summaryrefslogtreecommitdiff
path: root/src/pl/tcl/pltcl.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-07-20 05:16:59 +0000
committerBruce Momjian <bruce@momjian.us>2002-07-20 05:16:59 +0000
commitb0f5086e4133d1d8ec092799952dda65ebd717c8 (patch)
tree0f717342af7cce7896d40fdb34ccc572e435d499 /src/pl/tcl/pltcl.c
parent38dd3ae7d032eecc6ddadcbd402d90f6ac38f6a3 (diff)
downloadpostgresql-b0f5086e4133d1d8ec092799952dda65ebd717c8.tar.gz
oid is needed, it is added at the end of the struct (after the null
bitmap, if present). Per Tom Lane's suggestion the information whether a tuple has an oid or not is carried in the tuple descriptor. For debugging reasons tdhasoid is of type char, not bool. There are predefined values for WITHOID, WITHOUTOID and UNDEFOID. This patch has been generated against a cvs snapshot from last week and I don't expect it to apply cleanly to current sources. While I post it here for public review, I'm working on a new version against a current snapshot. (There's been heavy activity recently; hope to catch up some day ...) This is a long patch; if it is too hard to swallow, I can provide it in smaller pieces: Part 1: Accessor macros Part 2: tdhasoid in TupDesc Part 3: Regression test Part 4: Parameter withoid to heap_addheader Part 5: Eliminate t_oid from HeapTupleHeader Part 2 is the most hairy part because of changes in the executor and even in the parser; the other parts are straightforward. Up to part 4 the patched postmaster stays binary compatible to databases created with an unpatched version. Part 5 is small (100 lines) and finally breaks compatibility. Manfred Koizar
Diffstat (limited to 'src/pl/tcl/pltcl.c')
-rw-r--r--src/pl/tcl/pltcl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 2888f4d9aa..6f2080b1a4 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.58 2002/07/18 05:07:30 ishii Exp $
+ * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.59 2002/07/20 05:16:59 momjian Exp $
*
**********************************************************************/
@@ -1743,7 +1743,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp,
{
/* XXX should extend this to allow qualified type names */
typeTup = typenameType(makeTypeName(args[i]));
- qdesc->argtypes[i] = typeTup->t_data->t_oid;
+ qdesc->argtypes[i] = HeapTupleGetOid(typeTup);
perm_fmgr_info(((Form_pg_type) GETSTRUCT(typeTup))->typinput,
&(qdesc->arginfuncs[i]));
qdesc->argtypelems[i] = ((Form_pg_type) GETSTRUCT(typeTup))->typelem;