aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/heapam.h7
-rw-r--r--src/include/access/htup.h291
-rw-r--r--src/include/access/tupdesc.h16
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/pg_attribute.h490
-rw-r--r--src/include/catalog/pg_class.h4
-rw-r--r--src/include/catalog/pg_proc.h12
-rw-r--r--src/include/catalog/pg_type.h22
-rw-r--r--src/include/executor/executor.h6
-rw-r--r--src/include/executor/spi.h6
-rw-r--r--src/include/fmgr.h7
-rw-r--r--src/include/funcapi.h71
-rw-r--r--src/include/nodes/execnodes.h13
-rw-r--r--src/include/nodes/nodes.h3
-rw-r--r--src/include/nodes/primnodes.h7
-rw-r--r--src/include/utils/builtins.h12
-rw-r--r--src/include/utils/sets.h27
-rw-r--r--src/include/utils/typcache.h19
18 files changed, 549 insertions, 468 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index c6579ea2462..9f91d81107d 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.87 2004/03/11 01:47:41 ishii Exp $
+ * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.88 2004/04/01 21:28:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -111,11 +111,12 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
) \
: \
- heap_getsysattr((tup), (attnum), (isnull)) \
+ heap_getsysattr((tup), (attnum), (tupleDesc), (isnull)) \
) \
)
-extern Datum heap_getsysattr(HeapTuple tup, int attnum, bool *isnull);
+extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+ bool *isnull);
/* ----------------
diff --git a/src/include/access/htup.h b/src/include/access/htup.h
index a47e668f9b2..3d48b5f45a3 100644
--- a/src/include/access/htup.h
+++ b/src/include/access/htup.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.64 2004/01/16 20:51:30 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.65 2004/04/01 21:28:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,10 +47,19 @@
#define MaxHeapAttributeNumber 1600 /* 8 * 200 */
/*----------
- * On-disk heap tuple header. Currently this is also used as the header
- * format for tuples formed in memory, although in principle they could
- * be different. To avoid wasting space, the fields should be layed out
- * in such a way to avoid structure padding.
+ * Heap tuple header. To avoid wasting space, the fields should be
+ * layed out in such a way to avoid structure padding.
+ *
+ * Datums of composite types (row types) share the same general structure
+ * as on-disk tuples, so that the same routines can be used to build and
+ * examine them. However the requirements are slightly different: a Datum
+ * does not need any transaction visibility information, and it does need
+ * a length word and some embedded type information. We can achieve this
+ * by overlaying the xmin/cmin/xmax/cmax/xvac fields of a heap tuple
+ * with the fields needed in the Datum case. Typically, all tuples built
+ * in-memory will be initialized with the Datum fields; but when a tuple is
+ * about to be inserted in a table, the transaction fields will be filled,
+ * overwriting the datum fields.
*
* The overall structure of a heap tuple looks like:
* fixed fields (HeapTupleHeaderData struct)
@@ -96,7 +105,8 @@
* MAXALIGN.
*----------
*/
-typedef struct HeapTupleHeaderData
+
+typedef struct HeapTupleFields
{
TransactionId t_xmin; /* inserting xact ID */
@@ -111,6 +121,28 @@ typedef struct HeapTupleHeaderData
CommandId t_cmax; /* deleting command ID */
TransactionId t_xvac; /* VACUUM FULL xact ID */
} t_field3;
+} HeapTupleFields;
+
+typedef struct DatumTupleFields
+{
+ int32 datum_len; /* required to be a varlena type */
+
+ int32 datum_typmod; /* -1, or identifier of a record type */
+
+ Oid datum_typeid; /* composite type OID, or RECORDOID */
+ /*
+ * Note: field ordering is chosen with thought that Oid might someday
+ * widen to 64 bits.
+ */
+} DatumTupleFields;
+
+typedef struct HeapTupleHeaderData
+{
+ union
+ {
+ HeapTupleFields t_heap;
+ DatumTupleFields t_datum;
+ } t_choice;
ItemPointerData t_ctid; /* current TID of this or newer tuple */
@@ -169,31 +201,31 @@ typedef HeapTupleHeaderData *HeapTupleHeader;
#define HeapTupleHeaderGetXmin(tup) \
( \
- (tup)->t_xmin \
+ (tup)->t_choice.t_heap.t_xmin \
)
#define HeapTupleHeaderSetXmin(tup, xid) \
( \
- TransactionIdStore((xid), &(tup)->t_xmin) \
+ TransactionIdStore((xid), &(tup)->t_choice.t_heap.t_xmin) \
)
#define HeapTupleHeaderGetXmax(tup) \
( \
((tup)->t_infomask & HEAP_XMAX_IS_XMIN) ? \
- (tup)->t_xmin \
+ (tup)->t_choice.t_heap.t_xmin \
: \
- (tup)->t_field2.t_xmax \
+ (tup)->t_choice.t_heap.t_field2.t_xmax \
)
#define HeapTupleHeaderSetXmax(tup, xid) \
do { \
TransactionId _newxid = (xid); \
- if (TransactionIdEquals((tup)->t_xmin, _newxid)) \
+ if (TransactionIdEquals((tup)->t_choice.t_heap.t_xmin, _newxid)) \
(tup)->t_infomask |= HEAP_XMAX_IS_XMIN; \
else \
{ \
(tup)->t_infomask &= ~HEAP_XMAX_IS_XMIN; \
- TransactionIdStore(_newxid, &(tup)->t_field2.t_xmax); \
+ TransactionIdStore(_newxid, &(tup)->t_choice.t_heap.t_field2.t_xmax); \
} \
} while (0)
@@ -207,13 +239,13 @@ do { \
*/
#define HeapTupleHeaderGetCmin(tup) \
( \
- (tup)->t_field2.t_cmin \
+ (tup)->t_choice.t_heap.t_field2.t_cmin \
)
#define HeapTupleHeaderSetCmin(tup, cid) \
do { \
Assert((tup)->t_infomask & HEAP_XMAX_INVALID); \
- (tup)->t_field2.t_cmin = (cid); \
+ (tup)->t_choice.t_heap.t_field2.t_cmin = (cid); \
} while (0)
/*
@@ -222,19 +254,19 @@ do { \
*/
#define HeapTupleHeaderGetCmax(tup) \
( \
- (tup)->t_field3.t_cmax \
+ (tup)->t_choice.t_heap.t_field3.t_cmax \
)
#define HeapTupleHeaderSetCmax(tup, cid) \
do { \
Assert(!((tup)->t_infomask & HEAP_MOVED)); \
- (tup)->t_field3.t_cmax = (cid); \
+ (tup)->t_choice.t_heap.t_field3.t_cmax = (cid); \
} while (0)
#define HeapTupleHeaderGetXvac(tup) \
( \
((tup)->t_infomask & HEAP_MOVED) ? \
- (tup)->t_field3.t_xvac \
+ (tup)->t_choice.t_heap.t_field3.t_xvac \
: \
InvalidTransactionId \
)
@@ -242,9 +274,39 @@ do { \
#define HeapTupleHeaderSetXvac(tup, xid) \
do { \
Assert((tup)->t_infomask & HEAP_MOVED); \
- TransactionIdStore((xid), &(tup)->t_field3.t_xvac); \
+ TransactionIdStore((xid), &(tup)->t_choice.t_heap.t_field3.t_xvac); \
} while (0)
+#define HeapTupleHeaderGetDatumLength(tup) \
+( \
+ (tup)->t_choice.t_datum.datum_len \
+)
+
+#define HeapTupleHeaderSetDatumLength(tup, len) \
+( \
+ (tup)->t_choice.t_datum.datum_len = (len) \
+)
+
+#define HeapTupleHeaderGetTypeId(tup) \
+( \
+ (tup)->t_choice.t_datum.datum_typeid \
+)
+
+#define HeapTupleHeaderSetTypeId(tup, typeid) \
+( \
+ (tup)->t_choice.t_datum.datum_typeid = (typeid) \
+)
+
+#define HeapTupleHeaderGetTypMod(tup) \
+( \
+ (tup)->t_choice.t_datum.datum_typmod \
+)
+
+#define HeapTupleHeaderSetTypMod(tup, typmod) \
+( \
+ (tup)->t_choice.t_datum.datum_typmod = (typmod) \
+)
+
#define HeapTupleHeaderGetOid(tup) \
( \
((tup)->t_infomask & HEAP_HASOID) ? \
@@ -261,95 +323,10 @@ do { \
/*
- * WAL record definitions for heapam.c's WAL operations
- *
- * XLOG allows to store some information in high 4 bits of log
- * record xl_info field
- */
-#define XLOG_HEAP_INSERT 0x00
-#define XLOG_HEAP_DELETE 0x10
-#define XLOG_HEAP_UPDATE 0x20
-#define XLOG_HEAP_MOVE 0x30
-#define XLOG_HEAP_CLEAN 0x40
-#define XLOG_HEAP_OPMASK 0x70
-/*
- * When we insert 1st item on new page in INSERT/UPDATE
- * we can (and we do) restore entire page in redo
- */
-#define XLOG_HEAP_INIT_PAGE 0x80
-
-/*
- * All what we need to find changed tuple (14 bytes)
- *
- * NB: on most machines, sizeof(xl_heaptid) will include some trailing pad
- * bytes for alignment. We don't want to store the pad space in the XLOG,
- * so use SizeOfHeapTid for space calculations. Similar comments apply for
- * the other xl_FOO structs.
- */
-typedef struct xl_heaptid
-{
- RelFileNode node;
- ItemPointerData tid; /* changed tuple id */
-} xl_heaptid;
-
-#define SizeOfHeapTid (offsetof(xl_heaptid, tid) + SizeOfIptrData)
-
-/* This is what we need to know about delete */
-typedef struct xl_heap_delete
-{
- xl_heaptid target; /* deleted tuple id */
-} xl_heap_delete;
-
-#define SizeOfHeapDelete (offsetof(xl_heap_delete, target) + SizeOfHeapTid)
-
-/*
- * We don't store the whole fixed part (HeapTupleHeaderData) of an inserted
- * or updated tuple in WAL; we can save a few bytes by reconstructing the
- * fields that are available elsewhere in the WAL record, or perhaps just
- * plain needn't be reconstructed. These are the fields we must store.
- * NOTE: t_hoff could be recomputed, but we may as well store it because
- * it will come for free due to alignment considerations.
+ * BITMAPLEN(NATTS) -
+ * Computes size of null bitmap given number of data columns.
*/
-typedef struct xl_heap_header
-{
- int16 t_natts;
- uint16 t_infomask;
- uint8 t_hoff;
-} xl_heap_header;
-
-#define SizeOfHeapHeader (offsetof(xl_heap_header, t_hoff) + sizeof(uint8))
-
-/* This is what we need to know about insert */
-typedef struct xl_heap_insert
-{
- xl_heaptid target; /* inserted tuple id */
- /* xl_heap_header & TUPLE DATA FOLLOWS AT END OF STRUCT */
-} xl_heap_insert;
-
-#define SizeOfHeapInsert (offsetof(xl_heap_insert, target) + SizeOfHeapTid)
-
-/* This is what we need to know about update|move */
-typedef struct xl_heap_update
-{
- xl_heaptid target; /* deleted tuple id */
- ItemPointerData newtid; /* new inserted tuple id */
- /* NEW TUPLE xl_heap_header (PLUS xmax & xmin IF MOVE OP) */
- /* and TUPLE DATA FOLLOWS AT END OF STRUCT */
-} xl_heap_update;
-
-#define SizeOfHeapUpdate (offsetof(xl_heap_update, newtid) + SizeOfIptrData)
-
-/* This is what we need to know about page cleanup */
-typedef struct xl_heap_clean
-{
- RelFileNode node;
- BlockNumber block;
- /* UNUSED OFFSET NUMBERS FOLLOW AT THE END */
-} xl_heap_clean;
-
-#define SizeOfHeapClean (offsetof(xl_heap_clean, block) + sizeof(BlockNumber))
-
-
+#define BITMAPLEN(NATTS) (((int)(NATTS) + 7) / 8)
/*
* MaxTupleSize is the maximum allowed size of a tuple, including header and
@@ -388,6 +365,7 @@ typedef struct xl_heap_clean
#define TableOidAttributeNumber (-7)
#define FirstLowInvalidHeapAttributeNumber (-8)
+
/*
* HeapTupleData is an in-memory data structure that points to a tuple.
*
@@ -417,22 +395,13 @@ typedef HeapTupleData *HeapTuple;
#define HEAPTUPLESIZE MAXALIGN(sizeof(HeapTupleData))
-
/*
* GETSTRUCT - given a HeapTuple pointer, return address of the user data
*/
#define GETSTRUCT(TUP) ((char *) ((TUP)->t_data) + (TUP)->t_data->t_hoff)
-
/*
- * BITMAPLEN(NATTS) -
- * Computes size of null bitmap given number of data columns.
- */
-#define BITMAPLEN(NATTS) (((int)(NATTS) + 7) / 8)
-
-/*
- * HeapTupleIsValid
- * True iff the heap tuple is valid.
+ * Accessor macros to be used with HeapTuple pointers.
*/
#define HeapTupleIsValid(tuple) PointerIsValid(tuple)
@@ -463,4 +432,94 @@ typedef HeapTupleData *HeapTuple;
#define HeapTupleSetOid(tuple, oid) \
HeapTupleHeaderSetOid((tuple)->t_data, (oid))
+
+/*
+ * WAL record definitions for heapam.c's WAL operations
+ *
+ * XLOG allows to store some information in high 4 bits of log
+ * record xl_info field
+ */
+#define XLOG_HEAP_INSERT 0x00
+#define XLOG_HEAP_DELETE 0x10
+#define XLOG_HEAP_UPDATE 0x20
+#define XLOG_HEAP_MOVE 0x30
+#define XLOG_HEAP_CLEAN 0x40
+#define XLOG_HEAP_OPMASK 0x70
+/*
+ * When we insert 1st item on new page in INSERT/UPDATE
+ * we can (and we do) restore entire page in redo
+ */
+#define XLOG_HEAP_INIT_PAGE 0x80
+
+/*
+ * All what we need to find changed tuple (14 bytes)
+ *
+ * NB: on most machines, sizeof(xl_heaptid) will include some trailing pad
+ * bytes for alignment. We don't want to store the pad space in the XLOG,
+ * so use SizeOfHeapTid for space calculations. Similar comments apply for
+ * the other xl_FOO structs.
+ */
+typedef struct xl_heaptid
+{
+ RelFileNode node;
+ ItemPointerData tid; /* changed tuple id */
+} xl_heaptid;
+
+#define SizeOfHeapTid (offsetof(xl_heaptid, tid) + SizeOfIptrData)
+
+/* This is what we need to know about delete */
+typedef struct xl_heap_delete
+{
+ xl_heaptid target; /* deleted tuple id */
+} xl_heap_delete;
+
+#define SizeOfHeapDelete (offsetof(xl_heap_delete, target) + SizeOfHeapTid)
+
+/*
+ * We don't store the whole fixed part (HeapTupleHeaderData) of an inserted
+ * or updated tuple in WAL; we can save a few bytes by reconstructing the
+ * fields that are available elsewhere in the WAL record, or perhaps just
+ * plain needn't be reconstructed. These are the fields we must store.
+ * NOTE: t_hoff could be recomputed, but we may as well store it because
+ * it will come for free due to alignment considerations.
+ */
+typedef struct xl_heap_header
+{
+ int16 t_natts;
+ uint16 t_infomask;
+ uint8 t_hoff;
+} xl_heap_header;
+
+#define SizeOfHeapHeader (offsetof(xl_heap_header, t_hoff) + sizeof(uint8))
+
+/* This is what we need to know about insert */
+typedef struct xl_heap_insert
+{
+ xl_heaptid target; /* inserted tuple id */
+ /* xl_heap_header & TUPLE DATA FOLLOWS AT END OF STRUCT */
+} xl_heap_insert;
+
+#define SizeOfHeapInsert (offsetof(xl_heap_insert, target) + SizeOfHeapTid)
+
+/* This is what we need to know about update|move */
+typedef struct xl_heap_update
+{
+ xl_heaptid target; /* deleted tuple id */
+ ItemPointerData newtid; /* new inserted tuple id */
+ /* NEW TUPLE xl_heap_header (PLUS xmax & xmin IF MOVE OP) */
+ /* and TUPLE DATA FOLLOWS AT END OF STRUCT */
+} xl_heap_update;
+
+#define SizeOfHeapUpdate (offsetof(xl_heap_update, newtid) + SizeOfIptrData)
+
+/* This is what we need to know about page cleanup */
+typedef struct xl_heap_clean
+{
+ RelFileNode node;
+ BlockNumber block;
+ /* UNUSED OFFSET NUMBERS FOLLOW AT THE END */
+} xl_heap_clean;
+
+#define SizeOfHeapClean (offsetof(xl_heap_clean, block) + sizeof(BlockNumber))
+
#endif /* HTUP_H */
diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h
index bf4e3aa1055..c7e560c0c65 100644
--- a/src/include/access/tupdesc.h
+++ b/src/include/access/tupdesc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/tupdesc.h,v 1.42 2003/11/29 22:40:55 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/access/tupdesc.h,v 1.43 2004/04/01 21:28:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,6 +44,15 @@ typedef struct tupleConstr
/*
* This structure contains all information (i.e. from Classes
* pg_attribute, pg_attrdef, pg_constraint) for the structure of a tuple.
+ *
+ * Note that only user attributes, not system attributes, are mentioned in
+ * TupleDesc; with the exception that tdhasoid indicates if OID is present.
+ *
+ * If the tuple is known to correspond to a named rowtype (such as a table's
+ * rowtype) then tdtypeid identifies that type and tdtypmod is -1. Otherwise
+ * tdtypeid is RECORDOID, and tdtypmod can be either -1 for a fully anonymous
+ * row type, or a value >= 0 to allow the rowtype to be looked up in the
+ * typcache.c type cache.
*/
typedef struct tupleDesc
{
@@ -51,6 +60,8 @@ typedef struct tupleDesc
Form_pg_attribute *attrs;
/* attrs[N] is a pointer to the description of Attribute Number N+1. */
TupleConstr *constr;
+ Oid tdtypeid; /* composite type ID for tuple type */
+ int32 tdtypmod; /* typmod for tuple type */
bool tdhasoid; /* Tuple has oid attribute in its header */
} *TupleDesc;
@@ -73,8 +84,7 @@ extern void TupleDescInitEntry(TupleDesc desc,
const char *attributeName,
Oid oidtypeid,
int32 typmod,
- int attdim,
- bool attisset);
+ int attdim);
extern TupleDesc BuildDescForRelation(List *schema);
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 5344d7afe86..82900e55f34 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.222 2004/03/22 01:38:17 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.223 2004/04/01 21:28:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200403211
+#define CATALOG_VERSION_NO 200403291
#endif
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index 754878f0148..896a06ada86 100644
--- a/src/include/catalog/pg_attribute.h
+++ b/src/include/catalog/pg_attribute.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_attribute.h,v 1.108 2004/02/12 23:41:04 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_attribute.h,v 1.109 2004/04/01 21:28:45 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -129,9 +129,6 @@ CATALOG(pg_attribute) BOOTSTRAP BKI_WITHOUT_OIDS
*/
char attstorage;
- /* This flag indicates that the attribute is really a set */
- bool attisset;
-
/*
* attalign is a copy of the typalign field from pg_type for this
* attribute. See atttypid comments above.
@@ -174,7 +171,7 @@ typedef FormData_pg_attribute *Form_pg_attribute;
* ----------------
*/
-#define Natts_pg_attribute 18
+#define Natts_pg_attribute 17
#define Anum_pg_attribute_attrelid 1
#define Anum_pg_attribute_attname 2
#define Anum_pg_attribute_atttypid 3
@@ -186,13 +183,12 @@ typedef FormData_pg_attribute *Form_pg_attribute;
#define Anum_pg_attribute_atttypmod 9
#define Anum_pg_attribute_attbyval 10
#define Anum_pg_attribute_attstorage 11
-#define Anum_pg_attribute_attisset 12
-#define Anum_pg_attribute_attalign 13
-#define Anum_pg_attribute_attnotnull 14
-#define Anum_pg_attribute_atthasdef 15
-#define Anum_pg_attribute_attisdropped 16
-#define Anum_pg_attribute_attislocal 17
-#define Anum_pg_attribute_attinhcount 18
+#define Anum_pg_attribute_attalign 12
+#define Anum_pg_attribute_attnotnull 13
+#define Anum_pg_attribute_atthasdef 14
+#define Anum_pg_attribute_attisdropped 15
+#define Anum_pg_attribute_attislocal 16
+#define Anum_pg_attribute_attinhcount 17
@@ -226,278 +222,276 @@ typedef FormData_pg_attribute *Form_pg_attribute;
* ----------------
*/
#define Schema_pg_type \
-{ 1247, {"typname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typowner"}, 23, -1, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typlen"}, 21, -1, 2, 4, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1247, {"typbyval"}, 16, -1, 1, 5, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1247, {"typtype"}, 18, -1, 1, 6, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1247, {"typisdefined"}, 16, -1, 1, 7, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1247, {"typdelim"}, 18, -1, 1, 8, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1247, {"typrelid"}, 26, -1, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typelem"}, 26, -1, 4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typinput"}, 24, -1, 4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typoutput"}, 24, -1, 4, 12, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typreceive"}, 24, -1, 4, 13, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typsend"}, 24, -1, 4, 14, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typanalyze"}, 24, -1, 4, 15, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typalign"}, 18, -1, 1, 16, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1247, {"typstorage"}, 18, -1, 1, 17, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1247, {"typnotnull"}, 16, -1, 1, 18, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1247, {"typbasetype"}, 26, -1, 4, 19, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typtypmod"}, 23, -1, 4, 20, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typndims"}, 23, -1, 4, 21, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1247, {"typdefaultbin"}, 25, -1, -1, 22, 0, -1, -1, false, 'x', false, 'i', false, false, false, true, 0 }, \
-{ 1247, {"typdefault"}, 25, -1, -1, 23, 0, -1, -1, false, 'x', false, 'i', false, false, false, true, 0 }
-
-
-DATA(insert ( 1247 typname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1247 typnamespace 26 -1 4 2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typowner 23 -1 4 3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typlen 21 -1 2 4 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1247 typbyval 16 -1 1 5 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1247 typtype 18 -1 1 6 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1247 typisdefined 16 -1 1 7 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1247 typdelim 18 -1 1 8 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1247 typrelid 26 -1 4 9 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typelem 26 -1 4 10 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typinput 24 -1 4 11 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typoutput 24 -1 4 12 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typreceive 24 -1 4 13 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typsend 24 -1 4 14 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typanalyze 24 -1 4 15 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typalign 18 -1 1 16 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1247 typstorage 18 -1 1 17 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1247 typnotnull 16 -1 1 18 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1247 typbasetype 26 -1 4 19 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typtypmod 23 -1 4 20 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typndims 23 -1 4 21 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 typdefaultbin 25 -1 -1 22 0 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1247 typdefault 25 -1 -1 23 0 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1247 ctid 27 0 6 -1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1247 oid 26 0 4 -2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 xmin 28 0 4 -3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 cmin 29 0 4 -4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 xmax 28 0 4 -5 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 cmax 29 0 4 -6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1247 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f t 0));
+{ 1247, {"typname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typowner"}, 23, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typlen"}, 21, -1, 2, 4, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1247, {"typbyval"}, 16, -1, 1, 5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1247, {"typtype"}, 18, -1, 1, 6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1247, {"typisdefined"}, 16, -1, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1247, {"typdelim"}, 18, -1, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1247, {"typrelid"}, 26, -1, 4, 9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typelem"}, 26, -1, 4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typinput"}, 24, -1, 4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typoutput"}, 24, -1, 4, 12, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typreceive"}, 24, -1, 4, 13, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typsend"}, 24, -1, 4, 14, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typanalyze"}, 24, -1, 4, 15, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typalign"}, 18, -1, 1, 16, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1247, {"typstorage"}, 18, -1, 1, 17, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1247, {"typnotnull"}, 16, -1, 1, 18, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1247, {"typbasetype"}, 26, -1, 4, 19, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typtypmod"}, 23, -1, 4, 20, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typndims"}, 23, -1, 4, 21, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1247, {"typdefaultbin"}, 25, -1, -1, 22, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0 }, \
+{ 1247, {"typdefault"}, 25, -1, -1, 23, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0 }
+
+
+DATA(insert ( 1247 typname 19 -1 NAMEDATALEN 1 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1247 typnamespace 26 -1 4 2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typowner 23 -1 4 3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typlen 21 -1 2 4 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1247 typbyval 16 -1 1 5 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1247 typtype 18 -1 1 6 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1247 typisdefined 16 -1 1 7 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1247 typdelim 18 -1 1 8 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1247 typrelid 26 -1 4 9 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typelem 26 -1 4 10 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typinput 24 -1 4 11 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typoutput 24 -1 4 12 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typreceive 24 -1 4 13 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typsend 24 -1 4 14 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typanalyze 24 -1 4 15 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typalign 18 -1 1 16 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1247 typstorage 18 -1 1 17 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1247 typnotnull 16 -1 1 18 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1247 typbasetype 26 -1 4 19 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typtypmod 23 -1 4 20 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typndims 23 -1 4 21 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 typdefaultbin 25 -1 -1 22 0 -1 -1 f x i f f f t 0));
+DATA(insert ( 1247 typdefault 25 -1 -1 23 0 -1 -1 f x i f f f t 0));
+DATA(insert ( 1247 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0));
+DATA(insert ( 1247 oid 26 0 4 -2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1247 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0));
/* ----------------
* pg_database
* ----------------
*/
-DATA(insert ( 1262 datname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1262 datdba 23 -1 4 2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 encoding 23 -1 4 3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 datistemplate 16 -1 1 4 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1262 datallowconn 16 -1 1 5 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1262 datlastsysoid 26 -1 4 6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 datvacuumxid 28 -1 4 7 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 datfrozenxid 28 -1 4 8 0 -1 -1 t p f i t f f t 0));
+DATA(insert ( 1262 datname 19 -1 NAMEDATALEN 1 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1262 datdba 23 -1 4 2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 encoding 23 -1 4 3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 datistemplate 16 -1 1 4 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1262 datallowconn 16 -1 1 5 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1262 datlastsysoid 26 -1 4 6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 datvacuumxid 28 -1 4 7 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 datfrozenxid 28 -1 4 8 0 -1 -1 t p i t f f t 0));
/* do not mark datpath as toastable; GetRawDatabaseInfo won't cope */
-DATA(insert ( 1262 datpath 25 -1 -1 9 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1262 datconfig 1009 -1 -1 10 1 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1262 datacl 1034 -1 -1 11 1 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1262 ctid 27 0 6 -1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1262 oid 26 0 4 -2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 xmin 28 0 4 -3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 cmin 29 0 4 -4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 xmax 28 0 4 -5 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 cmax 29 0 4 -6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1262 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f t 0));
+DATA(insert ( 1262 datpath 25 -1 -1 9 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1262 datconfig 1009 -1 -1 10 1 -1 -1 f x i f f f t 0));
+DATA(insert ( 1262 datacl 1034 -1 -1 11 1 -1 -1 f x i f f f t 0));
+DATA(insert ( 1262 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0));
+DATA(insert ( 1262 oid 26 0 4 -2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1262 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0));
/* ----------------
* pg_proc
* ----------------
*/
#define Schema_pg_proc \
-{ 1255, {"proname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1255, {"pronamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1255, {"proowner"}, 23, -1, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1255, {"prolang"}, 26, -1, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1255, {"proisagg"}, 16, -1, 1, 5, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1255, {"prosecdef"}, 16, -1, 1, 6, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1255, {"proisstrict"}, 16, -1, 1, 7, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1255, {"proretset"}, 16, -1, 1, 8, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1255, {"provolatile"}, 18, -1, 1, 9, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1255, {"pronargs"}, 21, -1, 2, 10, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1255, {"prorettype"}, 26, -1, 4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1255, {"proargtypes"}, 30, -1, INDEX_MAX_KEYS*4, 12, 0, -1, -1, false, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1255, {"proargnames"}, 1009, -1, -1, 13, 1, -1, -1, false, 'x', false, 'i', false, false, false, true, 0 }, \
-{ 1255, {"prosrc"}, 25, -1, -1, 14, 0, -1, -1, false, 'x', false, 'i', false, false, false, true, 0 }, \
-{ 1255, {"probin"}, 17, -1, -1, 15, 0, -1, -1, false, 'x', false, 'i', false, false, false, true, 0 }, \
-{ 1255, {"proacl"}, 1034, -1, -1, 16, 1, -1, -1, false, 'x', false, 'i', false, false, false, true, 0 }
-
-DATA(insert ( 1255 proname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1255 pronamespace 26 -1 4 2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 proowner 23 -1 4 3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 prolang 26 -1 4 4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 proisagg 16 -1 1 5 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1255 prosecdef 16 -1 1 6 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1255 proisstrict 16 -1 1 7 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1255 proretset 16 -1 1 8 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1255 provolatile 18 -1 1 9 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1255 pronargs 21 -1 2 10 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1255 prorettype 26 -1 4 11 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 proargtypes 30 -1 INDEX_MAX_KEYS*4 12 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1255 proargnames 1009 -1 -1 13 1 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1255 prosrc 25 -1 -1 14 0 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1255 probin 17 -1 -1 15 0 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1255 proacl 1034 -1 -1 16 1 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1255 ctid 27 0 6 -1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1255 oid 26 0 4 -2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 xmin 28 0 4 -3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 cmin 29 0 4 -4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 xmax 28 0 4 -5 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 cmax 29 0 4 -6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1255 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f t 0));
+{ 1255, {"proname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
+{ 1255, {"pronamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1255, {"proowner"}, 23, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1255, {"prolang"}, 26, -1, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1255, {"proisagg"}, 16, -1, 1, 5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1255, {"prosecdef"}, 16, -1, 1, 6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1255, {"proisstrict"}, 16, -1, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1255, {"proretset"}, 16, -1, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1255, {"provolatile"}, 18, -1, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1255, {"pronargs"}, 21, -1, 2, 10, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1255, {"prorettype"}, 26, -1, 4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1255, {"proargtypes"}, 30, -1, INDEX_MAX_KEYS*4, 12, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
+{ 1255, {"proargnames"}, 1009, -1, -1, 13, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0 }, \
+{ 1255, {"prosrc"}, 25, -1, -1, 14, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0 }, \
+{ 1255, {"probin"}, 17, -1, -1, 15, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0 }, \
+{ 1255, {"proacl"}, 1034, -1, -1, 16, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0 }
+
+DATA(insert ( 1255 proname 19 -1 NAMEDATALEN 1 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1255 pronamespace 26 -1 4 2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 proowner 23 -1 4 3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 prolang 26 -1 4 4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 proisagg 16 -1 1 5 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1255 prosecdef 16 -1 1 6 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1255 proisstrict 16 -1 1 7 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1255 proretset 16 -1 1 8 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1255 provolatile 18 -1 1 9 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1255 pronargs 21 -1 2 10 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1255 prorettype 26 -1 4 11 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 proargtypes 30 -1 INDEX_MAX_KEYS*4 12 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1255 proargnames 1009 -1 -1 13 1 -1 -1 f x i f f f t 0));
+DATA(insert ( 1255 prosrc 25 -1 -1 14 0 -1 -1 f x i f f f t 0));
+DATA(insert ( 1255 probin 17 -1 -1 15 0 -1 -1 f x i f f f t 0));
+DATA(insert ( 1255 proacl 1034 -1 -1 16 1 -1 -1 f x i f f f t 0));
+DATA(insert ( 1255 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0));
+DATA(insert ( 1255 oid 26 0 4 -2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1255 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0));
/* ----------------
* pg_shadow
* ----------------
*/
-DATA(insert ( 1260 usename 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1260 usesysid 23 -1 4 2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1260 usecreatedb 16 -1 1 3 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1260 usesuper 16 -1 1 4 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1260 usecatupd 16 -1 1 5 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1260 passwd 25 -1 -1 6 0 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1260 valuntil 702 -1 4 7 0 -1 -1 t p f i f f f t 0));
-DATA(insert ( 1260 useconfig 1009 -1 -1 8 1 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1260 ctid 27 0 6 -1 0 -1 -1 f p f i t f f t 0));
+DATA(insert ( 1260 usename 19 -1 NAMEDATALEN 1 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1260 usesysid 23 -1 4 2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1260 usecreatedb 16 -1 1 3 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1260 usesuper 16 -1 1 4 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1260 usecatupd 16 -1 1 5 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1260 passwd 25 -1 -1 6 0 -1 -1 f x i f f f t 0));
+DATA(insert ( 1260 valuntil 702 -1 4 7 0 -1 -1 t p i f f f t 0));
+DATA(insert ( 1260 useconfig 1009 -1 -1 8 1 -1 -1 f x i f f f t 0));
+DATA(insert ( 1260 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0));
/* no OIDs in pg_shadow */
-DATA(insert ( 1260 xmin 28 0 4 -3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1260 cmin 29 0 4 -4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1260 xmax 28 0 4 -5 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1260 cmax 29 0 4 -6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1260 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f t 0));
+DATA(insert ( 1260 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1260 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1260 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1260 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1260 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0));
/* ----------------
* pg_group
* ----------------
*/
-DATA(insert ( 1261 groname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1261 grosysid 23 -1 4 2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1261 grolist 1007 -1 -1 3 1 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1261 ctid 27 0 6 -1 0 -1 -1 f p f i t f f t 0));
+DATA(insert ( 1261 groname 19 -1 NAMEDATALEN 1 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1261 grosysid 23 -1 4 2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1261 grolist 1007 -1 -1 3 1 -1 -1 f x i f f f t 0));
+DATA(insert ( 1261 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0));
/* no OIDs in pg_group */
-DATA(insert ( 1261 xmin 28 0 4 -3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1261 cmin 29 0 4 -4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1261 xmax 28 0 4 -5 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1261 cmax 29 0 4 -6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1261 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f t 0));
+DATA(insert ( 1261 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1261 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1261 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1261 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1261 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0));
/* ----------------
* pg_attribute
* ----------------
*/
#define Schema_pg_attribute \
-{ 1249, {"attrelid"}, 26, -1, 4, 1, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1249, {"attname"}, 19, -1, NAMEDATALEN, 2, 0, -1, -1, false, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1249, {"atttypid"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1249, {"attstattarget"}, 23, -1, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1249, {"attlen"}, 21, -1, 2, 5, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1249, {"attnum"}, 21, -1, 2, 6, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1249, {"attndims"}, 23, -1, 4, 7, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1249, {"attcacheoff"}, 23, -1, 4, 8, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1249, {"atttypmod"}, 23, -1, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1249, {"attbyval"}, 16, -1, 1, 10, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1249, {"attstorage"}, 18, -1, 1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1249, {"attisset"}, 16, -1, 1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1249, {"attalign"}, 18, -1, 1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1249, {"attnotnull"}, 16, -1, 1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1249, {"atthasdef"}, 16, -1, 1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1249, {"attisdropped"}, 16, -1, 1, 16, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1249, {"attislocal"}, 16, -1, 1, 17, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1249, {"attinhcount"}, 23, -1, 4, 18, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }
-
-DATA(insert ( 1249 attrelid 26 -1 4 1 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 attname 19 -1 NAMEDATALEN 2 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1249 atttypid 26 -1 4 3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 attstattarget 23 -1 4 4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 attlen 21 -1 2 5 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1249 attnum 21 -1 2 6 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1249 attndims 23 -1 4 7 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 attcacheoff 23 -1 4 8 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 atttypmod 23 -1 4 9 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 attbyval 16 -1 1 10 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1249 attstorage 18 -1 1 11 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1249 attisset 16 -1 1 12 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1249 attalign 18 -1 1 13 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1249 attnotnull 16 -1 1 14 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1249 atthasdef 16 -1 1 15 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1249 attisdropped 16 -1 1 16 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1249 attislocal 16 -1 1 17 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1249 attinhcount 23 -1 4 18 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 ctid 27 0 6 -1 0 -1 -1 f p f i t f f t 0));
+{ 1249, {"attrelid"}, 26, -1, 4, 1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1249, {"attname"}, 19, -1, NAMEDATALEN, 2, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
+{ 1249, {"atttypid"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1249, {"attstattarget"}, 23, -1, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1249, {"attlen"}, 21, -1, 2, 5, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1249, {"attnum"}, 21, -1, 2, 6, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1249, {"attndims"}, 23, -1, 4, 7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1249, {"attcacheoff"}, 23, -1, 4, 8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1249, {"atttypmod"}, 23, -1, 4, 9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1249, {"attbyval"}, 16, -1, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1249, {"attstorage"}, 18, -1, 1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1249, {"attalign"}, 18, -1, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1249, {"attnotnull"}, 16, -1, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1249, {"atthasdef"}, 16, -1, 1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1249, {"attisdropped"}, 16, -1, 1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1249, {"attislocal"}, 16, -1, 1, 16, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1249, {"attinhcount"}, 23, -1, 4, 17, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }
+
+DATA(insert ( 1249 attrelid 26 -1 4 1 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 attname 19 -1 NAMEDATALEN 2 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1249 atttypid 26 -1 4 3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 attstattarget 23 -1 4 4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 attlen 21 -1 2 5 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1249 attnum 21 -1 2 6 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1249 attndims 23 -1 4 7 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 attcacheoff 23 -1 4 8 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 atttypmod 23 -1 4 9 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 attbyval 16 -1 1 10 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1249 attstorage 18 -1 1 11 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1249 attalign 18 -1 1 12 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1249 attnotnull 16 -1 1 13 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1249 atthasdef 16 -1 1 14 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1249 attisdropped 16 -1 1 15 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1249 attislocal 16 -1 1 16 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1249 attinhcount 23 -1 4 17 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0));
/* no OIDs in pg_attribute */
-DATA(insert ( 1249 xmin 28 0 4 -3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 cmin 29 0 4 -4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 xmax 28 0 4 -5 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 cmax 29 0 4 -6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1249 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f t 0));
+DATA(insert ( 1249 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1249 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0));
/* ----------------
* pg_class
* ----------------
*/
#define Schema_pg_class \
-{ 1259, {"relname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"relnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"reltype"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"relowner"}, 23, -1, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"relam"}, 26, -1, 4, 5, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"relfilenode"}, 26, -1, 4, 6, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"relpages"}, 23, -1, 4, 7, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"reltuples"}, 700, -1, 4, 8, 0, -1, -1, false, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"reltoastrelid"}, 26, -1, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"reltoastidxid"}, 26, -1, 4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false, true, 0 }, \
-{ 1259, {"relhasindex"}, 16, -1, 1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1259, {"relisshared"}, 16, -1, 1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1259, {"relkind"}, 18, -1, 1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1259, {"relnatts"}, 21, -1, 2, 14, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1259, {"relchecks"}, 21, -1, 2, 15, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1259, {"reltriggers"}, 21, -1, 2, 16, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1259, {"relukeys"}, 21, -1, 2, 17, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1259, {"relfkeys"}, 21, -1, 2, 18, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1259, {"relrefs"}, 21, -1, 2, 19, 0, -1, -1, true, 'p', false, 's', true, false, false, true, 0 }, \
-{ 1259, {"relhasoids"}, 16, -1, 1, 20, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1259, {"relhaspkey"}, 16, -1, 1, 21, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1259, {"relhasrules"}, 16, -1, 1, 22, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1259, {"relhassubclass"},16, -1, 1, 23, 0, -1, -1, true, 'p', false, 'c', true, false, false, true, 0 }, \
-{ 1259, {"relacl"}, 1034, -1, -1, 24, 1, -1, -1, false, 'x', false, 'i', false, false, false, true, 0 }
-
-DATA(insert ( 1259 relname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1259 relnamespace 26 -1 4 2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 reltype 26 -1 4 3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 relowner 23 -1 4 4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 relam 26 -1 4 5 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 relfilenode 26 -1 4 6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 relpages 23 -1 4 7 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 reltuples 700 -1 4 8 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1259 reltoastrelid 26 -1 4 9 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 reltoastidxid 26 -1 4 10 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 relhasindex 16 -1 1 11 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1259 relisshared 16 -1 1 12 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1259 relkind 18 -1 1 13 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1259 relnatts 21 -1 2 14 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1259 relchecks 21 -1 2 15 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1259 reltriggers 21 -1 2 16 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1259 relukeys 21 -1 2 17 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1259 relfkeys 21 -1 2 18 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1259 relrefs 21 -1 2 19 0 -1 -1 t p f s t f f t 0));
-DATA(insert ( 1259 relhasoids 16 -1 1 20 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1259 relhaspkey 16 -1 1 21 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1259 relhasrules 16 -1 1 22 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1259 relhassubclass 16 -1 1 23 0 -1 -1 t p f c t f f t 0));
-DATA(insert ( 1259 relacl 1034 -1 -1 24 1 -1 -1 f x f i f f f t 0));
-DATA(insert ( 1259 ctid 27 0 6 -1 0 -1 -1 f p f i t f f t 0));
-DATA(insert ( 1259 oid 26 0 4 -2 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 xmin 28 0 4 -3 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 cmin 29 0 4 -4 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 xmax 28 0 4 -5 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 cmax 29 0 4 -6 0 -1 -1 t p f i t f f t 0));
-DATA(insert ( 1259 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f t 0));
+{ 1259, {"relname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"relnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"reltype"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"relowner"}, 23, -1, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"relam"}, 26, -1, 4, 5, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"relfilenode"}, 26, -1, 4, 6, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"relpages"}, 23, -1, 4, 7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"reltuples"}, 700, -1, 4, 8, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"reltoastrelid"}, 26, -1, 4, 9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"reltoastidxid"}, 26, -1, 4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
+{ 1259, {"relhasindex"}, 16, -1, 1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1259, {"relisshared"}, 16, -1, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1259, {"relkind"}, 18, -1, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1259, {"relnatts"}, 21, -1, 2, 14, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1259, {"relchecks"}, 21, -1, 2, 15, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1259, {"reltriggers"}, 21, -1, 2, 16, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1259, {"relukeys"}, 21, -1, 2, 17, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1259, {"relfkeys"}, 21, -1, 2, 18, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1259, {"relrefs"}, 21, -1, 2, 19, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
+{ 1259, {"relhasoids"}, 16, -1, 1, 20, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1259, {"relhaspkey"}, 16, -1, 1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1259, {"relhasrules"}, 16, -1, 1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1259, {"relhassubclass"},16, -1, 1, 23, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
+{ 1259, {"relacl"}, 1034, -1, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0 }
+
+DATA(insert ( 1259 relname 19 -1 NAMEDATALEN 1 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1259 relnamespace 26 -1 4 2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 reltype 26 -1 4 3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 relowner 23 -1 4 4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 relam 26 -1 4 5 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 relfilenode 26 -1 4 6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 relpages 23 -1 4 7 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 reltuples 700 -1 4 8 0 -1 -1 f p i t f f t 0));
+DATA(insert ( 1259 reltoastrelid 26 -1 4 9 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 reltoastidxid 26 -1 4 10 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 relhasindex 16 -1 1 11 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1259 relisshared 16 -1 1 12 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1259 relkind 18 -1 1 13 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1259 relnatts 21 -1 2 14 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1259 relchecks 21 -1 2 15 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1259 reltriggers 21 -1 2 16 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1259 relukeys 21 -1 2 17 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1259 relfkeys 21 -1 2 18 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1259 relrefs 21 -1 2 19 0 -1 -1 t p s t f f t 0));
+DATA(insert ( 1259 relhasoids 16 -1 1 20 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1259 relhaspkey 16 -1 1 21 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1259 relhasrules 16 -1 1 22 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1259 relhassubclass 16 -1 1 23 0 -1 -1 t p c t f f t 0));
+DATA(insert ( 1259 relacl 1034 -1 -1 24 1 -1 -1 f x i f f f t 0));
+DATA(insert ( 1259 ctid 27 0 6 -1 0 -1 -1 f p s t f f t 0));
+DATA(insert ( 1259 oid 26 0 4 -2 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 xmin 28 0 4 -3 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 cmin 29 0 4 -4 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 xmax 28 0 4 -5 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 cmax 29 0 4 -6 0 -1 -1 t p i t f f t 0));
+DATA(insert ( 1259 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0));
/* ----------------
* pg_xactlock - this is not a real relation, but is a placeholder
@@ -507,6 +501,6 @@ DATA(insert ( 1259 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f t 0));
* table; and this entry is just to link to that one.
* ----------------
*/
-DATA(insert ( 376 xactlockfoo 26 0 4 1 0 -1 -1 t p f i t f f t 0));
+DATA(insert ( 376 xactlockfoo 26 0 4 1 0 -1 -1 t p i t f f t 0));
#endif /* PG_ATTRIBUTE_H */
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index eafe5ceb328..8f044b0459a 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_class.h,v 1.80 2004/02/12 23:41:04 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_class.h,v 1.81 2004/04/01 21:28:45 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -136,7 +136,7 @@ typedef FormData_pg_class *Form_pg_class;
DATA(insert OID = 1247 ( pg_type PGNSP 71 PGUID 0 1247 0 0 0 0 f f r 23 0 0 0 0 0 t f f f _null_ ));
DESCR("");
-DATA(insert OID = 1249 ( pg_attribute PGNSP 75 PGUID 0 1249 0 0 0 0 f f r 18 0 0 0 0 0 f f f f _null_ ));
+DATA(insert OID = 1249 ( pg_attribute PGNSP 75 PGUID 0 1249 0 0 0 0 f f r 17 0 0 0 0 0 f f f f _null_ ));
DESCR("");
DATA(insert OID = 1255 ( pg_proc PGNSP 81 PGUID 0 1255 0 0 0 0 f f r 16 0 0 0 0 0 t f f f _null_ ));
DESCR("");
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 739e1b0da64..7da13b33c90 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.322 2004/03/22 01:38:18 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.323 2004/04/01 21:28:45 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -1334,8 +1334,6 @@ DATA(insert OID = 1062 ( aclitemeq PGNSP PGUID 12 f f t f i 2 16 "1033 1033
DESCR("equality operator for ACL items");
DATA(insert OID = 1365 ( makeaclitem PGNSP PGUID 12 f f t f i 5 1033 "23 23 23 25 16" _null_ makeaclitem - _null_ ));
DESCR("make ACL item");
-DATA(insert OID = 1038 ( seteval PGNSP PGUID 12 f f t t v 1 23 "26" _null_ seteval - _null_ ));
-DESCR("internal function supporting PostQuel-style sets");
DATA(insert OID = 1044 ( bpcharin PGNSP PGUID 12 f f t f i 3 1042 "2275 26 23" _null_ bpcharin - _null_ ));
DESCR("I/O");
DATA(insert OID = 1045 ( bpcharout PGNSP PGUID 12 f f t f i 1 2275 "1042" _null_ bpcharout - _null_ ));
@@ -3155,9 +3153,9 @@ DATA(insert OID = 2273 ( has_schema_privilege PGNSP PGUID 12 f f t f s 2 16
DESCR("current user privilege on schema by schema oid");
-DATA(insert OID = 2290 ( record_in PGNSP PGUID 12 f f t f i 1 2249 "2275" _null_ record_in - _null_ ));
+DATA(insert OID = 2290 ( record_in PGNSP PGUID 12 f f t f v 1 2249 "2275" _null_ record_in - _null_ ));
DESCR("I/O");
-DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 f f t f i 1 2275 "2249" _null_ record_out - _null_ ));
+DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 f f t f v 1 2275 "2249" _null_ record_out - _null_ ));
DESCR("I/O");
DATA(insert OID = 2292 ( cstring_in PGNSP PGUID 12 f f t f i 1 2275 "2275" _null_ cstring_in - _null_ ));
DESCR("I/O");
@@ -3298,9 +3296,9 @@ DATA(insert OID = 2400 ( array_recv PGNSP PGUID 12 f f t f s 2 2277 "2281 2
DESCR("I/O");
DATA(insert OID = 2401 ( array_send PGNSP PGUID 12 f f t f s 2 17 "2277 26" _null_ array_send - _null_ ));
DESCR("I/O");
-DATA(insert OID = 2402 ( record_recv PGNSP PGUID 12 f f t f i 1 2249 "2281" _null_ record_recv - _null_ ));
+DATA(insert OID = 2402 ( record_recv PGNSP PGUID 12 f f t f v 1 2249 "2281" _null_ record_recv - _null_ ));
DESCR("I/O");
-DATA(insert OID = 2403 ( record_send PGNSP PGUID 12 f f t f i 1 17 "2249" _null_ record_send - _null_ ));
+DATA(insert OID = 2403 ( record_send PGNSP PGUID 12 f f t f v 1 17 "2249" _null_ record_send - _null_ ));
DESCR("I/O");
DATA(insert OID = 2404 ( int2recv PGNSP PGUID 12 f f t f i 1 21 "2281" _null_ int2recv - _null_ ));
DESCR("I/O");
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 8cbc0aa8e67..9f68e22fdb8 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.151 2004/03/19 18:58:07 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.152 2004/04/01 21:28:45 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -268,7 +268,7 @@ DATA(insert OID = 21 ( int2 PGNSP PGUID 2 t b t \054 0 0 int2in int2out int2
DESCR("-32 thousand to 32 thousand, 2-byte storage");
#define INT2OID 21
-DATA(insert OID = 22 ( int2vector PGNSP PGUID INDEX_MAX_KEYS*2 f b t \054 0 21 int2vectorin int2vectorout int2vectorrecv int2vectorsend - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 22 ( int2vector PGNSP PGUID INDEX_MAX_KEYS*2 f b t \054 0 21 int2vectorin int2vectorout int2vectorrecv int2vectorsend - s p f 0 -1 0 _null_ _null_ ));
DESCR("array of INDEX_MAX_KEYS int2 integers, used in system tables");
#define INT2VECTOROID 22
@@ -288,7 +288,7 @@ DATA(insert OID = 26 ( oid PGNSP PGUID 4 t b t \054 0 0 oidin oidout oidrec
DESCR("object identifier(oid), maximum 4 billion");
#define OIDOID 26
-DATA(insert OID = 27 ( tid PGNSP PGUID 6 f b t \054 0 0 tidin tidout tidrecv tidsend - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 27 ( tid PGNSP PGUID 6 f b t \054 0 0 tidin tidout tidrecv tidsend - s p f 0 -1 0 _null_ _null_ ));
DESCR("(Block, offset), physical location of tuple");
#define TIDOID 27
@@ -307,13 +307,13 @@ DESCR("array of INDEX_MAX_KEYS oids, used in system tables");
DATA(insert OID = 32 ( SET PGNSP PGUID -1 f b t \054 0 0 unknownin unknownout - - - i p f 0 -1 0 _null_ _null_ ));
DESCR("set of tuples");
-DATA(insert OID = 71 ( pg_type PGNSP PGUID 4 t c t \054 1247 0 record_in record_out record_recv record_send - i p f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 75 ( pg_attribute PGNSP PGUID 4 t c t \054 1249 0 record_in record_out record_recv record_send - i p f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 81 ( pg_proc PGNSP PGUID 4 t c t \054 1255 0 record_in record_out record_recv record_send - i p f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 83 ( pg_class PGNSP PGUID 4 t c t \054 1259 0 record_in record_out record_recv record_send - i p f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 86 ( pg_shadow PGNSP PGUID 4 t c t \054 1260 0 record_in record_out record_recv record_send - i p f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 87 ( pg_group PGNSP PGUID 4 t c t \054 1261 0 record_in record_out record_recv record_send - i p f 0 -1 0 _null_ _null_ ));
-DATA(insert OID = 88 ( pg_database PGNSP PGUID 4 t c t \054 1262 0 record_in record_out record_recv record_send - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 71 ( pg_type PGNSP PGUID -1 f c t \054 1247 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 75 ( pg_attribute PGNSP PGUID -1 f c t \054 1249 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 81 ( pg_proc PGNSP PGUID -1 f c t \054 1255 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 83 ( pg_class PGNSP PGUID -1 f c t \054 1259 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 86 ( pg_shadow PGNSP PGUID -1 f c t \054 1260 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 87 ( pg_group PGNSP PGUID -1 f c t \054 1261 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 88 ( pg_database PGNSP PGUID -1 f c t \054 1262 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
/* OIDS 100 - 199 */
@@ -526,7 +526,7 @@ DATA(insert OID = 2211 ( _regtype PGNSP PGUID -1 f b t \054 0 2206 array_in a
* argument and result types (if supported by the function's implementation
* language).
*/
-DATA(insert OID = 2249 ( record PGNSP PGUID 4 t p t \054 0 0 record_in record_out record_recv record_send - i p f 0 -1 0 _null_ _null_ ));
+DATA(insert OID = 2249 ( record PGNSP PGUID -1 f p t \054 0 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
#define RECORDOID 2249
DATA(insert OID = 2275 ( cstring PGNSP PGUID -2 f p t \054 0 0 cstring_in cstring_out cstring_recv cstring_send - c p f 0 -1 0 _null_ _null_ ));
#define CSTRINGOID 2275
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index 1eb158440b1..a3088ca7f62 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.108 2004/03/17 01:02:24 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.109 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -120,9 +120,9 @@ extern void ExecEndNode(PlanState *node);
/*
* prototypes from functions in execQual.c
*/
-extern Datum GetAttributeByNum(TupleTableSlot *slot, AttrNumber attrno,
+extern Datum GetAttributeByNum(HeapTupleHeader tuple, AttrNumber attrno,
bool *isNull);
-extern Datum GetAttributeByName(TupleTableSlot *slot, char *attname,
+extern Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname,
bool *isNull);
extern void init_fcache(Oid foid, FuncExprState *fcache,
MemoryContext fcacheCxt);
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h
index ac2b494b532..2e477e70f87 100644
--- a/src/include/executor/spi.h
+++ b/src/include/executor/spi.h
@@ -2,7 +2,7 @@
*
* spi.h
*
- * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.43 2004/03/17 01:05:10 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.44 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -95,9 +95,7 @@ extern int SPI_getargcount(void *plan);
extern bool SPI_is_cursor_plan(void *plan);
extern HeapTuple SPI_copytuple(HeapTuple tuple);
-extern TupleDesc SPI_copytupledesc(TupleDesc tupdesc);
-extern TupleTableSlot *SPI_copytupleintoslot(HeapTuple tuple,
- TupleDesc tupdesc);
+extern HeapTupleHeader SPI_returntuple(HeapTuple tuple, TupleDesc tupdesc);
extern HeapTuple SPI_modifytuple(Relation rel, HeapTuple tuple, int natts,
int *attnum, Datum *Values, const char *Nulls);
extern int SPI_fnumber(TupleDesc tupdesc, const char *fname);
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 6ed389e8f95..acdcb4ff475 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/fmgr.h,v 1.33 2004/01/19 02:06:42 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/fmgr.h,v 1.34 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -192,11 +192,13 @@ extern struct varlena *pg_detoast_datum_slice(struct varlena * datum,
#define DatumGetTextP(X) ((text *) PG_DETOAST_DATUM(X))
#define DatumGetBpCharP(X) ((BpChar *) PG_DETOAST_DATUM(X))
#define DatumGetVarCharP(X) ((VarChar *) PG_DETOAST_DATUM(X))
+#define DatumGetHeapTupleHeader(X) ((HeapTupleHeader) PG_DETOAST_DATUM(X))
/* And we also offer variants that return an OK-to-write copy */
#define DatumGetByteaPCopy(X) ((bytea *) PG_DETOAST_DATUM_COPY(X))
#define DatumGetTextPCopy(X) ((text *) PG_DETOAST_DATUM_COPY(X))
#define DatumGetBpCharPCopy(X) ((BpChar *) PG_DETOAST_DATUM_COPY(X))
#define DatumGetVarCharPCopy(X) ((VarChar *) PG_DETOAST_DATUM_COPY(X))
+#define DatumGetHeapTupleHeaderCopy(X) ((HeapTupleHeader) PG_DETOAST_DATUM_COPY(X))
/* Variants which return n bytes starting at pos. m */
#define DatumGetByteaPSlice(X,m,n) ((bytea *) PG_DETOAST_DATUM_SLICE(X,m,n))
#define DatumGetTextPSlice(X,m,n) ((text *) PG_DETOAST_DATUM_SLICE(X,m,n))
@@ -207,11 +209,13 @@ extern struct varlena *pg_detoast_datum_slice(struct varlena * datum,
#define PG_GETARG_TEXT_P(n) DatumGetTextP(PG_GETARG_DATUM(n))
#define PG_GETARG_BPCHAR_P(n) DatumGetBpCharP(PG_GETARG_DATUM(n))
#define PG_GETARG_VARCHAR_P(n) DatumGetVarCharP(PG_GETARG_DATUM(n))
+#define PG_GETARG_HEAPTUPLEHEADER(n) DatumGetHeapTupleHeader(PG_GETARG_DATUM(n))
/* And we also offer variants that return an OK-to-write copy */
#define PG_GETARG_BYTEA_P_COPY(n) DatumGetByteaPCopy(PG_GETARG_DATUM(n))
#define PG_GETARG_TEXT_P_COPY(n) DatumGetTextPCopy(PG_GETARG_DATUM(n))
#define PG_GETARG_BPCHAR_P_COPY(n) DatumGetBpCharPCopy(PG_GETARG_DATUM(n))
#define PG_GETARG_VARCHAR_P_COPY(n) DatumGetVarCharPCopy(PG_GETARG_DATUM(n))
+#define PG_GETARG_HEAPTUPLEHEADER_COPY(n) DatumGetHeapTupleHeaderCopy(PG_GETARG_DATUM(n))
/* And a b-byte slice from position a -also OK to write */
#define PG_GETARG_BYTEA_P_SLICE(n,a,b) DatumGetByteaPSlice(PG_GETARG_DATUM(n),a,b)
#define PG_GETARG_TEXT_P_SLICE(n,a,b) DatumGetTextPSlice(PG_GETARG_DATUM(n),a,b)
@@ -246,6 +250,7 @@ extern struct varlena *pg_detoast_datum_slice(struct varlena * datum,
#define PG_RETURN_TEXT_P(x) PG_RETURN_POINTER(x)
#define PG_RETURN_BPCHAR_P(x) PG_RETURN_POINTER(x)
#define PG_RETURN_VARCHAR_P(x) PG_RETURN_POINTER(x)
+#define PG_RETURN_HEAPTUPLEHEADER(x) PG_RETURN_POINTER(x)
/*-------------------------------------------------------------------------
diff --git a/src/include/funcapi.h b/src/include/funcapi.h
index a8051fc27f0..fd1660423e1 100644
--- a/src/include/funcapi.h
+++ b/src/include/funcapi.h
@@ -9,7 +9,7 @@
*
* Copyright (c) 2002-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/funcapi.h,v 1.10 2003/11/29 22:40:53 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/funcapi.h,v 1.11 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,7 +57,7 @@ typedef struct AttInMetadata
typedef struct FuncCallContext
{
/*
- * Number of times we've been called before.
+ * Number of times we've been called before
*
* call_cntr is initialized to 0 for you by SRF_FIRSTCALL_INIT(), and
* incremented for you every time SRF_RETURN_NEXT() is called.
@@ -67,7 +67,7 @@ typedef struct FuncCallContext
/*
* OPTIONAL maximum number of calls
*
- * max_calls is here for convenience ONLY and setting it is OPTIONAL. If
+ * max_calls is here for convenience only and setting it is optional. If
* not set, you must provide alternative means to know when the
* function is done.
*/
@@ -76,41 +76,50 @@ typedef struct FuncCallContext
/*
* OPTIONAL pointer to result slot
*
- * slot is for use when returning tuples (i.e. composite data types) and
- * is not needed when returning base (i.e. scalar) data types.
+ * This is obsolete and only present for backwards compatibility, viz,
+ * user-defined SRFs that use the deprecated TupleDescGetSlot().
*/
TupleTableSlot *slot;
/*
- * OPTIONAL pointer to misc user provided context info
+ * OPTIONAL pointer to miscellaneous user-provided context information
*
* user_fctx is for use as a pointer to your own struct to retain
- * arbitrary context information between calls for your function.
+ * arbitrary context information between calls of your function.
*/
void *user_fctx;
/*
- * OPTIONAL pointer to struct containing arrays of attribute type
- * input metainfo
+ * OPTIONAL pointer to struct containing attribute type input metadata
*
* attinmeta is for use when returning tuples (i.e. composite data types)
- * and is not needed when returning base (i.e. scalar) data types. It
- * is ONLY needed if you intend to use BuildTupleFromCStrings() to
- * create the return tuple.
+ * and is not used when returning base data types. It is only needed
+ * if you intend to use BuildTupleFromCStrings() to create the return
+ * tuple.
*/
AttInMetadata *attinmeta;
/*
- * memory context used for structures which must live for multiple
- * calls
+ * memory context used for structures that must live for multiple calls
*
* multi_call_memory_ctx is set by SRF_FIRSTCALL_INIT() for you, and used
* by SRF_RETURN_DONE() for cleanup. It is the most appropriate memory
- * context for any memory that is to be re-used across multiple calls
+ * context for any memory that is to be reused across multiple calls
* of the SRF.
*/
MemoryContext multi_call_memory_ctx;
+ /*
+ * OPTIONAL pointer to struct containing tuple description
+ *
+ * tuple_desc is for use when returning tuples (i.e. composite data types)
+ * and is only needed if you are going to build the tuples with
+ * heap_formtuple() rather than with BuildTupleFromCStrings(). Note that
+ * the TupleDesc pointer stored here should usually have been run through
+ * BlessTupleDesc() first.
+ */
+ TupleDesc tuple_desc;
+
} FuncCallContext;
/*----------
@@ -122,38 +131,43 @@ typedef struct FuncCallContext
* TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases) - Use to get a
* TupleDesc based on a type OID. This can be used to get
* a TupleDesc for a base (scalar) or composite (relation) type.
- * TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc) - Initialize a slot
- * given a TupleDesc.
+ * TupleDesc BlessTupleDesc(TupleDesc tupdesc) - "Bless" a completed tuple
+ * descriptor so that it can be used to return properly labeled tuples.
+ * You need to call this if you are going to use heap_formtuple directly.
+ * TupleDescGetAttInMetadata does it for you, however, so no need to call
+ * it if you call TupleDescGetAttInMetadata.
* AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc) - Build an
* AttInMetadata struct based on the given TupleDesc. AttInMetadata can
* be used in conjunction with C strings to produce a properly formed
- * tuple. Store the metadata here for use across calls to avoid redundant
- * work.
+ * tuple.
* HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) -
* build a HeapTuple given user data in C string form. values is an array
* of C strings, one for each attribute of the return tuple.
*
* Macro declarations:
+ * HeapTupleGetDatum(HeapTuple tuple) - convert a HeapTuple to a Datum.
+ *
+ * Obsolete routines and macros:
+ * TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc) - Builds a
+ * TupleTableSlot, which is not needed anymore.
* TupleGetDatum(TupleTableSlot *slot, HeapTuple tuple) - get a Datum
* given a tuple and a slot.
*----------
*/
+#define HeapTupleGetDatum(_tuple) PointerGetDatum((_tuple)->t_data)
+/* obsolete version of above */
+#define TupleGetDatum(_slot, _tuple) PointerGetDatum((_tuple)->t_data)
+
/* from tupdesc.c */
extern TupleDesc RelationNameGetTupleDesc(const char *relname);
extern TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases);
/* from execTuples.c */
-extern TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc);
+extern TupleDesc BlessTupleDesc(TupleDesc tupdesc);
extern AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc);
extern HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values);
-
-/*
- * Note we pass shouldFree = false; this is needed because the tuple will
- * typically be in a shorter-lived memory context than the TupleTableSlot.
- */
-#define TupleGetDatum(_slot, _tuple) \
- PointerGetDatum(ExecStoreTuple(_tuple, _slot, InvalidBuffer, false))
+extern TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc);
/*----------
@@ -176,8 +190,7 @@ extern HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values)
* oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
* <user defined code>
* <if returning composite>
- * <obtain slot>
- * funcctx->slot = slot;
+ * <build TupleDesc, and perhaps AttInMetaData>
* <endif returning composite>
* <user defined code>
* // return to original context when allocating transient memory
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 440fcc4d576..8a0fbf7be0f 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.114 2004/03/17 20:48:42 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.115 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -564,6 +564,17 @@ typedef struct SubPlanState
} SubPlanState;
/* ----------------
+ * FieldSelectState node
+ * ----------------
+ */
+typedef struct FieldSelectState
+{
+ ExprState xprstate;
+ ExprState *arg; /* input expression */
+ TupleDesc argdesc; /* tupdesc for most recent input */
+} FieldSelectState;
+
+/* ----------------
* CaseExprState node
* ----------------
*/
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 5c34b8d8559..d5d4f0832a7 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.151 2004/03/17 20:48:43 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.152 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -141,6 +141,7 @@ typedef enum NodeTag
T_ScalarArrayOpExprState,
T_BoolExprState,
T_SubPlanState,
+ T_FieldSelectState,
T_CaseExprState,
T_CaseWhenState,
T_ArrayExprState,
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index d94196d7400..567310fa1c3 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.96 2004/03/17 20:48:43 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.97 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -525,9 +525,8 @@ typedef struct SubPlan
* FieldSelect
*
* FieldSelect represents the operation of extracting one field from a tuple
- * value. At runtime, the input expression is expected to yield a Datum
- * that contains a pointer-to-TupleTableSlot. The specified field number
- * is extracted and returned as a Datum.
+ * value. At runtime, the input expression is expected to yield a rowtype
+ * Datum. The specified field number is extracted and returned as a Datum.
* ----------------
*/
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index b7c1f5fea77..02e6cbca49d 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.235 2004/03/15 03:29:22 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.236 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -384,10 +384,6 @@ extern Datum oidvectorge(PG_FUNCTION_ARGS);
extern Datum oidvectorgt(PG_FUNCTION_ARGS);
/* pseudotypes.c */
-extern Datum record_in(PG_FUNCTION_ARGS);
-extern Datum record_out(PG_FUNCTION_ARGS);
-extern Datum record_recv(PG_FUNCTION_ARGS);
-extern Datum record_send(PG_FUNCTION_ARGS);
extern Datum cstring_in(PG_FUNCTION_ARGS);
extern Datum cstring_out(PG_FUNCTION_ARGS);
extern Datum cstring_recv(PG_FUNCTION_ARGS);
@@ -452,6 +448,12 @@ extern List *stringToQualifiedNameList(const char *string, const char *caller);
extern char *format_procedure(Oid procedure_oid);
extern char *format_operator(Oid operator_oid);
+/* rowtypes.c */
+extern Datum record_in(PG_FUNCTION_ARGS);
+extern Datum record_out(PG_FUNCTION_ARGS);
+extern Datum record_recv(PG_FUNCTION_ARGS);
+extern Datum record_send(PG_FUNCTION_ARGS);
+
/* ruleutils.c */
extern Datum pg_get_ruledef(PG_FUNCTION_ARGS);
extern Datum pg_get_ruledef_ext(PG_FUNCTION_ARGS);
diff --git a/src/include/utils/sets.h b/src/include/utils/sets.h
deleted file mode 100644
index 82350f2806a..00000000000
--- a/src/include/utils/sets.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * sets.h
- *
- *
- *
- * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * $PostgreSQL: pgsql/src/include/utils/sets.h,v 1.16 2003/11/29 22:41:16 pgsql Exp $
- *
- *-------------------------------------------------------------------------
- */
-#ifndef SETS_H
-#define SETS_H
-
-#include "fmgr.h"
-
-
-/* Temporary name of a set function, before SetDefine changes it. */
-#define GENERICSETNAME "ZYX#Set#ZYX"
-
-extern Oid SetDefine(char *querystr, Oid elemType);
-
-extern Datum seteval(PG_FUNCTION_ARGS);
-
-#endif /* SETS_H */
diff --git a/src/include/utils/typcache.h b/src/include/utils/typcache.h
index 93f3f163c46..8b85f517000 100644
--- a/src/include/utils/typcache.h
+++ b/src/include/utils/typcache.h
@@ -9,13 +9,14 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/typcache.h,v 1.2 2003/11/29 22:41:16 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/utils/typcache.h,v 1.3 2004/04/01 21:28:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef TYPCACHE_H
#define TYPCACHE_H
+#include "access/tupdesc.h"
#include "fmgr.h"
@@ -28,6 +29,8 @@ typedef struct TypeCacheEntry
int16 typlen;
bool typbyval;
char typalign;
+ char typtype;
+ Oid typrelid;
/*
* Information obtained from opclass entries
@@ -51,6 +54,13 @@ typedef struct TypeCacheEntry
*/
FmgrInfo eq_opr_finfo;
FmgrInfo cmp_proc_finfo;
+
+ /*
+ * Tuple descriptor if it's a composite type (row type). NULL if not
+ * composite or information hasn't yet been requested. (NOTE: this
+ * is actually just a link to information maintained by relcache.c.)
+ */
+ TupleDesc tupDesc;
} TypeCacheEntry;
/* Bit flags to indicate which fields a given caller needs to have set */
@@ -60,7 +70,14 @@ typedef struct TypeCacheEntry
#define TYPECACHE_CMP_PROC 0x0008
#define TYPECACHE_EQ_OPR_FINFO 0x0010
#define TYPECACHE_CMP_PROC_FINFO 0x0020
+#define TYPECACHE_TUPDESC 0x0040
extern TypeCacheEntry *lookup_type_cache(Oid type_id, int flags);
+extern TupleDesc lookup_rowtype_tupdesc(Oid type_id, int32 typmod);
+
+extern void assign_record_type_typmod(TupleDesc tupDesc);
+
+extern void flush_rowtype_cache(Oid type_id);
+
#endif /* TYPCACHE_H */