summaryrefslogtreecommitdiff
path: root/src/backend/parser
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/backend/parser
parent38dd3ae7d032eecc6ddadcbd402d90f6ac38f6a3 (diff)
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/backend/parser')
-rw-r--r--src/backend/parser/parse_oper.c4
-rw-r--r--src/backend/parser/parse_type.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c
index 663e83831b3..78128b4f698 100644
--- a/src/backend/parser/parse_oper.c
+++ b/src/backend/parser/parse_oper.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.57 2002/06/20 20:29:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.58 2002/07/20 05:16:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -150,7 +150,7 @@ any_ordering_op(Oid argtype)
Oid
oprid(Operator op)
{
- return op->t_data->t_oid;
+ return HeapTupleGetOid(op);
}
/* given operator tuple, return the underlying function's OID */
diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c
index 14510a69b1b..7eafe3e7c84 100644
--- a/src/backend/parser/parse_type.c
+++ b/src/backend/parser/parse_type.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.44 2002/07/06 20:16:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.45 2002/07/20 05:16:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -283,7 +283,7 @@ typeTypeId(Type tp)
{
if (tp == NULL)
elog(ERROR, "typeTypeId() called with NULL type struct");
- return tp->t_data->t_oid;
+ return HeapTupleGetOid(tp);
}
/* given type (as type struct), return the length of type */