diff options
author | Bruce Momjian | 1997-09-07 05:04:48 +0000 |
---|---|---|
committer | Bruce Momjian | 1997-09-07 05:04:48 +0000 |
commit | 1ccd423235a48739d6f7a4d7889705b5f9ecc69b (patch) | |
tree | 8001c4e839dfad8f29ceda7f8c5f5dbb8759b564 /src/include | |
parent | 8fecd4febf8357f3cc20383ed29ced484877d5ac (diff) |
Massive commit to run PGINDENT on all *.c and *.h files.
Diffstat (limited to 'src/include')
275 files changed, 13992 insertions, 13018 deletions
diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h index b4111e16670..24a757ac3c7 100644 --- a/src/include/access/attnum.h +++ b/src/include/access/attnum.h @@ -1,60 +1,60 @@ /*------------------------------------------------------------------------- * * attnum.h-- - * POSTGRES attribute number definitions. + * POSTGRES attribute number definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: attnum.h,v 1.4 1996/10/31 09:46:35 scrappy Exp $ + * $Id: attnum.h,v 1.5 1997/09/07 04:55:45 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef ATTNUM_H +#ifndef ATTNUM_H #define ATTNUM_H /* * user defined attribute numbers start at 1. -ay 2/95 */ -typedef int16 AttrNumber; +typedef int16 AttrNumber; -#define InvalidAttrNumber 0 +#define InvalidAttrNumber 0 /* ---------------- - * support macros + * support macros * ---------------- */ /* * AttributeNumberIsValid -- - * True iff the attribute number is valid. + * True iff the attribute number is valid. */ #define AttributeNumberIsValid(attributeNumber) \ - ((bool) ((attributeNumber) != InvalidAttrNumber)) + ((bool) ((attributeNumber) != InvalidAttrNumber)) /* * AttrNumberIsForUserDefinedAttr -- - * True iff the attribute number corresponds to an user defined attribute. + * True iff the attribute number corresponds to an user defined attribute. */ #define AttrNumberIsForUserDefinedAttr(attributeNumber) \ - ((bool) ((attributeNumber) > 0)) + ((bool) ((attributeNumber) > 0)) /* * AttrNumberGetAttrOffset -- - * Returns the attribute offset for an attribute number. + * Returns the attribute offset for an attribute number. * * Note: - * Assumes the attribute number is for an user defined attribute. + * Assumes the attribute number is for an user defined attribute. */ #define AttrNumberGetAttrOffset(attNum) \ - (AssertMacro(AttrNumberIsForUserDefinedAttr(attNum)) ? \ - ((attNum - 1)) : 0) + (AssertMacro(AttrNumberIsForUserDefinedAttr(attNum)) ? \ + ((attNum - 1)) : 0) /* * AttributeOffsetGetAttributeNumber -- - * Returns the attribute number for an attribute offset. + * Returns the attribute number for an attribute offset. */ #define AttrOffsetGetAttrNumber(attributeOffset) \ - ((AttrNumber) (1 + attributeOffset)) + ((AttrNumber) (1 + attributeOffset)) -#endif /* ATTNUM_H */ +#endif /* ATTNUM_H */ diff --git a/src/include/access/funcindex.h b/src/include/access/funcindex.h index a1e1aeacf3d..6257ab97916 100644 --- a/src/include/access/funcindex.h +++ b/src/include/access/funcindex.h @@ -1,26 +1,27 @@ /*------------------------------------------------------------------------- * * funcindex.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: funcindex.h,v 1.2 1996/08/28 01:56:16 scrappy Exp $ + * $Id: funcindex.h,v 1.3 1997/09/07 04:55:47 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef _FUNC_INDEX_INCLUDED_ #define _FUNC_INDEX_INCLUDED_ -typedef struct { - int nargs; - Oid arglist[8]; - Oid procOid; - NameData funcName; -} FuncIndexInfo; +typedef struct +{ + int nargs; + Oid arglist[8]; + Oid procOid; + NameData funcName; +} FuncIndexInfo; -typedef FuncIndexInfo *FuncIndexInfoPtr; +typedef FuncIndexInfo *FuncIndexInfoPtr; /* * some marginally useful macro definitions @@ -38,4 +39,4 @@ typedef FuncIndexInfo *FuncIndexInfoPtr; #define FIisFunctionalIndex(FINFO) (FINFO->procOid != InvalidOid) -#endif /* FUNCINDEX_H */ +#endif /* FUNCINDEX_H */ diff --git a/src/include/access/genam.h b/src/include/access/genam.h index a6a3fd9d2f7..6bb73416c5a 100644 --- a/src/include/access/genam.h +++ b/src/include/access/genam.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * genam.h-- - * POSTGRES general access method definitions. + * POSTGRES general access method definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: genam.h,v 1.7 1997/08/19 21:37:13 momjian Exp $ + * $Id: genam.h,v 1.8 1997/09/07 04:55:48 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef GENAM_H +#ifndef GENAM_H #define GENAM_H #include <access/sdir.h> @@ -19,33 +19,39 @@ #include <access/itup.h> /* ---------------- - * generalized index_ interface routines + * generalized index_ interface routines * ---------------- */ extern Relation index_open(Oid relationId); extern Relation index_openr(char *relationName); -extern void index_close(Relation relation); -extern InsertIndexResult index_insert(Relation relation, - Datum *datum, char *nulls, - ItemPointer heap_t_ctid, - Relation heapRel); -extern void index_delete(Relation relation, ItemPointer indexItem); -extern IndexScanDesc index_beginscan(Relation relation, bool scanFromEnd, - uint16 numberOfKeys, ScanKey key); -extern void index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key); -extern void index_endscan(IndexScanDesc scan); -extern RetrieveIndexResult index_getnext(IndexScanDesc scan, - ScanDirection direction); -extern RegProcedure index_getprocid(Relation irel, AttrNumber attnum, - uint16 procnum); -extern Datum GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc, - int attOff, AttrNumber attrNums[], FuncIndexInfo *fInfo, - bool *attNull, Buffer buffer); +extern void index_close(Relation relation); +extern InsertIndexResult +index_insert(Relation relation, + Datum * datum, char *nulls, + ItemPointer heap_t_ctid, + Relation heapRel); +extern void index_delete(Relation relation, ItemPointer indexItem); +extern IndexScanDesc +index_beginscan(Relation relation, bool scanFromEnd, + uint16 numberOfKeys, ScanKey key); +extern void index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key); +extern void index_endscan(IndexScanDesc scan); +extern RetrieveIndexResult +index_getnext(IndexScanDesc scan, + ScanDirection direction); +extern RegProcedure +index_getprocid(Relation irel, AttrNumber attnum, + uint16 procnum); +extern Datum +GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc, + int attOff, AttrNumber attrNums[], FuncIndexInfo * fInfo, + bool * attNull, Buffer buffer); /* in genam.c */ -extern IndexScanDesc RelationGetIndexScan(Relation relation, bool scanFromEnd, - uint16 numberOfKeys, ScanKey key); -extern void IndexScanMarkPosition(IndexScanDesc scan); -extern void IndexScanRestorePosition(IndexScanDesc scan); +extern IndexScanDesc +RelationGetIndexScan(Relation relation, bool scanFromEnd, + uint16 numberOfKeys, ScanKey key); +extern void IndexScanMarkPosition(IndexScanDesc scan); +extern void IndexScanRestorePosition(IndexScanDesc scan); -#endif /* GENAM_H */ +#endif /* GENAM_H */ diff --git a/src/include/access/gist.h b/src/include/access/gist.h index 1e8efc18e0f..ff21dd50cd1 100644 --- a/src/include/access/gist.h +++ b/src/include/access/gist.h @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------- * * gist.h-- - * common declarations for the GiST access method code. + * common declarations for the GiST access method code. + * * * * - * * *------------------------------------------------------------------------- */ @@ -21,130 +21,136 @@ #include <utils/rel.h> #include <storage/off.h> -/* +/* ** You can have as many strategies as you please in GiSTs, as ** long as your consistent method can handle them ** -** But strat.h->StrategyEvaluationData->StrategyExpression expression[12] +** But strat.h->StrategyEvaluationData->StrategyExpression expression[12] ** - so 12 is real max # of strategies, or StrategyEvaluationIsValid -** crashes backend... - vadim 05/21/97 +** crashes backend... - vadim 05/21/97 -#define GISTNStrategies 100 +#define GISTNStrategies 100 */ -#define GISTNStrategies 12 +#define GISTNStrategies 12 /* ** Helper routines */ -#define GISTNProcs 8 -#define GIST_CONSISTENT_PROC 1 -#define GIST_UNION_PROC 2 -#define GIST_COMPRESS_PROC 3 -#define GIST_DECOMPRESS_PROC 4 -#define GIST_PENALTY_PROC 5 -#define GIST_PICKSPLIT_PROC 6 -#define GIST_EQUAL_PROC 7 -#define GIST_INFO_PROC 8 +#define GISTNProcs 8 +#define GIST_CONSISTENT_PROC 1 +#define GIST_UNION_PROC 2 +#define GIST_COMPRESS_PROC 3 +#define GIST_DECOMPRESS_PROC 4 +#define GIST_PENALTY_PROC 5 +#define GIST_PICKSPLIT_PROC 6 +#define GIST_EQUAL_PROC 7 +#define GIST_INFO_PROC 8 -#define F_LEAF (1 << 0) +#define F_LEAF (1 << 0) -typedef struct GISTPageOpaqueData { - uint32 flags; -} GISTPageOpaqueData; +typedef struct GISTPageOpaqueData +{ + uint32 flags; +} GISTPageOpaqueData; -typedef GISTPageOpaqueData *GISTPageOpaque; +typedef GISTPageOpaqueData *GISTPageOpaque; #define GIST_LEAF(entry) (((GISTPageOpaque) PageGetSpecialPointer((entry)->page))->flags & F_LEAF) /* - * When we descend a tree, we keep a stack of parent pointers. + * When we descend a tree, we keep a stack of parent pointers. */ -typedef struct GISTSTACK { +typedef struct GISTSTACK +{ struct GISTSTACK *gs_parent; OffsetNumber gs_child; - BlockNumber gs_blk; -} GISTSTACK; - -typedef struct GISTSTATE { - func_ptr consistentFn; - func_ptr unionFn; - func_ptr compressFn; - func_ptr decompressFn; - func_ptr penaltyFn; - func_ptr picksplitFn; - func_ptr equalFn; - bool haskeytype; - bool keytypbyval; -} GISTSTATE; + BlockNumber gs_blk; +} GISTSTACK; + +typedef struct GISTSTATE +{ + func_ptr consistentFn; + func_ptr unionFn; + func_ptr compressFn; + func_ptr decompressFn; + func_ptr penaltyFn; + func_ptr picksplitFn; + func_ptr equalFn; + bool haskeytype; + bool keytypbyval; +} GISTSTATE; /* -** When we're doing a scan, we need to keep track of the parent stack -** for the marked and current items. +** When we're doing a scan, we need to keep track of the parent stack +** for the marked and current items. */ -typedef struct GISTScanOpaqueData { - struct GISTSTACK *s_stack; - struct GISTSTACK *s_markstk; - uint16 s_flags; - struct GISTSTATE *giststate; -} GISTScanOpaqueData; +typedef struct GISTScanOpaqueData +{ + struct GISTSTACK *s_stack; + struct GISTSTACK *s_markstk; + uint16 s_flags; + struct GISTSTATE *giststate; +} GISTScanOpaqueData; -typedef GISTScanOpaqueData *GISTScanOpaque; +typedef GISTScanOpaqueData *GISTScanOpaque; /* -** When we're doing a scan and updating a tree at the same time, the -** updates may affect the scan. We use the flags entry of the scan's -** opaque space to record our actual position in response to updates -** that we can't handle simply by adjusting pointers. +** When we're doing a scan and updating a tree at the same time, the +** updates may affect the scan. We use the flags entry of the scan's +** opaque space to record our actual position in response to updates +** that we can't handle simply by adjusting pointers. */ #define GS_CURBEFORE ((uint16) (1 << 0)) #define GS_MRKBEFORE ((uint16) (1 << 1)) /* root page of a gist */ -#define GISTP_ROOT 0 +#define GISTP_ROOT 0 /* -** When we update a relation on which we're doing a scan, we need to -** check the scan and fix it if the update affected any of the pages it -** touches. Otherwise, we can miss records that we should see. The only -** times we need to do this are for deletions and splits. See the code in -** gistscan.c for how the scan is fixed. These two constants tell us what sort -** of operation changed the index. +** When we update a relation on which we're doing a scan, we need to +** check the scan and fix it if the update affected any of the pages it +** touches. Otherwise, we can miss records that we should see. The only +** times we need to do this are for deletions and splits. See the code in +** gistscan.c for how the scan is fixed. These two constants tell us what sort +** of operation changed the index. */ -#define GISTOP_DEL 0 -#define GISTOP_SPLIT 1 +#define GISTOP_DEL 0 +#define GISTOP_SPLIT 1 /* ** This is the Split Vector to be returned by the PickSplit method. */ -typedef struct GIST_SPLITVEC { - OffsetNumber *spl_left; /* array of entries that go left */ - int spl_nleft; /* size of this array */ - char *spl_ldatum; /* Union of keys in spl_left */ - OffsetNumber *spl_right; /* array of entries that go right */ - int spl_nright; /* size of the array */ - char *spl_rdatum; /* Union of keys in spl_right */ -} GIST_SPLITVEC; +typedef struct GIST_SPLITVEC +{ + OffsetNumber *spl_left; /* array of entries that go left */ + int spl_nleft; /* size of this array */ + char *spl_ldatum; /* Union of keys in spl_left */ + OffsetNumber *spl_right; /* array of entries that go right */ + int spl_nright; /* size of the array */ + char *spl_rdatum; /* Union of keys in spl_right */ +} GIST_SPLITVEC; /* -** An entry on a GiST node. Contains the key (pred), as well as +** An entry on a GiST node. Contains the key (pred), as well as ** its own location (rel,page,offset) which can supply the matching ** pointer. The size of the pred is in bytes, and leafkey is a flag to ** tell us if the entry is in a leaf node. */ -typedef struct GISTENTRY { - char *pred; - Relation rel; - Page page; - OffsetNumber offset; - int bytes; - bool leafkey; -} GISTENTRY; +typedef struct GISTENTRY +{ + char *pred; + Relation rel; + Page page; + OffsetNumber offset; + int bytes; + bool leafkey; +} GISTENTRY; /* ** macro to initialize a GISTENTRY @@ -156,40 +162,49 @@ typedef struct GISTENTRY { #define TRLOWER(tr) (((tr)->bytes)) #define TRUPPER(tr) (&((tr)->bytes[MAXALIGN(VARSIZE(TRLOWER(tr)))])) -typedef struct txtrange { - /* flag: NINF means that lower is negative infinity; PINF means that - ** upper is positive infinity. 0 means that both are numbers. - */ - int32 vl_len; - int32 flag; - char bytes[2]; -} TXTRANGE; - -typedef struct intrange { - int lower; - int upper; - /* flag: NINF means that lower is negative infinity; PINF means that - ** upper is positive infinity. 0 means that both are numbers. - */ - int flag; -} INTRANGE; - -extern void gistbuild(Relation heap, - Relation index, int natts, - AttrNumber *attnum, IndexStrategy istrat, - uint16 pint, Datum *params, - FuncIndexInfo *finfo, - PredInfo *predInfo); -extern InsertIndexResult gistinsert(Relation r, Datum *datum, - char *nulls,ItemPointer ht_ctid, Relation heapRel); -extern void _gistdump(Relation r); -extern void gistfreestack(GISTSTACK *s); -extern void initGISTstate(GISTSTATE *giststate, Relation index); -extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, - Relation r, Page pg, OffsetNumber o, int b, bool l) ; +typedef struct txtrange +{ + + /* + * flag: NINF means that lower is negative infinity; PINF means that * + * upper is positive infinity. 0 means that both are numbers. + */ + int32 vl_len; + int32 flag; + char bytes[2]; +} TXTRANGE; + +typedef struct intrange +{ + int lower; + int upper; + + /* + * flag: NINF means that lower is negative infinity; PINF means that * + * upper is positive infinity. 0 means that both are numbers. + */ + int flag; +} INTRANGE; + +extern void +gistbuild(Relation heap, + Relation index, int natts, + AttrNumber * attnum, IndexStrategy istrat, + uint16 pint, Datum * params, + FuncIndexInfo * finfo, + PredInfo * predInfo); +extern InsertIndexResult +gistinsert(Relation r, Datum * datum, + char *nulls, ItemPointer ht_ctid, Relation heapRel); +extern void _gistdump(Relation r); +extern void gistfreestack(GISTSTACK * s); +extern void initGISTstate(GISTSTATE * giststate, Relation index); +extern void +gistdentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr, + Relation r, Page pg, OffsetNumber o, int b, bool l); extern StrategyNumber RelationGetGISTStrategy(Relation, AttrNumber, RegProcedure); /* gistget.c */ extern RetrieveIndexResult gistgettuple(IndexScanDesc s, ScanDirection dir); -#endif /* GIST_H */ +#endif /* GIST_H */ diff --git a/src/include/access/gistscan.h b/src/include/access/gistscan.h index 9894e71b01b..46aa621631d 100644 --- a/src/include/access/gistscan.h +++ b/src/include/access/gistscan.h @@ -1,7 +1,7 @@ /*------------------------------------------------------------------------- * * gistscan.h-- - * routines defined in access/gisr/gistscan.c + * routines defined in access/gisr/gistscan.c * * * @@ -16,12 +16,13 @@ #include <storage/block.h> #include <utils/rel.h> -extern IndexScanDesc gistbeginscan(Relation r, bool fromEnd, - uint16 nkeys, ScanKey key); -extern void gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key); -extern void gistmarkpos(IndexScanDesc s); -extern void gistrestrpos(IndexScanDesc s); -extern void gistendscan(IndexScanDesc s); -extern void gistadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum); +extern IndexScanDesc +gistbeginscan(Relation r, bool fromEnd, + uint16 nkeys, ScanKey key); +extern void gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key); +extern void gistmarkpos(IndexScanDesc s); +extern void gistrestrpos(IndexScanDesc s); +extern void gistendscan(IndexScanDesc s); +extern void gistadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum); -#endif /* GISTSCAN_H */ +#endif /* GISTSCAN_H */ diff --git a/src/include/access/giststrat.h b/src/include/access/giststrat.h index 74f370b745d..1007dd3ec26 100644 --- a/src/include/access/giststrat.h +++ b/src/include/access/giststrat.h @@ -1,7 +1,7 @@ /*------------------------------------------------------------------------- * * giststrat.h-- - * routines defined in access/gist/giststrat.c + * routines defined in access/gist/giststrat.c * * * @@ -15,7 +15,8 @@ #include <access/strat.h> #include <utils/rel.h> -extern StrategyNumber RelationGetGISTStrategy(Relation r, - AttrNumber attnum, RegProcedure proc); +extern StrategyNumber +RelationGetGISTStrategy(Relation r, + AttrNumber attnum, RegProcedure proc); -#endif /* GISTSTRAT_H */ +#endif /* GISTSTRAT_H */ diff --git a/src/include/access/hash.h b/src/include/access/hash.h index c01bb55d45d..14fd50c34cf 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -1,15 +1,15 @@ /*------------------------------------------------------------------------- * * hash.h-- - * header file for postgres hash access method implementation + * header file for postgres hash access method implementation * * * Copyright (c) 1994, Regents of the University of California * - * $Id: hash.h,v 1.7 1997/08/19 21:37:27 momjian Exp $ + * $Id: hash.h,v 1.8 1997/09/07 04:55:54 momjian Exp $ * * NOTES - * modeled after Margo Seltzer's hash implementation for unix. + * modeled after Margo Seltzer's hash implementation for unix. * *------------------------------------------------------------------------- */ @@ -22,44 +22,44 @@ #include <access/relscan.h> #include <access/itup.h> -/* - * An overflow page is a spare page allocated for storing data whose +/* + * An overflow page is a spare page allocated for storing data whose * bucket doesn't have room to store it. We use overflow pages rather * than just splitting the bucket because there is a linear order in * the way we split buckets. In other words, if there isn't enough space - * in the bucket itself, put it in an overflow page. + * in the bucket itself, put it in an overflow page. * * Overflow page addresses are stored in form: (Splitnumber, Page offset). * * A splitnumber is the number of the generation where the table doubles * in size. The ovflpage's offset within the splitnumber; offsets start - * at 1. - * + * at 1. + * * We convert the stored bitmap address into a page address with the - * macro OADDR_OF(S, O) where S is the splitnumber and O is the page - * offset. + * macro OADDR_OF(S, O) where S is the splitnumber and O is the page + * offset. */ -typedef uint32 Bucket; +typedef uint32 Bucket; typedef bits16 OverflowPageAddress; typedef uint32 SplitNumber; -typedef uint32 PageOffset; +typedef uint32 PageOffset; /* A valid overflow address will always have a page offset >= 1 */ -#define InvalidOvflAddress 0 - -#define SPLITSHIFT 11 -#define SPLITMASK 0x7FF -#define SPLITNUM(N) ((SplitNumber)(((uint32)(N)) >> SPLITSHIFT)) -#define OPAGENUM(N) ((PageOffset)((N) & SPLITMASK)) -#define OADDR_OF(S,O) ((OverflowPageAddress)((uint32)((uint32)(S) << SPLITSHIFT) + (O))) +#define InvalidOvflAddress 0 + +#define SPLITSHIFT 11 +#define SPLITMASK 0x7FF +#define SPLITNUM(N) ((SplitNumber)(((uint32)(N)) >> SPLITSHIFT)) +#define OPAGENUM(N) ((PageOffset)((N) & SPLITMASK)) +#define OADDR_OF(S,O) ((OverflowPageAddress)((uint32)((uint32)(S) << SPLITSHIFT) + (O))) #define BUCKET_TO_BLKNO(B) \ - ((Bucket) ((B) + ((B) ? metap->SPARES[_hash_log2((B)+1)-1] : 0)) + 1) -#define OADDR_TO_BLKNO(B) \ - ((BlockNumber) \ - (BUCKET_TO_BLKNO ( (1 << SPLITNUM((B))) -1 ) + OPAGENUM((B)))); + ((Bucket) ((B) + ((B) ? metap->SPARES[_hash_log2((B)+1)-1] : 0)) + 1) +#define OADDR_TO_BLKNO(B) \ + ((BlockNumber) \ + (BUCKET_TO_BLKNO ( (1 << SPLITNUM((B))) -1 ) + OPAGENUM((B)))); -/* +/* * hasho_flag tells us which type of page we're looking at. For * example, knowing overflow pages from bucket pages is necessary * information when you're deleting tuples from a page. If all the @@ -69,44 +69,47 @@ typedef uint32 PageOffset; * necessary. */ -#define LH_UNUSED_PAGE (0) -#define LH_OVERFLOW_PAGE (1 << 0) -#define LH_BUCKET_PAGE (1 << 1) -#define LH_BITMAP_PAGE (1 << 2) -#define LH_META_PAGE (1 << 3) +#define LH_UNUSED_PAGE (0) +#define LH_OVERFLOW_PAGE (1 << 0) +#define LH_BUCKET_PAGE (1 << 1) +#define LH_BITMAP_PAGE (1 << 2) +#define LH_META_PAGE (1 << 3) -typedef struct HashPageOpaqueData { - bits16 hasho_flag; /* is this page a bucket or ovfl */ - Bucket hasho_bucket; /* bucket number this pg belongs to */ - OverflowPageAddress hasho_oaddr; /* ovfl address of this ovfl pg */ - BlockNumber hasho_nextblkno; /* next ovfl blkno */ - BlockNumber hasho_prevblkno; /* previous ovfl (or bucket) blkno */ -} HashPageOpaqueData; +typedef struct HashPageOpaqueData +{ + bits16 hasho_flag; /* is this page a bucket or ovfl */ + Bucket hasho_bucket; /* bucket number this pg belongs + * to */ + OverflowPageAddress hasho_oaddr; /* ovfl address of this ovfl pg */ + BlockNumber hasho_nextblkno; /* next ovfl blkno */ + BlockNumber hasho_prevblkno; /* previous ovfl (or bucket) blkno */ +} HashPageOpaqueData; -typedef HashPageOpaqueData *HashPageOpaque; +typedef HashPageOpaqueData *HashPageOpaque; /* - * ScanOpaqueData is used to remember which buffers we're currently - * examining in the scan. We keep these buffers locked and pinned and - * recorded in the opaque entry of the scan in order to avoid doing a - * ReadBuffer() for every tuple in the index. This avoids semop() calls, - * which are expensive. + * ScanOpaqueData is used to remember which buffers we're currently + * examining in the scan. We keep these buffers locked and pinned and + * recorded in the opaque entry of the scan in order to avoid doing a + * ReadBuffer() for every tuple in the index. This avoids semop() calls, + * which are expensive. */ -typedef struct HashScanOpaqueData { - Buffer hashso_curbuf; - Buffer hashso_mrkbuf; -} HashScanOpaqueData; +typedef struct HashScanOpaqueData +{ + Buffer hashso_curbuf; + Buffer hashso_mrkbuf; +} HashScanOpaqueData; -typedef HashScanOpaqueData *HashScanOpaque; +typedef HashScanOpaqueData *HashScanOpaque; -/* +/* * Definitions for metapage. */ #define HASH_METAPAGE 0 /* metapage is always block 0 */ -#define HASH_MAGIC 0x6440640 +#define HASH_MAGIC 0x6440640 #define HASH_VERSION 0 /* @@ -116,168 +119,169 @@ typedef HashScanOpaqueData *HashScanOpaque; * allocated at a certain splitpoint. For example, if spares[3] = 7 * then there are a maximum of 7 ovflpages available at splitpoint 3. * The value in spares[] will change as ovflpages are added within - * a splitpoint. - * + * a splitpoint. + * * Within a splitpoint, one can find which ovflpages are available and * which are used by looking at a bitmaps that are stored on the ovfl * pages themselves. There is at least one bitmap for every splitpoint's - * ovflpages. Bitmaps[] contains the ovflpage addresses of the ovflpages - * that hold the ovflpage bitmaps. + * ovflpages. Bitmaps[] contains the ovflpage addresses of the ovflpages + * that hold the ovflpage bitmaps. * * The reason that the size is restricted to NCACHED (32) is because * the bitmaps are 16 bits: upper 5 represent the splitpoint, lower 11 - * indicate the page number within the splitpoint. Since there are - * only 5 bits to store the splitpoint, there can only be 32 splitpoints. + * indicate the page number within the splitpoint. Since there are + * only 5 bits to store the splitpoint, there can only be 32 splitpoints. * Both spares[] and bitmaps[] use splitpoints as there indices, so there - * can only be 32 of them. + * can only be 32 of them. */ -#define NCACHED 32 - - -typedef struct HashMetaPageData { - PageHeaderData hashm_phdr; /* pad for page header - (do not use) */ - uint32 hashm_magic; /* magic no. for hash tables */ - uint32 hashm_version; /* version ID */ - uint32 hashm_nkeys; /* number of keys stored in - the table */ - uint16 hashm_ffactor; /* fill factor */ - uint16 hashm_bsize; /* bucket size (bytes) - - must be a power of 2 */ - uint16 hashm_bshift; /* bucket shift */ - uint16 hashm_bmsize; /* bitmap array size (bytes) - - must be a power of 2 */ - uint32 hashm_maxbucket; /* ID of maximum bucket - in use */ - uint32 hashm_highmask; /* mask to modulo into - entire table */ - uint32 hashm_lowmask; /* mask to modulo into lower - half of table */ - uint32 hashm_ovflpoint; /* pageno. from which ovflpgs - being allocated */ - uint32 hashm_lastfreed; /* last ovflpage freed */ - uint32 hashm_nmaps; /* Initial number of bitmaps */ - uint32 hashm_spares[NCACHED]; /* spare pages available at - splitpoints */ - BlockNumber hashm_mapp[NCACHED]; /* blknumbers of ovfl page - maps */ - RegProcedure hashm_procid; /* hash procedure id from - pg_proc */ -} HashMetaPageData; +#define NCACHED 32 + + +typedef struct HashMetaPageData +{ + PageHeaderData hashm_phdr; /* pad for page header (do not use) */ + uint32 hashm_magic;/* magic no. for hash tables */ + uint32 hashm_version; /* version ID */ + uint32 hashm_nkeys;/* number of keys stored in the table */ + uint16 hashm_ffactor; /* fill factor */ + uint16 hashm_bsize;/* bucket size (bytes) - must be a power + * of 2 */ + uint16 hashm_bshift; /* bucket shift */ + uint16 hashm_bmsize; /* bitmap array size (bytes) - + * must be a power of 2 */ + uint32 hashm_maxbucket; /* ID of maximum bucket in use */ + uint32 hashm_highmask; /* mask to modulo into entire + * table */ + uint32 hashm_lowmask; /* mask to modulo into lower half + * of table */ + uint32 hashm_ovflpoint; /* pageno. from which ovflpgs + * being allocated */ + uint32 hashm_lastfreed; /* last ovflpage freed */ + uint32 hashm_nmaps;/* Initial number of bitmaps */ + uint32 hashm_spares[NCACHED]; /* spare pages available + * at splitpoints */ + BlockNumber hashm_mapp[NCACHED]; /* blknumbers of ovfl page + * maps */ + RegProcedure hashm_procid; /* hash procedure id from pg_proc */ +} HashMetaPageData; typedef HashMetaPageData *HashMetaPage; /* Short hands for accessing structure */ -#define BSHIFT hashm_bshift -#define OVFL_POINT hashm_ovflpoint -#define LAST_FREED hashm_lastfreed -#define MAX_BUCKET hashm_maxbucket -#define FFACTOR hashm_ffactor -#define HIGH_MASK hashm_highmask -#define LOW_MASK hashm_lowmask -#define NKEYS hashm_nkeys -#define SPARES hashm_spares +#define BSHIFT hashm_bshift +#define OVFL_POINT hashm_ovflpoint +#define LAST_FREED hashm_lastfreed +#define MAX_BUCKET hashm_maxbucket +#define FFACTOR hashm_ffactor +#define HIGH_MASK hashm_highmask +#define LOW_MASK hashm_lowmask +#define NKEYS hashm_nkeys +#define SPARES hashm_spares -extern bool BuildingHash; +extern bool BuildingHash; -typedef struct HashItemData { - IndexTupleData hash_itup; -} HashItemData; +typedef struct HashItemData +{ + IndexTupleData hash_itup; +} HashItemData; -typedef HashItemData *HashItem; +typedef HashItemData *HashItem; /* * Constants */ -#define DEFAULT_FFACTOR 300 -#define SPLITMAX 8 -#define BYTE_TO_BIT 3 /* 2^3 bits/byte */ -#define INT_TO_BYTE 2 /* 2^2 bytes/int */ -#define INT_TO_BIT 5 /* 2^5 bits/int */ -#define ALL_SET ((uint32) ~0) +#define DEFAULT_FFACTOR 300 +#define SPLITMAX 8 +#define BYTE_TO_BIT 3 /* 2^3 bits/byte */ +#define INT_TO_BYTE 2 /* 2^2 bytes/int */ +#define INT_TO_BIT 5 /* 2^5 bits/int */ +#define ALL_SET ((uint32) ~0) /* - * bitmap pages do not contain tuples. they do contain the standard + * bitmap pages do not contain tuples. they do contain the standard * page headers and trailers; however, everything in between is a * giant bit array. the number of bits that fit on a page obviously * depends on the page size and the header/trailer overhead. */ -#define BMPGSZ_BYTE(metap) ((metap)->hashm_bmsize) -#define BMPGSZ_BIT(metap) ((metap)->hashm_bmsize << BYTE_TO_BIT) -#define HashPageGetBitmap(pg) \ - ((uint32 *) (((char *) (pg)) + DOUBLEALIGN(sizeof(PageHeaderData)))) +#define BMPGSZ_BYTE(metap) ((metap)->hashm_bmsize) +#define BMPGSZ_BIT(metap) ((metap)->hashm_bmsize << BYTE_TO_BIT) +#define HashPageGetBitmap(pg) \ + ((uint32 *) (((char *) (pg)) + DOUBLEALIGN(sizeof(PageHeaderData)))) /* * The number of bits in an ovflpage bitmap which * tells which ovflpages are empty versus in use (NOT the number of - * bits in an overflow page *address* bitmap). + * bits in an overflow page *address* bitmap). */ -#define BITS_PER_MAP 32 /* Number of bits in ovflpage bitmap */ +#define BITS_PER_MAP 32 /* Number of bits in ovflpage bitmap */ /* Given the address of the beginning of a big map, clear/set the nth bit */ #define CLRBIT(A, N) ((A)[(N)/BITS_PER_MAP] &= ~(1<<((N)%BITS_PER_MAP))) #define SETBIT(A, N) ((A)[(N)/BITS_PER_MAP] |= (1<<((N)%BITS_PER_MAP))) -#define ISSET(A, N) ((A)[(N)/BITS_PER_MAP] & (1<<((N)%BITS_PER_MAP))) +#define ISSET(A, N) ((A)[(N)/BITS_PER_MAP] & (1<<((N)%BITS_PER_MAP))) /* * page locking modes */ -#define HASH_READ 0 -#define HASH_WRITE 1 +#define HASH_READ 0 +#define HASH_WRITE 1 -/* - * In general, the hash code tries to localize its knowledge about page - * layout to a couple of routines. However, we need a special value to - * indicate "no page number" in those places where we expect page numbers. +/* + * In general, the hash code tries to localize its knowledge about page + * layout to a couple of routines. However, we need a special value to + * indicate "no page number" in those places where we expect page numbers. */ -#define P_NONE 0 +#define P_NONE 0 /* - * Strategy number. There's only one valid strategy for hashing: equality. + * Strategy number. There's only one valid strategy for hashing: equality. */ -#define HTEqualStrategyNumber 1 -#define HTMaxStrategyNumber 1 +#define HTEqualStrategyNumber 1 +#define HTMaxStrategyNumber 1 /* - * When a new operator class is declared, we require that the user supply - * us with an amproc procudure for hashing a key of the new type. - * Since we only have one such proc in amproc, it's number 1. + * When a new operator class is declared, we require that the user supply + * us with an amproc procudure for hashing a key of the new type. + * Since we only have one such proc in amproc, it's number 1. */ -#define HASHPROC 1 +#define HASHPROC 1 /* public routines */ -extern void hashbuild(Relation heap, Relation index, int natts, - AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, - Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo); -extern InsertIndexResult hashinsert(Relation rel, Datum *datum, char *nulls, - ItemPointer ht_ctid, Relation heapRel); -extern char *hashgettuple(IndexScanDesc scan, ScanDirection dir); -extern char *hashbeginscan(Relation rel, bool fromEnd, uint16 keysz, - ScanKey scankey); -extern void hashrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey); -extern void hashendscan(IndexScanDesc scan); -extern void hashmarkpos(IndexScanDesc scan); -extern void hashrestrpos(IndexScanDesc scan); -extern void hashdelete(Relation rel, ItemPointer tid); +extern void +hashbuild(Relation heap, Relation index, int natts, + AttrNumber * attnum, IndexStrategy istrat, uint16 pcount, + Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo); +extern InsertIndexResult +hashinsert(Relation rel, Datum * datum, char *nulls, + ItemPointer ht_ctid, Relation heapRel); +extern char *hashgettuple(IndexScanDesc scan, ScanDirection dir); +extern char * +hashbeginscan(Relation rel, bool fromEnd, uint16 keysz, + ScanKey scankey); +extern void hashrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey); +extern void hashendscan(IndexScanDesc scan); +extern void hashmarkpos(IndexScanDesc scan); +extern void hashrestrpos(IndexScanDesc scan); +extern void hashdelete(Relation rel, ItemPointer tid); /* hashfunc.c */ -extern uint32 hashint2(int16 key); -extern uint32 hashint4(uint32 key); -extern uint32 hashfloat4(float32 keyp); -extern uint32 hashfloat8(float64 keyp); -extern uint32 hashoid(Oid key); -extern uint32 hashchar(char key); -extern uint32 hashchar2(uint16 intkey); -extern uint32 hashchar4(uint32 intkey); -extern uint32 hashchar8(char *key); -extern uint32 hashchar16(char *key); -extern uint32 hashtext(struct varlena *key); -extern uint32 hashname(NameData *n); +extern uint32 hashint2(int16 key); +extern uint32 hashint4(uint32 key); +extern uint32 hashfloat4(float32 keyp); +extern uint32 hashfloat8(float64 keyp); +extern uint32 hashoid(Oid key); +extern uint32 hashchar(char key); +extern uint32 hashchar2(uint16 intkey); +extern uint32 hashchar4(uint32 intkey); +extern uint32 hashchar8(char *key); +extern uint32 hashchar16(char *key); +extern uint32 hashtext(struct varlena * key); +extern uint32 hashname(NameData * n); /* private routines */ @@ -286,50 +290,56 @@ extern InsertIndexResult _hash_doinsert(Relation rel, HashItem hitem); /* hashovfl.c */ -extern Buffer _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf); -extern Buffer _hash_freeovflpage(Relation rel, Buffer ovflbuf); -extern int32 _hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum, - int32 nbits, int32 ndx); -extern void _hash_squeezebucket(Relation rel, HashMetaPage metap, - Bucket bucket); +extern Buffer _hash_addovflpage(Relation rel, Buffer * metabufp, Buffer buf); +extern Buffer _hash_freeovflpage(Relation rel, Buffer ovflbuf); +extern int32 +_hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum, + int32 nbits, int32 ndx); +extern void +_hash_squeezebucket(Relation rel, HashMetaPage metap, + Bucket bucket); /* hashpage.c */ -extern void _hash_metapinit(Relation rel); -extern Buffer _hash_getbuf(Relation rel, BlockNumber blkno, int access); -extern void _hash_relbuf(Relation rel, Buffer buf, int access); -extern void _hash_wrtbuf(Relation rel, Buffer buf); -extern void _hash_wrtnorelbuf(Relation rel, Buffer buf); -extern Page _hash_chgbufaccess(Relation rel, Buffer *bufp, int from_access, - int to_access); -extern void _hash_pageinit(Page page, Size size); -extern void _hash_pagedel(Relation rel, ItemPointer tid); -extern void _hash_expandtable(Relation rel, Buffer metabuf); +extern void _hash_metapinit(Relation rel); +extern Buffer _hash_getbuf(Relation rel, BlockNumber blkno, int access); +extern void _hash_relbuf(Relation rel, Buffer buf, int access); +extern void _hash_wrtbuf(Relation rel, Buffer buf); +extern void _hash_wrtnorelbuf(Relation rel, Buffer buf); +extern Page +_hash_chgbufaccess(Relation rel, Buffer * bufp, int from_access, + int to_access); +extern void _hash_pageinit(Page page, Size size); +extern void _hash_pagedel(Relation rel, ItemPointer tid); +extern void _hash_expandtable(Relation rel, Buffer metabuf); /* hashscan.c */ -extern void _hash_regscan(IndexScanDesc scan); -extern void _hash_dropscan(IndexScanDesc scan); -extern void _hash_adjscans(Relation rel, ItemPointer tid); +extern void _hash_regscan(IndexScanDesc scan); +extern void _hash_dropscan(IndexScanDesc scan); +extern void _hash_adjscans(Relation rel, ItemPointer tid); /* hashsearch.c */ -extern void _hash_search(Relation rel, int keysz, ScanKey scankey, - Buffer *bufP, HashMetaPage metap); +extern void +_hash_search(Relation rel, int keysz, ScanKey scankey, + Buffer * bufP, HashMetaPage metap); extern RetrieveIndexResult _hash_next(IndexScanDesc scan, ScanDirection dir); extern RetrieveIndexResult _hash_first(IndexScanDesc scan, ScanDirection dir); -extern bool _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, - Buffer metabuf); +extern bool +_hash_step(IndexScanDesc scan, Buffer * bufP, ScanDirection dir, + Buffer metabuf); /* hashutil.c */ -extern ScanKey _hash_mkscankey(Relation rel, IndexTuple itup, - HashMetaPage metap); -extern void _hash_freeskey(ScanKey skey); -extern bool _hash_checkqual(IndexScanDesc scan, IndexTuple itup); +extern ScanKey +_hash_mkscankey(Relation rel, IndexTuple itup, + HashMetaPage metap); +extern void _hash_freeskey(ScanKey skey); +extern bool _hash_checkqual(IndexScanDesc scan, IndexTuple itup); extern HashItem _hash_formitem(IndexTuple itup); -extern Bucket _hash_call(Relation rel, HashMetaPage metap, Datum key); -extern uint32 _hash_log2(uint32 num); -extern void _hash_checkpage(Page page, int flags); +extern Bucket _hash_call(Relation rel, HashMetaPage metap, Datum key); +extern uint32 _hash_log2(uint32 num); +extern void _hash_checkpage(Page page, int flags); -#endif /* HASH_H */ +#endif /* HASH_H */ diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 7666dc543f2..15f5685e86a 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * heapam.h-- - * POSTGRES heap access method definitions. + * POSTGRES heap access method definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: heapam.h,v 1.11 1997/09/04 16:20:55 momjian Exp $ + * $Id: heapam.h,v 1.12 1997/09/07 04:55:55 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef HEAPAM_H +#ifndef HEAPAM_H #define HEAPAM_H #include <access/htup.h> @@ -19,142 +19,154 @@ #include <utils/rel.h> /* ---------------------------------------------------------------- - * heap access method statistics + * heap access method statistics * ---------------------------------------------------------------- */ -typedef struct HeapAccessStatisticsData { - time_t init_global_timestamp; /* time global statistics started */ - time_t local_reset_timestamp; /* last time local reset was done */ - time_t last_request_timestamp; /* last time stats were requested */ - - int global_open; - int global_openr; - int global_close; - int global_beginscan; - int global_rescan; - int global_endscan; - int global_getnext; - int global_fetch; - int global_insert; - int global_delete; - int global_replace; - int global_markpos; - int global_restrpos; - int global_BufferGetRelation; - int global_RelationIdGetRelation; - int global_RelationIdGetRelation_Buf; - int global_RelationNameGetRelation; - int global_getreldesc; - int global_heapgettup; - int global_RelationPutHeapTuple; - int global_RelationPutLongHeapTuple; - - int local_open; - int local_openr; - int local_close; - int local_beginscan; - int local_rescan; - int local_endscan; - int local_getnext; - int local_fetch; - int local_insert; - int local_delete; - int local_replace; - int local_markpos; - int local_restrpos; - int local_BufferGetRelation; - int local_RelationIdGetRelation; - int local_RelationIdGetRelation_Buf; - int local_RelationNameGetRelation; - int local_getreldesc; - int local_heapgettup; - int local_RelationPutHeapTuple; - int local_RelationPutLongHeapTuple; -} HeapAccessStatisticsData; +typedef struct HeapAccessStatisticsData +{ + time_t init_global_timestamp; /* time global statistics + * started */ + time_t local_reset_timestamp; /* last time local reset + * was done */ + time_t last_request_timestamp; /* last time stats were + * requested */ + + int global_open; + int global_openr; + int global_close; + int global_beginscan; + int global_rescan; + int global_endscan; + int global_getnext; + int global_fetch; + int global_insert; + int global_delete; + int global_replace; + int global_markpos; + int global_restrpos; + int global_BufferGetRelation; + int global_RelationIdGetRelation; + int global_RelationIdGetRelation_Buf; + int global_RelationNameGetRelation; + int global_getreldesc; + int global_heapgettup; + int global_RelationPutHeapTuple; + int global_RelationPutLongHeapTuple; + + int local_open; + int local_openr; + int local_close; + int local_beginscan; + int local_rescan; + int local_endscan; + int local_getnext; + int local_fetch; + int local_insert; + int local_delete; + int local_replace; + int local_markpos; + int local_restrpos; + int local_BufferGetRelation; + int local_RelationIdGetRelation; + int local_RelationIdGetRelation_Buf; + int local_RelationNameGetRelation; + int local_getreldesc; + int local_heapgettup; + int local_RelationPutHeapTuple; + int local_RelationPutLongHeapTuple; +} HeapAccessStatisticsData; typedef HeapAccessStatisticsData *HeapAccessStatistics; #define IncrHeapAccessStat(x) \ - (heap_access_stats == NULL ? 0 : (heap_access_stats->x)++) + (heap_access_stats == NULL ? 0 : (heap_access_stats->x)++) /* ---------------- - * heap_getattr + * heap_getattr * - * Find a particular field in a row represented as a heap tuple. - * We return a pointer into that heap tuple, which points to the - * first byte of the value of the field in question. + * Find a particular field in a row represented as a heap tuple. + * We return a pointer into that heap tuple, which points to the + * first byte of the value of the field in question. * - * If the field in question has a NULL value, we return a null - * pointer and return <*isnull> == true. Otherwise, we return - * <*isnull> == false. + * If the field in question has a NULL value, we return a null + * pointer and return <*isnull> == true. Otherwise, we return + * <*isnull> == false. * - * <tup> is the pointer to the heap tuple. <attnum> is the attribute - * number of the column (field) caller wants. <tupleDesc> is a - * pointer to the structure describing the row and all its fields. + * <tup> is the pointer to the heap tuple. <attnum> is the attribute + * number of the column (field) caller wants. <tupleDesc> is a + * pointer to the structure describing the row and all its fields. * ---------------- */ #define heap_getattr(tup, b, attnum, tupleDesc, isnull) \ - (AssertMacro((tup) != NULL) ? \ - ((attnum) > (int) (tup)->t_natts) ? \ - (((isnull) ? (*(isnull) = true) : (char)NULL), (char *)NULL) : \ - ((attnum) > 0) ? \ - fastgetattr((tup), (attnum), (tupleDesc), (isnull)) : \ - (((isnull) ? (*(isnull) = false) : (char)NULL), heap_getsysattr((tup), (b), (attnum))) : \ - (char *)NULL) + (AssertMacro((tup) != NULL) ? \ + ((attnum) > (int) (tup)->t_natts) ? \ + (((isnull) ? (*(isnull) = true) : (char)NULL), (char *)NULL) : \ + ((attnum) > 0) ? \ + fastgetattr((tup), (attnum), (tupleDesc), (isnull)) : \ + (((isnull) ? (*(isnull) = false) : (char)NULL), heap_getsysattr((tup), (b), (attnum))) : \ + (char *)NULL) extern HeapAccessStatistics heap_access_stats; /* in stats.c */ /* ---------------- - * function prototypes for heap access method + * function prototypes for heap access method * ---------------- */ /* heap_create, heap_creatr, and heap_destroy are declared in catalog/heap.h */ /* heapam.c */ -extern void doinsert(Relation relation, HeapTuple tup); +extern void doinsert(Relation relation, HeapTuple tup); extern Relation heap_open(Oid relationId); extern Relation heap_openr(char *relationName); -extern void heap_close(Relation relation); -extern HeapScanDesc heap_beginscan(Relation relation, int atend, - TimeQual timeQual, unsigned nkeys, ScanKey key); -extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key); -extern void heap_endscan(HeapScanDesc sdesc); -extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer *b); -extern HeapTuple heap_fetch(Relation relation, TimeQual timeQual, - ItemPointer tid, Buffer *b); -extern Oid heap_insert(Relation relation, HeapTuple tup); -extern int heap_delete(Relation relation, ItemPointer tid); -extern int heap_replace(Relation relation, ItemPointer otid, - HeapTuple tup); -extern void heap_markpos(HeapScanDesc sdesc); -extern void heap_restrpos(HeapScanDesc sdesc); +extern void heap_close(Relation relation); +extern HeapScanDesc +heap_beginscan(Relation relation, int atend, + TimeQual timeQual, unsigned nkeys, ScanKey key); +extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key); +extern void heap_endscan(HeapScanDesc sdesc); +extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer * b); +extern HeapTuple +heap_fetch(Relation relation, TimeQual timeQual, + ItemPointer tid, Buffer * b); +extern Oid heap_insert(Relation relation, HeapTuple tup); +extern int heap_delete(Relation relation, ItemPointer tid); +extern int +heap_replace(Relation relation, ItemPointer otid, + HeapTuple tup); +extern void heap_markpos(HeapScanDesc sdesc); +extern void heap_restrpos(HeapScanDesc sdesc); /* in common/heaptuple.c */ -extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]); -extern void DataFill(char *data, TupleDesc tupleDesc, - Datum value[], char nulls[], char *infomask, - bits8 *bit); -extern int heap_attisnull(HeapTuple tup, int attnum); -extern int heap_sysattrlen(AttrNumber attno); -extern bool heap_sysattrbyval(AttrNumber attno); -extern char *heap_getsysattr(HeapTuple tup, Buffer b, int attnum); -extern char *fastgetattr(HeapTuple tup, int attnum, - TupleDesc att, bool *isnull); +extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]); +extern void +DataFill(char *data, TupleDesc tupleDesc, + Datum value[], char nulls[], char *infomask, + bits8 * bit); +extern int heap_attisnull(HeapTuple tup, int attnum); +extern int heap_sysattrlen(AttrNumber attno); +extern bool heap_sysattrbyval(AttrNumber attno); +extern char *heap_getsysattr(HeapTuple tup, Buffer b, int attnum); +extern char * +fastgetattr(HeapTuple tup, int attnum, + TupleDesc att, bool * isnull); extern HeapTuple heap_copytuple(HeapTuple tuple); -extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor, - Datum value[], char nulls[]); -extern HeapTuple heap_modifytuple(HeapTuple tuple, Buffer buffer, - Relation relation, Datum replValue[], char replNull[], char repl[]); -HeapTuple heap_addheader(uint32 natts, int structlen, char *structure); +extern HeapTuple +heap_formtuple(TupleDesc tupleDescriptor, + Datum value[], char nulls[]); +extern HeapTuple +heap_modifytuple(HeapTuple tuple, Buffer buffer, + Relation relation, Datum replValue[], char replNull[], char repl[]); +HeapTuple heap_addheader(uint32 natts, int structlen, char *structure); /* in common/heap/stats.c */ -extern void PrintHeapAccessStatistics(HeapAccessStatistics stats); -extern void initam(void); +extern void PrintHeapAccessStatistics(HeapAccessStatistics stats); +extern void initam(void); /* hio.c */ -extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, - HeapTuple tuple); -extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); +extern void +RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, + HeapTuple tuple); +extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); -#endif /* HEAPAM_H */ +#endif /* HEAPAM_H */ diff --git a/src/include/access/hio.h b/src/include/access/hio.h index 27a3bdb1812..05c9dc330c9 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -1,24 +1,25 @@ /*------------------------------------------------------------------------- * * hio.h-- - * POSTGRES heap access method input/output definitions. + * POSTGRES heap access method input/output definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: hio.h,v 1.3 1996/11/05 10:37:05 scrappy Exp $ + * $Id: hio.h,v 1.4 1997/09/07 04:55:56 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef HIO_H +#ifndef HIO_H #define HIO_H #include <access/htup.h> #include <utils/rel.h> -extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, - HeapTuple tuple); -extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); +extern void +RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, + HeapTuple tuple); +extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); -#endif /* HIO_H */ +#endif /* HIO_H */ diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 2dedd873eae..02d708bb0ad 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * htup.h-- - * POSTGRES heap tuple definitions. + * POSTGRES heap tuple definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: htup.h,v 1.3 1996/11/04 07:18:11 scrappy Exp $ + * $Id: htup.h,v 1.4 1997/09/07 04:55:58 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef HTUP_H +#ifndef HTUP_H #define HTUP_H #include <utils/nabstime.h> @@ -20,94 +20,95 @@ /* check these, they are likely to be more severely limited by t_hoff */ -#define MaxHeapAttributeNumber 1600 /* 8 * 200 */ +#define MaxHeapAttributeNumber 1600 /* 8 * 200 */ /* * to avoid wasting space, the attributes should be layed out in such a * way to reduce structure padding. */ -typedef struct HeapTupleData { +typedef struct HeapTupleData +{ - unsigned int t_len; /* length of entire tuple */ + unsigned int t_len; /* length of entire tuple */ - ItemPointerData t_ctid; /* current TID of this tuple */ + ItemPointerData t_ctid; /* current TID of this tuple */ - ItemPointerData t_chain; /* replaced tuple TID */ + ItemPointerData t_chain; /* replaced tuple TID */ - Oid t_oid; /* OID of this tuple -- 4 bytes */ + Oid t_oid; /* OID of this tuple -- 4 bytes */ - CommandId t_cmin; /* insert CID stamp -- 2 bytes each */ - CommandId t_cmax; /* delete CommandId stamp */ + CommandId t_cmin; /* insert CID stamp -- 2 bytes each */ + CommandId t_cmax; /* delete CommandId stamp */ - TransactionId t_xmin; /* insert XID stamp -- 4 bytes each */ - TransactionId t_xmax; /* delete XID stamp */ + TransactionId t_xmin; /* insert XID stamp -- 4 bytes each */ + TransactionId t_xmax; /* delete XID stamp */ - AbsoluteTime t_tmin; /* time stamps -- 4 bytes each */ - AbsoluteTime t_tmax; + AbsoluteTime t_tmin; /* time stamps -- 4 bytes each */ + AbsoluteTime t_tmax; - int16 t_natts; /* number of attributes */ - char t_vtype; /* not used - padding */ + int16 t_natts; /* number of attributes */ + char t_vtype; /* not used - padding */ - char t_infomask; /* whether tuple as null or variable - * length attributes - */ + char t_infomask; /* whether tuple as null or variable + * length attributes */ - uint8 t_hoff; /* sizeof tuple header */ + uint8 t_hoff; /* sizeof tuple header */ - bits8 t_bits[MinHeapTupleBitmapSize / 8]; - /* bit map of domains */ + bits8 t_bits[MinHeapTupleBitmapSize / 8]; + /* bit map of domains */ - /* MORE DATA FOLLOWS AT END OF STRUCT */ -} HeapTupleData; + /* MORE DATA FOLLOWS AT END OF STRUCT */ +} HeapTupleData; -typedef HeapTupleData *HeapTuple; +typedef HeapTupleData *HeapTuple; -#define SelfItemPointerAttributeNumber (-1) -#define ObjectIdAttributeNumber (-2) -#define MinTransactionIdAttributeNumber (-3) -#define MinCommandIdAttributeNumber (-4) -#define MaxTransactionIdAttributeNumber (-5) -#define MaxCommandIdAttributeNumber (-6) -#define ChainItemPointerAttributeNumber (-7) -#define AnchorItemPointerAttributeNumber (-8) -#define MinAbsoluteTimeAttributeNumber (-9) -#define MaxAbsoluteTimeAttributeNumber (-10) -#define VersionTypeAttributeNumber (-11) -#define FirstLowInvalidHeapAttributeNumber (-12) +#define SelfItemPointerAttributeNumber (-1) +#define ObjectIdAttributeNumber (-2) +#define MinTransactionIdAttributeNumber (-3) +#define MinCommandIdAttributeNumber (-4) +#define MaxTransactionIdAttributeNumber (-5) +#define MaxCommandIdAttributeNumber (-6) +#define ChainItemPointerAttributeNumber (-7) +#define AnchorItemPointerAttributeNumber (-8) +#define MinAbsoluteTimeAttributeNumber (-9) +#define MaxAbsoluteTimeAttributeNumber (-10) +#define VersionTypeAttributeNumber (-11) +#define FirstLowInvalidHeapAttributeNumber (-12) /* ---------------- - * support macros + * support macros * ---------------- */ #define GETSTRUCT(TUP) (((char *)(TUP)) + ((HeapTuple)(TUP))->t_hoff) /* - * BITMAPLEN(NATTS) - - * Computes minimum size of bitmap given number of domains. + * BITMAPLEN(NATTS) - + * Computes minimum size of bitmap given number of domains. */ #define BITMAPLEN(NATTS) \ - ((((((int)(NATTS) - 1) >> 3) + 4 - (MinHeapTupleBitmapSize >> 3)) \ - & ~03) + (MinHeapTupleBitmapSize >> 3)) + ((((((int)(NATTS) - 1) >> 3) + 4 - (MinHeapTupleBitmapSize >> 3)) \ + & ~03) + (MinHeapTupleBitmapSize >> 3)) /* * HeapTupleIsValid - * True iff the heap tuple is valid. + * True iff the heap tuple is valid. */ -#define HeapTupleIsValid(tuple) PointerIsValid(tuple) +#define HeapTupleIsValid(tuple) PointerIsValid(tuple) /* * information stored in t_infomask: */ -#define HEAP_HASNULL 0x01 /* has null attribute(s) */ -#define HEAP_HASVARLENA 0x02 /* has variable length attribute(s) */ +#define HEAP_HASNULL 0x01 /* has null attribute(s) */ +#define HEAP_HASVARLENA 0x02 /* has variable length + * attribute(s) */ #define HeapTupleNoNulls(tuple) \ - (!(((HeapTuple) (tuple))->t_infomask & HEAP_HASNULL)) + (!(((HeapTuple) (tuple))->t_infomask & HEAP_HASNULL)) #define HeapTupleAllFixed(tuple) \ - (!(((HeapTuple) (tuple))->t_infomask & HEAP_HASVARLENA)) + (!(((HeapTuple) (tuple))->t_infomask & HEAP_HASVARLENA)) -#endif /* HTUP_H */ +#endif /* HTUP_H */ diff --git a/src/include/access/ibit.h b/src/include/access/ibit.h index 8cb17221608..87e2fec53fd 100644 --- a/src/include/access/ibit.h +++ b/src/include/access/ibit.h @@ -1,33 +1,34 @@ /*------------------------------------------------------------------------- * * ibit.h-- - * POSTGRES index valid attribute bit map definitions. + * POSTGRES index valid attribute bit map definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: ibit.h,v 1.4 1996/11/05 07:24:03 scrappy Exp $ + * $Id: ibit.h,v 1.5 1997/09/07 04:56:01 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef IBIT_H +#ifndef IBIT_H #define IBIT_H #include <utils/memutils.h> -typedef struct IndexAttributeBitMapData { - char bits[(MaxIndexAttributeNumber + MaxBitsPerByte - 1) - / MaxBitsPerByte]; -} IndexAttributeBitMapData; +typedef struct IndexAttributeBitMapData +{ + char bits[(MaxIndexAttributeNumber + MaxBitsPerByte - 1) + / MaxBitsPerByte]; +} IndexAttributeBitMapData; -typedef IndexAttributeBitMapData *IndexAttributeBitMap; +typedef IndexAttributeBitMapData *IndexAttributeBitMap; -#define IndexAttributeBitMapSize sizeof(IndexAttributeBitMapData) +#define IndexAttributeBitMapSize sizeof(IndexAttributeBitMapData) /* * IndexAttributeBitMapIsValid -- - * True iff attribute bit map is valid. + * True iff attribute bit map is valid. */ -#define IndexAttributeBitMapIsValid(bits) PointerIsValid(bits) +#define IndexAttributeBitMapIsValid(bits) PointerIsValid(bits) -#endif /* IBIT_H */ +#endif /* IBIT_H */ diff --git a/src/include/access/iqual.h b/src/include/access/iqual.h index 492c24732f0..233c2f61f87 100644 --- a/src/include/access/iqual.h +++ b/src/include/access/iqual.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * iqual.h-- - * Index scan key qualification definitions. + * Index scan key qualification definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: iqual.h,v 1.4 1996/11/05 10:37:03 scrappy Exp $ + * $Id: iqual.h,v 1.5 1997/09/07 04:56:04 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef IQUAL_H +#ifndef IQUAL_H #define IQUAL_H #include <access/skey.h> @@ -18,13 +18,14 @@ /* ---------------- - * index tuple qualification support + * index tuple qualification support * ---------------- */ -extern int NIndexTupleProcessed; +extern int NIndexTupleProcessed; -extern bool index_keytest(IndexTuple tuple, TupleDesc tupdesc, +extern bool +index_keytest(IndexTuple tuple, TupleDesc tupdesc, int scanKeySize, ScanKey key); -#endif /* IQUAL_H */ +#endif /* IQUAL_H */ diff --git a/src/include/access/istrat.h b/src/include/access/istrat.h index 59b4bffa5b1..377a8463446 100644 --- a/src/include/access/istrat.h +++ b/src/include/access/istrat.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * istrat.h-- - * POSTGRES index strategy definitions. + * POSTGRES index strategy definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: istrat.h,v 1.5 1997/08/19 21:37:31 momjian Exp $ + * $Id: istrat.h,v 1.6 1997/09/07 04:56:05 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef ISTRAT_H +#ifndef ISTRAT_H #define ISTRAT_H #include <utils/rel.h> @@ -18,51 +18,55 @@ /* * StrategyNumberIsValid -- - * True iff the strategy number is valid. + * True iff the strategy number is valid. */ #define StrategyNumberIsValid(strategyNumber) \ - ((bool) ((strategyNumber) != InvalidStrategy)) + ((bool) ((strategyNumber) != InvalidStrategy)) /* * StrategyNumberIsInBounds -- - * True iff strategy number is within given bounds. + * True iff strategy number is within given bounds. * * Note: - * Assumes StrategyNumber is an unsigned type. - * Assumes the bounded interval to be (0,max]. + * Assumes StrategyNumber is an unsigned type. + * Assumes the bounded interval to be (0,max]. */ #define StrategyNumberIsInBounds(strategyNumber, maxStrategyNumber) \ - ((bool)(InvalidStrategy < (strategyNumber) && \ - (strategyNumber) <= (maxStrategyNumber))) + ((bool)(InvalidStrategy < (strategyNumber) && \ + (strategyNumber) <= (maxStrategyNumber))) /* * StrategyMapIsValid -- - * True iff the index strategy mapping is valid. + * True iff the index strategy mapping is valid. */ -#define StrategyMapIsValid(map) PointerIsValid(map) +#define StrategyMapIsValid(map) PointerIsValid(map) /* * IndexStrategyIsValid -- - * True iff the index strategy is valid. + * True iff the index strategy is valid. */ -#define IndexStrategyIsValid(s) PointerIsValid(s) +#define IndexStrategyIsValid(s) PointerIsValid(s) -extern StrategyMap IndexStrategyGetStrategyMap(IndexStrategy indexStrategy, - StrategyNumber maxStrategyNum, AttrNumber attrNum); +extern StrategyMap +IndexStrategyGetStrategyMap(IndexStrategy indexStrategy, + StrategyNumber maxStrategyNum, AttrNumber attrNum); -extern Size +extern Size AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber, - StrategyNumber maxStrategyNumber); -extern StrategyNumber RelationGetStrategy(Relation relation, - AttrNumber attributeNumber, StrategyEvaluation evaluation, - RegProcedure procedure); -extern bool RelationInvokeStrategy(Relation relation, - StrategyEvaluation evaluation, AttrNumber attributeNumber, - StrategyNumber strategy, Datum left, Datum right); -extern void IndexSupportInitialize(IndexStrategy indexStrategy, - RegProcedure *indexSupport, Oid indexObjectId, - Oid accessMethodObjectId, StrategyNumber maxStrategyNumber, - StrategyNumber maxSupportNumber, AttrNumber maxAttributeNumber); + StrategyNumber maxStrategyNumber); +extern StrategyNumber +RelationGetStrategy(Relation relation, + AttrNumber attributeNumber, StrategyEvaluation evaluation, + RegProcedure procedure); +extern bool +RelationInvokeStrategy(Relation relation, + StrategyEvaluation evaluation, AttrNumber attributeNumber, + StrategyNumber strategy, Datum left, Datum right); +extern void +IndexSupportInitialize(IndexStrategy indexStrategy, + RegProcedure * indexSupport, Oid indexObjectId, + Oid accessMethodObjectId, StrategyNumber maxStrategyNumber, + StrategyNumber maxSupportNumber, AttrNumber maxAttributeNumber); -#endif /* ISTRAT_H */ +#endif /* ISTRAT_H */ diff --git a/src/include/access/itup.h b/src/include/access/itup.h index 45e19fd8494..742078a3bd1 100644 --- a/src/include/access/itup.h +++ b/src/include/access/itup.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * itup.h-- - * POSTGRES index tuple definitions. + * POSTGRES index tuple definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: itup.h,v 1.5 1997/08/19 21:37:33 momjian Exp $ + * $Id: itup.h,v 1.6 1997/09/07 04:56:05 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,69 +16,72 @@ #include <access/tupdesc.h> #include <storage/itemptr.h> -#define MaxIndexAttributeNumber 7 +#define MaxIndexAttributeNumber 7 -typedef struct IndexTupleData { - ItemPointerData t_tid; /* reference TID to base tuple */ +typedef struct IndexTupleData +{ + ItemPointerData t_tid; /* reference TID to base tuple */ - /* - * t_info is layed out in the following fashion: - * - * 15th (leftmost) bit: "has nulls" bit - * 14th bit: "has varlenas" bit - * 13th bit: "has rules" bit - (removed ay 11/94) - * bits 12-0 bit: size of tuple. - */ + /* + * t_info is layed out in the following fashion: + * + * 15th (leftmost) bit: "has nulls" bit 14th bit: "has varlenas" bit 13th + * bit: "has rules" bit - (removed ay 11/94) bits 12-0 bit: size of + * tuple. + */ - unsigned short t_info; /* various info about tuple */ + unsigned short t_info; /* various info about tuple */ - /* - * please make sure sizeof(IndexTupleData) is MAXALIGN'ed. - * See IndexInfoFindDataOffset() for the reason. - */ - -} IndexTupleData; /* MORE DATA FOLLOWS AT END OF STRUCT */ + /* + * please make sure sizeof(IndexTupleData) is MAXALIGN'ed. See + * IndexInfoFindDataOffset() for the reason. + */ -typedef IndexTupleData *IndexTuple; +} IndexTupleData; /* MORE DATA FOLLOWS AT END OF STRUCT */ +typedef IndexTupleData *IndexTuple; -typedef struct InsertIndexResultData { - ItemPointerData pointerData; -} InsertIndexResultData; + +typedef struct InsertIndexResultData +{ + ItemPointerData pointerData; +} InsertIndexResultData; typedef InsertIndexResultData *InsertIndexResult; -typedef struct RetrieveIndexResultData { - ItemPointerData index_iptr; - ItemPointerData heap_iptr; -} RetrieveIndexResultData; +typedef struct RetrieveIndexResultData +{ + ItemPointerData index_iptr; + ItemPointerData heap_iptr; +} RetrieveIndexResultData; -typedef RetrieveIndexResultData *RetrieveIndexResult; +typedef RetrieveIndexResultData *RetrieveIndexResult; /*----------------- * PredInfo - - * used for partial indices + * used for partial indices *----------------- */ -typedef struct PredInfo { - Node *pred; - Node *oldPred; -} PredInfo; +typedef struct PredInfo +{ + Node *pred; + Node *oldPred; +} PredInfo; /* ---------------- - * externs + * externs * ---------------- */ #define INDEX_SIZE_MASK 0x1FFF #define INDEX_NULL_MASK 0x8000 -#define INDEX_VAR_MASK 0x4000 +#define INDEX_VAR_MASK 0x4000 -#define IndexTupleSize(itup) (((IndexTuple) (itup))->t_info & 0x1FFF) -#define IndexTupleDSize(itup) ((itup).t_info & 0x1FFF) +#define IndexTupleSize(itup) (((IndexTuple) (itup))->t_info & 0x1FFF) +#define IndexTupleDSize(itup) ((itup).t_info & 0x1FFF) #define IndexTupleNoNulls(itup) (!(((IndexTuple) (itup))->t_info & 0x8000)) #define IndexTupleAllFixed(itup) (!(((IndexTuple) (itup))->t_info & 0x4000)) @@ -86,15 +89,16 @@ typedef struct PredInfo { /* indextuple.h */ -extern IndexTuple index_formtuple(TupleDesc tupleDescriptor, - Datum value[], char null[]); -extern Datum index_getattr(IndexTuple tuple, AttrNumber attNum, - TupleDesc tupDesc, bool *isNullOutP); -extern RetrieveIndexResult +extern IndexTuple +index_formtuple(TupleDesc tupleDescriptor, + Datum value[], char null[]); +extern Datum +index_getattr(IndexTuple tuple, AttrNumber attNum, + TupleDesc tupDesc, bool * isNullOutP); +extern RetrieveIndexResult FormRetrieveIndexResult(ItemPointer indexItemPointer, - ItemPointer heapItemPointer); -extern void CopyIndexTuple(IndexTuple source, IndexTuple *target); - + ItemPointer heapItemPointer); +extern void CopyIndexTuple(IndexTuple source, IndexTuple * target); -#endif /* ITUP_H */ +#endif /* ITUP_H */ diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 89f1085929a..0062431d6cb 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * nbtree.h-- - * header file for postgres btree access method implementation. + * header file for postgres btree access method implementation. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nbtree.h,v 1.14 1997/08/19 21:37:35 momjian Exp $ + * $Id: nbtree.h,v 1.15 1997/09/07 04:56:06 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NBTREE_H -#define NBTREE_H +#ifndef NBTREE_H +#define NBTREE_H #include <access/sdir.h> #include <access/relscan.h> @@ -23,184 +23,189 @@ #include <storage/itemptr.h> /* - * BTPageOpaqueData -- At the end of every page, we store a pointer - * to both siblings in the tree. See Lehman and Yao's paper for more - * info. In addition, we need to know what sort of page this is - * (leaf or internal), and whether the page is available for reuse. + * BTPageOpaqueData -- At the end of every page, we store a pointer + * to both siblings in the tree. See Lehman and Yao's paper for more + * info. In addition, we need to know what sort of page this is + * (leaf or internal), and whether the page is available for reuse. * - * Lehman and Yao's algorithm requires a ``high key'' on every page. - * The high key on a page is guaranteed to be greater than or equal - * to any key that appears on this page. Our insertion algorithm - * guarantees that we can use the initial least key on our right - * sibling as the high key. We allocate space for the line pointer - * to the high key in the opaque data at the end of the page. + * Lehman and Yao's algorithm requires a ``high key'' on every page. + * The high key on a page is guaranteed to be greater than or equal + * to any key that appears on this page. Our insertion algorithm + * guarantees that we can use the initial least key on our right + * sibling as the high key. We allocate space for the line pointer + * to the high key in the opaque data at the end of the page. * - * Rightmost pages in the tree have no high key. + * Rightmost pages in the tree have no high key. */ -typedef struct BTPageOpaqueData { - BlockNumber btpo_prev; - BlockNumber btpo_next; - uint16 btpo_flags; +typedef struct BTPageOpaqueData +{ + BlockNumber btpo_prev; + BlockNumber btpo_next; + uint16 btpo_flags; -#define BTP_LEAF (1 << 0) -#define BTP_ROOT (1 << 1) -#define BTP_FREE (1 << 2) -#define BTP_META (1 << 3) -#define BTP_CHAIN (1 << 4) +#define BTP_LEAF (1 << 0) +#define BTP_ROOT (1 << 1) +#define BTP_FREE (1 << 2) +#define BTP_META (1 << 3) +#define BTP_CHAIN (1 << 4) -} BTPageOpaqueData; +} BTPageOpaqueData; -typedef BTPageOpaqueData *BTPageOpaque; +typedef BTPageOpaqueData *BTPageOpaque; /* - * ScanOpaqueData is used to remember which buffers we're currently - * examining in the scan. We keep these buffers locked and pinned - * and recorded in the opaque entry of the scan in order to avoid - * doing a ReadBuffer() for every tuple in the index. This avoids - * semop() calls, which are expensive. + * ScanOpaqueData is used to remember which buffers we're currently + * examining in the scan. We keep these buffers locked and pinned + * and recorded in the opaque entry of the scan in order to avoid + * doing a ReadBuffer() for every tuple in the index. This avoids + * semop() calls, which are expensive. * - * And it's used to remember actual scankey info (we need in it - * if some scankeys evaled at runtime. + * And it's used to remember actual scankey info (we need in it + * if some scankeys evaled at runtime. */ -typedef struct BTScanOpaqueData { - Buffer btso_curbuf; - Buffer btso_mrkbuf; - uint16 qual_ok; /* 0 for quals like key == 1 && key > 2 */ - uint16 numberOfKeys; /* number of keys */ - uint16 numberOfFirstKeys; /* number of keys for 1st attribute */ - ScanKey keyData; /* key descriptor */ -} BTScanOpaqueData; +typedef struct BTScanOpaqueData +{ + Buffer btso_curbuf; + Buffer btso_mrkbuf; + uint16 qual_ok; /* 0 for quals like key == 1 && key > 2 */ + uint16 numberOfKeys; /* number of keys */ + uint16 numberOfFirstKeys; /* number of keys for 1st + * attribute */ + ScanKey keyData; /* key descriptor */ +} BTScanOpaqueData; -typedef BTScanOpaqueData *BTScanOpaque; +typedef BTScanOpaqueData *BTScanOpaque; /* - * BTItems are what we store in the btree. Each item has an index - * tuple, including key and pointer values. In addition, we must - * guarantee that all tuples in the index are unique, in order to - * satisfy some assumptions in Lehman and Yao. The way that we do - * this is by generating a new OID for every insertion that we do in - * the tree. This adds eight bytes to the size of btree index - * tuples. Note that we do not use the OID as part of a composite - * key; the OID only serves as a unique identifier for a given index - * tuple (logical position within a page). + * BTItems are what we store in the btree. Each item has an index + * tuple, including key and pointer values. In addition, we must + * guarantee that all tuples in the index are unique, in order to + * satisfy some assumptions in Lehman and Yao. The way that we do + * this is by generating a new OID for every insertion that we do in + * the tree. This adds eight bytes to the size of btree index + * tuples. Note that we do not use the OID as part of a composite + * key; the OID only serves as a unique identifier for a given index + * tuple (logical position within a page). * - * New comments: - * actually, we must guarantee that all tuples in A LEVEL - * are unique, not in ALL INDEX. So, we can use bti_itup->t_tid - * as unique identifier for a given index tuple (logical position - * within a level). - vadim 04/09/97 + * New comments: + * actually, we must guarantee that all tuples in A LEVEL + * are unique, not in ALL INDEX. So, we can use bti_itup->t_tid + * as unique identifier for a given index tuple (logical position + * within a level). - vadim 04/09/97 */ -typedef struct BTItemData { +typedef struct BTItemData +{ #ifndef BTREE_VERSION_1 - Oid bti_oid; - int32 bti_dummy; /* padding to make bti_itup - * align at 8-byte boundary - */ + Oid bti_oid; + int32 bti_dummy; /* padding to make bti_itup align at + * 8-byte boundary */ #endif - IndexTupleData bti_itup; -} BTItemData; + IndexTupleData bti_itup; +} BTItemData; -typedef BTItemData *BTItem; +typedef BTItemData *BTItem; #ifdef BTREE_VERSION_1 -#define BTItemSame(i1, i2) ( i1->bti_itup.t_tid.ip_blkid.bi_hi == \ - i2->bti_itup.t_tid.ip_blkid.bi_hi && \ - i1->bti_itup.t_tid.ip_blkid.bi_lo == \ - i2->bti_itup.t_tid.ip_blkid.bi_lo && \ - i1->bti_itup.t_tid.ip_posid == \ - i2->bti_itup.t_tid.ip_posid ) +#define BTItemSame(i1, i2) ( i1->bti_itup.t_tid.ip_blkid.bi_hi == \ + i2->bti_itup.t_tid.ip_blkid.bi_hi && \ + i1->bti_itup.t_tid.ip_blkid.bi_lo == \ + i2->bti_itup.t_tid.ip_blkid.bi_lo && \ + i1->bti_itup.t_tid.ip_posid == \ + i2->bti_itup.t_tid.ip_posid ) #else -#define BTItemSame(i1, i2) ( i1->bti_oid == i2->bti_oid ) +#define BTItemSame(i1, i2) ( i1->bti_oid == i2->bti_oid ) #endif /* - * BTStackData -- As we descend a tree, we push the (key, pointer) - * pairs from internal nodes onto a private stack. If we split a - * leaf, we use this stack to walk back up the tree and insert data - * into parent nodes (and possibly to split them, too). Lehman and - * Yao's update algorithm guarantees that under no circumstances can - * our private stack give us an irredeemably bad picture up the tree. - * Again, see the paper for details. + * BTStackData -- As we descend a tree, we push the (key, pointer) + * pairs from internal nodes onto a private stack. If we split a + * leaf, we use this stack to walk back up the tree and insert data + * into parent nodes (and possibly to split them, too). Lehman and + * Yao's update algorithm guarantees that under no circumstances can + * our private stack give us an irredeemably bad picture up the tree. + * Again, see the paper for details. */ -typedef struct BTStackData { - BlockNumber bts_blkno; - OffsetNumber bts_offset; - BTItem bts_btitem; - struct BTStackData *bts_parent; -} BTStackData; - -typedef BTStackData *BTStack; - -typedef struct BTPageState { - Buffer btps_buf; - Page btps_page; - BTItem btps_lastbti; - OffsetNumber btps_lastoff; - OffsetNumber btps_firstoff; - int btps_level; - bool btps_doupper; - struct BTPageState *btps_next; -} BTPageState; +typedef struct BTStackData +{ + BlockNumber bts_blkno; + OffsetNumber bts_offset; + BTItem bts_btitem; + struct BTStackData *bts_parent; +} BTStackData; + +typedef BTStackData *BTStack; + +typedef struct BTPageState +{ + Buffer btps_buf; + Page btps_page; + BTItem btps_lastbti; + OffsetNumber btps_lastoff; + OffsetNumber btps_firstoff; + int btps_level; + bool btps_doupper; + struct BTPageState *btps_next; +} BTPageState; /* - * We need to be able to tell the difference between read and write - * requests for pages, in order to do locking correctly. + * We need to be able to tell the difference between read and write + * requests for pages, in order to do locking correctly. */ -#define BT_READ 0 -#define BT_WRITE 1 +#define BT_READ 0 +#define BT_WRITE 1 /* - * Similarly, the difference between insertion and non-insertion binary - * searches on a given page makes a difference when we're descending the - * tree. + * Similarly, the difference between insertion and non-insertion binary + * searches on a given page makes a difference when we're descending the + * tree. */ #define BT_INSERTION 0 -#define BT_DESCENT 1 +#define BT_DESCENT 1 /* - * We must classify index modification types for the benefit of - * _bt_adjscans. + * We must classify index modification types for the benefit of + * _bt_adjscans. */ -#define BT_INSERT 0 -#define BT_DELETE 1 +#define BT_INSERT 0 +#define BT_DELETE 1 /* - * In general, the btree code tries to localize its knowledge about - * page layout to a couple of routines. However, we need a special - * value to indicate "no page number" in those places where we expect - * page numbers. + * In general, the btree code tries to localize its knowledge about + * page layout to a couple of routines. However, we need a special + * value to indicate "no page number" in those places where we expect + * page numbers. */ -#define P_NONE 0 -#define P_LEFTMOST(opaque) ((opaque)->btpo_prev == P_NONE) -#define P_RIGHTMOST(opaque) ((opaque)->btpo_next == P_NONE) +#define P_NONE 0 +#define P_LEFTMOST(opaque) ((opaque)->btpo_prev == P_NONE) +#define P_RIGHTMOST(opaque) ((opaque)->btpo_next == P_NONE) -#define P_HIKEY ((OffsetNumber) 1) -#define P_FIRSTKEY ((OffsetNumber) 2) +#define P_HIKEY ((OffsetNumber) 1) +#define P_FIRSTKEY ((OffsetNumber) 2) /* - * Strategy numbers -- ordering of these is <, <=, =, >=, > + * Strategy numbers -- ordering of these is <, <=, =, >=, > */ -#define BTLessStrategyNumber 1 -#define BTLessEqualStrategyNumber 2 -#define BTEqualStrategyNumber 3 +#define BTLessStrategyNumber 1 +#define BTLessEqualStrategyNumber 2 +#define BTEqualStrategyNumber 3 #define BTGreaterEqualStrategyNumber 4 -#define BTGreaterStrategyNumber 5 -#define BTMaxStrategyNumber 5 +#define BTGreaterStrategyNumber 5 +#define BTMaxStrategyNumber 5 /* - * When a new operator class is declared, we require that the user - * supply us with an amproc procedure for determining whether, for - * two keys a and b, a < b, a = b, or a > b. This routine must - * return < 0, 0, > 0, respectively, in these three cases. Since we - * only have one such proc in amproc, it's number 1. + * When a new operator class is declared, we require that the user + * supply us with an amproc procedure for determining whether, for + * two keys a and b, a < b, a = b, or a > b. This routine must + * return < 0, 0, > 0, respectively, in these three cases. Since we + * only have one such proc in amproc, it's number 1. */ #define BTORDER_PROC 1 @@ -208,94 +213,105 @@ typedef struct BTPageState { /* * prototypes for functions in nbtinsert.c */ -extern InsertIndexResult _bt_doinsert(Relation rel, BTItem btitem, - bool index_is_unique, Relation heapRel); +extern InsertIndexResult +_bt_doinsert(Relation rel, BTItem btitem, + bool index_is_unique, Relation heapRel); - /* default is to allow duplicates */ -extern bool _bt_itemcmp(Relation rel, Size keysz, BTItem item1, BTItem item2, + /* default is to allow duplicates */ +extern bool +_bt_itemcmp(Relation rel, Size keysz, BTItem item1, BTItem item2, StrategyNumber strat); /* * prototypes for functions in nbtpage.c */ -extern void _bt_metapinit(Relation rel); -extern Buffer _bt_getroot(Relation rel, int access); -extern Buffer _bt_getbuf(Relation rel, BlockNumber blkno, int access); -extern void _bt_relbuf(Relation rel, Buffer buf, int access); -extern void _bt_wrtbuf(Relation rel, Buffer buf); -extern void _bt_wrtnorelbuf(Relation rel, Buffer buf); -extern void _bt_pageinit(Page page, Size size); -extern void _bt_metaproot(Relation rel, BlockNumber rootbknum, int level); -extern Buffer _bt_getstackbuf(Relation rel, BTStack stack, int access); -extern void _bt_pagedel(Relation rel, ItemPointer tid); +extern void _bt_metapinit(Relation rel); +extern Buffer _bt_getroot(Relation rel, int access); +extern Buffer _bt_getbuf(Relation rel, BlockNumber blkno, int access); +extern void _bt_relbuf(Relation rel, Buffer buf, int access); +extern void _bt_wrtbuf(Relation rel, Buffer buf); +extern void _bt_wrtnorelbuf(Relation rel, Buffer buf); +extern void _bt_pageinit(Page page, Size size); +extern void _bt_metaproot(Relation rel, BlockNumber rootbknum, int level); +extern Buffer _bt_getstackbuf(Relation rel, BTStack stack, int access); +extern void _bt_pagedel(Relation rel, ItemPointer tid); /* * prototypes for functions in nbtree.c */ -extern bool BuildingBtree; /* in nbtree.c */ - -extern void btbuild(Relation heap, Relation index, int natts, - AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, - Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo); -extern InsertIndexResult btinsert(Relation rel, Datum *datum, char *nulls, - ItemPointer ht_ctid, Relation heapRel); -extern char *btgettuple(IndexScanDesc scan, ScanDirection dir); -extern char *btbeginscan(Relation rel, bool fromEnd, uint16 keysz, - ScanKey scankey); - -extern void btrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey); -extern void btmovescan(IndexScanDesc scan, Datum v); -extern void btendscan(IndexScanDesc scan); -extern void btmarkpos(IndexScanDesc scan); -extern void btrestrpos(IndexScanDesc scan); -extern void btdelete(Relation rel, ItemPointer tid); +extern bool BuildingBtree; /* in nbtree.c */ + +extern void +btbuild(Relation heap, Relation index, int natts, + AttrNumber * attnum, IndexStrategy istrat, uint16 pcount, + Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo); +extern InsertIndexResult +btinsert(Relation rel, Datum * datum, char *nulls, + ItemPointer ht_ctid, Relation heapRel); +extern char *btgettuple(IndexScanDesc scan, ScanDirection dir); +extern char * +btbeginscan(Relation rel, bool fromEnd, uint16 keysz, + ScanKey scankey); + +extern void btrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey); +extern void btmovescan(IndexScanDesc scan, Datum v); +extern void btendscan(IndexScanDesc scan); +extern void btmarkpos(IndexScanDesc scan); +extern void btrestrpos(IndexScanDesc scan); +extern void btdelete(Relation rel, ItemPointer tid); /* * prototypes for functions in nbtscan.c */ -extern void _bt_regscan(IndexScanDesc scan); -extern void _bt_dropscan(IndexScanDesc scan); -extern void _bt_adjscans(Relation rel, ItemPointer tid, int op); +extern void _bt_regscan(IndexScanDesc scan); +extern void _bt_dropscan(IndexScanDesc scan); +extern void _bt_adjscans(Relation rel, ItemPointer tid, int op); /* * prototypes for functions in nbtsearch.c */ -extern BTStack _bt_search(Relation rel, int keysz, ScanKey scankey, - Buffer *bufP); -extern Buffer _bt_moveright(Relation rel, Buffer buf, int keysz, - ScanKey scankey, int access); -extern bool _bt_skeycmp(Relation rel, Size keysz, ScanKey scankey, +extern BTStack +_bt_search(Relation rel, int keysz, ScanKey scankey, + Buffer * bufP); +extern Buffer +_bt_moveright(Relation rel, Buffer buf, int keysz, + ScanKey scankey, int access); +extern bool +_bt_skeycmp(Relation rel, Size keysz, ScanKey scankey, Page page, ItemId itemid, StrategyNumber strat); -extern OffsetNumber _bt_binsrch(Relation rel, Buffer buf, int keysz, - ScanKey scankey, int srchtype); +extern OffsetNumber +_bt_binsrch(Relation rel, Buffer buf, int keysz, + ScanKey scankey, int srchtype); extern RetrieveIndexResult _bt_next(IndexScanDesc scan, ScanDirection dir); extern RetrieveIndexResult _bt_first(IndexScanDesc scan, ScanDirection dir); -extern bool _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir); +extern bool _bt_step(IndexScanDesc scan, Buffer * bufP, ScanDirection dir); /* * prototypes for functions in nbtstrat.c */ -extern StrategyNumber _bt_getstrat(Relation rel, AttrNumber attno, - RegProcedure proc); -extern bool _bt_invokestrat(Relation rel, AttrNumber attno, - StrategyNumber strat, Datum left, Datum right); +extern StrategyNumber +_bt_getstrat(Relation rel, AttrNumber attno, + RegProcedure proc); +extern bool +_bt_invokestrat(Relation rel, AttrNumber attno, + StrategyNumber strat, Datum left, Datum right); /* * prototypes for functions in nbtutils.c */ -extern ScanKey _bt_mkscankey(Relation rel, IndexTuple itup); -extern void _bt_freeskey(ScanKey skey); -extern void _bt_freestack(BTStack stack); -extern void _bt_orderkeys(Relation relation, BTScanOpaque so); -extern bool _bt_checkkeys (IndexScanDesc scan, IndexTuple tuple, Size *keysok); -extern BTItem _bt_formitem(IndexTuple itup); +extern ScanKey _bt_mkscankey(Relation rel, IndexTuple itup); +extern void _bt_freeskey(ScanKey skey); +extern void _bt_freestack(BTStack stack); +extern void _bt_orderkeys(Relation relation, BTScanOpaque so); +extern bool _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size * keysok); +extern BTItem _bt_formitem(IndexTuple itup); /* * prototypes for functions in nbtsort.c */ -extern void *_bt_spoolinit(Relation index, int ntapes, bool isunique); -extern void _bt_spooldestroy(void *spool); -extern void _bt_spool(Relation index, BTItem btitem, void *spool); -extern void _bt_leafbuild(Relation index, void *spool); +extern void *_bt_spoolinit(Relation index, int ntapes, bool isunique); +extern void _bt_spooldestroy(void *spool); +extern void _bt_spool(Relation index, BTItem btitem, void *spool); +extern void _bt_leafbuild(Relation index, void *spool); -#endif /* NBTREE_H */ +#endif /* NBTREE_H */ diff --git a/src/include/access/printtup.h b/src/include/access/printtup.h index 81321c6ca6f..65994dbe7ef 100644 --- a/src/include/access/printtup.h +++ b/src/include/access/printtup.h @@ -1,26 +1,26 @@ /*------------------------------------------------------------------------- * * printtup.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: printtup.h,v 1.2 1996/11/06 08:52:04 scrappy Exp $ + * $Id: printtup.h,v 1.3 1997/09/07 04:56:07 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PRINTTUP_H +#ifndef PRINTTUP_H #define PRINTTUP_H #include <access/htup.h> #include <access/tupdesc.h> -extern Oid typtoout(Oid type); -extern void printtup(HeapTuple tuple, TupleDesc typeinfo); -extern void showatts(char *name, TupleDesc attinfo); -extern void debugtup(HeapTuple tuple, TupleDesc typeinfo); -extern void printtup_internal(HeapTuple tuple, TupleDesc typeinfo); -extern Oid gettypelem(Oid type); +extern Oid typtoout(Oid type); +extern void printtup(HeapTuple tuple, TupleDesc typeinfo); +extern void showatts(char *name, TupleDesc attinfo); +extern void debugtup(HeapTuple tuple, TupleDesc typeinfo); +extern void printtup_internal(HeapTuple tuple, TupleDesc typeinfo); +extern Oid gettypelem(Oid type); -#endif /* PRINTTUP_H */ +#endif /* PRINTTUP_H */ diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index 60a2be58dea..356bcefc529 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -1,80 +1,82 @@ /*------------------------------------------------------------------------- * * relscan.h-- - * POSTGRES internal relation scan descriptor definitions. + * POSTGRES internal relation scan descriptor definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: relscan.h,v 1.5 1996/11/04 08:52:41 scrappy Exp $ + * $Id: relscan.h,v 1.6 1997/09/07 04:56:08 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef RELSCAN_H +#ifndef RELSCAN_H #define RELSCAN_H #include <utils/tqual.h> #include <storage/buf.h> #include <utils/rel.h> -typedef ItemPointerData MarkData; +typedef ItemPointerData MarkData; -typedef struct HeapScanDescData { - Relation rs_rd; /* pointer to relation descriptor */ - HeapTuple rs_ptup; /* previous tuple in scan */ - HeapTuple rs_ctup; /* current tuple in scan */ - HeapTuple rs_ntup; /* next tuple in scan */ - Buffer rs_pbuf; /* previous buffer in scan */ - Buffer rs_cbuf; /* current buffer in scan */ - Buffer rs_nbuf; /* next buffer in scan */ - ItemPointerData rs_mptid; /* marked previous tid */ - ItemPointerData rs_mctid; /* marked current tid */ - ItemPointerData rs_mntid; /* marked next tid */ - ItemPointerData rs_mcd; /* marked current delta XXX ??? */ - bool rs_atend; /* restart scan at end? */ - TimeQual rs_tr; /* time qualification */ - uint16 rs_cdelta; /* current delta in chain */ - uint16 rs_nkeys; /* number of attributes in keys */ - ScanKey rs_key; /* key descriptors */ -} HeapScanDescData; +typedef struct HeapScanDescData +{ + Relation rs_rd; /* pointer to relation descriptor */ + HeapTuple rs_ptup; /* previous tuple in scan */ + HeapTuple rs_ctup; /* current tuple in scan */ + HeapTuple rs_ntup; /* next tuple in scan */ + Buffer rs_pbuf; /* previous buffer in scan */ + Buffer rs_cbuf; /* current buffer in scan */ + Buffer rs_nbuf; /* next buffer in scan */ + ItemPointerData rs_mptid; /* marked previous tid */ + ItemPointerData rs_mctid; /* marked current tid */ + ItemPointerData rs_mntid; /* marked next tid */ + ItemPointerData rs_mcd; /* marked current delta XXX ??? */ + bool rs_atend; /* restart scan at end? */ + TimeQual rs_tr; /* time qualification */ + uint16 rs_cdelta; /* current delta in chain */ + uint16 rs_nkeys; /* number of attributes in keys */ + ScanKey rs_key; /* key descriptors */ +} HeapScanDescData; typedef HeapScanDescData *HeapScanDesc; -typedef struct IndexScanDescData { - Relation relation; /* relation descriptor */ - void *opaque; /* am-specific slot */ - ItemPointerData previousItemData; /* previous index pointer */ - ItemPointerData currentItemData; /* current index pointer */ - ItemPointerData nextItemData; /* next index pointer */ - MarkData previousMarkData; /* marked previous pointer */ - MarkData currentMarkData; /* marked current pointer */ - MarkData nextMarkData; /* marked next pointer */ - uint8 flags; /* scan position flags */ - bool scanFromEnd; /* restart scan at end? */ - uint16 numberOfKeys; /* number of key attributes */ - ScanKey keyData; /* key descriptor */ -} IndexScanDescData; +typedef struct IndexScanDescData +{ + Relation relation; /* relation descriptor */ + void *opaque; /* am-specific slot */ + ItemPointerData previousItemData; /* previous index pointer */ + ItemPointerData currentItemData; /* current index pointer */ + ItemPointerData nextItemData; /* next index pointer */ + MarkData previousMarkData; /* marked previous pointer */ + MarkData currentMarkData; /* marked current pointer */ + MarkData nextMarkData; /* marked next pointer */ + uint8 flags; /* scan position flags */ + bool scanFromEnd;/* restart scan at end? */ + uint16 numberOfKeys; /* number of key attributes */ + ScanKey keyData; /* key descriptor */ +} IndexScanDescData; -typedef IndexScanDescData *IndexScanDesc; +typedef IndexScanDescData *IndexScanDesc; /* ---------------- - * IndexScanDescPtr is used in the executor where we have to - * keep track of several index scans when using several indices - * - cim 9/10/89 + * IndexScanDescPtr is used in the executor where we have to + * keep track of several index scans when using several indices + * - cim 9/10/89 * ---------------- */ -typedef IndexScanDesc *IndexScanDescPtr; +typedef IndexScanDesc *IndexScanDescPtr; /* * HeapScanIsValid -- - * True iff the heap scan is valid. + * True iff the heap scan is valid. */ -#define HeapScanIsValid(scan) PointerIsValid(scan) +#define HeapScanIsValid(scan) PointerIsValid(scan) /* * IndexScanIsValid -- - * True iff the index scan is valid. + * True iff the index scan is valid. */ #define IndexScanIsValid(scan) PointerIsValid(scan) -#endif /* RELSCAN_H */ +#endif /* RELSCAN_H */ diff --git a/src/include/access/rtree.h b/src/include/access/rtree.h index c134d3dbbed..98699eba37f 100644 --- a/src/include/access/rtree.h +++ b/src/include/access/rtree.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * rtree.h-- - * common declarations for the rtree access method code. + * common declarations for the rtree access method code. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rtree.h,v 1.6 1997/08/19 21:37:36 momjian Exp $ + * $Id: rtree.h,v 1.7 1997/09/07 04:56:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,116 +23,125 @@ #include <storage/off.h> /* see rtstrat.c for what all this is about */ -#define RTNStrategies 8 -#define RTLeftStrategyNumber 1 -#define RTOverLeftStrategyNumber 2 -#define RTOverlapStrategyNumber 3 -#define RTOverRightStrategyNumber 4 -#define RTRightStrategyNumber 5 -#define RTSameStrategyNumber 6 -#define RTContainsStrategyNumber 7 -#define RTContainedByStrategyNumber 8 - -#define RTNProcs 3 -#define RT_UNION_PROC 1 -#define RT_INTER_PROC 2 -#define RT_SIZE_PROC 3 - -#define F_LEAF (1 << 0) - -typedef struct RTreePageOpaqueData { - uint32 flags; -} RTreePageOpaqueData; - -typedef RTreePageOpaqueData *RTreePageOpaque; +#define RTNStrategies 8 +#define RTLeftStrategyNumber 1 +#define RTOverLeftStrategyNumber 2 +#define RTOverlapStrategyNumber 3 +#define RTOverRightStrategyNumber 4 +#define RTRightStrategyNumber 5 +#define RTSameStrategyNumber 6 +#define RTContainsStrategyNumber 7 +#define RTContainedByStrategyNumber 8 + +#define RTNProcs 3 +#define RT_UNION_PROC 1 +#define RT_INTER_PROC 2 +#define RT_SIZE_PROC 3 + +#define F_LEAF (1 << 0) + +typedef struct RTreePageOpaqueData +{ + uint32 flags; +} RTreePageOpaqueData; + +typedef RTreePageOpaqueData *RTreePageOpaque; /* - * When we descend a tree, we keep a stack of parent pointers. + * When we descend a tree, we keep a stack of parent pointers. */ -typedef struct RTSTACK { - struct RTSTACK *rts_parent; +typedef struct RTSTACK +{ + struct RTSTACK *rts_parent; OffsetNumber rts_child; - BlockNumber rts_blk; -} RTSTACK; + BlockNumber rts_blk; +} RTSTACK; /* - * When we're doing a scan, we need to keep track of the parent stack - * for the marked and current items. Also, rtrees have the following - * property: if you're looking for the box (1,1,2,2), on the internal - * nodes you have to search for all boxes that *contain* (1,1,2,2), and - * not the ones that match it. We have a private scan key for internal - * nodes in the opaque structure for rtrees for this reason. See - * access/index-rtree/rtscan.c and rtstrat.c for how it gets initialized. + * When we're doing a scan, we need to keep track of the parent stack + * for the marked and current items. Also, rtrees have the following + * property: if you're looking for the box (1,1,2,2), on the internal + * nodes you have to search for all boxes that *contain* (1,1,2,2), and + * not the ones that match it. We have a private scan key for internal + * nodes in the opaque structure for rtrees for this reason. See + * access/index-rtree/rtscan.c and rtstrat.c for how it gets initialized. */ -typedef struct RTreeScanOpaqueData { - struct RTSTACK *s_stack; - struct RTSTACK *s_markstk; - uint16 s_flags; - uint16 s_internalNKey; - ScanKey s_internalKey; -} RTreeScanOpaqueData; +typedef struct RTreeScanOpaqueData +{ + struct RTSTACK *s_stack; + struct RTSTACK *s_markstk; + uint16 s_flags; + uint16 s_internalNKey; + ScanKey s_internalKey; +} RTreeScanOpaqueData; -typedef RTreeScanOpaqueData *RTreeScanOpaque; +typedef RTreeScanOpaqueData *RTreeScanOpaque; /* - * When we're doing a scan and updating a tree at the same time, the - * updates may affect the scan. We use the flags entry of the scan's - * opaque space to record our actual position in response to updates - * that we can't handle simply by adjusting pointers. + * When we're doing a scan and updating a tree at the same time, the + * updates may affect the scan. We use the flags entry of the scan's + * opaque space to record our actual position in response to updates + * that we can't handle simply by adjusting pointers. */ #define RTS_CURBEFORE ((uint16) (1 << 0)) #define RTS_MRKBEFORE ((uint16) (1 << 1)) /* root page of an rtree */ -#define P_ROOT 0 +#define P_ROOT 0 /* - * When we update a relation on which we're doing a scan, we need to - * check the scan and fix it if the update affected any of the pages it - * touches. Otherwise, we can miss records that we should see. The only - * times we need to do this are for deletions and splits. See the code in - * rtscan.c for how the scan is fixed. These two contants tell us what sort - * of operation changed the index. + * When we update a relation on which we're doing a scan, we need to + * check the scan and fix it if the update affected any of the pages it + * touches. Otherwise, we can miss records that we should see. The only + * times we need to do this are for deletions and splits. See the code in + * rtscan.c for how the scan is fixed. These two contants tell us what sort + * of operation changed the index. */ -#define RTOP_DEL 0 -#define RTOP_SPLIT 1 +#define RTOP_DEL 0 +#define RTOP_SPLIT 1 /* defined in rtree.c */ -extern void freestack(RTSTACK *s); +extern void freestack(RTSTACK * s); /* rget.c */ extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir); /* - * RTree code. - * Defined in access/index-rtree/ + * RTree code. + * Defined in access/index-rtree/ */ -extern InsertIndexResult rtinsert(Relation r, Datum *datum, char *nulls, - ItemPointer ht_ctid, Relation heapRel); -extern char *rtdelete(Relation r, ItemPointer tid); +extern InsertIndexResult +rtinsert(Relation r, Datum * datum, char *nulls, + ItemPointer ht_ctid, Relation heapRel); +extern char *rtdelete(Relation r, ItemPointer tid); extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir); -extern IndexScanDesc rtbeginscan(Relation r, bool fromEnd, uint16 nkeys, - ScanKey key); - -extern void rtendscan(IndexScanDesc s); -extern void rtmarkpos(IndexScanDesc s); -extern void rtrestrpos(IndexScanDesc s); -extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key); -extern void rtbuild(Relation heap, Relation index, int natts, - AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, - Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo); -extern void _rtdump(Relation r); +extern IndexScanDesc +rtbeginscan(Relation r, bool fromEnd, uint16 nkeys, + ScanKey key); + +extern void rtendscan(IndexScanDesc s); +extern void rtmarkpos(IndexScanDesc s); +extern void rtrestrpos(IndexScanDesc s); +extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key); +extern void +rtbuild(Relation heap, Relation index, int natts, + AttrNumber * attnum, IndexStrategy istrat, uint16 pcount, + Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo); +extern void _rtdump(Relation r); /* rtscan.c */ -extern void rtadjscans(Relation r, int op, BlockNumber blkno, - OffsetNumber offnum); +extern void +rtadjscans(Relation r, int op, BlockNumber blkno, + OffsetNumber offnum); + /* rtstrat.h */ -extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum, - RegProcedure proc); +extern RegProcedure +RTMapOperator(Relation r, AttrNumber attnum, + RegProcedure proc); -#endif /* RTREE_H */ +#endif /* RTREE_H */ diff --git a/src/include/access/rtscan.h b/src/include/access/rtscan.h index 88d36c6e226..b91fc2fa066 100644 --- a/src/include/access/rtscan.h +++ b/src/include/access/rtscan.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * rtscan.h-- - * routines defined in access/rtree/rtscan.c + * routines defined in access/rtree/rtscan.c * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rtscan.h,v 1.1 1996/08/27 21:50:22 scrappy Exp $ + * $Id: rtscan.h,v 1.2 1997/09/07 04:56:10 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef RTSCAN_H -void rtadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum); +void rtadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum); -#endif /* RTSCAN_H */ +#endif /* RTSCAN_H */ diff --git a/src/include/access/rtstrat.h b/src/include/access/rtstrat.h index 7f2b88a721f..3f33f04e914 100644 --- a/src/include/access/rtstrat.h +++ b/src/include/access/rtstrat.h @@ -1,18 +1,19 @@ /*------------------------------------------------------------------------- * * rtstrat.h-- - * routines defined in access/rtree/rtstrat.c + * routines defined in access/rtree/rtstrat.c * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rtstrat.h,v 1.1 1996/08/27 21:50:23 scrappy Exp $ + * $Id: rtstrat.h,v 1.2 1997/09/07 04:56:11 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef RTSTRAT_H -extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum, - RegProcedure proc); +extern RegProcedure +RTMapOperator(Relation r, AttrNumber attnum, + RegProcedure proc); -#endif /* RTSTRAT_H */ +#endif /* RTSTRAT_H */ diff --git a/src/include/access/sdir.h b/src/include/access/sdir.h index 9d60e2dd3d3..cc8826c528c 100644 --- a/src/include/access/sdir.h +++ b/src/include/access/sdir.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * sdir.h-- - * POSTGRES scan direction definitions. + * POSTGRES scan direction definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: sdir.h,v 1.2 1996/10/31 09:46:42 scrappy Exp $ + * $Id: sdir.h,v 1.3 1997/09/07 04:56:12 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef SDIR_H +#ifndef SDIR_H #define SDIR_H @@ -18,39 +18,40 @@ * ScanDirection was an int8 for no apparent reason. I kept the original * values because I'm not sure if I'll break anything otherwise. -ay 2/95 */ -typedef enum ScanDirection { - BackwardScanDirection = -1, - NoMovementScanDirection = 0, - ForwardScanDirection = 1 +typedef enum ScanDirection +{ + BackwardScanDirection = -1, + NoMovementScanDirection = 0, + ForwardScanDirection = 1 } ScanDirection; /* * ScanDirectionIsValid -- - * True iff scan direction is valid. + * True iff scan direction is valid. */ #define ScanDirectionIsValid(direction) \ - ((bool) (BackwardScanDirection <= direction && \ - direction <= ForwardScanDirection)) + ((bool) (BackwardScanDirection <= direction && \ + direction <= ForwardScanDirection)) /* * ScanDirectionIsBackward -- - * True iff scan direction is backward. + * True iff scan direction is backward. */ #define ScanDirectionIsBackward(direction) \ - ((bool) (direction == BackwardScanDirection)) + ((bool) (direction == BackwardScanDirection)) /* * ScanDirectionIsNoMovement -- - * True iff scan direction indicates no movement. + * True iff scan direction indicates no movement. */ #define ScanDirectionIsNoMovement(direction) \ - ((bool) (direction == NoMovementScanDirection)) + ((bool) (direction == NoMovementScanDirection)) /* * ScanDirectionIsForward -- - * True iff scan direction is forward. + * True iff scan direction is forward. */ #define ScanDirectionIsForward(direction) \ - ((bool) (direction == ForwardScanDirection)) + ((bool) (direction == ForwardScanDirection)) -#endif /* SDIR_H */ +#endif /* SDIR_H */ diff --git a/src/include/access/skey.h b/src/include/access/skey.h index d392bfef0d7..44c43c88758 100644 --- a/src/include/access/skey.h +++ b/src/include/access/skey.h @@ -1,50 +1,52 @@ /*------------------------------------------------------------------------- * * skey.h-- - * POSTGRES scan key definitions. + * POSTGRES scan key definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: skey.h,v 1.3 1996/11/04 07:45:26 scrappy Exp $ + * $Id: skey.h,v 1.4 1997/09/07 04:56:13 momjian Exp $ * * * Note: - * Needs more accessor/assignment routines. + * Needs more accessor/assignment routines. *------------------------------------------------------------------------- */ -#ifndef SKEY_H +#ifndef SKEY_H #define SKEY_H #include <access/attnum.h> -typedef struct ScanKeyData { - bits16 sk_flags; /* flags */ - AttrNumber sk_attno; /* domain number */ - RegProcedure sk_procedure; /* procedure OID */ - func_ptr sk_func; - int32 sk_nargs; - Datum sk_argument; /* data to compare */ -} ScanKeyData; +typedef struct ScanKeyData +{ + bits16 sk_flags; /* flags */ + AttrNumber sk_attno; /* domain number */ + RegProcedure sk_procedure; /* procedure OID */ + func_ptr sk_func; + int32 sk_nargs; + Datum sk_argument;/* data to compare */ +} ScanKeyData; -typedef ScanKeyData *ScanKey; +typedef ScanKeyData *ScanKey; -#define SK_ISNULL 0x1 -#define SK_UNARY 0x2 -#define SK_NEGATE 0x4 -#define SK_COMMUTE 0x8 +#define SK_ISNULL 0x1 +#define SK_UNARY 0x2 +#define SK_NEGATE 0x4 +#define SK_COMMUTE 0x8 -#define ScanUnmarked 0x01 +#define ScanUnmarked 0x01 #define ScanUncheckedPrevious 0x02 -#define ScanUncheckedNext 0x04 +#define ScanUncheckedNext 0x04 /* * prototypes for functions in access/common/scankey.c */ -extern void ScanKeyEntrySetIllegal(ScanKey entry); -extern void ScanKeyEntryInitialize(ScanKey entry, bits16 flags, - AttrNumber attributeNumber, RegProcedure procedure, Datum argument); +extern void ScanKeyEntrySetIllegal(ScanKey entry); +extern void +ScanKeyEntryInitialize(ScanKey entry, bits16 flags, + AttrNumber attributeNumber, RegProcedure procedure, Datum argument); -#endif /* SKEY_H */ +#endif /* SKEY_H */ diff --git a/src/include/access/strat.h b/src/include/access/strat.h index 5cd23255efa..035582ef766 100644 --- a/src/include/access/strat.h +++ b/src/include/access/strat.h @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * * strat.h-- - * index strategy type definitions - * (separated out from original istrat.h to avoid circular refs) + * index strategy type definitions + * (separated out from original istrat.h to avoid circular refs) * * * Copyright (c) 1994, Regents of the University of California * - * $Id: strat.h,v 1.4 1996/11/04 07:45:27 scrappy Exp $ + * $Id: strat.h,v 1.5 1997/09/07 04:56:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,67 +18,76 @@ typedef uint16 StrategyNumber; -#define InvalidStrategy 0 +#define InvalidStrategy 0 -typedef struct StrategyTransformMapData { - StrategyNumber strategy[1]; /* VARIABLE LENGTH ARRAY */ -} StrategyTransformMapData; /* VARIABLE LENGTH STRUCTURE */ +typedef struct StrategyTransformMapData +{ + StrategyNumber strategy[1];/* VARIABLE LENGTH ARRAY */ +} StrategyTransformMapData; /* VARIABLE LENGTH -typedef StrategyTransformMapData *StrategyTransformMap; + * STRUCTURE */ -typedef struct StrategyOperatorData { - StrategyNumber strategy; - bits16 flags; /* scan qualification flags h/skey.h */ -} StrategyOperatorData; +typedef StrategyTransformMapData *StrategyTransformMap; -typedef StrategyOperatorData *StrategyOperator; +typedef struct StrategyOperatorData +{ + StrategyNumber strategy; + bits16 flags; /* scan qualification flags h/skey.h */ +} StrategyOperatorData; -typedef struct StrategyTermData { /* conjunctive term */ - uint16 degree; - StrategyOperatorData operatorData[1]; /* VARIABLE LENGTH */ -} StrategyTermData; /* VARIABLE LENGTH STRUCTURE */ +typedef StrategyOperatorData *StrategyOperator; -typedef StrategyTermData *StrategyTerm; +typedef struct StrategyTermData +{ /* conjunctive term */ + uint16 degree; + StrategyOperatorData operatorData[1]; /* VARIABLE LENGTH */ +} StrategyTermData; /* VARIABLE LENGTH STRUCTURE */ -typedef struct StrategyExpressionData { /* disjunctive normal form */ - StrategyTerm term[1]; /* VARIABLE LENGTH ARRAY */ -} StrategyExpressionData; /* VARIABLE LENGTH STRUCTURE */ +typedef StrategyTermData *StrategyTerm; -typedef StrategyExpressionData *StrategyExpression; +typedef struct StrategyExpressionData +{ /* disjunctive normal form */ + StrategyTerm term[1]; /* VARIABLE LENGTH ARRAY */ +} StrategyExpressionData; /* VARIABLE LENGTH STRUCTURE */ -typedef struct StrategyEvaluationData { - StrategyNumber maxStrategy; - StrategyTransformMap negateTransform; - StrategyTransformMap commuteTransform; - StrategyTransformMap negateCommuteTransform; - StrategyExpression expression[12]; /* XXX VARIABLE LENGTH */ -} StrategyEvaluationData; /* VARIABLE LENGTH STRUCTURE */ +typedef StrategyExpressionData *StrategyExpression; -typedef StrategyEvaluationData *StrategyEvaluation; +typedef struct StrategyEvaluationData +{ + StrategyNumber maxStrategy; + StrategyTransformMap negateTransform; + StrategyTransformMap commuteTransform; + StrategyTransformMap negateCommuteTransform; + StrategyExpression expression[12]; /* XXX VARIABLE LENGTH */ +} StrategyEvaluationData; /* VARIABLE LENGTH STRUCTURE */ + +typedef StrategyEvaluationData *StrategyEvaluation; /* * StrategyTransformMapIsValid -- - * Returns true iff strategy transformation map is valid. + * Returns true iff strategy transformation map is valid. */ -#define StrategyTransformMapIsValid(transform) PointerIsValid(transform) +#define StrategyTransformMapIsValid(transform) PointerIsValid(transform) -#ifndef CorrectStrategies /* XXX this should be removable */ -#define AMStrategies(foo) 12 -#else /* !defined(CorrectStrategies) */ -#define AMStrategies(foo) (foo) -#endif /* !defined(CorrectStrategies) */ +#ifndef CorrectStrategies /* XXX this should be removable */ +#define AMStrategies(foo) 12 +#else /* !defined(CorrectStrategies) */ +#define AMStrategies(foo) (foo) +#endif /* !defined(CorrectStrategies) */ -typedef struct StrategyMapData { +typedef struct StrategyMapData +{ ScanKeyData entry[1]; /* VARIABLE LENGTH ARRAY */ -} StrategyMapData; /* VARIABLE LENGTH STRUCTURE */ +} StrategyMapData;/* VARIABLE LENGTH STRUCTURE */ -typedef StrategyMapData *StrategyMap; +typedef StrategyMapData *StrategyMap; -typedef struct IndexStrategyData { - StrategyMapData strategyMapData[1]; /* VARIABLE LENGTH ARRAY */ -} IndexStrategyData; /* VARIABLE LENGTH STRUCTURE */ +typedef struct IndexStrategyData +{ + StrategyMapData strategyMapData[1]; /* VARIABLE LENGTH ARRAY */ +} IndexStrategyData; /* VARIABLE LENGTH STRUCTURE */ -typedef IndexStrategyData *IndexStrategy; +typedef IndexStrategyData *IndexStrategy; -#endif /*STRAT_H */ +#endif /* STRAT_H */ diff --git a/src/include/access/transam.h b/src/include/access/transam.h index 1d794594872..98a07aad102 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * transam.h-- - * postgres transaction access method support code header + * postgres transaction access method support code header * * * Copyright (c) 1994, Regents of the University of California * - * $Id: transam.h,v 1.7 1997/08/19 21:37:38 momjian Exp $ + * $Id: transam.h,v 1.8 1997/09/07 04:56:14 momjian Exp $ * - * NOTES - * Transaction System Version 101 now support proper oid - * generation and recording in the variable relation. + * NOTES + * Transaction System Version 101 now support proper oid + * generation and recording in the variable relation. * *------------------------------------------------------------------------- */ @@ -21,119 +21,122 @@ #include <utils/nabstime.h> /* ---------------- - * transaction system version id + * transaction system version id * - * this is stored on the first page of the log, time and variable - * relations on the first 4 bytes. This is so that if we improve - * the format of the transaction log after postgres version 2, then - * people won't have to rebuild their databases. + * this is stored on the first page of the log, time and variable + * relations on the first 4 bytes. This is so that if we improve + * the format of the transaction log after postgres version 2, then + * people won't have to rebuild their databases. * - * TRANS_SYSTEM_VERSION 100 means major version 1 minor version 0. - * Two databases with the same major version should be compatible, - * even if their minor versions differ. + * TRANS_SYSTEM_VERSION 100 means major version 1 minor version 0. + * Two databases with the same major version should be compatible, + * even if their minor versions differ. * ---------------- */ #define TRANS_SYSTEM_VERSION 101 /* ---------------- - * transaction id status values + * transaction id status values * - * someday we will use "11" = 3 = XID_INVALID to mean the - * starting of run-length encoded log data. + * someday we will use "11" = 3 = XID_INVALID to mean the + * starting of run-length encoded log data. * ---------------- */ -#define XID_COMMIT 2 /* transaction commited */ -#define XID_ABORT 1 /* transaction aborted */ -#define XID_INPROGRESS 0 /* transaction in progress */ -#define XID_INVALID 3 /* other */ +#define XID_COMMIT 2 /* transaction commited */ +#define XID_ABORT 1 /* transaction aborted */ +#define XID_INPROGRESS 0 /* transaction in progress */ +#define XID_INVALID 3 /* other */ -typedef unsigned char XidStatus; /* (2 bits) */ +typedef unsigned char XidStatus;/* (2 bits) */ /* ---------- - * note: we reserve the first 16384 object ids for internal use. - * oid's less than this appear in the .bki files. the choice of - * 16384 is completely arbitrary. + * note: we reserve the first 16384 object ids for internal use. + * oid's less than this appear in the .bki files. the choice of + * 16384 is completely arbitrary. * ---------- */ #define BootstrapObjectIdData 16384 /* ---------------- - * BitIndexOf computes the index of the Nth xid on a given block + * BitIndexOf computes the index of the Nth xid on a given block * ---------------- */ -#define BitIndexOf(N) ((N) * 2) +#define BitIndexOf(N) ((N) * 2) /* ---------------- - * transaction page definitions + * transaction page definitions * ---------------- */ -#define TP_DataSize BLCKSZ -#define TP_NumXidStatusPerBlock (TP_DataSize * 4) -#define TP_NumTimePerBlock (TP_DataSize / 4) +#define TP_DataSize BLCKSZ +#define TP_NumXidStatusPerBlock (TP_DataSize * 4) +#define TP_NumTimePerBlock (TP_DataSize / 4) /* ---------------- - * LogRelationContents structure + * LogRelationContents structure * - * This structure describes the storage of the data in the - * first 128 bytes of the log relation. This storage is never - * used for transaction status because transaction id's begin - * their numbering at 512. + * This structure describes the storage of the data in the + * first 128 bytes of the log relation. This storage is never + * used for transaction status because transaction id's begin + * their numbering at 512. * - * The first 4 bytes of this relation store the version - * number of the transction system. + * The first 4 bytes of this relation store the version + * number of the transction system. * ---------------- */ -typedef struct LogRelationContentsData { - int TransSystemVersion; -} LogRelationContentsData; +typedef struct LogRelationContentsData +{ + int TransSystemVersion; +} LogRelationContentsData; typedef LogRelationContentsData *LogRelationContents; /* ---------------- - * TimeRelationContents structure + * TimeRelationContents structure * - * This structure describes the storage of the data in the - * first 2048 bytes of the time relation. This storage is never - * used for transaction commit times because transaction id's begin - * their numbering at 512. + * This structure describes the storage of the data in the + * first 2048 bytes of the time relation. This storage is never + * used for transaction commit times because transaction id's begin + * their numbering at 512. * - * The first 4 bytes of this relation store the version - * number of the transction system. + * The first 4 bytes of this relation store the version + * number of the transction system. * ---------------- */ -typedef struct TimeRelationContentsData { - int TransSystemVersion; -} TimeRelationContentsData; +typedef struct TimeRelationContentsData +{ + int TransSystemVersion; +} TimeRelationContentsData; typedef TimeRelationContentsData *TimeRelationContents; /* ---------------- - * VariableRelationContents structure + * VariableRelationContents structure * - * The variable relation is a special "relation" which - * is used to store various system "variables" persistantly. - * Unlike other relations in the system, this relation - * is updated in place whenever the variables change. + * The variable relation is a special "relation" which + * is used to store various system "variables" persistantly. + * Unlike other relations in the system, this relation + * is updated in place whenever the variables change. * - * The first 4 bytes of this relation store the version - * number of the transction system. + * The first 4 bytes of this relation store the version + * number of the transction system. * - * Currently, the relation has only one page and the next - * available xid, the last committed xid and the next - * available oid are stored there. + * Currently, the relation has only one page and the next + * available xid, the last committed xid and the next + * available oid are stored there. * ---------------- */ -typedef struct VariableRelationContentsData { - int TransSystemVersion; - TransactionId nextXidData; - TransactionId lastXidData; - Oid nextOid; -} VariableRelationContentsData; +typedef struct VariableRelationContentsData +{ + int TransSystemVersion; + TransactionId nextXidData; + TransactionId lastXidData; + Oid nextOid; +} VariableRelationContentsData; typedef VariableRelationContentsData *VariableRelationContents; /* ---------------- - * extern declarations + * extern declarations * ---------------- */ @@ -141,59 +144,64 @@ typedef VariableRelationContentsData *VariableRelationContents; * prototypes for functions in transam/transam.c */ extern AbsoluteTime TransactionIdGetCommitTime(TransactionId transactionId); -extern void InitializeTransactionLog(void); -extern bool TransactionIdDidCommit(TransactionId transactionId); -extern bool TransactionIdDidAbort(TransactionId transactionId); -extern void TransactionIdCommit(TransactionId transactionId); -extern void TransactionIdAbort(TransactionId transactionId); +extern void InitializeTransactionLog(void); +extern bool TransactionIdDidCommit(TransactionId transactionId); +extern bool TransactionIdDidAbort(TransactionId transactionId); +extern void TransactionIdCommit(TransactionId transactionId); +extern void TransactionIdAbort(TransactionId transactionId); /* in transam/transsup.c */ -extern void AmiTransactionOverride(bool flag); -extern void TransComputeBlockNumber(Relation relation, - TransactionId transactionId, BlockNumber *blockNumberOutP); -extern XidStatus TransBlockNumberGetXidStatus(Relation relation, - BlockNumber blockNumber, TransactionId xid, bool *failP); -extern void TransBlockNumberSetXidStatus(Relation relation, - BlockNumber blockNumber, TransactionId xid, XidStatus xstatus, - bool *failP); -extern AbsoluteTime TransBlockNumberGetCommitTime(Relation relation, - BlockNumber blockNumber, TransactionId xid, bool *failP); -extern void TransBlockNumberSetCommitTime(Relation relation, - BlockNumber blockNumber, TransactionId xid, AbsoluteTime xtime, - bool *failP); +extern void AmiTransactionOverride(bool flag); +extern void +TransComputeBlockNumber(Relation relation, + TransactionId transactionId, BlockNumber * blockNumberOutP); +extern XidStatus +TransBlockNumberGetXidStatus(Relation relation, + BlockNumber blockNumber, TransactionId xid, bool * failP); +extern void +TransBlockNumberSetXidStatus(Relation relation, + BlockNumber blockNumber, TransactionId xid, XidStatus xstatus, + bool * failP); +extern AbsoluteTime +TransBlockNumberGetCommitTime(Relation relation, + BlockNumber blockNumber, TransactionId xid, bool * failP); +extern void +TransBlockNumberSetCommitTime(Relation relation, + BlockNumber blockNumber, TransactionId xid, AbsoluteTime xtime, + bool * failP); /* in transam/varsup.c */ -extern void VariableRelationPutNextXid(TransactionId xid); -extern void GetNewTransactionId(TransactionId *xid); -extern void UpdateLastCommittedXid(TransactionId xid); -extern void GetNewObjectId(Oid *oid_return); -extern void CheckMaxObjectId(Oid assigned_oid); +extern void VariableRelationPutNextXid(TransactionId xid); +extern void GetNewTransactionId(TransactionId * xid); +extern void UpdateLastCommittedXid(TransactionId xid); +extern void GetNewObjectId(Oid * oid_return); +extern void CheckMaxObjectId(Oid assigned_oid); /* ---------------- - * global variable extern declarations + * global variable extern declarations * ---------------- */ /* in transam.c */ -extern Relation LogRelation; -extern Relation TimeRelation; -extern Relation VariableRelation; +extern Relation LogRelation; +extern Relation TimeRelation; +extern Relation VariableRelation; -extern TransactionId cachedGetCommitTimeXid; -extern AbsoluteTime cachedGetCommitTime; -extern TransactionId cachedTestXid; -extern XidStatus cachedTestXidStatus; +extern TransactionId cachedGetCommitTimeXid; +extern AbsoluteTime cachedGetCommitTime; +extern TransactionId cachedTestXid; +extern XidStatus cachedTestXidStatus; extern TransactionId NullTransactionId; extern TransactionId AmiTransactionId; extern TransactionId FirstTransactionId; -extern int RecoveryCheckingEnableState; +extern int RecoveryCheckingEnableState; /* in transsup.c */ -extern bool AMI_OVERRIDE; +extern bool AMI_OVERRIDE; /* in varsup.c */ -extern int OidGenLockId; +extern int OidGenLockId; -#endif /* TRAMSAM_H */ +#endif /* TRAMSAM_H */ diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h index f27bdc7f0a5..4196e6b955c 100644 --- a/src/include/access/tupdesc.h +++ b/src/include/access/tupdesc.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * tupdesc.h-- - * POSTGRES tuple descriptor definitions. + * POSTGRES tuple descriptor definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: tupdesc.h,v 1.8 1997/08/22 03:55:39 vadim Exp $ + * $Id: tupdesc.h,v 1.9 1997/09/07 04:56:16 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef TUPDESC_H +#ifndef TUPDESC_H #define TUPDESC_H #include <nodes/pg_list.h> @@ -18,56 +18,61 @@ #include <catalog/pg_attribute.h> -typedef struct attrDefault { - AttrNumber adnum; - char *adbin; - char *adsrc; -} AttrDefault; +typedef struct attrDefault +{ + AttrNumber adnum; + char *adbin; + char *adsrc; +} AttrDefault; -typedef struct constrCheck { - char *ccname; - char *ccbin; - char *ccsrc; -} ConstrCheck; +typedef struct constrCheck +{ + char *ccname; + char *ccbin; + char *ccsrc; +} ConstrCheck; /* This structure contains constraints of a tuple */ -typedef struct tupleConstr { - AttrDefault *defval; - ConstrCheck *check; - uint16 num_defval; - uint16 num_check; - bool has_not_null; -} TupleConstr; +typedef struct tupleConstr +{ + AttrDefault *defval; + ConstrCheck *check; + uint16 num_defval; + uint16 num_check; + bool has_not_null; +} TupleConstr; /* * This structure contains all information (i.e. from Classes - * pg_attribute, pg_attrdef, pg_relcheck) for a tuple. + * pg_attribute, pg_attrdef, pg_relcheck) for a tuple. */ -typedef struct tupleDesc { - int natts; - /* Number of attributes in the tuple */ - AttributeTupleForm *attrs; - /* attrs[N] is a pointer to the description of Attribute Number N+1. */ - TupleConstr *constr; -} *TupleDesc; +typedef struct tupleDesc +{ + int natts; + /* Number of attributes in the tuple */ + AttributeTupleForm *attrs; + /* attrs[N] is a pointer to the description of Attribute Number N+1. */ + TupleConstr *constr; +} *TupleDesc; extern TupleDesc CreateTemplateTupleDesc(int natts); -extern TupleDesc CreateTupleDesc(int natts, AttributeTupleForm *attrs); +extern TupleDesc CreateTupleDesc(int natts, AttributeTupleForm * attrs); extern TupleDesc CreateTupleDescCopy(TupleDesc tupdesc); extern TupleDesc CreateTupleDescCopyConstr(TupleDesc tupdesc); -extern void FreeTupleDesc(TupleDesc tupdesc); +extern void FreeTupleDesc(TupleDesc tupdesc); -extern bool TupleDescInitEntry(TupleDesc desc, - AttrNumber attributeNumber, - char *attributeName, - char *typeName, - int attdim, - bool attisset); +extern bool +TupleDescInitEntry(TupleDesc desc, + AttrNumber attributeNumber, + char *attributeName, + char *typeName, + int attdim, + bool attisset); -extern TupleDesc BuildDescForRelation(List *schema, char *relname); +extern TupleDesc BuildDescForRelation(List * schema, char *relname); -#endif /* TUPDESC_H */ +#endif /* TUPDESC_H */ diff --git a/src/include/access/tupmacs.h b/src/include/access/tupmacs.h index 23e8ea1686a..39d3004d561 100644 --- a/src/include/access/tupmacs.h +++ b/src/include/access/tupmacs.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * tupmacs.h-- - * Tuple macros used by both index tuples and heap tuples. + * Tuple macros used by both index tuples and heap tuples. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: tupmacs.h,v 1.1 1996/08/27 21:50:27 scrappy Exp $ + * $Id: tupmacs.h,v 1.2 1997/09/07 04:56:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,7 @@ * given a AttributeTupleForm and a pointer into a tuple's data * area, return the correct value or pointer. * - * We return a 4 byte (char *) value in all cases. If the attribute has + * We return a 4 byte (char *) value in all cases. If the attribute has * "byval" false or has variable length, we return the same pointer * into the tuple data area that we're passed. Otherwise, we return * the 1, 2, or 4 bytes pointed to by it, properly extended to 4 @@ -31,7 +31,7 @@ * note that T must already be properly LONGALIGN/SHORTALIGN'd for * this to work correctly. * - * the double-cast is to stop gcc from (correctly) complaining about + * the double-cast is to stop gcc from (correctly) complaining about * casting integer types with size < sizeof(char *) to (char *). * sign-extension may get weird if you use an integer type that * isn't the same size as (char *) for the first cast. (on the other @@ -39,17 +39,17 @@ * * attbyval seems to be fairly redundant. We have to return a pointer if * the value is longer than 4 bytes or has variable length; returning the - * value would be useless. In fact, for at least the variable length case, + * value would be useless. In fact, for at least the variable length case, * the caller assumes we return a pointer regardless of attbyval. * I would eliminate attbyval altogether, but I don't know how. -BRYANH. */ #define fetchatt(A, T) \ ((*(A))->attbyval && (*(A))->attlen != -1 \ ? ((*(A))->attlen > sizeof(int16) \ - ? (char *) (long) *((int32 *)(T)) \ - : ((*(A))->attlen < sizeof(int16) \ - ? (char *) (long) *((char *)(T)) \ - : (char *) (long) *((int16 *)(T)))) \ + ? (char *) (long) *((int32 *)(T)) \ + : ((*(A))->attlen < sizeof(int16) \ + ? (char *) (long) *((char *)(T)) \ + : (char *) (long) *((int16 *)(T)))) \ : (char *) (T)) - + #endif diff --git a/src/include/access/valid.h b/src/include/access/valid.h index ca209a16e5a..7eb639230ab 100644 --- a/src/include/access/valid.h +++ b/src/include/access/valid.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * valid.h-- - * POSTGRES tuple qualification validity definitions. + * POSTGRES tuple qualification validity definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: valid.h,v 1.4 1997/03/28 07:05:54 scrappy Exp $ + * $Id: valid.h,v 1.5 1997/09/07 04:56:18 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef VALID_H +#ifndef VALID_H #define VALID_H #include <utils/tqual.h> @@ -18,18 +18,20 @@ #include <utils/rel.h> /* ---------------- - * extern decl's + * extern decl's * ---------------- */ -extern bool heap_keytest(HeapTuple t, TupleDesc tupdesc, +extern bool +heap_keytest(HeapTuple t, TupleDesc tupdesc, int nkeys, ScanKey keys); -extern HeapTuple heap_tuple_satisfies(ItemId itemId, Relation relation, - Buffer buffer, PageHeader disk_page, - TimeQual qual, int nKeys, - ScanKey key); +extern HeapTuple +heap_tuple_satisfies(ItemId itemId, Relation relation, + Buffer buffer, PageHeader disk_page, + TimeQual qual, int nKeys, + ScanKey key); -extern bool TupleUpdatedByCurXactAndCmd(HeapTuple t); +extern bool TupleUpdatedByCurXactAndCmd(HeapTuple t); -#endif /* VALID_H */ +#endif /* VALID_H */ diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 0aec4bccb82..e8ed4123f06 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * xact.h-- - * postgres transaction system header + * postgres transaction system header * * * Copyright (c) 1994, Regents of the University of California * - * $Id: xact.h,v 1.6 1997/08/29 09:05:25 vadim Exp $ + * $Id: xact.h,v 1.7 1997/09/07 04:56:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,83 +16,85 @@ #include <utils/nabstime.h> /* ---------------- - * transaction state structure + * transaction state structure * ---------------- */ -typedef struct TransactionStateData { - TransactionId transactionIdData; - CommandId commandId; - CommandId scanCommandId; - AbsoluteTime startTime; - int state; - int blockState; -} TransactionStateData; +typedef struct TransactionStateData +{ + TransactionId transactionIdData; + CommandId commandId; + CommandId scanCommandId; + AbsoluteTime startTime; + int state; + int blockState; +} TransactionStateData; /* ---------------- - * transaction states + * transaction states * ---------------- */ -#define TRANS_DEFAULT 0 -#define TRANS_START 1 -#define TRANS_INPROGRESS 2 -#define TRANS_COMMIT 3 -#define TRANS_ABORT 4 -#define TRANS_DISABLED 5 +#define TRANS_DEFAULT 0 +#define TRANS_START 1 +#define TRANS_INPROGRESS 2 +#define TRANS_COMMIT 3 +#define TRANS_ABORT 4 +#define TRANS_DISABLED 5 /* ---------------- - * transaction block states + * transaction block states * ---------------- */ -#define TBLOCK_DEFAULT 0 -#define TBLOCK_BEGIN 1 -#define TBLOCK_INPROGRESS 2 -#define TBLOCK_END 3 -#define TBLOCK_ABORT 4 -#define TBLOCK_ENDABORT 5 +#define TBLOCK_DEFAULT 0 +#define TBLOCK_BEGIN 1 +#define TBLOCK_INPROGRESS 2 +#define TBLOCK_END 3 +#define TBLOCK_ABORT 4 +#define TBLOCK_ENDABORT 5 typedef TransactionStateData *TransactionState; /* ---------------- - * extern definitions + * extern definitions * ---------------- */ -extern int TransactionFlushEnabled(void); -extern void SetTransactionFlushEnabled(bool state); +extern int TransactionFlushEnabled(void); +extern void SetTransactionFlushEnabled(bool state); -extern bool IsTransactionState(void); -extern bool IsAbortedTransactionBlockState(void); -extern void OverrideTransactionSystem(bool flag); +extern bool IsTransactionState(void); +extern bool IsAbortedTransactionBlockState(void); +extern void OverrideTransactionSystem(bool flag); extern TransactionId GetCurrentTransactionId(void); extern CommandId GetCurrentCommandId(void); extern CommandId GetScanCommandId(void); -extern void SetScanCommandId(CommandId); +extern void SetScanCommandId(CommandId); extern AbsoluteTime GetCurrentTransactionStartTime(void); -extern bool TransactionIdIsCurrentTransactionId(TransactionId xid); -extern bool CommandIdIsCurrentCommandId(CommandId cid); -extern bool CommandIdGEScanCommandId(CommandId cid); -extern void CommandCounterIncrement(void); -extern void InitializeTransactionSystem(void); -extern bool CurrentXactInProgress(void); -extern void StartTransactionCommand(void); -extern void CommitTransactionCommand(void); -extern void AbortCurrentTransaction(void); -extern void BeginTransactionBlock(void); -extern void EndTransactionBlock(void); -extern bool IsTransactionBlock(void); -extern void UserAbortTransactionBlock(void); +extern bool TransactionIdIsCurrentTransactionId(TransactionId xid); +extern bool CommandIdIsCurrentCommandId(CommandId cid); +extern bool CommandIdGEScanCommandId(CommandId cid); +extern void CommandCounterIncrement(void); +extern void InitializeTransactionSystem(void); +extern bool CurrentXactInProgress(void); +extern void StartTransactionCommand(void); +extern void CommitTransactionCommand(void); +extern void AbortCurrentTransaction(void); +extern void BeginTransactionBlock(void); +extern void EndTransactionBlock(void); +extern bool IsTransactionBlock(void); +extern void UserAbortTransactionBlock(void); extern TransactionId DisabledTransactionId; /* defined in xid.c */ extern TransactionId xidin(char *representation); -extern char *xidout(TransactionId transactionId); -extern bool xideq(TransactionId xid1, TransactionId xid2); -extern bool TransactionIdIsValid(TransactionId transactionId); -extern void StoreInvalidTransactionId(TransactionId *destination); -extern void TransactionIdStore(TransactionId transactionId, - TransactionId *destination); -extern bool TransactionIdEquals(TransactionId id1, TransactionId id2); -extern bool TransactionIdIsLessThan(TransactionId id1, TransactionId id2); -extern void TransactionIdAdd(TransactionId *xid, int value); +extern char *xidout(TransactionId transactionId); +extern bool xideq(TransactionId xid1, TransactionId xid2); +extern bool TransactionIdIsValid(TransactionId transactionId); +extern void StoreInvalidTransactionId(TransactionId * destination); +extern void +TransactionIdStore(TransactionId transactionId, + TransactionId * destination); +extern bool TransactionIdEquals(TransactionId id1, TransactionId id2); +extern bool TransactionIdIsLessThan(TransactionId id1, TransactionId id2); +extern void TransactionIdAdd(TransactionId * xid, int value); -#endif /* XACT_H */ +#endif /* XACT_H */ diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/bootstrap.h index 12e28495e40..3adecdcdbd3 100644 --- a/src/include/bootstrap/bootstrap.h +++ b/src/include/bootstrap/bootstrap.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * bootstrap.h-- - * include file for the bootstrapping code + * include file for the bootstrapping code * * * Copyright (c) 1994, Regents of the University of California * - * $Id: bootstrap.h,v 1.5 1997/08/19 21:37:42 momjian Exp $ + * $Id: bootstrap.h,v 1.6 1997/09/07 04:56:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,42 +17,44 @@ #include <access/itup.h> #include <utils/rel.h> -#define MAXATTR 40 /* max. number of attributes in a relation */ +#define MAXATTR 40 /* max. number of attributes in a relation */ -typedef struct hashnode { - int strnum; /* Index into string table */ - struct hashnode *next; -} hashnode; +typedef struct hashnode +{ + int strnum; /* Index into string table */ + struct hashnode *next; +} hashnode; #define EMITPROMPT printf("> ") extern Relation reldesc; extern AttributeTupleForm attrtypes[MAXATTR]; -extern int numattr; -extern int DebugMode; +extern int numattr; +extern int DebugMode; -extern int BootstrapMain(int ac, char *av[]); -extern void index_register(char *heap, +extern int BootstrapMain(int ac, char *av[]); +extern void +index_register(char *heap, char *ind, int natts, - AttrNumber *attnos, + AttrNumber * attnos, uint16 nparams, - Datum *params, - FuncIndexInfo *finfo, - PredInfo *predInfo); - -extern void err_out(void); -extern void InsertOneTuple(Oid objectid); -extern void closerel(char *name); -extern void boot_openrel(char *name); -extern char *LexIDStr(int ident_num); - -extern void DefineAttr(char *name, char *type, int attnum); -extern void InsertOneValue(Oid objectid, char *value, int i); -extern void InsertOneNull(int i); -extern char* MapArrayTypeName(char *s); -extern char* CleanUpStr(char *s); -extern int EnterString (char *str); -extern void build_indices(void); - -#endif /* BOOTSTRAP_H */ + Datum * params, + FuncIndexInfo * finfo, + PredInfo * predInfo); + +extern void err_out(void); +extern void InsertOneTuple(Oid objectid); +extern void closerel(char *name); +extern void boot_openrel(char *name); +extern char *LexIDStr(int ident_num); + +extern void DefineAttr(char *name, char *type, int attnum); +extern void InsertOneValue(Oid objectid, char *value, int i); +extern void InsertOneNull(int i); +extern char *MapArrayTypeName(char *s); +extern char *CleanUpStr(char *s); +extern int EnterString(char *str); +extern void build_indices(void); + +#endif /* BOOTSTRAP_H */ diff --git a/src/include/c.h b/src/include/c.h index 9a4bad2b7bf..cf9367c0fd1 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -1,46 +1,46 @@ /*------------------------------------------------------------------------- * * c.h-- - * Fundamental C definitions. This is included by every .c file in - * postgres. + * Fundamental C definitions. This is included by every .c file in + * postgres. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: c.h,v 1.16 1997/08/25 04:15:40 momjian Exp $ + * $Id: c.h,v 1.17 1997/09/07 04:55:35 momjian Exp $ * *------------------------------------------------------------------------- */ /* - * TABLE OF CONTENTS + * TABLE OF CONTENTS * - * When adding stuff to this file, please try and put stuff - * into the relevant section, or add new sections as appropriate. + * When adding stuff to this file, please try and put stuff + * into the relevant section, or add new sections as appropriate. * - * section description - * ------- ------------------------------------------------ - * 1) bool, true, false, TRUE, FALSE - * 2) __STDC__, non-ansi C definitions: - * Pointer typedef, NULL - * cpp magic macros - * type prefixes: const, signed, volatile, inline - * 3) standard system types - * 4) datum type - * 5) IsValid macros for system types - * 6) offsetof, lengthof, endof - * 7) exception handling definitions, Assert, Trap, etc macros - * 8) Min, Max, Abs, strNcpy macros - * 9) externs - * 10) Berkeley-specific defs - * 11) system-specific hacks + * section description + * ------- ------------------------------------------------ + * 1) bool, true, false, TRUE, FALSE + * 2) __STDC__, non-ansi C definitions: + * Pointer typedef, NULL + * cpp magic macros + * type prefixes: const, signed, volatile, inline + * 3) standard system types + * 4) datum type + * 5) IsValid macros for system types + * 6) offsetof, lengthof, endof + * 7) exception handling definitions, Assert, Trap, etc macros + * 8) Min, Max, Abs, strNcpy macros + * 9) externs + * 10) Berkeley-specific defs + * 11) system-specific hacks * - * NOTES + * NOTES * - * This file is MACHINE AND COMPILER dependent!!! (For now.) + * This file is MACHINE AND COMPILER dependent!!! (For now.) * * ---------------------------------------------------------------- */ -#ifndef C_H +#ifndef C_H #define C_H /* We have to include stdlib.h here because it defines many of these macros @@ -50,410 +50,413 @@ #include <stdlib.h> /* ---------------------------------------------------------------- - * Section 1: bool, true, false, TRUE, FALSE + * Section 1: bool, true, false, TRUE, FALSE * ---------------------------------------------------------------- */ /* * bool -- - * Boolean value, either true or false. + * Boolean value, either true or false. * */ #define false ((char) 0) #define true ((char) 1) #ifndef __cplusplus typedef char bool; -#endif /* not C++ */ -typedef bool *BoolPtr; + +#endif /* not C++ */ +typedef bool *BoolPtr; #ifndef TRUE #define TRUE 1 -#endif /* TRUE */ +#endif /* TRUE */ #ifndef FALSE #define FALSE 0 -#endif /* FALSE */ +#endif /* FALSE */ /* ---------------------------------------------------------------- - * Section 2: __STDC__, non-ansi C definitions: + * Section 2: __STDC__, non-ansi C definitions: * - * cpp magic macros - * Pointer typedef, NULL - * type prefixes: const, signed, volatile, inline + * cpp magic macros + * Pointer typedef, NULL + * type prefixes: const, signed, volatile, inline * ---------------------------------------------------------------- */ -#ifdef __STDC__ /* ANSI C */ +#ifdef __STDC__ /* ANSI C */ /* * Pointer -- - * Variable holding address of any memory resident object. + * Variable holding address of any memory resident object. */ /* - * XXX Pointer arithmetic is done with this, so it can't be void * - * under "true" ANSI compilers. + * XXX Pointer arithmetic is done with this, so it can't be void * + * under "true" ANSI compilers. */ -typedef char *Pointer; +typedef char *Pointer; -#ifndef NULL +#ifndef NULL /* * NULL -- - * Null pointer. + * Null pointer. */ #define NULL ((void *) 0) -#endif /* !defined(NULL) */ +#endif /* !defined(NULL) */ -#define HAVE_ANSI_CPP /* all ANSI C compilers must have this! */ +#define HAVE_ANSI_CPP /* all ANSI C compilers must have this! */ #if defined(NEED_STD_HDRS) -#undef NEED_STD_HDRS /* all ANSI systems must have stddef/stdlib */ -#endif /* NEED_STD_HDRS */ +#undef NEED_STD_HDRS /* all ANSI systems must have + * stddef/stdlib */ +#endif /* NEED_STD_HDRS */ -#else /* !defined(__STDC__) */ /* NOT ANSI C */ +#else /* !defined(__STDC__) *//* NOT ANSI C */ /* * Pointer -- - * Variable containing address of any memory resident object. + * Variable containing address of any memory resident object. */ -typedef char *Pointer; +typedef char *Pointer; -#ifndef NULL +#ifndef NULL /* * NULL -- - * Null pointer. + * Null pointer. */ #define NULL 0 -#endif /* !defined(NULL) */ +#endif /* !defined(NULL) */ /* * const -- - * Type modifier. Identifies read only variables. + * Type modifier. Identifies read only variables. * * Example: - * extern const Version RomVersion; + * extern const Version RomVersion; */ -#define const /* const */ +#define const /* const */ /* * signed -- - * Type modifier. Identifies signed integral types. + * Type modifier. Identifies signed integral types. */ -#define signed /* signed */ +#define signed /* signed */ /* * volatile -- - * Type modifier. Identifies variables which may change in ways not - * noticeable by the compiler, e.g. via asynchronous interrupts. + * Type modifier. Identifies variables which may change in ways not + * noticeable by the compiler, e.g. via asynchronous interrupts. * * Example: - * extern volatile unsigned int NumberOfInterrupts; + * extern volatile unsigned int NumberOfInterrupts; */ -#define volatile /* volatile */ +#define volatile /* volatile */ -#endif /* !defined(__STDC__) */ /* NOT ANSI C */ +#endif /* !defined(__STDC__) *//* NOT ANSI C */ /* * CppAsString -- - * Convert the argument to a string, using the C preprocessor. + * Convert the argument to a string, using the C preprocessor. * CppConcat -- - * Concatenate two arguments together, using the C preprocessor. + * Concatenate two arguments together, using the C preprocessor. */ #if defined(HAVE_ANSI_CPP) -#define CppAsString(identifier) #identifier -#define CppConcat(x, y) x##y +#define CppAsString(identifier) #identifier +#define CppConcat(x, y) x##y -#else /* !HAVE_ANSI_CPP */ +#else /* !HAVE_ANSI_CPP */ -#define CppAsString(identifier) "identifier" +#define CppAsString(identifier) "identifier" /* * CppIdentity -- On Reiser based cpp's this is used to concatenate - * two tokens. That is - * CppIdentity(A)B ==> AB - * We renamed it to _private_CppIdentity because it should not - * be referenced outside this file. On other cpp's it - * produces A B. + * two tokens. That is + * CppIdentity(A)B ==> AB + * We renamed it to _private_CppIdentity because it should not + * be referenced outside this file. On other cpp's it + * produces A B. */ #define _priv_CppIdentity(x)x -#define CppConcat(x, y) _priv_CppIdentity(x)y +#define CppConcat(x, y) _priv_CppIdentity(x)y -#endif /* !HAVE_ANSI_CPP */ +#endif /* !HAVE_ANSI_CPP */ -#ifndef __GNUC__ /* GNU cc */ -# define inline +#ifndef __GNUC__ /* GNU cc */ +#define inline #endif #if defined(NEED_STD_HDRS) /* - * You're doomed. We've removed almost all of our own C library + * You're doomed. We've removed almost all of our own C library * extern declarations because they conflict on the different * systems. You'll have to write your own stdlib.h. */ #include "stdlib.h" -#else /* NEED_STD_HDRS */ +#else /* NEED_STD_HDRS */ #include <stddef.h> #include <stdlib.h> -#endif /* NEED_STD_HDRS */ +#endif /* NEED_STD_HDRS */ /* ---------------------------------------------------------------- - * Section 3: standard system types + * Section 3: standard system types * ---------------------------------------------------------------- */ /* * intN -- - * Signed integer, AT LEAST N BITS IN SIZE, - * used for numerical computations. + * Signed integer, AT LEAST N BITS IN SIZE, + * used for numerical computations. */ -typedef signed char int8; /* >= 8 bits */ -typedef signed short int16; /* >= 16 bits */ -typedef signed int int32; /* >= 32 bits */ +typedef signed char int8; /* >= 8 bits */ +typedef signed short int16; /* >= 16 bits */ +typedef signed int int32; /* >= 32 bits */ /* * uintN -- - * Unsigned integer, AT LEAST N BITS IN SIZE, - * used for numerical computations. + * Unsigned integer, AT LEAST N BITS IN SIZE, + * used for numerical computations. */ -typedef unsigned char uint8; /* >= 8 bits */ -typedef unsigned short uint16; /* >= 16 bits */ -typedef unsigned int uint32; /* >= 32 bits */ +typedef unsigned char uint8; /* >= 8 bits */ +typedef unsigned short uint16; /* >= 16 bits */ +typedef unsigned int uint32; /* >= 32 bits */ /* * floatN -- - * Floating point number, AT LEAST N BITS IN SIZE, - * used for numerical computations. + * Floating point number, AT LEAST N BITS IN SIZE, + * used for numerical computations. * - * Since sizeof(floatN) may be > sizeof(char *), always pass - * floatN by reference. + * Since sizeof(floatN) may be > sizeof(char *), always pass + * floatN by reference. */ -typedef float float32data; -typedef double float64data; -typedef float *float32; -typedef double *float64; +typedef float float32data; +typedef double float64data; +typedef float *float32; +typedef double *float64; /* * boolN -- - * Boolean value, AT LEAST N BITS IN SIZE. + * Boolean value, AT LEAST N BITS IN SIZE. */ -typedef uint8 bool8; /* >= 8 bits */ -typedef uint16 bool16; /* >= 16 bits */ -typedef uint32 bool32; /* >= 32 bits */ +typedef uint8 bool8; /* >= 8 bits */ +typedef uint16 bool16; /* >= 16 bits */ +typedef uint32 bool32; /* >= 32 bits */ /* * bitsN -- - * Unit of bitwise operation, AT LEAST N BITS IN SIZE. + * Unit of bitwise operation, AT LEAST N BITS IN SIZE. */ -typedef uint8 bits8; /* >= 8 bits */ -typedef uint16 bits16; /* >= 16 bits */ -typedef uint32 bits32; /* >= 32 bits */ +typedef uint8 bits8; /* >= 8 bits */ +typedef uint16 bits16; /* >= 16 bits */ +typedef uint32 bits32; /* >= 32 bits */ /* * wordN -- - * Unit of storage, AT LEAST N BITS IN SIZE, - * used to fetch/store data. + * Unit of storage, AT LEAST N BITS IN SIZE, + * used to fetch/store data. */ -typedef uint8 word8; /* >= 8 bits */ -typedef uint16 word16; /* >= 16 bits */ -typedef uint32 word32; /* >= 32 bits */ +typedef uint8 word8; /* >= 8 bits */ +typedef uint16 word16; /* >= 16 bits */ +typedef uint32 word32; /* >= 32 bits */ /* * Size -- - * Size of any memory resident object, as returned by sizeof. + * Size of any memory resident object, as returned by sizeof. */ -typedef unsigned int Size; +typedef unsigned int Size; /* * Index -- - * Index into any memory resident array. + * Index into any memory resident array. * * Note: - * Indices are non negative. + * Indices are non negative. */ -typedef unsigned int Index; +typedef unsigned int Index; #define MAXDIM 6 -typedef struct { - int indx[MAXDIM]; -} IntArray; +typedef struct +{ + int indx[MAXDIM]; +} IntArray; /* * Offset -- - * Offset into any memory resident array. + * Offset into any memory resident array. * * Note: - * This differs from an Index in that an Index is always - * non negative, whereas Offset may be negative. + * This differs from an Index in that an Index is always + * non negative, whereas Offset may be negative. */ -typedef signed int Offset; +typedef signed int Offset; /* ---------------------------------------------------------------- - * Section 4: datum type + support macros + * Section 4: datum type + support macros * ---------------------------------------------------------------- */ /* * datum.h -- - * POSTGRES abstract data type datum representation definitions. + * POSTGRES abstract data type datum representation definitions. * * Note: * * Port Notes: - * Postgres makes the following assumption about machines: + * Postgres makes the following assumption about machines: * - * sizeof(Datum) == sizeof(long) >= sizeof(void *) >= 4 + * sizeof(Datum) == sizeof(long) >= sizeof(void *) >= 4 * - * Postgres also assumes that + * Postgres also assumes that * - * sizeof(char) == 1 + * sizeof(char) == 1 * - * and that + * and that * - * sizeof(short) == 2 + * sizeof(short) == 2 * - * If your machine meets these requirements, Datums should also be checked - * to see if the positioning is correct. + * If your machine meets these requirements, Datums should also be checked + * to see if the positioning is correct. * - * This file is MACHINE AND COMPILER dependent!!! + * This file is MACHINE AND COMPILER dependent!!! */ typedef unsigned long Datum; /* XXX sizeof(long) >= sizeof(void *) */ -typedef Datum * DatumPtr; +typedef Datum *DatumPtr; -#define GET_1_BYTE(datum) (((Datum) (datum)) & 0x000000ff) -#define GET_2_BYTES(datum) (((Datum) (datum)) & 0x0000ffff) -#define GET_4_BYTES(datum) (((Datum) (datum)) & 0xffffffff) -#define SET_1_BYTE(value) (((Datum) (value)) & 0x000000ff) -#define SET_2_BYTES(value) (((Datum) (value)) & 0x0000ffff) -#define SET_4_BYTES(value) (((Datum) (value)) & 0xffffffff) +#define GET_1_BYTE(datum) (((Datum) (datum)) & 0x000000ff) +#define GET_2_BYTES(datum) (((Datum) (datum)) & 0x0000ffff) +#define GET_4_BYTES(datum) (((Datum) (datum)) & 0xffffffff) +#define SET_1_BYTE(value) (((Datum) (value)) & 0x000000ff) +#define SET_2_BYTES(value) (((Datum) (value)) & 0x0000ffff) +#define SET_4_BYTES(value) (((Datum) (value)) & 0xffffffff) /* * DatumGetChar -- - * Returns character value of a datum. + * Returns character value of a datum. */ #define DatumGetChar(X) ((char) GET_1_BYTE(X)) /* * CharGetDatum -- - * Returns datum representation for a character. + * Returns datum representation for a character. */ #define CharGetDatum(X) ((Datum) SET_1_BYTE(X)) /* * Int8GetDatum -- - * Returns datum representation for an 8-bit integer. + * Returns datum representation for an 8-bit integer. */ #define Int8GetDatum(X) ((Datum) SET_1_BYTE(X)) /* * DatumGetUInt8 -- - * Returns 8-bit unsigned integer value of a datum. + * Returns 8-bit unsigned integer value of a datum. */ #define DatumGetUInt8(X) ((uint8) GET_1_BYTE(X)) /* * UInt8GetDatum -- - * Returns datum representation for an 8-bit unsigned integer. + * Returns datum representation for an 8-bit unsigned integer. */ #define UInt8GetDatum(X) ((Datum) SET_1_BYTE(X)) /* * DatumGetInt16 -- - * Returns 16-bit integer value of a datum. + * Returns 16-bit integer value of a datum. */ #define DatumGetInt16(X) ((int16) GET_2_BYTES(X)) /* * Int16GetDatum -- - * Returns datum representation for a 16-bit integer. + * Returns datum representation for a 16-bit integer. */ #define Int16GetDatum(X) ((Datum) SET_2_BYTES(X)) /* * DatumGetUInt16 -- - * Returns 16-bit unsigned integer value of a datum. + * Returns 16-bit unsigned integer value of a datum. */ #define DatumGetUInt16(X) ((uint16) GET_2_BYTES(X)) /* * UInt16GetDatum -- - * Returns datum representation for a 16-bit unsigned integer. + * Returns datum representation for a 16-bit unsigned integer. */ #define UInt16GetDatum(X) ((Datum) SET_2_BYTES(X)) /* * DatumGetInt32 -- - * Returns 32-bit integer value of a datum. + * Returns 32-bit integer value of a datum. */ #define DatumGetInt32(X) ((int32) GET_4_BYTES(X)) /* * Int32GetDatum -- - * Returns datum representation for a 32-bit integer. + * Returns datum representation for a 32-bit integer. */ #define Int32GetDatum(X) ((Datum) SET_4_BYTES(X)) /* * DatumGetUInt32 -- - * Returns 32-bit unsigned integer value of a datum. + * Returns 32-bit unsigned integer value of a datum. */ #define DatumGetUInt32(X) ((uint32) GET_4_BYTES(X)) /* * UInt32GetDatum -- - * Returns datum representation for a 32-bit unsigned integer. + * Returns datum representation for a 32-bit unsigned integer. */ #define UInt32GetDatum(X) ((Datum) SET_4_BYTES(X)) /* * DatumGetObjectId -- - * Returns object identifier value of a datum. + * Returns object identifier value of a datum. */ #define DatumGetObjectId(X) ((Oid) GET_4_BYTES(X)) /* * ObjectIdGetDatum -- - * Returns datum representation for an object identifier. + * Returns datum representation for an object identifier. */ #define ObjectIdGetDatum(X) ((Datum) SET_4_BYTES(X)) /* * DatumGetPointer -- - * Returns pointer value of a datum. + * Returns pointer value of a datum. */ #define DatumGetPointer(X) ((Pointer) X) /* * PointerGetDatum -- - * Returns datum representation for a pointer. + * Returns datum representation for a pointer. */ #define PointerGetDatum(X) ((Datum) X) /* * DatumGetName -- - * Returns name value of a datum. + * Returns name value of a datum. */ #define DatumGetName(X) ((Name) DatumGetPointer((Datum) X)) /* * NameGetDatum -- - * Returns datum representation for a name. + * Returns datum representation for a name. */ #define NameGetDatum(X) PointerGetDatum((Pointer) X) @@ -461,143 +464,144 @@ typedef Datum * DatumPtr; /* * DatumGetFloat32 -- - * Returns 32-bit floating point value of a datum. - * This is really a pointer, of course. + * Returns 32-bit floating point value of a datum. + * This is really a pointer, of course. */ #define DatumGetFloat32(X) ((float32) DatumGetPointer((Datum) X)) /* * Float32GetDatum -- - * Returns datum representation for a 32-bit floating point number. - * This is really a pointer, of course. + * Returns datum representation for a 32-bit floating point number. + * This is really a pointer, of course. */ #define Float32GetDatum(X) PointerGetDatum((Pointer) X) /* * DatumGetFloat64 -- - * Returns 64-bit floating point value of a datum. - * This is really a pointer, of course. + * Returns 64-bit floating point value of a datum. + * This is really a pointer, of course. */ #define DatumGetFloat64(X) ((float64) DatumGetPointer(X)) /* * Float64GetDatum -- - * Returns datum representation for a 64-bit floating point number. - * This is really a pointer, of course. + * Returns datum representation for a 64-bit floating point number. + * This is really a pointer, of course. */ #define Float64GetDatum(X) PointerGetDatum((Pointer) X) /* ---------------------------------------------------------------- - * Section 5: IsValid macros for system types + * Section 5: IsValid macros for system types * ---------------------------------------------------------------- */ /* * BoolIsValid -- - * True iff bool is valid. + * True iff bool is valid. */ -#define BoolIsValid(boolean) ((boolean) == false || (boolean) == true) +#define BoolIsValid(boolean) ((boolean) == false || (boolean) == true) /* * PointerIsValid -- - * True iff pointer is valid. + * True iff pointer is valid. */ -#define PointerIsValid(pointer) (bool)((void*)(pointer) != NULL) +#define PointerIsValid(pointer) (bool)((void*)(pointer) != NULL) /* * PointerIsInBounds -- - * True iff pointer is within given bounds. + * True iff pointer is within given bounds. * * Note: - * Assumes the bounded interval to be [min,max), - * i.e. closed on the left and open on the right. + * Assumes the bounded interval to be [min,max), + * i.e. closed on the left and open on the right. */ #define PointerIsInBounds(pointer, min, max) \ - ((min) <= (pointer) && (pointer) < (max)) + ((min) <= (pointer) && (pointer) < (max)) /* * PointerIsAligned -- - * True iff pointer is properly aligned to point to the given type. + * True iff pointer is properly aligned to point to the given type. */ -#define PointerIsAligned(pointer, type) \ - (((long)(pointer) % (sizeof (type))) == 0) +#define PointerIsAligned(pointer, type) \ + (((long)(pointer) % (sizeof (type))) == 0) /* ---------------------------------------------------------------- - * Section 6: offsetof, lengthof, endof + * Section 6: offsetof, lengthof, endof * ---------------------------------------------------------------- */ /* * offsetof -- - * Offset of a structure/union field within that structure/union. + * Offset of a structure/union field within that structure/union. * - * XXX This is supposed to be part of stddef.h, but isn't on - * some systems (like SunOS 4). + * XXX This is supposed to be part of stddef.h, but isn't on + * some systems (like SunOS 4). */ #ifndef offsetof #define offsetof(type, field) ((long) &((type *)0)->field) -#endif /* offsetof */ +#endif /* offsetof */ /* * lengthof -- - * Number of elements in an array. + * Number of elements in an array. */ -#define lengthof(array) (sizeof (array) / sizeof ((array)[0])) +#define lengthof(array) (sizeof (array) / sizeof ((array)[0])) /* * endof -- - * Address of the element one past the last in an array. + * Address of the element one past the last in an array. */ #define endof(array) (&array[lengthof(array)]) /* ---------------------------------------------------------------- - * Section 7: exception handling definitions - * Assert, Trap, etc macros + * Section 7: exception handling definitions + * Assert, Trap, etc macros * ---------------------------------------------------------------- */ /* * Exception Handling definitions */ -typedef char *ExcMessage; -typedef struct Exception { - ExcMessage message; -} Exception; +typedef char *ExcMessage; +typedef struct Exception +{ + ExcMessage message; +} Exception; /* * NO_ASSERT_CHECKING, if defined, turns off all the assertions. * - plai 9/5/90 * * It should _NOT_ be undef'ed in releases or in benchmark copies - * + * * #undef NO_ASSERT_CHECKING */ /* * Trap -- - * Generates an exception if the given condition is true. + * Generates an exception if the given condition is true. * */ #define Trap(condition, exception) \ - { if (condition) \ - ExceptionalCondition(CppAsString(condition), &(exception), \ - (char*)NULL, __FILE__, __LINE__); } + { if (condition) \ + ExceptionalCondition(CppAsString(condition), &(exception), \ + (char*)NULL, __FILE__, __LINE__); } -/* - * TrapMacro is the same as Trap but it's intended for use in macros: +/* + * TrapMacro is the same as Trap but it's intended for use in macros: * - * #define foo(x) (AssertM(x != 0) && bar(x)) + * #define foo(x) (AssertM(x != 0) && bar(x)) * - * Isn't CPP fun? + * Isn't CPP fun? */ #define TrapMacro(condition, exception) \ - ((bool) ((! condition) || \ - (ExceptionalCondition(CppAsString(condition), \ - &(exception), \ - (char*) NULL, __FILE__, __LINE__)))) - + ((bool) ((! condition) || \ + (ExceptionalCondition(CppAsString(condition), \ + &(exception), \ + (char*) NULL, __FILE__, __LINE__)))) + #ifdef NO_ASSERT_CHECKING #define Assert(condition) #define AssertMacro(condition) true @@ -605,40 +609,40 @@ typedef struct Exception { #define AssertState(condition) #else #define Assert(condition) \ - Trap(!(condition), FailedAssertion) + Trap(!(condition), FailedAssertion) #define AssertMacro(condition) \ - TrapMacro(!(condition), FailedAssertion) + TrapMacro(!(condition), FailedAssertion) #define AssertArg(condition) \ - Trap(!(condition), BadArg) + Trap(!(condition), BadArg) #define AssertState(condition) \ - Trap(!(condition), BadState) + Trap(!(condition), BadState) -#endif /* NO_ASSERT_CHECKING */ +#endif /* NO_ASSERT_CHECKING */ /* * LogTrap -- - * Generates an exception with a message if the given condition is true. + * Generates an exception with a message if the given condition is true. * */ #define LogTrap(condition, exception, printArgs) \ - { if (condition) \ - ExceptionalCondition(CppAsString(condition), &(exception), \ - form printArgs, __FILE__, __LINE__); } + { if (condition) \ + ExceptionalCondition(CppAsString(condition), &(exception), \ + form printArgs, __FILE__, __LINE__); } -/* - * LogTrapMacro is the same as LogTrap but it's intended for use in macros: +/* + * LogTrapMacro is the same as LogTrap but it's intended for use in macros: * - * #define foo(x) (LogAssertMacro(x != 0, "yow!") && bar(x)) + * #define foo(x) (LogAssertMacro(x != 0, "yow!") && bar(x)) */ #define LogTrapMacro(condition, exception, printArgs) \ - ((bool) ((! condition) || \ - (ExceptionalCondition(CppAsString(condition), \ - &(exception), \ - form printArgs, __FILE__, __LINE__)))) - + ((bool) ((! condition) || \ + (ExceptionalCondition(CppAsString(condition), \ + &(exception), \ + form printArgs, __FILE__, __LINE__)))) + #ifdef NO_ASSERT_CHECKING #define LogAssert(condition, printArgs) #define LogAssertMacro(condition, printArgs) true @@ -646,73 +650,74 @@ typedef struct Exception { #define LogAssertState(condition, printArgs) #else #define LogAssert(condition, printArgs) \ - LogTrap(!(condition), FailedAssertion, printArgs) + LogTrap(!(condition), FailedAssertion, printArgs) #define LogAssertMacro(condition, printArgs) \ - LogTrapMacro(!(condition), FailedAssertion, printArgs) + LogTrapMacro(!(condition), FailedAssertion, printArgs) #define LogAssertArg(condition, printArgs) \ - LogTrap(!(condition), BadArg, printArgs) + LogTrap(!(condition), BadArg, printArgs) #define LogAssertState(condition, printArgs) \ - LogTrap(!(condition), BadState, printArgs) + LogTrap(!(condition), BadState, printArgs) -#endif /* NO_ASSERT_CHECKING */ +#endif /* NO_ASSERT_CHECKING */ /* ---------------------------------------------------------------- - * Section 8: Min, Max, Abs macros + * Section 8: Min, Max, Abs macros * ---------------------------------------------------------------- */ /* * Max -- - * Return the maximum of two numbers. + * Return the maximum of two numbers. */ -#define Max(x, y) ((x) > (y) ? (x) : (y)) +#define Max(x, y) ((x) > (y) ? (x) : (y)) /* * Min -- - * Return the minimum of two numbers. + * Return the minimum of two numbers. */ -#define Min(x, y) ((x) < (y) ? (x) : (y)) +#define Min(x, y) ((x) < (y) ? (x) : (y)) /* * Abs -- - * Return the absolute value of the argument. + * Return the absolute value of the argument. */ -#define Abs(x) ((x) >= 0 ? (x) : -(x)) +#define Abs(x) ((x) >= 0 ? (x) : -(x)) /* * strNcpy -- - * Does string copy, and forces terminating NULL + * Does string copy, and forces terminating NULL */ /* we do this so if the macro is used in an if action, it will work */ #define strNcpy(dst,src,len) (strncpy((dst),(src),(len)),*((dst)+(len))='\0') /* ---------------------------------------------------------------- - * Section 9: externs + * Section 9: externs * ---------------------------------------------------------------- */ -extern Exception FailedAssertion; -extern Exception BadArg; -extern Exception BadState; +extern Exception FailedAssertion; +extern Exception BadArg; +extern Exception BadState; /* in utils/error/assert.c */ -extern int ExceptionalCondition(char *conditionName, - Exception *exceptionP, char *details, - char *fileName, int lineNumber); +extern int +ExceptionalCondition(char *conditionName, + Exception * exceptionP, char *details, + char *fileName, int lineNumber); /* ---------------- - * form is used by assert and the exception handling stuff + * form is used by assert and the exception handling stuff * ---------------- */ -extern char *form(const char *fmt, ...); +extern char *form(const char *fmt,...); /* ---------------------------------------------------------------- - * Section 10: berkeley-specific configuration + * Section 10: berkeley-specific configuration * * this section contains settings which are only relevant to the UC Berkeley * sites. Other sites can ignore this @@ -720,10 +725,10 @@ extern char *form(const char *fmt, ...); */ /* ---------------- - * storage managers + * storage managers * - * These are experimental and are not supported in the code that - * we distribute to other sites. + * These are experimental and are not supported in the code that + * we distribute to other sites. * ---------------- */ #ifdef SEQUOIA @@ -733,33 +738,33 @@ extern char *form(const char *fmt, ...); /* ---------------------------------------------------------------- - * Section 11: system-specific hacks + * Section 11: system-specific hacks * - * This should be limited to things that absolutely have to be - * included in every source file. The changes should be factored - * into a separate file so that changes to one port don't require - * changes to c.h (and everyone recompiling their whole system). + * This should be limited to things that absolutely have to be + * included in every source file. The changes should be factored + * into a separate file so that changes to one port don't require + * changes to c.h (and everyone recompiling their whole system). * ---------------------------------------------------------------- */ #ifdef FIXADE -#if defined(hpux) -#include "port/hpux/fixade.h" /* for unaligned access fixup */ -#endif /* hpux */ +#if defined(hpux) +#include "port/hpux/fixade.h" /* for unaligned access fixup */ +#endif /* hpux */ #endif #if defined(sunos4) -#define memmove(d, s, l) bcopy(s, d, l) +#define memmove(d, s, l) bcopy(s, d, l) #include <unistd.h> #endif /* These are for things that are one way on Unix and another on NT */ -#define NULL_DEV "/dev/null" -#define COPY_CMD "cp" -#define SEP_CHAR '/' +#define NULL_DEV "/dev/null" +#define COPY_CMD "cp" +#define SEP_CHAR '/' /* ---------------- - * end of c.h + * end of c.h * ---------------- */ -#endif /* C_H */ +#endif /* C_H */ diff --git a/src/include/catalog/catalog.h b/src/include/catalog/catalog.h index b183180c604..c888d8648de 100644 --- a/src/include/catalog/catalog.h +++ b/src/include/catalog/catalog.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * catalog.h-- - * prototypes for functions in lib/catalog/catalog.c + * prototypes for functions in lib/catalog/catalog.c * * * Copyright (c) 1994, Regents of the University of California * - * $Id: catalog.h,v 1.2 1996/11/05 10:37:14 scrappy Exp $ + * $Id: catalog.h,v 1.3 1997/09/07 04:56:25 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,10 +15,10 @@ #include <access/tupdesc.h> -extern char *relpath(char relname[]); -extern bool IsSystemRelationName(char *relname); -extern bool IsSharedSystemRelationName(char *relname); -extern Oid newoid(void); -extern void fillatt(TupleDesc att); +extern char *relpath(char relname[]); +extern bool IsSystemRelationName(char *relname); +extern bool IsSharedSystemRelationName(char *relname); +extern Oid newoid(void); +extern void fillatt(TupleDesc att); -#endif /* CATALOG_H */ +#endif /* CATALOG_H */ diff --git a/src/include/catalog/catname.h b/src/include/catalog/catname.h index 988e186492f..8dcf95b45ab 100644 --- a/src/include/catalog/catname.h +++ b/src/include/catalog/catname.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * catname.h-- - * POSTGRES system catalog relation name definitions. + * POSTGRES system catalog relation name definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: catname.h,v 1.4 1997/09/01 08:09:09 vadim Exp $ + * $Id: catname.h,v 1.5 1997/09/07 04:56:27 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef CATNAME_H +#ifndef CATNAME_H #define CATNAME_H @@ -49,6 +49,6 @@ #define RelCheckRelationName "pg_relcheck" #define TriggerRelationName "pg_trigger" -extern char *SharedSystemRelationNames[]; +extern char *SharedSystemRelationNames[]; -#endif /* CATNAME_H */ +#endif /* CATNAME_H */ diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index 643b5198f09..616aa9e42ef 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * heap.h-- - * prototypes for functions in lib/catalog/heap.c + * prototypes for functions in lib/catalog/heap.c * * * Copyright (c) 1994, Regents of the University of California * - * $Id: heap.h,v 1.4 1997/08/19 21:37:47 momjian Exp $ + * $Id: heap.h,v 1.5 1997/09/07 04:56:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,15 +17,16 @@ extern Relation heap_creatr(char *relname, unsigned smgr, TupleDesc att); -extern Oid heap_create(char relname[], - char *typename, - int arch, - unsigned smgr, TupleDesc tupdesc); +extern Oid +heap_create(char relname[], + char *typename, + int arch, + unsigned smgr, TupleDesc tupdesc); -extern void heap_destroy(char relname[]); -extern void heap_destroyr(Relation r); - -extern void InitTempRelList(void); -extern void DestroyTempRels(void); +extern void heap_destroy(char relname[]); +extern void heap_destroyr(Relation r); -#endif /* HEAP_H */ +extern void InitTempRelList(void); +extern void DestroyTempRels(void); + +#endif /* HEAP_H */ diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h index 70f37d32f30..5ce47e90168 100644 --- a/src/include/catalog/index.h +++ b/src/include/catalog/index.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * index.h-- - * prototypes for index.c. + * prototypes for index.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: index.h,v 1.5 1997/03/19 07:36:35 vadim Exp $ + * $Id: index.h,v 1.6 1997/09/07 04:56:31 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef INDEX_H +#ifndef INDEX_H #define INDEX_H #include <nodes/execnodes.h> @@ -18,48 +18,53 @@ #include <access/itup.h> #include <access/funcindex.h> -extern Form_pg_am -AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId); +extern Form_pg_am + AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId); extern void -UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate); + UpdateIndexPredicate(Oid indexoid, Node * oldPred, Node * predicate); -extern void InitIndexStrategy(int numatts, - Relation indexRelation, - Oid accessMethodObjectId); +extern void +InitIndexStrategy(int numatts, + Relation indexRelation, + Oid accessMethodObjectId); -extern void index_create(char *heapRelationName, - char* indexRelationName, - FuncIndexInfo *funcInfo, - List *attributeList, +extern void +index_create(char *heapRelationName, + char *indexRelationName, + FuncIndexInfo * funcInfo, + List * attributeList, Oid accessMethodObjectId, - int numatts, + int numatts, AttrNumber attNums[], - Oid classObjectId[], + Oid classObjectId[], uint16 parameterCount, - Datum *parameter, - Node *predicate, + Datum * parameter, + Node * predicate, bool islossy, bool unique); -extern void index_destroy(Oid indexId); +extern void index_destroy(Oid indexId); -extern void FormIndexDatum(int numberOfAttributes, - AttrNumber attributeNumber[], HeapTuple heapTuple, - TupleDesc heapDescriptor, Buffer buffer, Datum *datum, - char *nullv, FuncIndexInfoPtr fInfo); +extern void +FormIndexDatum(int numberOfAttributes, + AttrNumber attributeNumber[], HeapTuple heapTuple, + TupleDesc heapDescriptor, Buffer buffer, Datum * datum, + char *nullv, FuncIndexInfoPtr fInfo); -extern void UpdateStats(Oid relid, long reltuples, bool hasindex); +extern void UpdateStats(Oid relid, long reltuples, bool hasindex); -extern void FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot, - TupleDesc tupdesc, Buffer buffer); +extern void +FillDummyExprContext(ExprContext * econtext, TupleTableSlot * slot, + TupleDesc tupdesc, Buffer buffer); -extern void index_build(Relation heapRelation, Relation indexRelation, - int numberOfAttributes, AttrNumber attributeNumber[], - uint16 parameterCount, Datum *parameter, FuncIndexInfo *funcInfo, - PredInfo *predInfo); +extern void +index_build(Relation heapRelation, Relation indexRelation, + int numberOfAttributes, AttrNumber attributeNumber[], + uint16 parameterCount, Datum * parameter, FuncIndexInfo * funcInfo, + PredInfo * predInfo); -extern bool IndexIsUnique(Oid indexId); -extern bool IndexIsUniqueNoCache(Oid indexId); +extern bool IndexIsUnique(Oid indexId); +extern bool IndexIsUniqueNoCache(Oid indexId); -#endif /* INDEX_H */ +#endif /* INDEX_H */ diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index d79e1581bd8..c428aec8a22 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * * indexing.h-- - * This include provides some definitions to support indexing - * on system catalogs + * This include provides some definitions to support indexing + * on system catalogs * * * Copyright (c) 1994, Regents of the University of California * - * $Id: indexing.h,v 1.4 1997/08/31 09:55:20 vadim Exp $ + * $Id: indexing.h,v 1.5 1997/09/07 04:56:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -20,12 +20,12 @@ /* * Some definitions for indices on pg_attribute */ -#define Num_pg_attr_indices 3 -#define Num_pg_proc_indices 3 -#define Num_pg_type_indices 2 +#define Num_pg_attr_indices 3 +#define Num_pg_proc_indices 3 +#define Num_pg_type_indices 2 #define Num_pg_class_indices 2 #define Num_pg_attrdef_indices 1 -#define Num_pg_relcheck_indices 1 +#define Num_pg_relcheck_indices 1 #define Num_pg_trigger_indices 1 @@ -38,48 +38,52 @@ #define ProcedureNameIndex "pg_procnameind" #define ProcedureOidIndex "pg_procidind" #define ProcedureSrcIndex "pg_procsrcind" -#define TypeNameIndex "pg_typenameind" -#define TypeOidIndex "pg_typeidind" -#define ClassNameIndex "pg_classnameind" -#define ClassOidIndex "pg_classoidind" +#define TypeNameIndex "pg_typenameind" +#define TypeOidIndex "pg_typeidind" +#define ClassNameIndex "pg_classnameind" +#define ClassOidIndex "pg_classoidind" #define AttrDefaultIndex "pg_attrdefind" -#define RelCheckIndex "pg_relcheckind" +#define RelCheckIndex "pg_relcheckind" #define TriggerRelidIndex "pg_trigrelidind" -extern char *Name_pg_attr_indices[]; -extern char *Name_pg_proc_indices[]; -extern char *Name_pg_type_indices[]; -extern char *Name_pg_class_indices[]; -extern char *Name_pg_attrdef_indices[]; -extern char *Name_pg_relcheck_indices[]; -extern char *Name_pg_trigger_indices[]; +extern char *Name_pg_attr_indices[]; +extern char *Name_pg_proc_indices[]; +extern char *Name_pg_type_indices[]; +extern char *Name_pg_class_indices[]; +extern char *Name_pg_attrdef_indices[]; +extern char *Name_pg_relcheck_indices[]; +extern char *Name_pg_trigger_indices[]; -extern char *IndexedCatalogNames[]; +extern char *IndexedCatalogNames[]; /* - * indexing.c prototypes + * indexing.c prototypes * * Functions for each index to perform the necessary scan on a cache miss. */ -extern void CatalogOpenIndices(int nIndices, char *names[], Relation idescs[]); -extern void CatalogCloseIndices(int nIndices, Relation *idescs); -extern void CatalogIndexInsert(Relation *idescs, - int nIndices, - Relation heapRelation, - HeapTuple heapTuple); -extern bool CatalogHasIndex(char *catName, Oid catId); - -extern HeapTuple AttributeNameIndexScan(Relation heapRelation, - Oid relid, - char *attname); - -extern HeapTuple AttributeNumIndexScan(Relation heapRelation, - Oid relid, - AttrNumber attnum); +extern void CatalogOpenIndices(int nIndices, char *names[], Relation idescs[]); +extern void CatalogCloseIndices(int nIndices, Relation * idescs); +extern void +CatalogIndexInsert(Relation * idescs, + int nIndices, + Relation heapRelation, + HeapTuple heapTuple); +extern bool CatalogHasIndex(char *catName, Oid catId); + +extern HeapTuple +AttributeNameIndexScan(Relation heapRelation, + Oid relid, + char *attname); + +extern HeapTuple +AttributeNumIndexScan(Relation heapRelation, + Oid relid, + AttrNumber attnum); extern HeapTuple ProcedureOidIndexScan(Relation heapRelation, Oid procId); -extern HeapTuple ProcedureNameIndexScan(Relation heapRelation, - char *procName, int nargs, Oid *argTypes); -extern HeapTuple ProcedureSrcIndexScan(Relation heapRelation, text *procSrc); +extern HeapTuple +ProcedureNameIndexScan(Relation heapRelation, + char *procName, int nargs, Oid * argTypes); +extern HeapTuple ProcedureSrcIndexScan(Relation heapRelation, text * procSrc); extern HeapTuple TypeOidIndexScan(Relation heapRelation, Oid typeId); extern HeapTuple TypeNameIndexScan(Relation heapRelation, char *typeName); extern HeapTuple ClassNameIndexScan(Relation heapRelation, char *relName); @@ -93,26 +97,26 @@ extern HeapTuple ClassOidIndexScan(Relation heapRelation, Oid relId); * The keyword is DECLARE_INDEX every thing after that is just like in a * normal specification of the 'define index' POSTQUEL command. */ -DECLARE_INDEX(pg_attnameind on pg_attribute using btree (mkoidname(attrelid, attname) oidname_ops)); -DECLARE_INDEX(pg_attnumind on pg_attribute using btree (mkoidint2(attrelid, attnum) oidint2_ops)); -DECLARE_INDEX(pg_attrelidind on pg_attribute using btree (attrelid oid_ops)); +DECLARE_INDEX(pg_attnameind on pg_attribute using btree(mkoidname(attrelid, attname) oidname_ops)); +DECLARE_INDEX(pg_attnumind on pg_attribute using btree(mkoidint2(attrelid, attnum) oidint2_ops)); +DECLARE_INDEX(pg_attrelidind on pg_attribute using btree(attrelid oid_ops)); -DECLARE_INDEX(pg_procidind on pg_proc using btree (Oid oid_ops)); -DECLARE_INDEX(pg_procnameind on pg_proc using btree (proname name_ops)); -DECLARE_INDEX(pg_procsrcind on pg_proc using btree (prosrc text_ops)); +DECLARE_INDEX(pg_procidind on pg_proc using btree(Oid oid_ops)); +DECLARE_INDEX(pg_procnameind on pg_proc using btree(proname name_ops)); +DECLARE_INDEX(pg_procsrcind on pg_proc using btree(prosrc text_ops)); -DECLARE_INDEX(pg_typeidind on pg_type using btree (Oid oid_ops)); -DECLARE_INDEX(pg_typenameind on pg_type using btree (typname name_ops)); +DECLARE_INDEX(pg_typeidind on pg_type using btree(Oid oid_ops)); +DECLARE_INDEX(pg_typenameind on pg_type using btree(typname name_ops)); -DECLARE_INDEX(pg_classnameind on pg_class using btree (relname name_ops)); -DECLARE_INDEX(pg_classoidind on pg_class using btree (Oid oid_ops)); +DECLARE_INDEX(pg_classnameind on pg_class using btree(relname name_ops)); +DECLARE_INDEX(pg_classoidind on pg_class using btree(Oid oid_ops)); -DECLARE_INDEX(pg_attrdefind on pg_attrdef using btree (adrelid oid_ops)); -DECLARE_INDEX(pg_relcheckind on pg_relcheck using btree (rcrelid oid_ops)); +DECLARE_INDEX(pg_attrdefind on pg_attrdef using btree(adrelid oid_ops)); +DECLARE_INDEX(pg_relcheckind on pg_relcheck using btree(rcrelid oid_ops)); -DECLARE_INDEX(pg_trigrelidind on pg_trigger using btree (tgrelid oid_ops)); +DECLARE_INDEX(pg_trigrelidind on pg_trigger using btree(tgrelid oid_ops)); /* now build indices in the initialization scripts */ BUILD_INDICES -#endif /* INDEXING_H */ +#endif /* INDEXING_H */ diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h index f951e1e5d8c..39f8c5d697a 100644 --- a/src/include/catalog/pg_aggregate.h +++ b/src/include/catalog/pg_aggregate.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_aggregate.h-- - * definition of the system "aggregate" relation (pg_aggregate) - * along with the relation's initial contents. + * definition of the system "aggregate" relation (pg_aggregate) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_aggregate.h,v 1.8 1997/08/21 23:56:45 momjian Exp $ + * $Id: pg_aggregate.h,v 1.9 1997/09/07 04:56:36 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,64 +19,65 @@ #define PG_AGGREGATE_H /* ---------------- - * postgres.h contains the system type definitions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definitions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------------------------------------------------------- - * pg_aggregate definition. + * pg_aggregate definition. * - * cpp turns this into typedef struct FormData_pg_aggregate + * cpp turns this into typedef struct FormData_pg_aggregate * - * aggname name of the aggregate - * aggtransfn1 transition function 1 - * aggtransfn2 transition function 2 - * aggfinalfn final function - * aggbasetype type of data on which aggregate operates - * aggtranstype1 output types for transition func 1 - * aggtranstype2 output types for transition func 2 - * aggfinaltype output type for final function - * agginitval1 initial aggregate value - * agginitval2 initial value for transition state 2 + * aggname name of the aggregate + * aggtransfn1 transition function 1 + * aggtransfn2 transition function 2 + * aggfinalfn final function + * aggbasetype type of data on which aggregate operates + * aggtranstype1 output types for transition func 1 + * aggtranstype2 output types for transition func 2 + * aggfinaltype output type for final function + * agginitval1 initial aggregate value + * agginitval2 initial value for transition state 2 * ---------------------------------------------------------------- - */ -CATALOG(pg_aggregate) { - NameData aggname; - Oid aggowner; - regproc aggtransfn1; - regproc aggtransfn2; - regproc aggfinalfn; - Oid aggbasetype; - Oid aggtranstype1; - Oid aggtranstype2; - Oid aggfinaltype; - text agginitval1; /* VARIABLE LENGTH FIELD */ - text agginitval2; /* VARIABLE LENGTH FIELD */ + */ +CATALOG(pg_aggregate) +{ + NameData aggname; + Oid aggowner; + regproc aggtransfn1; + regproc aggtransfn2; + regproc aggfinalfn; + Oid aggbasetype; + Oid aggtranstype1; + Oid aggtranstype2; + Oid aggfinaltype; + text agginitval1;/* VARIABLE LENGTH FIELD */ + text agginitval2;/* VARIABLE LENGTH FIELD */ } FormData_pg_aggregate; /* ---------------- - * Form_pg_aggregate corresponds to a pointer to a tuple with - * the format of pg_aggregate relation. + * Form_pg_aggregate corresponds to a pointer to a tuple with + * the format of pg_aggregate relation. * ---------------- */ -typedef FormData_pg_aggregate *Form_pg_aggregate; +typedef FormData_pg_aggregate *Form_pg_aggregate; /* ---------------- - * compiler constants for pg_aggregate + * compiler constants for pg_aggregate * ---------------- */ -#define Natts_pg_aggregate 11 -#define Anum_pg_aggregate_aggname 1 -#define Anum_pg_aggregate_aggowner 2 +#define Natts_pg_aggregate 11 +#define Anum_pg_aggregate_aggname 1 +#define Anum_pg_aggregate_aggowner 2 #define Anum_pg_aggregate_aggtransfn1 3 #define Anum_pg_aggregate_aggtransfn2 4 #define Anum_pg_aggregate_aggfinalfn 5 #define Anum_pg_aggregate_aggbasetype 6 -#define Anum_pg_aggregate_aggtranstype1 7 -#define Anum_pg_aggregate_aggtranstype2 8 +#define Anum_pg_aggregate_aggtranstype1 7 +#define Anum_pg_aggregate_aggtranstype2 8 #define Anum_pg_aggregate_aggfinaltype 9 #define Anum_pg_aggregate_agginitval1 10 #define Anum_pg_aggregate_agginitval2 11 @@ -87,57 +88,59 @@ typedef FormData_pg_aggregate *Form_pg_aggregate; * --------------- */ -DATA(insert OID = 0 ( avg PGUID int4pl int4inc int4div 23 23 23 23 _null_ 0 )); -DATA(insert OID = 0 ( avg PGUID int2pl int2inc int2div 21 21 21 21 _null_ 0 )); -DATA(insert OID = 0 ( avg PGUID float4pl float4inc float4div 700 700 700 700 _null_ 0.0 )); -DATA(insert OID = 0 ( avg PGUID float8pl float8inc float8div 701 701 701 701 _null_ 0.0 )); -DATA(insert OID = 0 ( avg PGUID cash_pl float8inc cash_div 790 790 701 790 _null_ 0.0 )); -DATA(insert OID = 0 ( avg PGUID timespan_pl float8inc timespan_div 1186 1186 701 1186 _null_ 0.0 )); +DATA(insert OID = 0 ( avg PGUID int4pl int4inc int4div 23 23 23 23 _null_ 0 )); +DATA(insert OID = 0 ( avg PGUID int2pl int2inc int2div 21 21 21 21 _null_ 0 )); +DATA(insert OID = 0 ( avg PGUID float4pl float4inc float4div 700 700 700 700 _null_ 0.0 )); +DATA(insert OID = 0 ( avg PGUID float8pl float8inc float8div 701 701 701 701 _null_ 0.0 )); +DATA(insert OID = 0 ( avg PGUID cash_pl float8inc cash_div 790 790 701 790 _null_ 0.0 )); +DATA(insert OID = 0 ( avg PGUID timespan_pl float8inc timespan_div 1186 1186 701 1186 _null_ 0.0 )); -DATA(insert OID = 0 ( sum PGUID int4pl - - 23 23 0 23 _null_ _null_ )); -DATA(insert OID = 0 ( sum PGUID int2pl - - 21 21 0 21 _null_ _null_ )); -DATA(insert OID = 0 ( sum PGUID float4pl - - 700 700 0 700 _null_ _null_ )); -DATA(insert OID = 0 ( sum PGUID float8pl - - 701 701 0 701 _null_ _null_ )); -DATA(insert OID = 0 ( sum PGUID cash_pl - - 790 790 0 790 _null_ _null_ )); -DATA(insert OID = 0 ( sum PGUID timespan_pl - - 1186 1186 0 1186 _null_ _null_ )); +DATA(insert OID = 0 ( sum PGUID int4pl - - 23 23 0 23 _null_ _null_ )); +DATA(insert OID = 0 ( sum PGUID int2pl - - 21 21 0 21 _null_ _null_ )); +DATA(insert OID = 0 ( sum PGUID float4pl - - 700 700 0 700 _null_ _null_ )); +DATA(insert OID = 0 ( sum PGUID float8pl - - 701 701 0 701 _null_ _null_ )); +DATA(insert OID = 0 ( sum PGUID cash_pl - - 790 790 0 790 _null_ _null_ )); +DATA(insert OID = 0 ( sum PGUID timespan_pl - - 1186 1186 0 1186 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID int4larger - - 23 23 0 23 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID int2larger - - 21 21 0 21 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID float4larger - - 700 700 0 700 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID float8larger - - 701 701 0 701 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID int4larger - - 702 702 0 702 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID date_larger - - 1082 1082 0 1082 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID float8larger - - 1084 1084 0 1084 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID cashlarger - - 790 790 0 790 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID datetime_larger - - 1184 1184 0 1184 _null_ _null_ )); -DATA(insert OID = 0 ( max PGUID timespan_larger - - 1186 1186 0 1186 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID int4larger - - 23 23 0 23 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID int2larger - - 21 21 0 21 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID float4larger - - 700 700 0 700 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID float8larger - - 701 701 0 701 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID int4larger - - 702 702 0 702 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID date_larger - - 1082 1082 0 1082 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID float8larger - - 1084 1084 0 1084 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID cashlarger - - 790 790 0 790 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID datetime_larger - - 1184 1184 0 1184 _null_ _null_ )); +DATA(insert OID = 0 ( max PGUID timespan_larger - - 1186 1186 0 1186 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID int4smaller - - 23 23 0 23 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID int2smaller - - 21 21 0 21 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID float4smaller - - 700 700 0 700 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID float8smaller - - 701 701 0 701 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID int4smaller - - 702 702 0 702 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID date_smaller - - 1082 1082 0 1082 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID float8smaller - - 1084 1084 0 1084 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID cashsmaller - - 790 790 0 790 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID datetime_smaller - - 1184 1184 0 1184 _null_ _null_ )); -DATA(insert OID = 0 ( min PGUID timespan_smaller - - 1186 1186 0 1186 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID int4smaller - - 23 23 0 23 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID int2smaller - - 21 21 0 21 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID float4smaller - - 700 700 0 700 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID float8smaller - - 701 701 0 701 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID int4smaller - - 702 702 0 702 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID date_smaller - - 1082 1082 0 1082 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID float8smaller - - 1084 1084 0 1084 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID cashsmaller - - 790 790 0 790 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID datetime_smaller - - 1184 1184 0 1184 _null_ _null_ )); +DATA(insert OID = 0 ( min PGUID timespan_smaller - - 1186 1186 0 1186 _null_ _null_ )); DATA(insert OID = 0 ( count PGUID - int4inc - 0 0 23 23 _null_ 0 )); /* * prototypes for functions in pg_aggregate.c */ -extern void AggregateCreate(char *aggName, - char *aggtransfn1Name, - char *aggtransfn2Name, - char *aggfinalfnName, - char *aggbasetypeName, - char *aggtransfn1typeName, - char *aggtransfn2typeName, - char *agginitval1, - char *agginitval2); -extern char *AggNameGetInitVal(char *aggName, Oid basetype, - int xfuncno, bool *isNull); +extern void +AggregateCreate(char *aggName, + char *aggtransfn1Name, + char *aggtransfn2Name, + char *aggfinalfnName, + char *aggbasetypeName, + char *aggtransfn1typeName, + char *aggtransfn2typeName, + char *agginitval1, + char *agginitval2); +extern char * +AggNameGetInitVal(char *aggName, Oid basetype, + int xfuncno, bool * isNull); -#endif /* PG_AGGREGATE_H */ +#endif /* PG_AGGREGATE_H */ diff --git a/src/include/catalog/pg_am.h b/src/include/catalog/pg_am.h index aca3de4f80b..361c102b502 100644 --- a/src/include/catalog/pg_am.h +++ b/src/include/catalog/pg_am.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * pg_am.h-- - * definition of the system "am" relation (pg_am) - * along with the relation's initial contents. + * definition of the system "am" relation (pg_am) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_am.h,v 1.2 1996/10/31 09:47:07 scrappy Exp $ + * $Id: pg_am.h,v 1.3 1997/09/07 04:56:37 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * XXX do NOT break up DATA() statements into multiple lines! + * the scripts are not as smart as you might think... * *------------------------------------------------------------------------- */ @@ -22,79 +22,80 @@ #define PG_AM_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_am definition. cpp turns this into - * typedef struct FormData_pg_am + * pg_am definition. cpp turns this into + * typedef struct FormData_pg_am * ---------------- - */ -CATALOG(pg_am) { - NameData amname; - Oid amowner; - char amkind; - int2 amstrategies; - int2 amsupport; - regproc amgettuple; - regproc aminsert; - regproc amdelete; - regproc amgetattr; - regproc amsetlock; - regproc amsettid; - regproc amfreetuple; - regproc ambeginscan; - regproc amrescan; - regproc amendscan; - regproc ammarkpos; - regproc amrestrpos; - regproc amopen; - regproc amclose; - regproc ambuild; - regproc amcreate; - regproc amdestroy; + */ +CATALOG(pg_am) +{ + NameData amname; + Oid amowner; + char amkind; + int2 amstrategies; + int2 amsupport; + regproc amgettuple; + regproc aminsert; + regproc amdelete; + regproc amgetattr; + regproc amsetlock; + regproc amsettid; + regproc amfreetuple; + regproc ambeginscan; + regproc amrescan; + regproc amendscan; + regproc ammarkpos; + regproc amrestrpos; + regproc amopen; + regproc amclose; + regproc ambuild; + regproc amcreate; + regproc amdestroy; } FormData_pg_am; /* ---------------- - * Form_pg_am corresponds to a pointer to a tuple with - * the format of pg_am relation. + * Form_pg_am corresponds to a pointer to a tuple with + * the format of pg_am relation. * ---------------- */ -typedef FormData_pg_am *Form_pg_am; +typedef FormData_pg_am *Form_pg_am; /* ---------------- - * compiler constants for pg_am + * compiler constants for pg_am * ---------------- */ -#define Natts_pg_am 22 -#define Anum_pg_am_amname 1 -#define Anum_pg_am_amowner 2 -#define Anum_pg_am_amkind 3 -#define Anum_pg_am_amstrategies 4 -#define Anum_pg_am_amsupport 5 -#define Anum_pg_am_amgettuple 6 -#define Anum_pg_am_aminsert 7 -#define Anum_pg_am_amdelete 8 -#define Anum_pg_am_amgetattr 9 -#define Anum_pg_am_amsetlock 10 -#define Anum_pg_am_amsettid 11 -#define Anum_pg_am_amfreetuple 12 -#define Anum_pg_am_ambeginscan 13 -#define Anum_pg_am_amrescan 14 -#define Anum_pg_am_amendscan 15 -#define Anum_pg_am_ammarkpos 16 -#define Anum_pg_am_amrestrpos 17 -#define Anum_pg_am_amopen 18 -#define Anum_pg_am_amclose 19 -#define Anum_pg_am_ambuild 20 -#define Anum_pg_am_amcreate 21 -#define Anum_pg_am_amdestroy 22 +#define Natts_pg_am 22 +#define Anum_pg_am_amname 1 +#define Anum_pg_am_amowner 2 +#define Anum_pg_am_amkind 3 +#define Anum_pg_am_amstrategies 4 +#define Anum_pg_am_amsupport 5 +#define Anum_pg_am_amgettuple 6 +#define Anum_pg_am_aminsert 7 +#define Anum_pg_am_amdelete 8 +#define Anum_pg_am_amgetattr 9 +#define Anum_pg_am_amsetlock 10 +#define Anum_pg_am_amsettid 11 +#define Anum_pg_am_amfreetuple 12 +#define Anum_pg_am_ambeginscan 13 +#define Anum_pg_am_amrescan 14 +#define Anum_pg_am_amendscan 15 +#define Anum_pg_am_ammarkpos 16 +#define Anum_pg_am_amrestrpos 17 +#define Anum_pg_am_amopen 18 +#define Anum_pg_am_amclose 19 +#define Anum_pg_am_ambuild 20 +#define Anum_pg_am_amcreate 21 +#define Anum_pg_am_amdestroy 22 /* ---------------- - * initial contents of pg_am + * initial contents of pg_am * ---------------- */ @@ -109,7 +110,7 @@ BKI_BEGIN BKI_END DATA(insert OID = 404 ( nobtree PGUID "o" 5 1 nobtgettuple nobtinsert nobtdelete - - - - nobtbeginscan nobtrescan nobtendscan nobtmarkpos nobtrestrpos - - nobtbuild - - )); BKI_BEGIN -#endif /* NOBTREE */ +#endif /* NOBTREE */ BKI_END -#endif /* PG_AM_H */ +#endif /* PG_AM_H */ diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h index 8385db08462..7e42e0f4f0f 100644 --- a/src/include/catalog/pg_amop.h +++ b/src/include/catalog/pg_amop.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_amop.h-- - * definition of the system "amop" relation (pg_amop) - * along with the relation's initial contents. + * definition of the system "amop" relation (pg_amop) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_amop.h,v 1.5 1997/09/04 18:43:57 thomas Exp $ + * $Id: pg_amop.h,v 1.6 1997/09/07 04:56:37 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,53 +19,54 @@ #define PG_AMOP_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_amop definition. cpp turns this into - * typedef struct FormData_pg_amop + * pg_amop definition. cpp turns this into + * typedef struct FormData_pg_amop * ---------------- - */ -CATALOG(pg_amop) { - Oid amopid; - Oid amopclaid; - Oid amopopr; - int2 amopstrategy; - regproc amopselect; - regproc amopnpages; + */ +CATALOG(pg_amop) +{ + Oid amopid; + Oid amopclaid; + Oid amopopr; + int2 amopstrategy; + regproc amopselect; + regproc amopnpages; } FormData_pg_amop; /* ---------------- - * Form_pg_amop corresponds to a pointer to a tuple with - * the format of pg_amop relation. + * Form_pg_amop corresponds to a pointer to a tuple with + * the format of pg_amop relation. * ---------------- */ -typedef FormData_pg_amop *Form_pg_amop; +typedef FormData_pg_amop *Form_pg_amop; /* ---------------- - * compiler constants for pg_amop + * compiler constants for pg_amop * ---------------- */ -/* #define Name_pg_amop "pg_amop" */ -#define Natts_pg_amop 6 -#define Anum_pg_amop_amopid 1 -#define Anum_pg_amop_amopclaid 2 -#define Anum_pg_amop_amopopr 3 -#define Anum_pg_amop_amopstrategy 4 -#define Anum_pg_amop_amopselect 5 -#define Anum_pg_amop_amopnpages 6 +/* #define Name_pg_amop "pg_amop" */ +#define Natts_pg_amop 6 +#define Anum_pg_amop_amopid 1 +#define Anum_pg_amop_amopclaid 2 +#define Anum_pg_amop_amopopr 3 +#define Anum_pg_amop_amopstrategy 4 +#define Anum_pg_amop_amopselect 5 +#define Anum_pg_amop_amopnpages 6 /* ---------------- - * initial contents of pg_amop + * initial contents of pg_amop * ---------------- */ /* - * rtree box_ops + * rtree box_ops */ DATA(insert OID = 0 ( 402 422 493 1 rtsel rtnpage )); @@ -78,7 +79,7 @@ DATA(insert OID = 0 ( 402 422 498 7 rtsel rtnpage )); DATA(insert OID = 0 ( 402 422 497 8 rtsel rtnpage )); /* - * rtree bigbox_ops + * rtree bigbox_ops */ DATA(insert OID = 0 ( 402 433 493 1 rtsel rtnpage )); @@ -91,7 +92,7 @@ DATA(insert OID = 0 ( 402 433 498 7 rtsel rtnpage )); DATA(insert OID = 0 ( 402 433 497 8 rtsel rtnpage )); /* - * rtree poly_ops (supports polygons) + * rtree poly_ops (supports polygons) */ DATA(insert OID = 0 ( 402 434 485 1 rtsel rtnpage )); @@ -104,7 +105,7 @@ DATA(insert OID = 0 ( 402 434 491 7 rtsel rtnpage )); DATA(insert OID = 0 ( 402 434 492 8 rtsel rtnpage )); /* - * rtree circle_ops (supports circles) + * rtree circle_ops (supports circles) */ DATA(insert OID = 0 ( 402 714 1506 1 rtsel rtnpage )); @@ -117,17 +118,17 @@ DATA(insert OID = 0 ( 402 714 1512 7 rtsel rtnpage )); DATA(insert OID = 0 ( 402 714 1513 8 rtsel rtnpage )); /* - * nbtree int2_ops + * nbtree int2_ops */ -DATA(insert OID = 0 ( 403 421 95 1 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 421 95 1 btreesel btreenpage )); DATA(insert OID = 0 ( 403 421 522 2 btreesel btreenpage )); -DATA(insert OID = 0 ( 403 421 94 3 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 421 94 3 btreesel btreenpage )); DATA(insert OID = 0 ( 403 421 524 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 421 520 5 btreesel btreenpage )); /* - * nbtree float8_ops + * nbtree float8_ops */ DATA(insert OID = 0 ( 403 423 672 1 btreesel btreenpage )); @@ -137,7 +138,7 @@ DATA(insert OID = 0 ( 403 423 675 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 423 674 5 btreesel btreenpage )); /* - * nbtree int24_ops + * nbtree int24_ops */ DATA(insert OID = 0 ( 403 424 534 1 btreesel btreenpage )); @@ -147,7 +148,7 @@ DATA(insert OID = 0 ( 403 424 542 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 424 536 5 btreesel btreenpage )); /* - * nbtree int42_ops + * nbtree int42_ops */ DATA(insert OID = 0 ( 403 425 535 1 btreesel btreenpage )); @@ -157,17 +158,17 @@ DATA(insert OID = 0 ( 403 425 543 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 425 537 5 btreesel btreenpage )); /* - * nbtree int4_ops + * nbtree int4_ops */ -DATA(insert OID = 0 ( 403 426 97 1 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 426 97 1 btreesel btreenpage )); DATA(insert OID = 0 ( 403 426 523 2 btreesel btreenpage )); -DATA(insert OID = 0 ( 403 426 96 3 btreesel btreenpage )); +DATA(insert OID = 0 ( 403 426 96 3 btreesel btreenpage )); DATA(insert OID = 0 ( 403 426 525 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 426 521 5 btreesel btreenpage )); /* - * nbtree oid_ops + * nbtree oid_ops */ DATA(insert OID = 0 ( 403 427 609 1 btreesel btreenpage )); @@ -177,7 +178,7 @@ DATA(insert OID = 0 ( 403 427 612 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 427 610 5 btreesel btreenpage )); /* - * nbtree float4_ops + * nbtree float4_ops */ DATA(insert OID = 0 ( 403 428 622 1 btreesel btreenpage )); @@ -187,7 +188,7 @@ DATA(insert OID = 0 ( 403 428 625 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 428 623 5 btreesel btreenpage )); /* - * nbtree char_ops + * nbtree char_ops */ DATA(insert OID = 0 ( 403 429 631 1 btreesel btreenpage )); @@ -197,7 +198,7 @@ DATA(insert OID = 0 ( 403 429 634 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 429 633 5 btreesel btreenpage )); /* - * nbtree char2_ops + * nbtree char2_ops */ DATA(insert OID = 0 ( 403 406 418 1 btreesel btreenpage )); @@ -207,7 +208,7 @@ DATA(insert OID = 0 ( 403 406 463 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 406 460 5 btreesel btreenpage )); /* - * nbtree char4_ops + * nbtree char4_ops */ DATA(insert OID = 0 ( 403 407 419 1 btreesel btreenpage )); @@ -217,7 +218,7 @@ DATA(insert OID = 0 ( 403 407 464 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 407 461 5 btreesel btreenpage )); /* - * nbtree char8_ops + * nbtree char8_ops */ DATA(insert OID = 0 ( 403 408 420 1 btreesel btreenpage )); @@ -227,7 +228,7 @@ DATA(insert OID = 0 ( 403 408 465 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 408 462 5 btreesel btreenpage )); /* - * nbtree name_ops + * nbtree name_ops */ DATA(insert OID = 0 ( 403 1181 660 1 btreesel btreenpage )); @@ -237,7 +238,7 @@ DATA(insert OID = 0 ( 403 1181 663 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 1181 662 5 btreesel btreenpage )); /* - * nbtree char16_ops + * nbtree char16_ops */ DATA(insert OID = 0 ( 403 430 645 1 btreesel btreenpage )); @@ -247,7 +248,7 @@ DATA(insert OID = 0 ( 403 430 648 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 430 647 5 btreesel btreenpage )); /* - * nbtree text_ops + * nbtree text_ops */ DATA(insert OID = 0 ( 403 431 664 1 btreesel btreenpage )); @@ -257,7 +258,7 @@ DATA(insert OID = 0 ( 403 431 667 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 431 666 5 btreesel btreenpage )); /* - * nbtree abstime_ops + * nbtree abstime_ops */ DATA(insert OID = 0 ( 403 432 562 1 btreesel btreenpage )); @@ -267,7 +268,7 @@ DATA(insert OID = 0 ( 403 432 565 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 432 563 5 btreesel btreenpage )); /* - * nbtree oidint4_ops + * nbtree oidint4_ops */ DATA(insert OID = 0 ( 403 435 930 1 btreesel btreenpage )); @@ -277,7 +278,7 @@ DATA(insert OID = 0 ( 403 435 933 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 435 934 5 btreesel btreenpage )); /* - * nbtree oidint2_ops + * nbtree oidint2_ops */ DATA(insert OID = 0 ( 403 437 830 1 btreesel btreenpage )); @@ -287,7 +288,7 @@ DATA(insert OID = 0 ( 403 437 833 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 437 834 5 btreesel btreenpage )); /* - * nbtree oidname_ops + * nbtree oidname_ops */ DATA(insert OID = 0 ( 403 436 676 1 btreesel btreenpage )); @@ -297,7 +298,7 @@ DATA(insert OID = 0 ( 403 436 679 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 436 680 5 btreesel btreenpage )); /* - * nbtree bpchar_ops + * nbtree bpchar_ops */ DATA(insert OID = 0 ( 403 1076 1058 1 btreesel btreenpage )); @@ -307,7 +308,7 @@ DATA(insert OID = 0 ( 403 1076 1061 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 1076 1060 5 btreesel btreenpage )); /* - * nbtree varchar_ops + * nbtree varchar_ops */ DATA(insert OID = 0 ( 403 1077 1066 1 btreesel btreenpage )); @@ -317,7 +318,7 @@ DATA(insert OID = 0 ( 403 1077 1069 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 1077 1068 5 btreesel btreenpage )); /* - * nbtree date_ops + * nbtree date_ops */ DATA(insert OID = 0 ( 403 1114 1095 1 btreesel btreenpage )); @@ -328,7 +329,7 @@ DATA(insert OID = 0 ( 403 1114 1097 5 btreesel btreenpage )); /* - * nbtree time_ops + * nbtree time_ops */ DATA(insert OID = 0 ( 403 1115 1110 1 btreesel btreenpage )); @@ -338,7 +339,7 @@ DATA(insert OID = 0 ( 403 1115 1113 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 1115 1112 5 btreesel btreenpage )); /* - * nbtree datetime_ops + * nbtree datetime_ops */ DATA(insert OID = 0 ( 403 1312 1322 1 btreesel btreenpage )); @@ -348,7 +349,7 @@ DATA(insert OID = 0 ( 403 1312 1325 4 btreesel btreenpage )); DATA(insert OID = 0 ( 403 1312 1324 5 btreesel btreenpage )); /* - * nbtree timespan_ops + * nbtree timespan_ops */ DATA(insert OID = 0 ( 403 1313 1332 1 btreesel btreenpage )); @@ -361,17 +362,17 @@ BKI_BEGIN #ifdef NOBTREE BKI_END /* - * nobtree int2_ops + * nobtree int2_ops */ -DATA(insert OID = 0 ( 404 421 95 1 btreesel btreenpage )); +DATA(insert OID = 0 ( 404 421 95 1 btreesel btreenpage )); DATA(insert OID = 0 ( 404 421 522 2 btreesel btreenpage )); -DATA(insert OID = 0 ( 404 421 94 3 btreesel btreenpage )); +DATA(insert OID = 0 ( 404 421 94 3 btreesel btreenpage )); DATA(insert OID = 0 ( 404 421 524 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 421 520 5 btreesel btreenpage )); /* - * nobtree float8_ops + * nobtree float8_ops */ DATA(insert OID = 0 ( 404 423 672 1 btreesel btreenpage )); @@ -381,7 +382,7 @@ DATA(insert OID = 0 ( 404 423 675 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 423 674 5 btreesel btreenpage )); /* - * nobtree int24_ops + * nobtree int24_ops */ DATA(insert OID = 0 ( 404 424 534 1 btreesel btreenpage )); @@ -391,7 +392,7 @@ DATA(insert OID = 0 ( 404 424 542 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 424 536 5 btreesel btreenpage )); /* - * nobtree int42_ops + * nobtree int42_ops */ DATA(insert OID = 0 ( 404 425 535 1 btreesel btreenpage )); @@ -401,17 +402,17 @@ DATA(insert OID = 0 ( 404 425 543 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 425 537 5 btreesel btreenpage )); /* - * nobtree int4_ops + * nobtree int4_ops */ -DATA(insert OID = 0 ( 404 426 97 1 btreesel btreenpage )); +DATA(insert OID = 0 ( 404 426 97 1 btreesel btreenpage )); DATA(insert OID = 0 ( 404 426 523 2 btreesel btreenpage )); -DATA(insert OID = 0 ( 404 426 96 3 btreesel btreenpage )); +DATA(insert OID = 0 ( 404 426 96 3 btreesel btreenpage )); DATA(insert OID = 0 ( 404 426 525 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 426 521 5 btreesel btreenpage )); /* - * nobtree oid_ops + * nobtree oid_ops */ DATA(insert OID = 0 ( 404 427 609 1 btreesel btreenpage )); @@ -421,7 +422,7 @@ DATA(insert OID = 0 ( 404 427 612 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 427 610 5 btreesel btreenpage )); /* - * nobtree float4_ops + * nobtree float4_ops */ DATA(insert OID = 0 ( 404 428 622 1 btreesel btreenpage )); @@ -431,7 +432,7 @@ DATA(insert OID = 0 ( 404 428 625 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 428 623 5 btreesel btreenpage )); /* - * nobtree char_ops + * nobtree char_ops */ DATA(insert OID = 0 ( 404 429 631 1 btreesel btreenpage )); @@ -441,7 +442,7 @@ DATA(insert OID = 0 ( 404 429 634 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 429 633 5 btreesel btreenpage )); /* - * nobtree char2_ops + * nobtree char2_ops */ DATA(insert OID = 0 ( 404 406 418 1 btreesel btreenpage )); @@ -451,7 +452,7 @@ DATA(insert OID = 0 ( 404 406 463 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 406 460 5 btreesel btreenpage )); /* - * nobtree char4_ops + * nobtree char4_ops */ DATA(insert OID = 0 ( 404 407 419 1 btreesel btreenpage )); @@ -461,7 +462,7 @@ DATA(insert OID = 0 ( 404 407 464 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 407 461 5 btreesel btreenpage )); /* - * nobtree char8_ops + * nobtree char8_ops */ DATA(insert OID = 0 ( 404 408 420 1 btreesel btreenpage )); @@ -471,7 +472,7 @@ DATA(insert OID = 0 ( 404 408 465 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 408 462 5 btreesel btreenpage )); /* - * nobtree char16_ops + * nobtree char16_ops */ DATA(insert OID = 0 ( 404 430 645 1 btreesel btreenpage )); @@ -481,7 +482,7 @@ DATA(insert OID = 0 ( 404 430 648 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 430 647 5 btreesel btreenpage )); /* - * nobtree name_ops + * nobtree name_ops */ DATA(insert OID = 0 ( 404 1181 660 1 btreesel btreenpage )); @@ -491,7 +492,7 @@ DATA(insert OID = 0 ( 404 1181 663 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 1181 662 5 btreesel btreenpage )); /* - * nobtree text_ops + * nobtree text_ops */ DATA(insert OID = 0 ( 404 431 664 1 btreesel btreenpage )); @@ -501,7 +502,7 @@ DATA(insert OID = 0 ( 404 431 667 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 431 666 5 btreesel btreenpage )); /* - * nobtree abstime_ops + * nobtree abstime_ops */ DATA(insert OID = 0 ( 404 432 562 1 btreesel btreenpage )); @@ -511,7 +512,7 @@ DATA(insert OID = 0 ( 404 432 565 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 432 563 5 btreesel btreenpage )); /* - * nobtree datetime_ops + * nobtree datetime_ops */ DATA(insert OID = 0 ( 404 1312 1322 1 btreesel btreenpage )); @@ -521,7 +522,7 @@ DATA(insert OID = 0 ( 404 1312 1325 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 1312 1324 5 btreesel btreenpage )); /* - * nobtree timespan_ops + * nobtree timespan_ops */ DATA(insert OID = 0 ( 404 1313 1332 1 btreesel btreenpage )); @@ -531,48 +532,48 @@ DATA(insert OID = 0 ( 404 1313 1335 4 btreesel btreenpage )); DATA(insert OID = 0 ( 404 1313 1334 5 btreesel btreenpage )); BKI_BEGIN -#endif /* NOBTREE */ +#endif /* NOBTREE */ BKI_END /* - * hash table _ops + * hash table _ops */ -/* hash table int2_ops */ -DATA(insert OID = 0 ( 405 421 94 1 btreesel btreenpage )); -/* hash table float8_ops */ +/* hash table int2_ops */ +DATA(insert OID = 0 ( 405 421 94 1 btreesel btreenpage )); +/* hash table float8_ops */ DATA(insert OID = 0 ( 405 423 670 1 btreesel btreenpage )); -/* hash table int4_ops */ -DATA(insert OID = 0 ( 405 426 96 1 hashsel hashnpage )); -/* hash table oid_ops */ +/* hash table int4_ops */ +DATA(insert OID = 0 ( 405 426 96 1 hashsel hashnpage )); +/* hash table oid_ops */ DATA(insert OID = 0 ( 405 427 607 1 hashsel hashnpage )); -/* hash table float4_ops */ +/* hash table float4_ops */ DATA(insert OID = 0 ( 405 428 620 1 hashsel hashnpage )); -/* hash table char_ops */ +/* hash table char_ops */ DATA(insert OID = 0 ( 405 429 92 1 hashsel hashnpage )); -/* hash table char2_ops */ +/* hash table char2_ops */ DATA(insert OID = 0 ( 405 406 412 1 hashsel hashnpage )); -/* hash table char4_ops */ +/* hash table char4_ops */ DATA(insert OID = 0 ( 405 407 413 1 hashsel hashnpage )); -/* hash table char8_ops */ +/* hash table char8_ops */ DATA(insert OID = 0 ( 405 408 414 1 hashsel hashnpage )); -/* hash table char16_ops */ +/* hash table char16_ops */ DATA(insert OID = 0 ( 405 430 1267 1 hashsel hashnpage )); -/* hash table name_ops */ +/* hash table name_ops */ DATA(insert OID = 0 ( 405 1181 93 1 hashsel hashnpage )); -/* hash table text_ops */ +/* hash table text_ops */ DATA(insert OID = 0 ( 405 431 98 1 hashsel hashnpage )); -/* hash table bpchar_ops */ +/* hash table bpchar_ops */ DATA(insert OID = 0 ( 405 1076 1054 1 hashsel hashnpage )); -/* hash table varchar_ops */ +/* hash table varchar_ops */ DATA(insert OID = 0 ( 405 1077 1062 1 hashsel hashnpage )); -/* hash table date_ops */ +/* hash table date_ops */ DATA(insert OID = 0 ( 405 1114 1093 1 hashsel hashnpage )); -/* hash table time_ops */ +/* hash table time_ops */ DATA(insert OID = 0 ( 405 1115 1108 1 hashsel hashnpage )); -/* hash table datetime_ops */ +/* hash table datetime_ops */ DATA(insert OID = 0 ( 405 1312 1320 1 hashsel hashnpage )); -/* hash table timespan_ops */ +/* hash table timespan_ops */ DATA(insert OID = 0 ( 405 1313 1330 1 hashsel hashnpage )); -#endif /* PG_AMOP_H */ +#endif /* PG_AMOP_H */ diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h index e1353fbcd5d..e9aca5c73e7 100644 --- a/src/include/catalog/pg_amproc.h +++ b/src/include/catalog/pg_amproc.h @@ -1,19 +1,19 @@ /*------------------------------------------------------------------------- * * pg_amproc.h-- - * definition of the system "amproc" relation (pg_amproce) - * along with the relation's initial contents. The amproc - * catalog is used to store procedures used by indexed access - * methods that aren't associated with operators. + * definition of the system "amproc" relation (pg_amproce) + * along with the relation's initial contents. The amproc + * catalog is used to store procedures used by indexed access + * methods that aren't associated with operators. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_amproc.h,v 1.4 1997/09/04 18:43:57 thomas Exp $ + * $Id: pg_amproc.h,v 1.5 1997/09/07 04:56:39 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -21,43 +21,44 @@ #define PG_AMPROC_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_amproc definition. cpp turns this into - * typedef struct FormData_pg_amproc + * pg_amproc definition. cpp turns this into + * typedef struct FormData_pg_amproc * ---------------- - */ -CATALOG(pg_amproc) { - Oid amid; - Oid amopclaid; - Oid amproc; - int2 amprocnum; + */ +CATALOG(pg_amproc) +{ + Oid amid; + Oid amopclaid; + Oid amproc; + int2 amprocnum; } FormData_pg_amproc; /* ---------------- - * Form_pg_amproc corresponds to a pointer to a tuple with - * the format of pg_amproc relation. + * Form_pg_amproc corresponds to a pointer to a tuple with + * the format of pg_amproc relation. * ---------------- */ -typedef FormData_pg_amproc *Form_pg_amproc; +typedef FormData_pg_amproc *Form_pg_amproc; /* ---------------- - * compiler constants for pg_amproc + * compiler constants for pg_amproc * ---------------- */ -#define Natts_pg_amproc 4 -#define Anum_pg_amproc_amid 1 -#define Anum_pg_amproc_amopclaid 2 -#define Anum_pg_amproc_amproc 3 -#define Anum_pg_amproc_amprocnum 4 +#define Natts_pg_amproc 4 +#define Anum_pg_amproc_amid 1 +#define Anum_pg_amproc_amopclaid 2 +#define Anum_pg_amproc_amproc 3 +#define Anum_pg_amproc_amprocnum 4 /* ---------------- - * initial contents of pg_amproc + * initial contents of pg_amproc * ---------------- */ @@ -114,7 +115,7 @@ DATA(insert OID = 0 (404 430 1274 1)); DATA(insert OID = 0 (404 431 360 1)); DATA(insert OID = 0 (404 432 357 1)); BKI_BEGIN -#endif /* NOBTREE */ +#endif /* NOBTREE */ BKI_END DATA(insert OID = 0 (405 421 449 1)); @@ -134,4 +135,4 @@ DATA(insert OID = 0 (405 1077 1081 1)); DATA(insert OID = 0 (405 1114 450 1)); DATA(insert OID = 0 (405 1115 694 1)); -#endif /* PG_AMPROC_H */ +#endif /* PG_AMPROC_H */ diff --git a/src/include/catalog/pg_attrdef.h b/src/include/catalog/pg_attrdef.h index 2c42788fa46..9fc546f05b2 100644 --- a/src/include/catalog/pg_attrdef.h +++ b/src/include/catalog/pg_attrdef.h @@ -6,8 +6,8 @@ * Copyright (c) 1994, Regents of the University of California * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -15,40 +15,41 @@ #define PG_ATTRDEF_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_attrdef definition. cpp turns this into - * typedef struct FormData_pg_attrdef + * pg_attrdef definition. cpp turns this into + * typedef struct FormData_pg_attrdef * ---------------- - */ -CATALOG(pg_attrdef) BOOTSTRAP { - Oid adrelid; - int2 adnum; - text adbin; - text adsrc; + */ +CATALOG(pg_attrdef) BOOTSTRAP +{ + Oid adrelid; + int2 adnum; + text adbin; + text adsrc; } FormData_pg_attrdef; /* ---------------- - * Form_pg_attrdef corresponds to a pointer to a tuple with - * the format of pg_attrdef relation. + * Form_pg_attrdef corresponds to a pointer to a tuple with + * the format of pg_attrdef relation. * ---------------- */ -typedef FormData_pg_attrdef *Form_pg_attrdef; +typedef FormData_pg_attrdef *Form_pg_attrdef; /* ---------------- - * compiler constants for pg_attrdef + * compiler constants for pg_attrdef * ---------------- */ -#define Natts_pg_attrdef 4 -#define Anum_pg_attrdef_adrelid 1 -#define Anum_pg_attrdef_adnum 2 -#define Anum_pg_attrdef_adbin 3 -#define Anum_pg_attrdef_adsrc 4 +#define Natts_pg_attrdef 4 +#define Anum_pg_attrdef_adrelid 1 +#define Anum_pg_attrdef_adnum 2 +#define Anum_pg_attrdef_adbin 3 +#define Anum_pg_attrdef_adsrc 4 -#endif /* PG_ATTRDEF_H */ +#endif /* PG_ATTRDEF_H */ diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index da07ebcacbe..5150463c324 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -1,97 +1,110 @@ /*------------------------------------------------------------------------- * * pg_attribute.h-- - * definition of the system "attribute" relation (pg_attribute) - * along with the relation's initial contents. + * definition of the system "attribute" relation (pg_attribute) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_attribute.h,v 1.14 1997/09/04 13:25:08 vadim Exp $ + * $Id: pg_attribute.h,v 1.15 1997/09/07 04:56:41 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * - * utils/cache/relcache.c requires some hard-coded tuple descriptors - * for some of the system catalogs so if the schema for any of - * these changes, be sure and change the appropriate Schema_xxx - * macros! -cim 2/5/91 + * utils/cache/relcache.c requires some hard-coded tuple descriptors + * for some of the system catalogs so if the schema for any of + * these changes, be sure and change the appropriate Schema_xxx + * macros! -cim 2/5/91 * *------------------------------------------------------------------------- */ #ifndef PG_ATTRIBUTE_H #define PG_ATTRIBUTE_H - + /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_attribute definition. cpp turns this into - * typedef struct FormData_pg_attribute + * pg_attribute definition. cpp turns this into + * typedef struct FormData_pg_attribute * - * If you change the following, make sure you change the structs for - * system attributes in heap.c and index.c also. + * If you change the following, make sure you change the structs for + * system attributes in heap.c and index.c also. * ---------------- */ -CATALOG(pg_attribute) BOOTSTRAP { - Oid attrelid; - NameData attname; - Oid atttypid; - /* atttypid is the OID of the instance in Catalog Class pg_type that - defines the data type of this attribute (e.g. int4). Information in - that instance is redundant with the attlen, attbyval, and attalign - attributes of this instance, so they had better match or Postgres - will fail. - */ - float4 attdisbursion; - int2 attlen; - /* attlen is a copy of the typlen field from pg_type for this - attribute. See atttypid above. See struct TypeTupleFormData for - definition. - */ - int2 attnum; - /* attnum is the "attribute number" for the attribute: A - value that uniquely identifies this attribute within its class. - For user attributes, Attribute numbers are greater than 0 and - not greater than the number of attributes in the class. - I.e. if the Class pg_class says that Class XYZ has 10 - attributes, then the user attribute numbers in Class - pg_attribute must be 1-10. - - System attributes have attribute numbers less than 0 that are - unique within the class, but not constrained to any particular range. - - Note that (attnum - 1) is often used as the index to an array. - */ - int4 attnelems; - int4 attcacheoff; - /* fastgetattr() uses attcacheoff to cache byte offsets of - attributes in heap tuples. The data actually stored in - pg_attribute (-1) indicates no cached value. But when we - copy these tuples into a tuple descriptor, we may then update - attcacheoff in the copies. This speeds up the attribute - walking process. - */ - bool attbyval; - /* attbyval is a copy of the typbyval field from pg_type for this - attribute. See atttypid above. See struct TypeTupleFormData for - definition. - */ - bool attisset; - char attalign; - /* attalign is a copy of the typalign field from pg_type for this - attribute. See atttypid above. See struct TypeTupleFormData for - definition. - */ - bool attnotnull; - /* This flag represents the "NOT NULL" constraint */ - bool atthasdef; - /* Has DEFAULT value or not */ +CATALOG(pg_attribute) BOOTSTRAP +{ + Oid attrelid; + NameData attname; + Oid atttypid; + + /* + * atttypid is the OID of the instance in Catalog Class pg_type that + * defines the data type of this attribute (e.g. int4). Information + * in that instance is redundant with the attlen, attbyval, and + * attalign attributes of this instance, so they had better match or + * Postgres will fail. + */ + float4 attdisbursion; + int2 attlen; + + /* + * attlen is a copy of the typlen field from pg_type for this + * attribute. See atttypid above. See struct TypeTupleFormData for + * definition. + */ + int2 attnum; + + /* + * attnum is the "attribute number" for the attribute: A value that + * uniquely identifies this attribute within its class. For user + * attributes, Attribute numbers are greater than 0 and not greater + * than the number of attributes in the class. I.e. if the Class + * pg_class says that Class XYZ has 10 attributes, then the user + * attribute numbers in Class pg_attribute must be 1-10. + * + * System attributes have attribute numbers less than 0 that are unique + * within the class, but not constrained to any particular range. + * + * Note that (attnum - 1) is often used as the index to an array. + */ + int4 attnelems; + int4 attcacheoff; + + /* + * fastgetattr() uses attcacheoff to cache byte offsets of attributes + * in heap tuples. The data actually stored in pg_attribute (-1) + * indicates no cached value. But when we copy these tuples into a + * tuple descriptor, we may then update attcacheoff in the copies. + * This speeds up the attribute walking process. + */ + bool attbyval; + + /* + * attbyval is a copy of the typbyval field from pg_type for this + * attribute. See atttypid above. See struct TypeTupleFormData for + * definition. + */ + bool attisset; + char attalign; + + /* + * attalign is a copy of the typalign field from pg_type for this + * attribute. See atttypid above. See struct TypeTupleFormData for + * definition. + */ + bool attnotnull; + + /* This flag represents the "NOT NULL" constraint */ + bool atthasdef; + + /* Has DEFAULT value or not */ } FormData_pg_attribute; /* @@ -99,499 +112,499 @@ CATALOG(pg_attribute) BOOTSTRAP { * the size of the C struct is not the same as the size of the tuple.) */ #define ATTRIBUTE_TUPLE_SIZE \ - (offsetof(FormData_pg_attribute,atthasdef) + sizeof(char)) + (offsetof(FormData_pg_attribute,atthasdef) + sizeof(char)) /* ---------------- - * Form_pg_attribute corresponds to a pointer to a tuple with - * the format of pg_attribute relation. + * Form_pg_attribute corresponds to a pointer to a tuple with + * the format of pg_attribute relation. * ---------------- */ -typedef FormData_pg_attribute *AttributeTupleForm; +typedef FormData_pg_attribute *AttributeTupleForm; /* ---------------- - * compiler constants for pg_attribute + * compiler constants for pg_attribute * ---------------- */ -#define Natts_pg_attribute 13 -#define Anum_pg_attribute_attrelid 1 -#define Anum_pg_attribute_attname 2 -#define Anum_pg_attribute_atttypid 3 +#define Natts_pg_attribute 13 +#define Anum_pg_attribute_attrelid 1 +#define Anum_pg_attribute_attname 2 +#define Anum_pg_attribute_atttypid 3 -#define Anum_pg_attribute_attdisbursion 4 +#define Anum_pg_attribute_attdisbursion 4 -#define Anum_pg_attribute_attlen 5 -#define Anum_pg_attribute_attnum 6 +#define Anum_pg_attribute_attlen 5 +#define Anum_pg_attribute_attnum 6 -#define Anum_pg_attribute_attnelems 7 +#define Anum_pg_attribute_attnelems 7 #define Anum_pg_attribute_attcacheoff 8 -#define Anum_pg_attribute_attbyval 9 -#define Anum_pg_attribute_attisset 10 -#define Anum_pg_attribute_attalign 11 -#define Anum_pg_attribute_attnotnull 12 -#define Anum_pg_attribute_atthasdef 13 +#define Anum_pg_attribute_attbyval 9 +#define Anum_pg_attribute_attisset 10 +#define Anum_pg_attribute_attalign 11 +#define Anum_pg_attribute_attnotnull 12 +#define Anum_pg_attribute_atthasdef 13 /* ---------------- - * SCHEMA_ macros for declaring hardcoded tuple descriptors. - * these are used in utils/cache/relcache.c + * SCHEMA_ macros for declaring hardcoded tuple descriptors. + * these are used in utils/cache/relcache.c * ---------------- #define SCHEMA_NAME(x) CppConcat(Name_,x) #define SCHEMA_DESC(x) CppConcat(Desc_,x) #define SCHEMA_NATTS(x) CppConcat(Natts_,x) #define SCHEMA_DEF(x) \ - FormData_pg_attribute \ - SCHEMA_DESC(x) [ SCHEMA_NATTS(x) ] = \ - { \ - CppConcat(Schema_,x) \ - } + FormData_pg_attribute \ + SCHEMA_DESC(x) [ SCHEMA_NATTS(x) ] = \ + { \ + CppConcat(Schema_,x) \ + } */ /* ---------------- - * initial contents of pg_attribute + * initial contents of pg_attribute * ---------------- */ /* ---------------- - * pg_type schema + * pg_type schema * ---------------- */ #define Schema_pg_type \ -{ 1247l, {"typname"}, 19l, 0l, NAMEDATALEN, 1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ -{ 1247l, {"typowner"}, 26l, 0l, 4, 2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1247l, {"typlen"}, 21l, 0l, 2, 3, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ +{ 1247l, {"typname"}, 19l, 0l, NAMEDATALEN, 1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ +{ 1247l, {"typowner"}, 26l, 0l, 4, 2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1247l, {"typlen"}, 21l, 0l, 2, 3, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ { 1247l, {"typprtlen"}, 21l, 0l, 2, 4, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ -{ 1247l, {"typbyval"}, 16l, 0l, 1, 5, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1247l, {"typtype"}, 18l, 0l, 1, 6, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1247l, {"typbyval"}, 16l, 0l, 1, 5, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1247l, {"typtype"}, 18l, 0l, 1, 6, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ { 1247l, {"typisdefined"}, 16l, 0l, 1, 7, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1247l, {"typdelim"}, 18l, 0l, 1, 8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1247l, {"typrelid"}, 26l, 0l, 4, 9, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1247l, {"typelem"}, 26l, 0l, 4, 10, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1247l, {"typinput"}, 24l, 0l, 4, 11, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1247l, {"typdelim"}, 18l, 0l, 1, 8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1247l, {"typrelid"}, 26l, 0l, 4, 9, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1247l, {"typelem"}, 26l, 0l, 4, 10, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1247l, {"typinput"}, 24l, 0l, 4, 11, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1247l, {"typoutput"}, 24l, 0l, 4, 12, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1247l, {"typreceive"}, 24l, 0l, 4, 13, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1247l, {"typsend"}, 24l, 0l, 4, 14, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1247l, {"typalign"}, 18l, 0l, 1, 15, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1247l, {"typsend"}, 24l, 0l, 4, 14, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1247l, {"typalign"}, 18l, 0l, 1, 15, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ { 1247l, {"typdefault"}, 25l, 0l, -1, 16, 0l, -1l, '\0' , '\0', 'i', '\0', '\0' } -DATA(insert OID = 0 ( 1247 typname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 typowner 26 0 4 2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 typlen 21 0 2 3 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1247 typprtlen 21 0 2 4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1247 typbyval 16 0 1 5 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1247 typtype 18 0 1 6 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1247 typisdefined 16 0 1 7 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1247 typdelim 18 0 1 8 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1247 typrelid 26 0 4 9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 typelem 26 0 4 10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 typinput 24 0 4 11 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 typoutput 24 0 4 12 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 typreceive 24 0 4 13 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 typsend 24 0 4 14 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 typalign 18 0 1 15 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1247 typdefault 25 0 -1 16 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1247 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1247 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1247 typname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1247 typowner 26 0 4 2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 typlen 21 0 2 3 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1247 typprtlen 21 0 2 4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1247 typbyval 16 0 1 5 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1247 typtype 18 0 1 6 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1247 typisdefined 16 0 1 7 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1247 typdelim 18 0 1 8 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1247 typrelid 26 0 4 9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 typelem 26 0 4 10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 typinput 24 0 4 11 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 typoutput 24 0 4 12 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 typreceive 24 0 4 13 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 typsend 24 0 4 14 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 typalign 18 0 1 15 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1247 typdefault 25 0 -1 16 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1247 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1247 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1247 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1247 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1247 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1247 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1247 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1247 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1247 vtype 18 0 1 -11 0 -1 t f c f f)); /* ---------------- - * pg_database + * pg_database * ---------------- */ -DATA(insert OID = 0 ( 1262 datname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 datdba 23 0 4 2 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1262 datpath 25 0 -1 3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1262 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1262 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1262 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1262 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1262 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1262 datname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1262 datdba 23 0 4 2 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1262 datpath 25 0 -1 3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1262 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1262 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1262 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1262 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1262 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1262 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1262 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1262 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1262 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1262 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1262 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_demon + * pg_demon * ---------------- */ -DATA(insert OID = 0 ( 1251 demserid 26 0 4 1 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1251 demname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 demowner 26 0 4 3 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1251 demcode 24 0 4 4 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1251 ctid 27 0 6 -1 0 -1 f f i f f)); - -DATA(insert OID = 0 ( 1251 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1251 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1251 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1251 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1251 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1251 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1251 demserid 26 0 4 1 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1251 demname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1251 demowner 26 0 4 3 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1251 demcode 24 0 4 4 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1251 ctid 27 0 6 -1 0 -1 f f i f f)); + +DATA(insert OID = 0 ( 1251 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1251 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1251 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1251 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1251 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1251 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1251 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1251 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1251 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1251 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_proc + * pg_proc * ---------------- */ #define Schema_pg_proc \ -{ 1255l, {"proname"}, 19l, 0l, NAMEDATALEN, 1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ -{ 1255l, {"proowner"}, 26l, 0l, 4, 2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1255l, {"prolang"}, 26l, 0l, 4, 3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1255l, {"proisinh"}, 16l, 0l, 1, 4, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1255l, {"proistrusted"}, 16l, 0l, 1, 5, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1255l, {"proname"}, 19l, 0l, NAMEDATALEN, 1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ +{ 1255l, {"proowner"}, 26l, 0l, 4, 2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1255l, {"prolang"}, 26l, 0l, 4, 3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1255l, {"proisinh"}, 16l, 0l, 1, 4, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1255l, {"proistrusted"}, 16l, 0l, 1, 5, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ { 1255l, {"proiscachable"}, 16l, 0l, 1, 6, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1255l, {"pronargs"}, 21l, 0l, 2, 7, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ -{ 1255l, {"proretset"}, 16l, 0l, 1, 8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1255l, {"prorettype"}, 26l, 0l, 4, 9, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1255l, {"proargtypes"}, 30l, 0l, 32, 10, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ -{ 1255l, {"probyte_pct"}, 23l, 0l, 4, 11, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1255l, {"pronargs"}, 21l, 0l, 2, 7, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ +{ 1255l, {"proretset"}, 16l, 0l, 1, 8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1255l, {"prorettype"}, 26l, 0l, 4, 9, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1255l, {"proargtypes"}, 30l, 0l, 32, 10, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ +{ 1255l, {"probyte_pct"}, 23l, 0l, 4, 11, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1255l, {"properbyte_cpu"}, 23l, 0l, 4, 12, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1255l, {"propercall_cpu"}, 23l, 0l, 4, 13, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1255l, {"prooutin_ratio"}, 23l, 0l, 4, 14, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1255l, {"prosrc"}, 25l, 0l, -1, 15, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ -{ 1255l, {"probin"}, 17l, 0l, -1, 16, 0l, -1l, '\0', '\0', 'i', '\0', '\0' } - -DATA(insert OID = 0 ( 1255 proname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 proowner 26 0 4 2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 prolang 26 0 4 3 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 proisinh 16 0 1 4 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1255 proistrusted 16 0 1 5 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1255 proiscachable 16 0 1 6 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1255 pronargs 21 0 2 7 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1255 proretset 16 0 1 8 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1255 prorettype 26 0 4 9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 proargtypes 30 0 32 10 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 probyte_pct 23 0 4 11 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 properbyte_cpu 23 0 4 12 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 propercall_cpu 23 0 4 13 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 prooutin_ratio 23 0 4 14 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 prosrc 25 0 -1 15 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 probin 17 0 -1 16 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1255 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1255 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 vtype 18 0 1 -11 0 -1 t f c f f)); - +{ 1255l, {"prosrc"}, 25l, 0l, -1, 15, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ +{ 1255l, {"probin"}, 17l, 0l, -1, 16, 0l, -1l, '\0', '\0', 'i', '\0', '\0' } + +DATA(insert OID = 0 ( 1255 proname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 proowner 26 0 4 2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 prolang 26 0 4 3 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 proisinh 16 0 1 4 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1255 proistrusted 16 0 1 5 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1255 proiscachable 16 0 1 6 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1255 pronargs 21 0 2 7 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1255 proretset 16 0 1 8 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1255 prorettype 26 0 4 9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 proargtypes 30 0 32 10 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 probyte_pct 23 0 4 11 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 properbyte_cpu 23 0 4 12 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 propercall_cpu 23 0 4 13 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 prooutin_ratio 23 0 4 14 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 prosrc 25 0 -1 15 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 probin 17 0 -1 16 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1255 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1255 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1255 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1255 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_server + * pg_server * ---------------- */ -DATA(insert OID = 0 ( 1257 sername 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 serpid 21 0 2 2 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1257 serport 21 0 2 3 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1257 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1257 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1257 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1257 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1257 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1257 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1257 sername 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1257 serpid 21 0 2 2 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1257 serport 21 0 2 3 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1257 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1257 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1257 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1257 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1257 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1257 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1257 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1257 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1257 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1257 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1257 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_user + * pg_user * ---------------- */ -DATA(insert OID = 0 ( 1260 usename 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 usesysid 23 0 4 2 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1260 usecreatedb 16 0 1 3 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1260 usetrace 16 0 1 4 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1260 usesuper 16 0 1 5 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1260 usecatupd 16 0 1 6 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1260 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1260 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1260 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1260 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1260 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1260 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1260 usename 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1260 usesysid 23 0 4 2 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1260 usecreatedb 16 0 1 3 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1260 usetrace 16 0 1 4 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1260 usesuper 16 0 1 5 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1260 usecatupd 16 0 1 6 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1260 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1260 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1260 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1260 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1260 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1260 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1260 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1260 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1260 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1260 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1260 vtype 18 0 1 -11 0 -1 t f c f f)); /* ---------------- - * pg_group + * pg_group * ---------------- */ -DATA(insert OID = 0 ( 1261 groname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 grosysid 23 0 4 2 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1261 grolist 1007 0 -1 3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1261 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1261 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1261 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1261 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1261 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1261 groname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1261 grosysid 23 0 4 2 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1261 grolist 1007 0 -1 3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1261 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1261 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1261 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1261 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1261 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1261 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1261 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1261 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1261 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1261 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1261 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_attribute + * pg_attribute * ---------------- */ #define Schema_pg_attribute \ -{ 1249l, {"attrelid"}, 26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1249l, {"attname"}, 19l, 0l, NAMEDATALEN, 2, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ -{ 1249l, {"atttypid"}, 26l, 0l, 4, 3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1249l, {"attrelid"}, 26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1249l, {"attname"}, 19l, 0l, NAMEDATALEN, 2, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ +{ 1249l, {"atttypid"}, 26l, 0l, 4, 3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1249l, {"attdisbursion"}, 700l, 0l, 4, 4, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ -{ 1249l, {"attlen"}, 21l, 0l, 2, 5, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ -{ 1249l, {"attnum"}, 21l, 0l, 2, 6, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ -{ 1249l, {"attnelems"}, 23l, 0l, 4, 7, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1249l, {"attcacheoff"}, 23l, 0l, 4, 8, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1249l, {"attbyval"}, 16l, 0l, 1, 9, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1249l, {"attisset"}, 16l, 0l, 1, 10, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1249l, {"attalign"}, 18l, 0l, 1, 11, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 12491, {"attnotnull"}, 16l, 0l, 1, 12, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 12491, {"atthasdef"}, 16l, 0l, 1, 13, 0l, -1l, '\001', '\0', 'c', '\0', '\0' } - -DATA(insert OID = 0 ( 1249 attrelid 26 0 4 1 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 atttypid 26 0 4 3 0 -1 t f i f f)); +{ 1249l, {"attlen"}, 21l, 0l, 2, 5, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ +{ 1249l, {"attnum"}, 21l, 0l, 2, 6, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ +{ 1249l, {"attnelems"}, 23l, 0l, 4, 7, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1249l, {"attcacheoff"}, 23l, 0l, 4, 8, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1249l, {"attbyval"}, 16l, 0l, 1, 9, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1249l, {"attisset"}, 16l, 0l, 1, 10, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1249l, {"attalign"}, 18l, 0l, 1, 11, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 12491, {"attnotnull"}, 16l, 0l, 1, 12, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 12491, {"atthasdef"}, 16l, 0l, 1, 13, 0l, -1l, '\001', '\0', 'c', '\0', '\0' } + +DATA(insert OID = 0 ( 1249 attrelid 26 0 4 1 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1249 atttypid 26 0 4 3 0 -1 t f i f f)); DATA(insert OID = 0 ( 1249 attdisbursion 700 0 4 4 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1249 attnum 21 0 2 6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1249 attnelems 23 0 4 7 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 attcacheoff 23 0 4 8 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 attbyval 16 0 1 9 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1249 attisset 16 0 1 10 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1249 attalign 18 0 1 11 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1249 attnotnull 16 0 1 12 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1249 atthasdef 16 0 1 13 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1249 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1249 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1249 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1249 attnum 21 0 2 6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1249 attnelems 23 0 4 7 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1249 attcacheoff 23 0 4 8 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1249 attbyval 16 0 1 9 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1249 attisset 16 0 1 10 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1249 attalign 18 0 1 11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1249 attnotnull 16 0 1 12 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1249 atthasdef 16 0 1 13 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1249 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1249 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1249 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1249 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1249 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1249 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1249 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1249 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1249 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1249 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1249 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_class + * pg_class * ---------------- */ #define Schema_pg_class \ -{ 1259l, {"relname"}, 19l, 0l, NAMEDATALEN, 1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ -{ 1259l, {"reltype"}, 26l, 0l, 4, 2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1259l, {"relowner"}, 26l, 0l, 4, 2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1259l, {"relam"}, 26l, 0l, 4, 3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1259l, {"relpages"}, 23, 0l, 4, 4, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1259l, {"reltuples"}, 23, 0l, 4, 5, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1259l, {"relname"}, 19l, 0l, NAMEDATALEN, 1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ +{ 1259l, {"reltype"}, 26l, 0l, 4, 2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1259l, {"relowner"}, 26l, 0l, 4, 2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1259l, {"relam"}, 26l, 0l, 4, 3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1259l, {"relpages"}, 23, 0l, 4, 4, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1259l, {"reltuples"}, 23, 0l, 4, 5, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1259l, {"relexpires"}, 702, 0l, 4, 6, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1259l, {"relpreserved"}, 703, 0l, 4, 7, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1259l, {"relhasindex"}, 16, 0l, 1, 8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1259l, {"relisshared"}, 16, 0l, 1, 9, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1259l, {"relkind"}, 18, 0l, 1, 10, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1259l, {"relarch"}, 18, 0l, 1, 11, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1259l, {"relnatts"}, 21, 0l, 2, 12, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ -{ 1259l, {"relsmgr"}, 210l, 0l, 2, 13, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ +{ 1259l, {"relhasindex"}, 16, 0l, 1, 8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1259l, {"relisshared"}, 16, 0l, 1, 9, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1259l, {"relkind"}, 18, 0l, 1, 10, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1259l, {"relarch"}, 18, 0l, 1, 11, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1259l, {"relnatts"}, 21, 0l, 2, 12, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ +{ 1259l, {"relsmgr"}, 210l, 0l, 2, 13, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ { 1259l, {"relchecks"}, 21l, 0l, 2, 14, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ { 1259l, {"reltriggers"}, 21l, 0l, 2, 15, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ -{ 1259l, {"relhasrules"}, 16, 0l, 1, 16, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ -{ 1259l, {"relacl"}, 1034l, 0l, -1, 17, 0l, -1l, '\0', '\0', 'i', '\0', '\0' } - -DATA(insert OID = 0 ( 1259 relname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 reltype 26 0 4 2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 relowner 26 0 4 2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 relam 26 0 4 3 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 relpages 23 0 4 4 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 reltuples 23 0 4 5 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 relexpires 702 0 4 6 0 -1 t f i f f)); +{ 1259l, {"relhasrules"}, 16, 0l, 1, 16, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \ +{ 1259l, {"relacl"}, 1034l, 0l, -1, 17, 0l, -1l, '\0', '\0', 'i', '\0', '\0' } + +DATA(insert OID = 0 ( 1259 relname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1259 reltype 26 0 4 2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1259 relowner 26 0 4 2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1259 relam 26 0 4 3 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1259 relpages 23 0 4 4 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1259 reltuples 23 0 4 5 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1259 relexpires 702 0 4 6 0 -1 t f i f f)); DATA(insert OID = 0 ( 1259 relpreserved 702 0 4 7 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 relhasindex 16 0 1 8 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1259 relisshared 16 0 1 9 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1259 relkind 18 0 1 10 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1259 relarch 18 0 1 11 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1259 relnatts 21 0 2 12 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1259 relsmgr 210 0 2 13 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1259 relchecks 21 0 2 14 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1259 reltriggers 21 0 2 15 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1259 relhasrules 16 0 1 16 0 -1 t f c f f)); -DATA(insert OID = 0 ( 1259 relacl 1034 0 -1 17 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1259 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1259 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1259 relhasindex 16 0 1 8 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1259 relisshared 16 0 1 9 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1259 relkind 18 0 1 10 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1259 relarch 18 0 1 11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1259 relnatts 21 0 2 12 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1259 relsmgr 210 0 2 13 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1259 relchecks 21 0 2 14 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1259 reltriggers 21 0 2 15 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1259 relhasrules 16 0 1 16 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1259 relacl 1034 0 -1 17 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1259 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1259 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1259 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1259 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1259 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1259 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1259 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1259 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1259 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1259 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1259 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_magic + * pg_magic * ---------------- */ -DATA(insert OID = 0 ( 1253 magname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 magvalue 19 0 NAMEDATALEN 2 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1253 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1253 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1253 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1253 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1253 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1253 magname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1253 magvalue 19 0 NAMEDATALEN 2 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1253 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1253 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1253 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1253 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1253 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1253 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1253 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1253 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1253 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1253 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1253 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_defaults + * pg_defaults * ---------------- */ -DATA(insert OID = 0 ( 1263 defname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 defvalue 19 0 NAMEDATALEN 2 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1263 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1263 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1263 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1263 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1263 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1263 defname 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1263 defvalue 19 0 NAMEDATALEN 2 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1263 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1263 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1263 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1263 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1263 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1263 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1263 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1263 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1263 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1263 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1263 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_attrdef + * pg_attrdef * ---------------- */ -DATA(insert OID = 0 ( 1215 adrelid 26 0 4 1 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1215 adnum 21 0 2 2 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1215 adbin 25 0 -1 3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 adsrc 25 0 -1 4 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1215 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1215 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1215 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1215 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1215 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1215 adrelid 26 0 4 1 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1215 adnum 21 0 2 2 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1215 adbin 25 0 -1 3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1215 adsrc 25 0 -1 4 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1215 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1215 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1215 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1215 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1215 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1215 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1215 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1215 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1215 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1215 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1215 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_relcheck + * pg_relcheck * ---------------- */ -DATA(insert OID = 0 ( 1216 rcrelid 26 0 4 1 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1216 rcname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 rcbin 25 0 -1 3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 rcsrc 25 0 -1 4 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1216 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1216 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1216 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1216 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1216 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1216 rcrelid 26 0 4 1 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1216 rcname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1216 rcbin 25 0 -1 3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1216 rcsrc 25 0 -1 4 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1216 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1216 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1216 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1216 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1216 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1216 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1216 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1216 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1216 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1216 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1216 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_trigger + * pg_trigger * ---------------- */ -DATA(insert OID = 0 ( 1219 tgrelid 26 0 4 1 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1219 tgname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 tgfoid 26 0 4 3 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1219 tgtype 21 0 2 4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1219 tgnargs 21 0 2 5 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1219 tgattr 22 0 16 6 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 tgargs 17 0 -1 7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 ctid 27 0 6 -1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 oid 26 0 4 -2 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1219 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 cmin 29 0 2 -4 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1219 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1219 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1219 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1219 vtype 18 0 1 -11 0 -1 t f c f f)); - +DATA(insert OID = 0 ( 1219 tgrelid 26 0 4 1 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1219 tgname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1219 tgfoid 26 0 4 3 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1219 tgtype 21 0 2 4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1219 tgnargs 21 0 2 5 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1219 tgattr 22 0 16 6 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1219 tgargs 17 0 -1 7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1219 ctid 27 0 6 -1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1219 oid 26 0 4 -2 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1219 xmin 28 0 4 -3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1219 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1219 xmax 28 0 4 -5 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1219 cmax 29 0 2 -6 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1219 chain 27 0 6 -7 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1219 anchor 27 0 6 -8 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1219 tmin 702 0 4 -9 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1219 tmax 702 0 4 -10 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1219 vtype 18 0 1 -11 0 -1 t f c f f)); + /* ---------------- - * pg_hosts - this relation is used to store host based authentication - * info - * + * pg_hosts - this relation is used to store host based authentication + * info + * * ---------------- */ -DATA(insert OID = 0 ( 1273 dbName 19 0 NAMEDATALEN 1 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1273 address 25 0 -1 2 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1273 mask 25 0 -1 3 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1273 dbName 19 0 NAMEDATALEN 1 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1273 address 25 0 -1 2 0 -1 f f i f f)); +DATA(insert OID = 0 ( 1273 mask 25 0 -1 3 0 -1 f f i f f)); /* ---------------- - * pg_variable - this relation is modified by special purpose access - * method code. The following is garbage but is needed - * so that the reldesc code works properly. + * pg_variable - this relation is modified by special purpose access + * method code. The following is garbage but is needed + * so that the reldesc code works properly. * ---------------- */ #define Schema_pg_variable \ { 1264l, {"varfoo"}, 26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' } - -DATA(insert OID = 0 ( 1264 varfoo 26 0 4 1 0 -1 t f i f f)); - + +DATA(insert OID = 0 ( 1264 varfoo 26 0 4 1 0 -1 t f i f f)); + /* ---------------- - * pg_log - this relation is modified by special purpose access - * method code. The following is garbage but is needed - * so that the reldesc code works properly. + * pg_log - this relation is modified by special purpose access + * method code. The following is garbage but is needed + * so that the reldesc code works properly. * ---------------- */ #define Schema_pg_log \ { 1269l, {"logfoo"}, 26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' } -DATA(insert OID = 0 ( 1269 logfoo 26 0 4 1 0 -1 t f i f f)); - +DATA(insert OID = 0 ( 1269 logfoo 26 0 4 1 0 -1 t f i f f)); + /* ---------------- - * pg_time - this relation is modified by special purpose access - * method code. The following is garbage but is needed - * so that the reldesc code works properly. + * pg_time - this relation is modified by special purpose access + * method code. The following is garbage but is needed + * so that the reldesc code works properly. * ---------------- */ #define Schema_pg_time \ { 1271l, {"timefoo"}, 26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' } -DATA(insert OID = 0 ( 1271 timefoo 26 0 4 1 0 -1 t f i f f)); - -#endif /* PG_ATTRIBUTE_H */ +DATA(insert OID = 0 ( 1271 timefoo 26 0 4 1 0 -1 t f i f f)); + +#endif /* PG_ATTRIBUTE_H */ diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index e595f8fbbc6..2be1ebd90b5 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -1,22 +1,22 @@ /*------------------------------------------------------------------------- * * pg_class.h-- - * definition of the system "relation" relation (pg_class) - * along with the relation's initial contents. + * definition of the system "relation" relation (pg_class) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_class.h,v 1.9 1997/09/04 13:25:13 vadim Exp $ + * $Id: pg_class.h,v 1.10 1997/09/07 04:56:42 momjian Exp $ * * NOTES - * ``pg_relation'' is being replaced by ``pg_class''. currently - * we are only changing the name in the catalogs but someday the - * code will be changed too. -cim 2/26/90 - * [it finally happens. -ay 11/5/94] + * ``pg_relation'' is being replaced by ``pg_class''. currently + * we are only changing the name in the catalogs but someday the + * code will be changed too. -cim 2/26/90 + * [it finally happens. -ay 11/5/94] * - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -24,149 +24,155 @@ #define PG_RELATION_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_class definition. cpp turns this into - * typedef struct FormData_pg_class + * pg_class definition. cpp turns this into + * typedef struct FormData_pg_class * - * Note: the #if 0, #endif around the BKI_BEGIN.. END block - * below keeps cpp from seeing what is meant for the - * genbki script: pg_relation is now called pg_class, but - * only in the catalogs -cim 2/26/90 + * Note: the #if 0, #endif around the BKI_BEGIN.. END block + * below keeps cpp from seeing what is meant for the + * genbki script: pg_relation is now called pg_class, but + * only in the catalogs -cim 2/26/90 * ---------------- */ /* ---------------- - * This structure is actually variable-length (the last attribute is - * a POSTGRES array). Hence, sizeof(FormData_pg_class) does not - * describe the fixed-length or actual size of the structure. - * FormData_pg_class.relacl may not be correctly aligned, either, - * if aclitem and struct varlena don't align together. Hence, - * you MUST use heap_getattr() to get the relacl field. + * This structure is actually variable-length (the last attribute is + * a POSTGRES array). Hence, sizeof(FormData_pg_class) does not + * describe the fixed-length or actual size of the structure. + * FormData_pg_class.relacl may not be correctly aligned, either, + * if aclitem and struct varlena don't align together. Hence, + * you MUST use heap_getattr() to get the relacl field. * ---------------- */ -CATALOG(pg_class) BOOTSTRAP { - NameData relname; - Oid reltype; - Oid relowner; - Oid relam; - int4 relpages; - int4 reltuples; - int4 relexpires; /* really used as a abstime, but fudge it for now*/ - int4 relpreserved;/*really used as a reltime, but fudge it for now*/ - bool relhasindex; - bool relisshared; - char relkind; - char relarch; /* 'h' = heavy, 'l' = light, 'n' = no archival*/ - int2 relnatts; - /* relnatts is the number of user attributes this class has. There - must be exactly this many instances in Class pg_attribute for this - class which have attnum > 0 (= user attribute). - */ - int2 relsmgr; - int2 relchecks; /* # of CHECK constraints */ - int2 reltriggers; /* # of TRIGGERs */ - bool relhasrules; - aclitem relacl[1]; /* this is here for the catalog */ +CATALOG(pg_class) BOOTSTRAP +{ + NameData relname; + Oid reltype; + Oid relowner; + Oid relam; + int4 relpages; + int4 reltuples; + int4 relexpires; /* really used as a abstime, but fudge it + * for now */ + int4 relpreserved; /* really used as a reltime, but + * fudge it for now */ + bool relhasindex; + bool relisshared; + char relkind; + char relarch; /* 'h' = heavy, 'l' = light, 'n' = no + * archival */ + int2 relnatts; + + /* + * relnatts is the number of user attributes this class has. There + * must be exactly this many instances in Class pg_attribute for this + * class which have attnum > 0 (= user attribute). + */ + int2 relsmgr; + int2 relchecks; /* # of CHECK constraints */ + int2 reltriggers;/* # of TRIGGERs */ + bool relhasrules; + aclitem relacl[1]; /* this is here for the catalog */ } FormData_pg_class; #define CLASS_TUPLE_SIZE \ - (offsetof(FormData_pg_class,relhasrules) + sizeof(bool)) + (offsetof(FormData_pg_class,relhasrules) + sizeof(bool)) /* ---------------- - * Form_pg_class corresponds to a pointer to a tuple with - * the format of pg_class relation. + * Form_pg_class corresponds to a pointer to a tuple with + * the format of pg_class relation. * ---------------- */ -typedef FormData_pg_class *Form_pg_class; +typedef FormData_pg_class *Form_pg_class; /* ---------------- - * compiler constants for pg_class + * compiler constants for pg_class * ---------------- */ /* ---------------- - * Natts_pg_class_fixed is used to tell routines that insert new - * pg_class tuples (as opposed to replacing old ones) that there's no - * relacl field. + * Natts_pg_class_fixed is used to tell routines that insert new + * pg_class tuples (as opposed to replacing old ones) that there's no + * relacl field. * ---------------- */ -#define Natts_pg_class_fixed 17 -#define Natts_pg_class 18 -#define Anum_pg_class_relname 1 -#define Anum_pg_class_reltype 2 -#define Anum_pg_class_relowner 3 -#define Anum_pg_class_relam 4 -#define Anum_pg_class_relpages 5 -#define Anum_pg_class_reltuples 6 -#define Anum_pg_class_relexpires 7 -#define Anum_pg_class_relpreserved 8 -#define Anum_pg_class_relhasindex 9 -#define Anum_pg_class_relisshared 10 -#define Anum_pg_class_relkind 11 -#define Anum_pg_class_relarch 12 -#define Anum_pg_class_relnatts 13 -#define Anum_pg_class_relsmgr 14 -#define Anum_pg_class_relchecks 15 -#define Anum_pg_class_reltriggers 16 -#define Anum_pg_class_relhasrules 17 -#define Anum_pg_class_relacl 18 +#define Natts_pg_class_fixed 17 +#define Natts_pg_class 18 +#define Anum_pg_class_relname 1 +#define Anum_pg_class_reltype 2 +#define Anum_pg_class_relowner 3 +#define Anum_pg_class_relam 4 +#define Anum_pg_class_relpages 5 +#define Anum_pg_class_reltuples 6 +#define Anum_pg_class_relexpires 7 +#define Anum_pg_class_relpreserved 8 +#define Anum_pg_class_relhasindex 9 +#define Anum_pg_class_relisshared 10 +#define Anum_pg_class_relkind 11 +#define Anum_pg_class_relarch 12 +#define Anum_pg_class_relnatts 13 +#define Anum_pg_class_relsmgr 14 +#define Anum_pg_class_relchecks 15 +#define Anum_pg_class_reltriggers 16 +#define Anum_pg_class_relhasrules 17 +#define Anum_pg_class_relacl 18 /* ---------------- - * initial contents of pg_class + * initial contents of pg_class * ---------------- */ -DATA(insert OID = 1247 ( pg_type 71 PGUID 0 0 0 0 0 f f r n 16 0 0 0 f _null_ )); -DATA(insert OID = 1249 ( pg_attribute 75 PGUID 0 0 0 0 0 f f r n 16 0 0 0 f _null_ )); -DATA(insert OID = 1251 ( pg_demon 76 PGUID 0 0 0 0 0 f t r n 4 0 0 0 f _null_ )); -DATA(insert OID = 1253 ( pg_magic 80 PGUID 0 0 0 0 0 f t r n 2 0 0 0 f _null_ )); -DATA(insert OID = 1255 ( pg_proc 81 PGUID 0 0 0 0 0 f f r n 16 0 0 0 f _null_ )); -DATA(insert OID = 1257 ( pg_server 82 PGUID 0 0 0 0 0 f t r n 3 0 0 0 f _null_ )); -DATA(insert OID = 1259 ( pg_class 83 PGUID 0 0 0 0 0 f f r n 18 0 0 0 f _null_ )); -DATA(insert OID = 1260 ( pg_user 86 PGUID 0 0 0 0 0 f t r n 6 0 0 0 f _null_ )); -DATA(insert OID = 1261 ( pg_group 87 PGUID 0 0 0 0 0 f t s n 3 0 0 0 f _null_ )); -DATA(insert OID = 1262 ( pg_database 88 PGUID 0 0 0 0 0 f t r n 3 0 0 0 f _null_ )); -DATA(insert OID = 1263 ( pg_defaults 89 PGUID 0 0 0 0 0 f t r n 2 0 0 0 f _null_ )); -DATA(insert OID = 1264 ( pg_variable 90 PGUID 0 0 0 0 0 f t s n 2 0 0 0 f _null_ )); -DATA(insert OID = 1269 ( pg_log 99 PGUID 0 0 0 0 0 f t s n 1 0 0 0 f _null_ )); -DATA(insert OID = 1271 ( pg_time 100 PGUID 0 0 0 0 0 f t s n 1 0 0 0 f _null_ )); -DATA(insert OID = 1273 ( pg_hosts 101 PGUID 0 0 0 0 0 f t s n 3 0 0 0 f _null_ )); -DATA(insert OID = 1215 ( pg_attrdef 109 PGUID 0 0 0 0 0 t t r n 4 0 0 0 f _null_ )); -DATA(insert OID = 1216 ( pg_relcheck 110 PGUID 0 0 0 0 0 t t r n 4 0 0 0 f _null_ )); -DATA(insert OID = 1219 ( pg_trigger 111 PGUID 0 0 0 0 0 t t r n 7 0 0 0 f _null_ )); +DATA(insert OID = 1247 ( pg_type 71 PGUID 0 0 0 0 0 f f r n 16 0 0 0 f _null_ )); +DATA(insert OID = 1249 ( pg_attribute 75 PGUID 0 0 0 0 0 f f r n 16 0 0 0 f _null_ )); +DATA(insert OID = 1251 ( pg_demon 76 PGUID 0 0 0 0 0 f t r n 4 0 0 0 f _null_ )); +DATA(insert OID = 1253 ( pg_magic 80 PGUID 0 0 0 0 0 f t r n 2 0 0 0 f _null_ )); +DATA(insert OID = 1255 ( pg_proc 81 PGUID 0 0 0 0 0 f f r n 16 0 0 0 f _null_ )); +DATA(insert OID = 1257 ( pg_server 82 PGUID 0 0 0 0 0 f t r n 3 0 0 0 f _null_ )); +DATA(insert OID = 1259 ( pg_class 83 PGUID 0 0 0 0 0 f f r n 18 0 0 0 f _null_ )); +DATA(insert OID = 1260 ( pg_user 86 PGUID 0 0 0 0 0 f t r n 6 0 0 0 f _null_ )); +DATA(insert OID = 1261 ( pg_group 87 PGUID 0 0 0 0 0 f t s n 3 0 0 0 f _null_ )); +DATA(insert OID = 1262 ( pg_database 88 PGUID 0 0 0 0 0 f t r n 3 0 0 0 f _null_ )); +DATA(insert OID = 1263 ( pg_defaults 89 PGUID 0 0 0 0 0 f t r n 2 0 0 0 f _null_ )); +DATA(insert OID = 1264 ( pg_variable 90 PGUID 0 0 0 0 0 f t s n 2 0 0 0 f _null_ )); +DATA(insert OID = 1269 ( pg_log 99 PGUID 0 0 0 0 0 f t s n 1 0 0 0 f _null_ )); +DATA(insert OID = 1271 ( pg_time 100 PGUID 0 0 0 0 0 f t s n 1 0 0 0 f _null_ )); +DATA(insert OID = 1273 ( pg_hosts 101 PGUID 0 0 0 0 0 f t s n 3 0 0 0 f _null_ )); +DATA(insert OID = 1215 ( pg_attrdef 109 PGUID 0 0 0 0 0 t t r n 4 0 0 0 f _null_ )); +DATA(insert OID = 1216 ( pg_relcheck 110 PGUID 0 0 0 0 0 t t r n 4 0 0 0 f _null_ )); +DATA(insert OID = 1219 ( pg_trigger 111 PGUID 0 0 0 0 0 t t r n 7 0 0 0 f _null_ )); + +#define RelOid_pg_type 1247 +#define RelOid_pg_demon 1251 +#define RelOid_pg_attribute 1249 +#define RelOid_pg_magic 1253 +#define RelOid_pg_proc 1255 +#define RelOid_pg_server 1257 +#define RelOid_pg_class 1259 +#define RelOid_pg_user 1260 +#define RelOid_pg_group 1261 +#define RelOid_pg_database 1262 +#define RelOid_pg_defaults 1263 +#define RelOid_pg_variable 1264 +#define RelOid_pg_log 1269 +#define RelOid_pg_time 1271 +#define RelOid_pg_hosts 1273 +#define RelOid_pg_attrdef 1215 +#define RelOid_pg_relcheck 1216 +#define RelOid_pg_trigger 1219 -#define RelOid_pg_type 1247 -#define RelOid_pg_demon 1251 -#define RelOid_pg_attribute 1249 -#define RelOid_pg_magic 1253 -#define RelOid_pg_proc 1255 -#define RelOid_pg_server 1257 -#define RelOid_pg_class 1259 -#define RelOid_pg_user 1260 -#define RelOid_pg_group 1261 -#define RelOid_pg_database 1262 -#define RelOid_pg_defaults 1263 -#define RelOid_pg_variable 1264 -#define RelOid_pg_log 1269 -#define RelOid_pg_time 1271 -#define RelOid_pg_hosts 1273 -#define RelOid_pg_attrdef 1215 -#define RelOid_pg_relcheck 1216 -#define RelOid_pg_trigger 1219 - -#define MAX_SYSTEM_RELOID 1273 /* this does not seem to be used */ - /* anywhere */ +#define MAX_SYSTEM_RELOID 1273 /* this does not seem to be used */ + /* anywhere */ -#define RELKIND_INDEX 'i' /* secondary index */ -#define RELKIND_RELATION 'r' /* cataloged heap */ -#define RELKIND_SPECIAL 's' /* special (non-heap) */ -#define RELKIND_SEQUENCE 'S' /* SEQUENCE relation */ -#define RELKIND_UNCATALOGED 'u' /* temporary heap */ +#define RELKIND_INDEX 'i' /* secondary index */ +#define RELKIND_RELATION 'r' /* cataloged heap */ +#define RELKIND_SPECIAL 's' /* special (non-heap) */ +#define RELKIND_SEQUENCE 'S' /* SEQUENCE relation */ +#define RELKIND_UNCATALOGED 'u' /* temporary heap */ -#endif /* PG_RELATION_H */ +#endif /* PG_RELATION_H */ diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h index 56536f811bd..bd77e23a5df 100644 --- a/src/include/catalog/pg_database.h +++ b/src/include/catalog/pg_database.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_database.h-- - * definition of the system "database" relation (pg_database) - * along with the relation's initial contents. + * definition of the system "database" relation (pg_database) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_database.h,v 1.3 1997/08/21 02:28:55 momjian Exp $ + * $Id: pg_database.h,v 1.4 1997/09/07 04:56:43 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,38 +19,39 @@ #define PG_DATABASE_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_database definition. cpp turns this into - * typedef struct FormData_pg_database + * pg_database definition. cpp turns this into + * typedef struct FormData_pg_database * ---------------- - */ -CATALOG(pg_database) BOOTSTRAP { - NameData datname; - int4 datdba; - text datpath; /* VARIABLE LENGTH FIELD */ + */ +CATALOG(pg_database) BOOTSTRAP +{ + NameData datname; + int4 datdba; + text datpath; /* VARIABLE LENGTH FIELD */ } FormData_pg_database; /* ---------------- - * Form_pg_database corresponds to a pointer to a tuple with - * the format of pg_database relation. + * Form_pg_database corresponds to a pointer to a tuple with + * the format of pg_database relation. * ---------------- */ -typedef FormData_pg_database *Form_pg_database; +typedef FormData_pg_database *Form_pg_database; /* ---------------- - * compiler constants for pg_database + * compiler constants for pg_database * ---------------- */ -#define Natts_pg_database 3 -#define Anum_pg_database_datname 1 -#define Anum_pg_database_datdba 2 -#define Anum_pg_database_datpath 3 +#define Natts_pg_database 3 +#define Anum_pg_database_datname 1 +#define Anum_pg_database_datdba 2 +#define Anum_pg_database_datpath 3 -#endif /* PG_DATABASE_H */ +#endif /* PG_DATABASE_H */ diff --git a/src/include/catalog/pg_defaults.h b/src/include/catalog/pg_defaults.h index 554c4457a3c..a35c06c4db8 100644 --- a/src/include/catalog/pg_defaults.h +++ b/src/include/catalog/pg_defaults.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_defaults.h-- - * definition of the system "defaults" relation (pg_defaults) - * along with the relation's initial contents. + * definition of the system "defaults" relation (pg_defaults) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_defaults.h,v 1.2 1996/10/31 09:47:24 scrappy Exp $ + * $Id: pg_defaults.h,v 1.3 1997/09/07 04:56:44 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,36 +19,37 @@ #define PG_DEFAULTS_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_defaults definition. cpp turns this into - * typedef struct FormData_pg_defaults + * pg_defaults definition. cpp turns this into + * typedef struct FormData_pg_defaults * ---------------- - */ -CATALOG(pg_defaults) BOOTSTRAP { - NameData defname; - NameData defvalue; + */ +CATALOG(pg_defaults) BOOTSTRAP +{ + NameData defname; + NameData defvalue; } FormData_pg_defaults; /* ---------------- - * Form_pg_defaults corresponds to a pointer to a tuple with - * the format of pg_defaults relation. + * Form_pg_defaults corresponds to a pointer to a tuple with + * the format of pg_defaults relation. * ---------------- */ -typedef FormData_pg_defaults *Form_pg_defaults; +typedef FormData_pg_defaults *Form_pg_defaults; /* ---------------- - * compiler constants for pg_defaults + * compiler constants for pg_defaults * ---------------- */ -#define Natts_pg_defaults 2 -#define Anum_pg_defaults_defname 1 -#define Anum_pg_defaults_defvalue 2 +#define Natts_pg_defaults 2 +#define Anum_pg_defaults_defname 1 +#define Anum_pg_defaults_defvalue 2 -#endif /* PG_DEFAULTS_H */ +#endif /* PG_DEFAULTS_H */ diff --git a/src/include/catalog/pg_demon.h b/src/include/catalog/pg_demon.h index a0511ee362c..0bdb0151aa1 100644 --- a/src/include/catalog/pg_demon.h +++ b/src/include/catalog/pg_demon.h @@ -1,57 +1,58 @@ /*------------------------------------------------------------------------- * * pg_demon.h-- - * definition of the system "demon" relation (pg_demon) - * along with the relation's initial contents. + * definition of the system "demon" relation (pg_demon) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_demon.h,v 1.2 1996/10/31 09:47:26 scrappy Exp $ + * $Id: pg_demon.h,v 1.3 1997/09/07 04:56:45 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ -#ifndef PG_DEMON_H -#define PG_DEMON_H +#ifndef PG_DEMON_H +#define PG_DEMON_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_demon definition. cpp turns this into - * typedef struct FormData_pg_demon + * pg_demon definition. cpp turns this into + * typedef struct FormData_pg_demon * ---------------- - */ -CATALOG(pg_demon) BOOTSTRAP { - Oid demserid; - NameData demname; - Oid demowner; - regproc demcode; + */ +CATALOG(pg_demon) BOOTSTRAP +{ + Oid demserid; + NameData demname; + Oid demowner; + regproc demcode; } FormData_pg_demon; /* ---------------- - * Form_pg_demon corresponds to a pointer to a tuple with - * the format of pg_demon relation. + * Form_pg_demon corresponds to a pointer to a tuple with + * the format of pg_demon relation. * ---------------- */ -typedef FormData_pg_demon *Form_pg_demon; +typedef FormData_pg_demon *Form_pg_demon; /* ---------------- - * compiler constants for pg_demon + * compiler constants for pg_demon * ---------------- */ -#define Natts_pg_demon 4 -#define Anum_pg_demon_demserid 1 -#define Anum_pg_demon_demname 2 -#define Anum_pg_demon_demowner 3 -#define Anum_pg_demon_demcode 4 +#define Natts_pg_demon 4 +#define Anum_pg_demon_demserid 1 +#define Anum_pg_demon_demname 2 +#define Anum_pg_demon_demowner 3 +#define Anum_pg_demon_demcode 4 -#endif /* PG_DEMON_H */ +#endif /* PG_DEMON_H */ diff --git a/src/include/catalog/pg_group.h b/src/include/catalog/pg_group.h index b54a960b06b..3661b5149fe 100644 --- a/src/include/catalog/pg_group.h +++ b/src/include/catalog/pg_group.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * pg_group.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_group.h,v 1.2 1996/10/31 09:47:28 scrappy Exp $ + * $Id: pg_group.h,v 1.3 1997/09/07 04:56:46 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -18,24 +18,26 @@ #define PG_GROUP_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ -CATALOG(pg_group) BOOTSTRAP { - NameData groname; - int4 grosysid; - int4 grolist[1]; +CATALOG(pg_group) BOOTSTRAP +{ + NameData groname; + int4 grosysid; + int4 grolist[1]; } FormData_pg_group; + /* VARIABLE LENGTH STRUCTURE */ -typedef FormData_pg_group *Form_pg_group; +typedef FormData_pg_group *Form_pg_group; -#define Natts_pg_group 1 +#define Natts_pg_group 1 #define Anum_pg_group_groname 1 #define Anum_pg_group_grosysid 2 #define Anum_pg_group_grolist 3 -#endif /* PG_GROUP_H */ +#endif /* PG_GROUP_H */ diff --git a/src/include/catalog/pg_hosts.h b/src/include/catalog/pg_hosts.h index f192310f2c7..633b28579b6 100644 --- a/src/include/catalog/pg_hosts.h +++ b/src/include/catalog/pg_hosts.h @@ -2,19 +2,19 @@ * * pg_hosts.h-- * - * the pg_hosts system catalog provides host-based access to the - * backend. Only those hosts that are in the pg_hosts + * the pg_hosts system catalog provides host-based access to the + * backend. Only those hosts that are in the pg_hosts * - * currently, this table is not used, instead file-based host authentication + * currently, this table is not used, instead file-based host authentication * is used * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_hosts.h,v 1.2 1996/10/31 09:47:30 scrappy Exp $ + * $Id: pg_hosts.h,v 1.3 1997/09/07 04:56:46 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. *------------------------------------------------------------------------- */ @@ -22,22 +22,24 @@ #define PG_HOSTS_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ -CATALOG(pg_hosts) BOOTSTRAP { - NameData dbName; - text address; - text mask; +CATALOG(pg_hosts) BOOTSTRAP +{ + NameData dbName; + text address; + text mask; } FormData_pg_hosts; -typedef FormData_pg_hosts *Form_pg_hosts; -#define Natts_pg_hosts 3 +typedef FormData_pg_hosts *Form_pg_hosts; + +#define Natts_pg_hosts 3 #define Anum_pg_hosts_dbName 1 #define Anum_pg_hosts_address 2 -#define Anum_pg_hosts_mask 3 +#define Anum_pg_hosts_mask 3 -#endif /* PG_HOSTS_H */ +#endif /* PG_HOSTS_H */ diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h index 91f472422a8..0ebaea1c76a 100644 --- a/src/include/catalog/pg_index.h +++ b/src/include/catalog/pg_index.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_index.h-- - * definition of the system "index" relation (pg_index) - * along with the relation's initial contents. + * definition of the system "index" relation (pg_index) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_index.h,v 1.3 1996/11/13 20:50:57 scrappy Exp $ + * $Id: pg_index.h,v 1.4 1997/09/07 04:56:47 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,64 +19,69 @@ #define PG_INDEX_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_index definition. cpp turns this into - * typedef struct FormData_pg_index. The oid of the index relation - * is stored in indexrelid; the oid of the indexed relation is stored - * in indrelid. + * pg_index definition. cpp turns this into + * typedef struct FormData_pg_index. The oid of the index relation + * is stored in indexrelid; the oid of the indexed relation is stored + * in indrelid. * ---------------- - */ + */ -/* +/* * it seems that all variable length fields should go at the _end_, * because the system cache routines only copy the fields up to the * first variable length field. so I moved indislossy, indhaskeytype, - * and indisunique before indpred. --djm 8/20/96 + * and indisunique before indpred. --djm 8/20/96 */ -CATALOG(pg_index) { - Oid indexrelid; - Oid indrelid; - Oid indproc; /* registered procedure for functional index */ - int28 indkey; - oid8 indclass; - bool indisclustered; - bool indisarchived; - bool indislossy; /* do we fetch false tuples (lossy compression)? */ - bool indhaskeytype; /* does key type != attribute type? */ - bool indisunique; /* is this a unique index? */ - text indpred; /* query plan for partial index predicate */ +CATALOG(pg_index) +{ + Oid indexrelid; + Oid indrelid; + Oid indproc; /* registered procedure for functional + * index */ + int28 indkey; + oid8 indclass; + bool indisclustered; + bool indisarchived; + bool indislossy; /* do we fetch false tuples (lossy + * compression)? */ + bool indhaskeytype; /* does key type != attribute + * type? */ + bool indisunique;/* is this a unique index? */ + text indpred; /* query plan for partial index predicate */ } FormData_pg_index; -#define INDEX_MAX_KEYS 8 /* maximum number of keys in an index definition */ +#define INDEX_MAX_KEYS 8 /* maximum number of keys in an index + * definition */ /* ---------------- - * Form_pg_index corresponds to a pointer to a tuple with - * the format of pg_index relation. + * Form_pg_index corresponds to a pointer to a tuple with + * the format of pg_index relation. * ---------------- */ -typedef FormData_pg_index *IndexTupleForm; +typedef FormData_pg_index *IndexTupleForm; /* ---------------- - * compiler constants for pg_index + * compiler constants for pg_index * ---------------- */ -#define Natts_pg_index 11 -#define Anum_pg_index_indexrelid 1 -#define Anum_pg_index_indrelid 2 -#define Anum_pg_index_indproc 3 -#define Anum_pg_index_indkey 4 -#define Anum_pg_index_indclass 5 +#define Natts_pg_index 11 +#define Anum_pg_index_indexrelid 1 +#define Anum_pg_index_indrelid 2 +#define Anum_pg_index_indproc 3 +#define Anum_pg_index_indkey 4 +#define Anum_pg_index_indclass 5 #define Anum_pg_index_indisclustered 6 -#define Anum_pg_index_indisarchived 7 -#define Anum_pg_index_indislossy 8 -#define Anum_pg_index_indhaskeytype 9 -#define Anum_pg_index_indisunique 10 -#define Anum_pg_index_indpred 11 +#define Anum_pg_index_indisarchived 7 +#define Anum_pg_index_indislossy 8 +#define Anum_pg_index_indhaskeytype 9 +#define Anum_pg_index_indisunique 10 +#define Anum_pg_index_indpred 11 -#endif /* PG_INDEX_H */ +#endif /* PG_INDEX_H */ diff --git a/src/include/catalog/pg_inheritproc.h b/src/include/catalog/pg_inheritproc.h index 5357c7ebfa5..f53561a51ca 100644 --- a/src/include/catalog/pg_inheritproc.h +++ b/src/include/catalog/pg_inheritproc.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_inheritproc.h-- - * definition of the system "inheritproc" relation (pg_inheritproc) - * along with the relation's initial contents. + * definition of the system "inheritproc" relation (pg_inheritproc) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_inheritproc.h,v 1.2 1996/10/31 09:47:33 scrappy Exp $ + * $Id: pg_inheritproc.h,v 1.3 1997/09/07 04:56:50 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,40 +19,41 @@ #define PG_INHERITPROC_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_inheritproc definition. cpp turns this into - * typedef struct FormData_pg_inheritproc + * pg_inheritproc definition. cpp turns this into + * typedef struct FormData_pg_inheritproc * ---------------- - */ -CATALOG(pg_inheritproc) { - NameData inhproname; - Oid inhargrel; - Oid inhdefrel; - Oid inhproc; + */ +CATALOG(pg_inheritproc) +{ + NameData inhproname; + Oid inhargrel; + Oid inhdefrel; + Oid inhproc; } FormData_pg_inheritproc; /* ---------------- - * Form_pg_inheritproc corresponds to a pointer to a tuple with - * the format of pg_inheritproc relation. + * Form_pg_inheritproc corresponds to a pointer to a tuple with + * the format of pg_inheritproc relation. * ---------------- */ -typedef FormData_pg_inheritproc *Form_pg_inheritproc; +typedef FormData_pg_inheritproc *Form_pg_inheritproc; /* ---------------- - * compiler constants for pg_inheritproc + * compiler constants for pg_inheritproc * ---------------- */ -#define Natts_pg_inheritproc 4 +#define Natts_pg_inheritproc 4 #define Anum_pg_inheritproc_inhproname 1 #define Anum_pg_inheritproc_inhargrel 2 #define Anum_pg_inheritproc_inhdefrel 3 -#define Anum_pg_inheritproc_inhproc 4 +#define Anum_pg_inheritproc_inhproc 4 -#endif /* PG_INHERITPROC_H */ +#endif /* PG_INHERITPROC_H */ diff --git a/src/include/catalog/pg_inherits.h b/src/include/catalog/pg_inherits.h index 66c6f933914..8913b613ed0 100644 --- a/src/include/catalog/pg_inherits.h +++ b/src/include/catalog/pg_inherits.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_inherits.h-- - * definition of the system "inherits" relation (pg_inherits) - * along with the relation's initial contents. + * definition of the system "inherits" relation (pg_inherits) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_inherits.h,v 1.2 1996/10/31 09:47:35 scrappy Exp $ + * $Id: pg_inherits.h,v 1.3 1997/09/07 04:56:51 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,38 +19,39 @@ #define PG_INHERITS_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_inherits definition. cpp turns this into - * typedef struct FormData_pg_inherits + * pg_inherits definition. cpp turns this into + * typedef struct FormData_pg_inherits * ---------------- - */ -CATALOG(pg_inherits) { - Oid inhrel; - Oid inhparent; - int4 inhseqno; + */ +CATALOG(pg_inherits) +{ + Oid inhrel; + Oid inhparent; + int4 inhseqno; } FormData_pg_inherits; /* ---------------- - * Form_pg_inherits corresponds to a pointer to a tuple with - * the format of pg_inherits relation. + * Form_pg_inherits corresponds to a pointer to a tuple with + * the format of pg_inherits relation. * ---------------- */ -typedef FormData_pg_inherits *InheritsTupleForm; +typedef FormData_pg_inherits *InheritsTupleForm; /* ---------------- - * compiler constants for pg_inherits + * compiler constants for pg_inherits * ---------------- */ -#define Natts_pg_inherits 3 -#define Anum_pg_inherits_inhrel 1 -#define Anum_pg_inherits_inhparent 2 -#define Anum_pg_inherits_inhseqno 3 +#define Natts_pg_inherits 3 +#define Anum_pg_inherits_inhrel 1 +#define Anum_pg_inherits_inhparent 2 +#define Anum_pg_inherits_inhseqno 3 -#endif /* PG_INHERITS_H */ +#endif /* PG_INHERITS_H */ diff --git a/src/include/catalog/pg_ipl.h b/src/include/catalog/pg_ipl.h index 7242c8fc672..4e735f8dc33 100644 --- a/src/include/catalog/pg_ipl.h +++ b/src/include/catalog/pg_ipl.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_ipl.h-- - * definition of the system "ipl" relation (pg_ipl) - * along with the relation's initial contents. + * definition of the system "ipl" relation (pg_ipl) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_ipl.h,v 1.2 1996/10/31 09:47:36 scrappy Exp $ + * $Id: pg_ipl.h,v 1.3 1997/09/07 04:56:52 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,38 +19,39 @@ #define PG_IPL_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_ipl definition. cpp turns this into - * typedef struct FormData_pg_ipl + * pg_ipl definition. cpp turns this into + * typedef struct FormData_pg_ipl * ---------------- - */ -CATALOG(pg_ipl) { - Oid iplrel; - Oid iplipl; - int4 iplseqno; + */ +CATALOG(pg_ipl) +{ + Oid iplrel; + Oid iplipl; + int4 iplseqno; } FormData_pg_ipl; /* ---------------- - * Form_pg_ipl corresponds to a pointer to a tuple with - * the format of pg_ipl relation. + * Form_pg_ipl corresponds to a pointer to a tuple with + * the format of pg_ipl relation. * ---------------- */ -typedef FormData_pg_ipl *Form_pg_ipl; +typedef FormData_pg_ipl *Form_pg_ipl; /* ---------------- - * compiler constants for pg_ipl + * compiler constants for pg_ipl * ---------------- */ -#define Natts_pg_ipl 3 -#define Anum_pg_ipl_iplrel 1 -#define Anum_pg_ipl_iplipl 2 +#define Natts_pg_ipl 3 +#define Anum_pg_ipl_iplrel 1 +#define Anum_pg_ipl_iplipl 2 #define Anum_pg_ipl_iplseqno 3 -#endif /* PG_IPL_H */ +#endif /* PG_IPL_H */ diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h index 35e53d7dc18..1a1ac577aad 100644 --- a/src/include/catalog/pg_language.h +++ b/src/include/catalog/pg_language.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_language.h-- - * definition of the system "language" relation (pg_language) - * along with the relation's initial contents. + * definition of the system "language" relation (pg_language) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_language.h,v 1.2 1996/10/31 09:47:38 scrappy Exp $ + * $Id: pg_language.h,v 1.3 1997/09/07 04:56:53 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,39 +19,40 @@ #define PG_LANGUAGE_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_language definition. cpp turns this into - * typedef struct FormData_pg_language + * pg_language definition. cpp turns this into + * typedef struct FormData_pg_language * ---------------- - */ -CATALOG(pg_language) { - NameData lanname; - text lancompiler; /* VARIABLE LENGTH FIELD */ + */ +CATALOG(pg_language) +{ + NameData lanname; + text lancompiler;/* VARIABLE LENGTH FIELD */ } FormData_pg_language; /* ---------------- - * Form_pg_language corresponds to a pointer to a tuple with - * the format of pg_language relation. + * Form_pg_language corresponds to a pointer to a tuple with + * the format of pg_language relation. * ---------------- */ -typedef FormData_pg_language *Form_pg_language; +typedef FormData_pg_language *Form_pg_language; /* ---------------- - * compiler constants for pg_language + * compiler constants for pg_language * ---------------- */ -#define Natts_pg_language 2 -#define Anum_pg_language_lanname 1 +#define Natts_pg_language 2 +#define Anum_pg_language_lanname 1 #define Anum_pg_language_lancompiler 2 /* ---------------- - * initial contents of pg_language + * initial contents of pg_language * ---------------- */ @@ -63,12 +64,5 @@ DATA(insert OID = 13 ( "C" "/bin/cc" )); DATA(insert OID = 14 ( "sql" "postgres")); #define SQLlanguageId 14 - -#endif /* PG_LANGUAGE_H */ - - - - - - +#endif /* PG_LANGUAGE_H */ diff --git a/src/include/catalog/pg_listener.h b/src/include/catalog/pg_listener.h index 64749d3e334..c1826a317a4 100644 --- a/src/include/catalog/pg_listener.h +++ b/src/include/catalog/pg_listener.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * pg_listener.h-- - * Asynchronous notification + * Asynchronous notification * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_listener.h,v 1.2 1996/10/31 09:47:40 scrappy Exp $ + * $Id: pg_listener.h,v 1.3 1997/09/07 04:56:54 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -18,38 +18,39 @@ #define PG_LISTENER_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------------------------------------------------------- - * pg_listener definition. + * pg_listener definition. * - * cpp turns this into typedef struct FormData_pg_listener + * cpp turns this into typedef struct FormData_pg_listener * ---------------------------------------------------------------- */ -CATALOG(pg_listener) { - NameData relname; - int4 listenerpid; - int4 notification; +CATALOG(pg_listener) +{ + NameData relname; + int4 listenerpid; + int4 notification; } FormData_pg_listener; /* ---------------- - * compiler constants for pg_listener + * compiler constants for pg_listener * ---------------- */ -#define Natts_pg_listener 3 -#define Anum_pg_listener_relname 1 -#define Anum_pg_listener_pid 2 -#define Anum_pg_listener_notify 3 +#define Natts_pg_listener 3 +#define Anum_pg_listener_relname 1 +#define Anum_pg_listener_pid 2 +#define Anum_pg_listener_notify 3 /* ---------------- - * initial contents of pg_listener are NOTHING. + * initial contents of pg_listener are NOTHING. * ---------------- */ -#endif /* PG_LISTENER_H */ +#endif /* PG_LISTENER_H */ diff --git a/src/include/catalog/pg_log.h b/src/include/catalog/pg_log.h index 7aa4240762d..977b1f9cccf 100644 --- a/src/include/catalog/pg_log.h +++ b/src/include/catalog/pg_log.h @@ -1,19 +1,19 @@ /*------------------------------------------------------------------------- * * pg_log.h-- - * the system log relation "pg_log" is not a "heap" relation. - * it is automatically created by the transam/ code and the - * information here is all bogus and is just here to make the - * relcache code happy. + * the system log relation "pg_log" is not a "heap" relation. + * it is automatically created by the transam/ code and the + * information here is all bogus and is just here to make the + * relcache code happy. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_log.h,v 1.2 1996/10/31 09:47:42 scrappy Exp $ + * $Id: pg_log.h,v 1.3 1997/09/07 04:56:55 momjian Exp $ * * NOTES - * The structures and macros used by the transam/ code - * to access pg_log should some day go here -cim 6/18/90 + * The structures and macros used by the transam/ code + * to access pg_log should some day go here -cim 6/18/90 * *------------------------------------------------------------------------- */ @@ -21,19 +21,20 @@ #define PG_LOG_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ -CATALOG(pg_log) BOOTSTRAP { - Oid logfoo; +CATALOG(pg_log) BOOTSTRAP +{ + Oid logfoo; } FormData_pg_log; -typedef FormData_pg_log *Form_pg_log; +typedef FormData_pg_log *Form_pg_log; -#define Natts_pg_log 1 -#define Anum_pg_log_logfoo 1 +#define Natts_pg_log 1 +#define Anum_pg_log_logfoo 1 -#endif /* PG_LOG_H */ +#endif /* PG_LOG_H */ diff --git a/src/include/catalog/pg_magic.h b/src/include/catalog/pg_magic.h index 83f53d73d1b..7c92c2e3c55 100644 --- a/src/include/catalog/pg_magic.h +++ b/src/include/catalog/pg_magic.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_magic.h-- - * definition of the system "magic" relation (pg_magic) - * along with the relation's initial contents. + * definition of the system "magic" relation (pg_magic) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_magic.h,v 1.2 1996/10/31 09:47:45 scrappy Exp $ + * $Id: pg_magic.h,v 1.3 1997/09/07 04:56:57 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,35 +19,36 @@ #define PG_MAGIC_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_magic definition. cpp turns this into - * typedef struct FormData_pg_magic + * pg_magic definition. cpp turns this into + * typedef struct FormData_pg_magic * ---------------- - */ -CATALOG(pg_magic) BOOTSTRAP { - NameData magname; - NameData magvalue; + */ +CATALOG(pg_magic) BOOTSTRAP +{ + NameData magname; + NameData magvalue; } FormData_pg_magic; /* ---------------- - * Form_pg_magic corresponds to a pointer to a tuple with - * the format of pg_magic relation. + * Form_pg_magic corresponds to a pointer to a tuple with + * the format of pg_magic relation. * ---------------- */ -typedef FormData_pg_magic *Form_pg_magic; +typedef FormData_pg_magic *Form_pg_magic; /* ---------------- - * compiler constants for pg_magic + * compiler constants for pg_magic * ---------------- */ -#define Natts_pg_magic 2 -#define Anum_pg_magic_magname 1 -#define Anum_pg_magic_magvalue 2 +#define Natts_pg_magic 2 +#define Anum_pg_magic_magname 1 +#define Anum_pg_magic_magvalue 2 -#endif /* PG_MAGIC_H */ +#endif /* PG_MAGIC_H */ diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h index ba267a10ccc..f047de2c890 100644 --- a/src/include/catalog/pg_opclass.h +++ b/src/include/catalog/pg_opclass.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_opclass.h-- - * definition of the system "opclass" relation (pg_opclass) - * along with the relation's initial contents. + * definition of the system "opclass" relation (pg_opclass) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_opclass.h,v 1.3 1997/09/04 18:43:58 thomas Exp $ + * $Id: pg_opclass.h,v 1.4 1997/09/07 04:56:58 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,40 +19,41 @@ #define PG_OPCLASS_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_opclass definition. cpp turns this into - * typedef struct FormData_pg_opclass + * pg_opclass definition. cpp turns this into + * typedef struct FormData_pg_opclass * ---------------- - */ + */ -CATALOG(pg_opclass) { - NameData opcname; - Oid opcdeftype; +CATALOG(pg_opclass) +{ + NameData opcname; + Oid opcdeftype; } FormData_pg_opclass; /* ---------------- - * Form_pg_opclass corresponds to a pointer to a tuple with - * the format of pg_opclass relation. + * Form_pg_opclass corresponds to a pointer to a tuple with + * the format of pg_opclass relation. * ---------------- */ -typedef FormData_pg_opclass *Form_pg_opclass; +typedef FormData_pg_opclass *Form_pg_opclass; /* ---------------- - * compiler constants for pg_opclass + * compiler constants for pg_opclass * ---------------- */ -#define Natts_pg_opclass 2 -#define Anum_pg_opclass_opcname 1 -#define Anum_pg_opclass_opcdeftype 2 +#define Natts_pg_opclass 2 +#define Anum_pg_opclass_opcname 1 +#define Anum_pg_opclass_opcdeftype 2 /* ---------------- - * initial contents of pg_opclass + * initial contents of pg_opclass * ---------------- */ @@ -61,34 +62,34 @@ typedef FormData_pg_opclass *Form_pg_opclass; * (see the README in this directory), so just put zeros * in, which are invalid OID's anyway. --djm */ -DATA(insert OID = 406 ( char2_ops 409 )); -DATA(insert OID = 407 ( char4_ops 410 )); -DATA(insert OID = 408 ( char8_ops 411 )); -DATA(insert OID = 1181 ( name_ops 19 )); -DATA(insert OID = 421 ( int2_ops 21 )); -DATA(insert OID = 422 ( box_ops 603 )); -DATA(insert OID = 423 ( float8_ops 701 )); -DATA(insert OID = 424 ( int24_ops 0 )); -DATA(insert OID = 425 ( int42_ops 0 )); -DATA(insert OID = 426 ( int4_ops 23 )); +DATA(insert OID = 406 ( char2_ops 409 )); +DATA(insert OID = 407 ( char4_ops 410 )); +DATA(insert OID = 408 ( char8_ops 411 )); +DATA(insert OID = 1181 ( name_ops 19 )); +DATA(insert OID = 421 ( int2_ops 21 )); +DATA(insert OID = 422 ( box_ops 603 )); +DATA(insert OID = 423 ( float8_ops 701 )); +DATA(insert OID = 424 ( int24_ops 0 )); +DATA(insert OID = 425 ( int42_ops 0 )); +DATA(insert OID = 426 ( int4_ops 23 )); #define INT4_OPS_OID 426 -DATA(insert OID = 427 ( oid_ops 26 )); -DATA(insert OID = 428 ( float4_ops 700 )); -DATA(insert OID = 429 ( char_ops 18 )); -DATA(insert OID = 430 ( char16_ops 20 )); -DATA(insert OID = 431 ( text_ops 25 )); -DATA(insert OID = 432 ( abstime_ops 702 )); -DATA(insert OID = 433 ( bigbox_ops 0 )); -DATA(insert OID = 434 ( poly_ops 604 )); -DATA(insert OID = 435 ( oidint4_ops 910 )); -DATA(insert OID = 436 ( oidname_ops 911 )); -DATA(insert OID = 437 ( oidint2_ops 810 )); -DATA(insert OID = 714 ( circle_ops 718 )); -DATA(insert OID = 1076 ( bpchar_ops 1042 )); -DATA(insert OID = 1077 ( varchar_ops 1043 )); -DATA(insert OID = 1114 ( date_ops 1082 )); -DATA(insert OID = 1115 ( time_ops 1083 )); -DATA(insert OID = 1312 ( datetime_ops 1184 )); -DATA(insert OID = 1313 ( timespan_ops 1186 )); +DATA(insert OID = 427 ( oid_ops 26 )); +DATA(insert OID = 428 ( float4_ops 700 )); +DATA(insert OID = 429 ( char_ops 18 )); +DATA(insert OID = 430 ( char16_ops 20 )); +DATA(insert OID = 431 ( text_ops 25 )); +DATA(insert OID = 432 ( abstime_ops 702 )); +DATA(insert OID = 433 ( bigbox_ops 0 )); +DATA(insert OID = 434 ( poly_ops 604 )); +DATA(insert OID = 435 ( oidint4_ops 910 )); +DATA(insert OID = 436 ( oidname_ops 911 )); +DATA(insert OID = 437 ( oidint2_ops 810 )); +DATA(insert OID = 714 ( circle_ops 718 )); +DATA(insert OID = 1076 ( bpchar_ops 1042 )); +DATA(insert OID = 1077 ( varchar_ops 1043 )); +DATA(insert OID = 1114 ( date_ops 1082 )); +DATA(insert OID = 1115 ( time_ops 1083 )); +DATA(insert OID = 1312 ( datetime_ops 1184 )); +DATA(insert OID = 1313 ( timespan_ops 1186 )); -#endif /* PG_OPCLASS_H */ +#endif /* PG_OPCLASS_H */ diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index 6e7f9284018..111974e4722 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * pg_operator.h-- - * definition of the system "operator" relation (pg_operator) - * along with the relation's initial contents. + * definition of the system "operator" relation (pg_operator) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_operator.h,v 1.13 1997/08/21 23:56:48 momjian Exp $ + * $Id: pg_operator.h,v 1.14 1997/09/07 04:57:00 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * XXX do NOT break up DATA() statements into multiple lines! + * the scripts are not as smart as you might think... * *------------------------------------------------------------------------- */ @@ -22,622 +22,624 @@ #define PG_OPERATOR_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_operator definition. cpp turns this into - * typedef struct FormData_pg_operator + * pg_operator definition. cpp turns this into + * typedef struct FormData_pg_operator * ---------------- */ -CATALOG(pg_operator) { - NameData oprname; - Oid oprowner; - int2 oprprec; - char oprkind; - bool oprisleft; - bool oprcanhash; - Oid oprleft; - Oid oprright; - Oid oprresult; - Oid oprcom; - Oid oprnegate; - Oid oprlsortop; - Oid oprrsortop; - regproc oprcode; - regproc oprrest; - regproc oprjoin; +CATALOG(pg_operator) +{ + NameData oprname; + Oid oprowner; + int2 oprprec; + char oprkind; + bool oprisleft; + bool oprcanhash; + Oid oprleft; + Oid oprright; + Oid oprresult; + Oid oprcom; + Oid oprnegate; + Oid oprlsortop; + Oid oprrsortop; + regproc oprcode; + regproc oprrest; + regproc oprjoin; } FormData_pg_operator; /* ---------------- - * Form_pg_operator corresponds to a pointer to a tuple with - * the format of pg_operator relation. + * Form_pg_operator corresponds to a pointer to a tuple with + * the format of pg_operator relation. * ---------------- */ -typedef FormData_pg_operator *OperatorTupleForm; +typedef FormData_pg_operator *OperatorTupleForm; /* ---------------- - * compiler constants for pg_operator + * compiler constants for pg_operator * ---------------- */ -#define Natts_pg_operator 16 -#define Anum_pg_operator_oprname 1 -#define Anum_pg_operator_oprowner 2 -#define Anum_pg_operator_oprprec 3 -#define Anum_pg_operator_oprkind 4 -#define Anum_pg_operator_oprisleft 5 -#define Anum_pg_operator_oprcanhash 6 -#define Anum_pg_operator_oprleft 7 -#define Anum_pg_operator_oprright 8 -#define Anum_pg_operator_oprresult 9 -#define Anum_pg_operator_oprcom 10 -#define Anum_pg_operator_oprnegate 11 -#define Anum_pg_operator_oprlsortop 12 -#define Anum_pg_operator_oprrsortop 13 -#define Anum_pg_operator_oprcode 14 -#define Anum_pg_operator_oprrest 15 -#define Anum_pg_operator_oprjoin 16 +#define Natts_pg_operator 16 +#define Anum_pg_operator_oprname 1 +#define Anum_pg_operator_oprowner 2 +#define Anum_pg_operator_oprprec 3 +#define Anum_pg_operator_oprkind 4 +#define Anum_pg_operator_oprisleft 5 +#define Anum_pg_operator_oprcanhash 6 +#define Anum_pg_operator_oprleft 7 +#define Anum_pg_operator_oprright 8 +#define Anum_pg_operator_oprresult 9 +#define Anum_pg_operator_oprcom 10 +#define Anum_pg_operator_oprnegate 11 +#define Anum_pg_operator_oprlsortop 12 +#define Anum_pg_operator_oprrsortop 13 +#define Anum_pg_operator_oprcode 14 +#define Anum_pg_operator_oprrest 15 +#define Anum_pg_operator_oprjoin 16 /* ---------------- - * initial contents of pg_operator + * initial contents of pg_operator * ---------------- */ -DATA(insert OID = 58 ( "<" PGUID 0 b t f 16 16 16 85 91 0 0 boollt intltsel intltjoinsel )); -DATA(insert OID = 59 ( ">" PGUID 0 b t f 16 16 16 85 91 0 0 boolgt intltsel intltjoinsel )); -DATA(insert OID = 85 ( "<>" PGUID 0 b t f 16 16 16 85 91 0 0 boolne neqsel neqjoinsel )); -DATA(insert OID = 91 ( "=" PGUID 0 b t t 16 16 16 91 85 0 0 booleq eqsel eqjoinsel )); +DATA(insert OID = 58 ( "<" PGUID 0 b t f 16 16 16 85 91 0 0 boollt intltsel intltjoinsel )); +DATA(insert OID = 59 ( ">" PGUID 0 b t f 16 16 16 85 91 0 0 boolgt intltsel intltjoinsel )); +DATA(insert OID = 85 ( "<>" PGUID 0 b t f 16 16 16 85 91 0 0 boolne neqsel neqjoinsel )); +DATA(insert OID = 91 ( "=" PGUID 0 b t t 16 16 16 91 85 0 0 booleq eqsel eqjoinsel )); #define BooleanEqualOperator 91 -DATA(insert OID = 92 ( "=" PGUID 0 b t t 18 18 16 92 630 631 631 chareq eqsel eqjoinsel )); -DATA(insert OID = 93 ( "=" PGUID 0 b t t 19 19 16 93 643 660 660 nameeq eqsel eqjoinsel )); -DATA(insert OID = 94 ( "=" PGUID 0 b t t 21 21 16 94 519 95 95 int2eq eqsel eqjoinsel )); -DATA(insert OID = 95 ( "<" PGUID 0 b t f 21 21 16 520 524 0 0 int2lt intltsel intltjoinsel )); -DATA(insert OID = 96 ( "=" PGUID 0 b t t 23 23 16 96 518 97 97 int4eq eqsel eqjoinsel )); -DATA(insert OID = 97 ( "<" PGUID 0 b t f 23 23 16 521 525 0 0 int4lt intltsel intltjoinsel )); -DATA(insert OID = 98 ( "=" PGUID 0 b t t 25 25 16 98 531 664 664 texteq eqsel eqjoinsel )); - -DATA(insert OID = 1267 ( "=" PGUID 0 b t t 20 20 16 1267 644 645 645 char16eq eqsel eqjoinsel )); -DATA(insert OID = 329 ( "=" PGUID 0 b t t 1000 1000 16 329 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 349 ( "=" PGUID 0 b t t 1001 1001 16 349 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 374 ( "=" PGUID 0 b t t 1002 1002 16 374 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 375 ( "=" PGUID 0 b t t 1003 1003 16 375 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 376 ( "=" PGUID 0 b t t 1004 1004 16 376 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 377 ( "=" PGUID 0 b t t 1005 1005 16 377 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 378 ( "=" PGUID 0 b t t 1006 1006 16 378 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 379 ( "=" PGUID 0 b t t 1007 1007 16 379 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 380 ( "=" PGUID 0 b t t 1008 1008 16 380 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 381 ( "=" PGUID 0 b t t 1009 1009 16 381 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 382 ( "=" PGUID 0 b t t 1028 1028 16 382 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 383 ( "=" PGUID 0 b t t 1010 1010 16 383 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 384 ( "=" PGUID 0 b t t 1011 1011 16 384 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 385 ( "=" PGUID 0 b t t 1012 1012 16 385 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 386 ( "=" PGUID 0 b t t 1013 1013 16 386 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 92 ( "=" PGUID 0 b t t 18 18 16 92 630 631 631 chareq eqsel eqjoinsel )); +DATA(insert OID = 93 ( "=" PGUID 0 b t t 19 19 16 93 643 660 660 nameeq eqsel eqjoinsel )); +DATA(insert OID = 94 ( "=" PGUID 0 b t t 21 21 16 94 519 95 95 int2eq eqsel eqjoinsel )); +DATA(insert OID = 95 ( "<" PGUID 0 b t f 21 21 16 520 524 0 0 int2lt intltsel intltjoinsel )); +DATA(insert OID = 96 ( "=" PGUID 0 b t t 23 23 16 96 518 97 97 int4eq eqsel eqjoinsel )); +DATA(insert OID = 97 ( "<" PGUID 0 b t f 23 23 16 521 525 0 0 int4lt intltsel intltjoinsel )); +DATA(insert OID = 98 ( "=" PGUID 0 b t t 25 25 16 98 531 664 664 texteq eqsel eqjoinsel )); + +DATA(insert OID = 1267 ( "=" PGUID 0 b t t 20 20 16 1267 644 645 645 char16eq eqsel eqjoinsel )); +DATA(insert OID = 329 ( "=" PGUID 0 b t t 1000 1000 16 329 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 349 ( "=" PGUID 0 b t t 1001 1001 16 349 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 374 ( "=" PGUID 0 b t t 1002 1002 16 374 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 375 ( "=" PGUID 0 b t t 1003 1003 16 375 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 376 ( "=" PGUID 0 b t t 1004 1004 16 376 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 377 ( "=" PGUID 0 b t t 1005 1005 16 377 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 378 ( "=" PGUID 0 b t t 1006 1006 16 378 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 379 ( "=" PGUID 0 b t t 1007 1007 16 379 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 380 ( "=" PGUID 0 b t t 1008 1008 16 380 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 381 ( "=" PGUID 0 b t t 1009 1009 16 381 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 382 ( "=" PGUID 0 b t t 1028 1028 16 382 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 383 ( "=" PGUID 0 b t t 1010 1010 16 383 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 384 ( "=" PGUID 0 b t t 1011 1011 16 384 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 385 ( "=" PGUID 0 b t t 1012 1012 16 385 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 386 ( "=" PGUID 0 b t t 1013 1013 16 386 0 0 0 array_eq eqsel eqjoinsel )); /* -DATA(insert OID = 387 ( "=" PGUID 0 b t t 1014 1014 16 387 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 387 ( "=" PGUID 0 b t t 1014 1014 16 387 0 0 0 array_eq eqsel eqjoinsel )); */ -DATA(insert OID = 388 ( "=" PGUID 0 b t t 1015 1015 16 388 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 389 ( "=" PGUID 0 b t t 1016 1016 16 389 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 390 ( "=" PGUID 0 b t t 1017 1017 16 390 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 391 ( "=" PGUID 0 b t t 1018 1018 16 391 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 392 ( "=" PGUID 0 b t t 1019 1019 16 392 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 393 ( "=" PGUID 0 b t t 1020 1020 16 393 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 394 ( "=" PGUID 0 b t t 1021 1021 16 394 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 395 ( "=" PGUID 0 b t t 1022 1022 16 395 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 396 ( "=" PGUID 0 b t t 1023 1023 16 396 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 397 ( "=" PGUID 0 b t t 1024 1024 16 397 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 398 ( "=" PGUID 0 b t t 1025 1025 16 398 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 399 ( "=" PGUID 0 b t t 1026 1026 16 399 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 400 ( "=" PGUID 0 b t t 1027 1027 16 400 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 401 ( "=" PGUID 0 b t t 1034 1034 16 401 0 0 0 array_eq eqsel eqjoinsel )); - -DATA(insert OID = 412 ( "=" PGUID 0 b t t 409 409 16 412 415 418 418 char2eq eqsel eqjoinsel )); -DATA(insert OID = 413 ( "=" PGUID 0 b t t 410 410 16 413 416 419 419 char4eq eqsel eqjoinsel )); -DATA(insert OID = 414 ( "=" PGUID 0 b t t 411 411 16 414 417 420 420 char8eq eqsel eqjoinsel )); - -DATA(insert OID = 415 ( "<>" PGUID 0 b t f 409 409 16 415 412 0 0 char2ne neqsel neqjoinsel )); -DATA(insert OID = 416 ( "<>" PGUID 0 b t f 410 410 16 416 413 0 0 char4ne neqsel neqjoinsel )); -DATA(insert OID = 417 ( "<>" PGUID 0 b t f 411 411 16 417 414 0 0 char8ne neqsel neqjoinsel )); -DATA(insert OID = 418 ( "<" PGUID 0 b t f 409 409 16 460 463 0 0 char2lt intltsel intltjoinsel )); -DATA(insert OID = 419 ( "<" PGUID 0 b t f 410 410 16 461 464 0 0 char4lt intltsel intltjoinsel )); -DATA(insert OID = 420 ( "<" PGUID 0 b t f 411 411 16 462 465 0 0 char8lt intltsel intltjoinsel )); - -DATA(insert OID = 457 ( "<=" PGUID 0 b t f 409 409 16 463 460 0 0 char2le intltsel intltjoinsel )); -DATA(insert OID = 458 ( "<=" PGUID 0 b t f 410 410 16 464 461 0 0 char4le intltsel intltjoinsel )); -DATA(insert OID = 459 ( "<=" PGUID 0 b t f 411 411 16 465 462 0 0 char8le intltsel intltjoinsel )); -DATA(insert OID = 460 ( ">" PGUID 0 b t f 409 409 16 418 457 0 0 char2gt intltsel intltjoinsel )); -DATA(insert OID = 461 ( ">" PGUID 0 b t f 410 410 16 419 458 0 0 char4gt intltsel intltjoinsel )); -DATA(insert OID = 462 ( ">" PGUID 0 b t f 411 411 16 420 459 0 0 char8gt intltsel intltjoinsel )); -DATA(insert OID = 463 ( ">=" PGUID 0 b t f 409 409 16 457 418 0 0 char2ge intltsel intltjoinsel )); -DATA(insert OID = 464 ( ">=" PGUID 0 b t f 410 410 16 458 418 0 0 char4ge intltsel intltjoinsel )); -DATA(insert OID = 465 ( ">=" PGUID 0 b t f 411 411 16 459 420 0 0 char8ge intltsel intltjoinsel )); - -DATA(insert OID = 485 ( "<<" PGUID 0 b t f 604 604 16 0 0 0 0 poly_left intltsel intltjoinsel )); -DATA(insert OID = 486 ( "&<" PGUID 0 b t f 604 604 16 0 0 0 0 poly_overleft intltsel intltjoinsel )); -DATA(insert OID = 487 ( "&>" PGUID 0 b t f 604 604 16 0 0 0 0 poly_overright intltsel intltjoinsel )); -DATA(insert OID = 488 ( ">>" PGUID 0 b t f 604 604 16 0 0 0 0 poly_right intltsel intltjoinsel )); -DATA(insert OID = 489 ( "@" PGUID 0 b t f 604 604 16 490 0 0 0 poly_contained intltsel intltjoinsel )); -DATA(insert OID = 490 ( "~" PGUID 0 b t f 604 604 16 489 0 0 0 poly_contain intltsel intltjoinsel )); -DATA(insert OID = 491 ( "~=" PGUID 0 b t f 604 604 16 491 0 0 0 poly_same intltsel intltjoinsel )); -DATA(insert OID = 492 ( "&&" PGUID 0 b t f 604 604 16 0 0 0 0 poly_overlap intltsel intltjoinsel )); -DATA(insert OID = 493 ( "<<" PGUID 0 b t f 603 603 16 0 0 0 0 box_left intltsel intltjoinsel )); -DATA(insert OID = 494 ( "&<" PGUID 0 b t f 603 603 16 0 0 0 0 box_overleft intltsel intltjoinsel )); -DATA(insert OID = 495 ( "&>" PGUID 0 b t f 603 603 16 0 0 0 0 box_overright intltsel intltjoinsel )); -DATA(insert OID = 496 ( ">>" PGUID 0 b t f 603 603 16 0 0 0 0 box_right intltsel intltjoinsel )); -DATA(insert OID = 497 ( "@" PGUID 0 b t f 603 603 16 498 0 0 0 box_contained intltsel intltjoinsel )); -DATA(insert OID = 498 ( "~" PGUID 0 b t f 603 603 16 497 0 0 0 box_contain intltsel intltjoinsel )); -DATA(insert OID = 499 ( "~=" PGUID 0 b t f 603 603 16 499 0 0 0 box_same intltsel intltjoinsel )); -DATA(insert OID = 500 ( "&&" PGUID 0 b t f 603 603 16 0 0 0 0 box_overlap intltsel intltjoinsel )); -DATA(insert OID = 501 ( ">=" PGUID 0 b t f 603 603 16 505 504 0 0 box_ge areasel areajoinsel )); -DATA(insert OID = 502 ( ">" PGUID 0 b t f 603 603 16 504 505 0 0 box_gt areasel areajoinsel )); -DATA(insert OID = 503 ( "=" PGUID 0 b t t 603 603 16 503 0 0 0 box_eq areasel areajoinsel )); -DATA(insert OID = 504 ( "<" PGUID 0 b t f 603 603 16 502 501 0 0 box_lt areasel areajoinsel )); -DATA(insert OID = 505 ( "<=" PGUID 0 b t f 603 603 16 501 502 0 0 box_le areasel areajoinsel )); -DATA(insert OID = 506 ( ">^" PGUID 0 b t f 600 600 16 0 0 0 0 point_above intltsel intltjoinsel )); -DATA(insert OID = 507 ( "<<" PGUID 0 b t f 600 600 16 0 0 0 0 point_left intltsel intltjoinsel )); -DATA(insert OID = 508 ( ">>" PGUID 0 b t f 600 600 16 0 0 0 0 point_right intltsel intltjoinsel )); -DATA(insert OID = 509 ( "<^" PGUID 0 b t f 600 600 16 0 0 0 0 point_below intltsel intltjoinsel )); -DATA(insert OID = 510 ( "~=" PGUID 0 b t f 600 600 16 510 0 0 0 point_eq intltsel intltjoinsel )); -DATA(insert OID = 511 ( "@" PGUID 0 b t f 600 603 16 0 0 0 0 on_pb intltsel intltjoinsel )); -DATA(insert OID = 512 ( "@" PGUID 0 b t f 600 602 16 0 0 0 0 on_ppath intltsel intltjoinsel )); -DATA(insert OID = 513 ( "@@" PGUID 0 l t f 0 603 600 0 0 0 0 box_center intltsel intltjoinsel )); -DATA(insert OID = 514 ( "*" PGUID 0 b t f 23 23 23 514 0 0 0 int4mul intltsel intltjoinsel )); -DATA(insert OID = 515 ( "!" PGUID 0 r t f 23 0 23 0 0 0 0 int4fac intltsel intltjoinsel )); -DATA(insert OID = 516 ( "!!" PGUID 0 l t f 0 23 23 0 0 0 0 int4fac intltsel intltjoinsel )); -DATA(insert OID = 517 ( "<->" PGUID 0 b t f 600 600 701 517 0 0 0 point_distance intltsel intltjoinsel )); -DATA(insert OID = 518 ( "<>" PGUID 0 b t f 23 23 16 518 96 0 0 int4ne neqsel neqjoinsel )); -DATA(insert OID = 519 ( "<>" PGUID 0 b t f 21 21 16 519 94 0 0 int2ne neqsel neqjoinsel )); -DATA(insert OID = 520 ( ">" PGUID 0 b t f 21 21 16 95 0 0 0 int2gt intgtsel intgtjoinsel )); -DATA(insert OID = 521 ( ">" PGUID 0 b t f 23 23 16 97 0 0 0 int4gt intgtsel intgtjoinsel )); -DATA(insert OID = 522 ( "<=" PGUID 0 b t f 21 21 16 524 520 0 0 int2le intltsel intltjoinsel )); -DATA(insert OID = 523 ( "<=" PGUID 0 b t f 23 23 16 525 521 0 0 int4le intltsel intltjoinsel )); -DATA(insert OID = 524 ( ">=" PGUID 0 b t f 21 21 16 522 95 0 0 int2ge intgtsel intgtjoinsel )); -DATA(insert OID = 525 ( ">=" PGUID 0 b t f 23 23 16 523 97 0 0 int4ge intgtsel intgtjoinsel )); -DATA(insert OID = 526 ( "*" PGUID 0 b t f 21 21 21 526 0 0 0 int2mul intltsel intltjoinsel )); -DATA(insert OID = 527 ( "/" PGUID 0 b t f 21 21 21 0 0 0 0 int2div intltsel intltjoinsel )); -DATA(insert OID = 528 ( "/" PGUID 0 b t f 23 23 23 0 0 0 0 int4div intltsel intltjoinsel )); -DATA(insert OID = 529 ( "%" PGUID 0 b t f 21 21 21 6 0 0 0 int2mod intltsel intltjoinsel )); -DATA(insert OID = 530 ( "%" PGUID 0 b t f 23 23 23 6 0 0 0 int4mod intltsel intltjoinsel )); -DATA(insert OID = 531 ( "<>" PGUID 0 b t f 25 25 16 531 98 0 0 textne neqsel neqjoinsel )); -DATA(insert OID = 532 ( "=" PGUID 0 b t t 21 23 16 533 538 95 97 int24eq eqsel eqjoinsel )); -DATA(insert OID = 533 ( "=" PGUID 0 b t t 23 21 16 532 539 97 95 int42eq eqsel eqjoinsel )); -DATA(insert OID = 534 ( "<" PGUID 0 b t f 21 23 16 537 542 0 0 int24lt intltsel intltjoinsel )); -DATA(insert OID = 535 ( "<" PGUID 0 b t f 23 21 16 536 543 0 0 int42lt intltsel intltjoinsel )); -DATA(insert OID = 536 ( ">" PGUID 0 b t f 21 23 16 535 540 0 0 int24gt intgtsel intgtjoinsel )); -DATA(insert OID = 537 ( ">" PGUID 0 b t f 23 21 16 534 541 0 0 int42gt intgtsel intgtjoinsel )); -DATA(insert OID = 538 ( "<>" PGUID 0 b t f 21 23 16 539 532 0 0 int24ne neqsel neqjoinsel )); -DATA(insert OID = 539 ( "<>" PGUID 0 b t f 23 21 16 538 533 0 0 int42ne neqsel neqjoinsel )); -DATA(insert OID = 540 ( "<=" PGUID 0 b t f 21 23 16 543 536 0 0 int24le intltsel intltjoinsel )); -DATA(insert OID = 541 ( "<=" PGUID 0 b t f 23 21 16 542 537 0 0 int42le intltsel intltjoinsel )); -DATA(insert OID = 542 ( ">=" PGUID 0 b t f 21 23 16 541 534 0 0 int24ge intgtsel intgtjoinsel )); -DATA(insert OID = 543 ( ">=" PGUID 0 b t f 23 21 16 540 535 0 0 int42ge intgtsel intgtjoinsel )); -DATA(insert OID = 544 ( "*" PGUID 0 b t f 21 23 23 545 0 0 0 int24mul intltsel intltjoinsel )); -DATA(insert OID = 545 ( "*" PGUID 0 b t f 23 21 23 544 0 0 0 int42mul intltsel intltjoinsel )); -DATA(insert OID = 546 ( "/" PGUID 0 b t f 21 23 23 0 0 0 0 int24div intltsel intltjoinsel )); -DATA(insert OID = 547 ( "/" PGUID 0 b t f 23 21 23 0 0 0 0 int42div intltsel intltjoinsel )); -DATA(insert OID = 548 ( "%" PGUID 0 b t f 21 23 23 6 0 0 0 int24mod intltsel intltjoinsel )); -DATA(insert OID = 549 ( "%" PGUID 0 b t f 23 21 23 6 0 0 0 int42mod intltsel intltjoinsel )); -DATA(insert OID = 550 ( "+" PGUID 0 b t f 21 21 21 550 0 0 0 int2pl intltsel intltjoinsel )); -DATA(insert OID = 551 ( "+" PGUID 0 b t f 23 23 23 551 0 0 0 int4pl intltsel intltjoinsel )); -DATA(insert OID = 552 ( "+" PGUID 0 b t f 21 23 23 553 0 0 0 int24pl intltsel intltjoinsel )); -DATA(insert OID = 553 ( "+" PGUID 0 b t f 23 21 23 552 0 0 0 int42pl intltsel intltjoinsel )); -DATA(insert OID = 554 ( "-" PGUID 0 b t f 21 21 21 0 0 0 0 int2mi intltsel intltjoinsel )); -DATA(insert OID = 555 ( "-" PGUID 0 b t f 23 23 23 0 0 0 0 int4mi intltsel intltjoinsel )); -DATA(insert OID = 556 ( "-" PGUID 0 b t f 21 23 23 0 0 0 0 int24mi intltsel intltjoinsel )); -DATA(insert OID = 557 ( "-" PGUID 0 b t f 23 21 23 0 0 0 0 int42mi intltsel intltjoinsel )); -DATA(insert OID = 558 ( "-" PGUID 0 l t f 0 23 23 0 0 0 0 int4um intltsel intltjoinsel )); -DATA(insert OID = 559 ( "-" PGUID 0 l t f 0 21 21 0 0 0 0 int2um intltsel intltjoinsel )); -DATA(insert OID = 560 ( "=" PGUID 0 b t t 702 702 16 560 561 562 562 abstimeeq eqsel eqjoinsel )); -DATA(insert OID = 561 ( "<>" PGUID 0 b t f 702 702 16 561 560 0 0 abstimene neqsel neqjoinsel )); -DATA(insert OID = 562 ( "<" PGUID 0 b t f 702 702 16 563 565 0 0 abstimelt intltsel intltjoinsel )); -DATA(insert OID = 563 ( ">" PGUID 0 b t f 702 702 16 562 564 0 0 abstimegt intltsel intltjoinsel )); -DATA(insert OID = 564 ( "<=" PGUID 0 b t f 702 702 16 565 563 0 0 abstimele intltsel intltjoinsel )); -DATA(insert OID = 565 ( ">=" PGUID 0 b t f 702 702 16 564 562 0 0 abstimege intltsel intltjoinsel )); -DATA(insert OID = 566 ( "=" PGUID 0 b t t 703 703 16 566 567 568 568 reltimeeq - - )); -DATA(insert OID = 567 ( "<>" PGUID 0 b t f 703 703 16 567 566 0 0 reltimene - - )); -DATA(insert OID = 568 ( "<" PGUID 0 b t f 703 703 16 569 571 0 0 reltimelt - - )); -DATA(insert OID = 569 ( ">" PGUID 0 b t f 703 703 16 568 570 0 0 reltimegt - - )); -DATA(insert OID = 570 ( "<=" PGUID 0 b t f 703 703 16 571 569 0 0 reltimele - - )); -DATA(insert OID = 571 ( ">=" PGUID 0 b t f 703 703 16 570 568 0 0 reltimege - - )); -DATA(insert OID = 572 ( "=" PGUID 0 b t t 704 704 16 572 0 0 0 intervaleq - - )); -DATA(insert OID = 573 ( "<<" PGUID 0 b t f 704 704 16 0 0 0 0 intervalct - - )); -DATA(insert OID = 574 ( "&&" PGUID 0 b t f 704 704 16 0 0 0 0 intervalov - - )); -DATA(insert OID = 575 ( "#=" PGUID 0 b t f 704 703 16 0 576 0 568 intervalleneq - - )); -DATA(insert OID = 576 ( "#<>" PGUID 0 b t f 704 703 16 0 575 0 568 intervallenne - - )); -DATA(insert OID = 577 ( "#<" PGUID 0 b t f 704 703 16 0 580 0 568 intervallenlt - - )); -DATA(insert OID = 578 ( "#>" PGUID 0 b t f 704 703 16 0 579 0 568 intervallengt - - )); -DATA(insert OID = 579 ( "#<=" PGUID 0 b t f 704 703 16 0 578 0 568 intervallenle - - )); -DATA(insert OID = 580 ( "#>=" PGUID 0 b t f 704 703 16 0 577 0 568 intervallenge - - )); -DATA(insert OID = 581 ( "+" PGUID 0 b t f 702 703 702 581 0 0 0 timepl - - )); -DATA(insert OID = 582 ( "-" PGUID 0 b t f 702 703 702 0 0 0 0 timemi - - )); -DATA(insert OID = 583 ( "<?>" PGUID 0 b t f 702 704 16 0 0 562 0 ininterval - - )); -DATA(insert OID = 584 ( "-" PGUID 0 l t f 0 700 700 0 0 0 0 float4um - - )); -DATA(insert OID = 585 ( "-" PGUID 0 l t f 0 701 701 0 0 0 0 float8um - - )); -DATA(insert OID = 586 ( "+" PGUID 0 b t f 700 700 700 586 0 0 0 float4pl - - )); -DATA(insert OID = 587 ( "-" PGUID 0 b t f 700 700 700 0 0 0 0 float4mi - - )); -DATA(insert OID = 588 ( "/" PGUID 0 b t f 700 700 700 0 0 0 0 float4div - - )); -DATA(insert OID = 589 ( "*" PGUID 0 b t f 700 700 700 589 0 0 0 float4mul - - )); -DATA(insert OID = 590 ( "@" PGUID 0 l t f 0 700 700 0 0 0 0 float4abs - - )); -DATA(insert OID = 591 ( "+" PGUID 0 b t f 701 701 701 591 0 0 0 float8pl - - )); -DATA(insert OID = 592 ( "-" PGUID 0 b t f 701 701 701 0 0 0 0 float8mi - - )); -DATA(insert OID = 593 ( "/" PGUID 0 b t f 701 701 701 0 0 0 0 float8div - - )); -DATA(insert OID = 594 ( "*" PGUID 0 b t f 701 701 701 594 0 0 0 float8mul - - )); -DATA(insert OID = 595 ( "@" PGUID 0 l t f 0 701 701 0 0 0 0 float8abs - - )); -DATA(insert OID = 596 ( "|/" PGUID 0 l t f 0 701 701 0 0 0 0 dsqrt - - )); -DATA(insert OID = 597 ( "||/" PGUID 0 l t f 0 701 701 0 0 0 0 dcbrt - - )); -DATA(insert OID = 598 ( "%" PGUID 0 l t f 0 701 701 0 0 0 0 dtrunc - - )); -DATA(insert OID = 599 ( "%" PGUID 0 r t f 701 0 701 0 0 0 0 dround - - )); -DATA(insert OID = 1282 ( ":" PGUID 0 l t f 0 701 701 0 0 0 0 dexp - - )); -DATA(insert OID = 1283 ( ";" PGUID 0 l t f 0 701 701 0 0 0 0 dlog1 - - )); -DATA(insert OID = 1284 ( "|" PGUID 0 l t f 0 704 702 0 0 0 0 intervalstart - - )); -DATA(insert OID = 606 ( "<#>" PGUID 0 b t f 702 702 704 0 0 0 0 mktinterval - - )); -DATA(insert OID = 607 ( "=" PGUID 0 b t t 26 26 16 607 608 97 97 oideq eqsel eqjoinsel )); -#define OIDEqualOperator 607 /* XXX planner/prep/semanopt.c crock */ -DATA(insert OID = 608 ( "<>" PGUID 0 b t f 26 26 16 608 607 0 0 oidne neqsel neqjoinsel )); -DATA(insert OID = 609 ( "<" PGUID 0 b t f 26 26 16 610 612 0 0 int4lt intltsel intltjoinsel )); -DATA(insert OID = 610 ( ">" PGUID 0 b t f 26 26 16 609 611 0 0 int4gt intgtsel intgtjoinsel )); -DATA(insert OID = 611 ( "<=" PGUID 0 b t f 26 26 16 612 610 0 0 int4le intltsel intltjoinsel )); -DATA(insert OID = 612 ( ">=" PGUID 0 b t f 26 26 16 611 609 0 0 int4ge intgtsel intgtjoinsel )); - -DATA(insert OID = 613 ( "<->" PGUID 0 b t f 600 603 701 0 0 0 0 dist_pl - - )); -DATA(insert OID = 614 ( "<->" PGUID 0 b t f 600 601 701 0 0 0 0 dist_ps - - )); -DATA(insert OID = 615 ( "<->" PGUID 0 b t f 600 603 701 0 0 0 0 dist_pb - - )); -DATA(insert OID = 616 ( "<->" PGUID 0 b t f 601 628 701 0 0 0 0 dist_sl - - )); -DATA(insert OID = 617 ( "<->" PGUID 0 b t f 601 603 701 0 0 0 0 dist_sb - - )); -DATA(insert OID = 618 ( "<->" PGUID 0 b t f 600 602 701 0 0 0 0 dist_ppath - - )); - -DATA(insert OID = 619 ( "<" PGUID 0 b t f 704 704 16 0 0 0 0 intervalct - - )); - -DATA(insert OID = 620 ( "=" PGUID 0 b t t 700 700 16 620 621 622 622 float4eq eqsel eqjoinsel )); -DATA(insert OID = 621 ( "<>" PGUID 0 b t f 700 700 16 621 620 0 0 float4ne neqsel neqjoinsel )); -DATA(insert OID = 622 ( "<" PGUID 0 b t f 700 700 16 623 625 0 0 float4lt intltsel intltjoinsel )); -DATA(insert OID = 623 ( ">" PGUID 0 b t f 700 700 16 622 624 0 0 float4gt intgtsel intgtjoinsel )); -DATA(insert OID = 624 ( "<=" PGUID 0 b t f 700 700 16 625 623 0 0 float4le intltsel intltjoinsel )); -DATA(insert OID = 625 ( ">=" PGUID 0 b t f 700 700 16 624 622 0 0 float4ge intgtsel intgtjoinsel )); -DATA(insert OID = 626 ( "!!=" PGUID 0 b t f 23 19 16 0 0 0 0 int4notin "-" "-")); -DATA(insert OID = 627 ( "!!=" PGUID 0 b t f 26 19 16 0 0 0 0 oidnotin "-" "-")); +DATA(insert OID = 388 ( "=" PGUID 0 b t t 1015 1015 16 388 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 389 ( "=" PGUID 0 b t t 1016 1016 16 389 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 390 ( "=" PGUID 0 b t t 1017 1017 16 390 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 391 ( "=" PGUID 0 b t t 1018 1018 16 391 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 392 ( "=" PGUID 0 b t t 1019 1019 16 392 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 393 ( "=" PGUID 0 b t t 1020 1020 16 393 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 394 ( "=" PGUID 0 b t t 1021 1021 16 394 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 395 ( "=" PGUID 0 b t t 1022 1022 16 395 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 396 ( "=" PGUID 0 b t t 1023 1023 16 396 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 397 ( "=" PGUID 0 b t t 1024 1024 16 397 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 398 ( "=" PGUID 0 b t t 1025 1025 16 398 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 399 ( "=" PGUID 0 b t t 1026 1026 16 399 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 400 ( "=" PGUID 0 b t t 1027 1027 16 400 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 401 ( "=" PGUID 0 b t t 1034 1034 16 401 0 0 0 array_eq eqsel eqjoinsel )); + +DATA(insert OID = 412 ( "=" PGUID 0 b t t 409 409 16 412 415 418 418 char2eq eqsel eqjoinsel )); +DATA(insert OID = 413 ( "=" PGUID 0 b t t 410 410 16 413 416 419 419 char4eq eqsel eqjoinsel )); +DATA(insert OID = 414 ( "=" PGUID 0 b t t 411 411 16 414 417 420 420 char8eq eqsel eqjoinsel )); + +DATA(insert OID = 415 ( "<>" PGUID 0 b t f 409 409 16 415 412 0 0 char2ne neqsel neqjoinsel )); +DATA(insert OID = 416 ( "<>" PGUID 0 b t f 410 410 16 416 413 0 0 char4ne neqsel neqjoinsel )); +DATA(insert OID = 417 ( "<>" PGUID 0 b t f 411 411 16 417 414 0 0 char8ne neqsel neqjoinsel )); +DATA(insert OID = 418 ( "<" PGUID 0 b t f 409 409 16 460 463 0 0 char2lt intltsel intltjoinsel )); +DATA(insert OID = 419 ( "<" PGUID 0 b t f 410 410 16 461 464 0 0 char4lt intltsel intltjoinsel )); +DATA(insert OID = 420 ( "<" PGUID 0 b t f 411 411 16 462 465 0 0 char8lt intltsel intltjoinsel )); + +DATA(insert OID = 457 ( "<=" PGUID 0 b t f 409 409 16 463 460 0 0 char2le intltsel intltjoinsel )); +DATA(insert OID = 458 ( "<=" PGUID 0 b t f 410 410 16 464 461 0 0 char4le intltsel intltjoinsel )); +DATA(insert OID = 459 ( "<=" PGUID 0 b t f 411 411 16 465 462 0 0 char8le intltsel intltjoinsel )); +DATA(insert OID = 460 ( ">" PGUID 0 b t f 409 409 16 418 457 0 0 char2gt intltsel intltjoinsel )); +DATA(insert OID = 461 ( ">" PGUID 0 b t f 410 410 16 419 458 0 0 char4gt intltsel intltjoinsel )); +DATA(insert OID = 462 ( ">" PGUID 0 b t f 411 411 16 420 459 0 0 char8gt intltsel intltjoinsel )); +DATA(insert OID = 463 ( ">=" PGUID 0 b t f 409 409 16 457 418 0 0 char2ge intltsel intltjoinsel )); +DATA(insert OID = 464 ( ">=" PGUID 0 b t f 410 410 16 458 418 0 0 char4ge intltsel intltjoinsel )); +DATA(insert OID = 465 ( ">=" PGUID 0 b t f 411 411 16 459 420 0 0 char8ge intltsel intltjoinsel )); + +DATA(insert OID = 485 ( "<<" PGUID 0 b t f 604 604 16 0 0 0 0 poly_left intltsel intltjoinsel )); +DATA(insert OID = 486 ( "&<" PGUID 0 b t f 604 604 16 0 0 0 0 poly_overleft intltsel intltjoinsel )); +DATA(insert OID = 487 ( "&>" PGUID 0 b t f 604 604 16 0 0 0 0 poly_overright intltsel intltjoinsel )); +DATA(insert OID = 488 ( ">>" PGUID 0 b t f 604 604 16 0 0 0 0 poly_right intltsel intltjoinsel )); +DATA(insert OID = 489 ( "@" PGUID 0 b t f 604 604 16 490 0 0 0 poly_contained intltsel intltjoinsel )); +DATA(insert OID = 490 ( "~" PGUID 0 b t f 604 604 16 489 0 0 0 poly_contain intltsel intltjoinsel )); +DATA(insert OID = 491 ( "~=" PGUID 0 b t f 604 604 16 491 0 0 0 poly_same intltsel intltjoinsel )); +DATA(insert OID = 492 ( "&&" PGUID 0 b t f 604 604 16 0 0 0 0 poly_overlap intltsel intltjoinsel )); +DATA(insert OID = 493 ( "<<" PGUID 0 b t f 603 603 16 0 0 0 0 box_left intltsel intltjoinsel )); +DATA(insert OID = 494 ( "&<" PGUID 0 b t f 603 603 16 0 0 0 0 box_overleft intltsel intltjoinsel )); +DATA(insert OID = 495 ( "&>" PGUID 0 b t f 603 603 16 0 0 0 0 box_overright intltsel intltjoinsel )); +DATA(insert OID = 496 ( ">>" PGUID 0 b t f 603 603 16 0 0 0 0 box_right intltsel intltjoinsel )); +DATA(insert OID = 497 ( "@" PGUID 0 b t f 603 603 16 498 0 0 0 box_contained intltsel intltjoinsel )); +DATA(insert OID = 498 ( "~" PGUID 0 b t f 603 603 16 497 0 0 0 box_contain intltsel intltjoinsel )); +DATA(insert OID = 499 ( "~=" PGUID 0 b t f 603 603 16 499 0 0 0 box_same intltsel intltjoinsel )); +DATA(insert OID = 500 ( "&&" PGUID 0 b t f 603 603 16 0 0 0 0 box_overlap intltsel intltjoinsel )); +DATA(insert OID = 501 ( ">=" PGUID 0 b t f 603 603 16 505 504 0 0 box_ge areasel areajoinsel )); +DATA(insert OID = 502 ( ">" PGUID 0 b t f 603 603 16 504 505 0 0 box_gt areasel areajoinsel )); +DATA(insert OID = 503 ( "=" PGUID 0 b t t 603 603 16 503 0 0 0 box_eq areasel areajoinsel )); +DATA(insert OID = 504 ( "<" PGUID 0 b t f 603 603 16 502 501 0 0 box_lt areasel areajoinsel )); +DATA(insert OID = 505 ( "<=" PGUID 0 b t f 603 603 16 501 502 0 0 box_le areasel areajoinsel )); +DATA(insert OID = 506 ( ">^" PGUID 0 b t f 600 600 16 0 0 0 0 point_above intltsel intltjoinsel )); +DATA(insert OID = 507 ( "<<" PGUID 0 b t f 600 600 16 0 0 0 0 point_left intltsel intltjoinsel )); +DATA(insert OID = 508 ( ">>" PGUID 0 b t f 600 600 16 0 0 0 0 point_right intltsel intltjoinsel )); +DATA(insert OID = 509 ( "<^" PGUID 0 b t f 600 600 16 0 0 0 0 point_below intltsel intltjoinsel )); +DATA(insert OID = 510 ( "~=" PGUID 0 b t f 600 600 16 510 0 0 0 point_eq intltsel intltjoinsel )); +DATA(insert OID = 511 ( "@" PGUID 0 b t f 600 603 16 0 0 0 0 on_pb intltsel intltjoinsel )); +DATA(insert OID = 512 ( "@" PGUID 0 b t f 600 602 16 0 0 0 0 on_ppath intltsel intltjoinsel )); +DATA(insert OID = 513 ( "@@" PGUID 0 l t f 0 603 600 0 0 0 0 box_center intltsel intltjoinsel )); +DATA(insert OID = 514 ( "*" PGUID 0 b t f 23 23 23 514 0 0 0 int4mul intltsel intltjoinsel )); +DATA(insert OID = 515 ( "!" PGUID 0 r t f 23 0 23 0 0 0 0 int4fac intltsel intltjoinsel )); +DATA(insert OID = 516 ( "!!" PGUID 0 l t f 0 23 23 0 0 0 0 int4fac intltsel intltjoinsel )); +DATA(insert OID = 517 ( "<->" PGUID 0 b t f 600 600 701 517 0 0 0 point_distance intltsel intltjoinsel )); +DATA(insert OID = 518 ( "<>" PGUID 0 b t f 23 23 16 518 96 0 0 int4ne neqsel neqjoinsel )); +DATA(insert OID = 519 ( "<>" PGUID 0 b t f 21 21 16 519 94 0 0 int2ne neqsel neqjoinsel )); +DATA(insert OID = 520 ( ">" PGUID 0 b t f 21 21 16 95 0 0 0 int2gt intgtsel intgtjoinsel )); +DATA(insert OID = 521 ( ">" PGUID 0 b t f 23 23 16 97 0 0 0 int4gt intgtsel intgtjoinsel )); +DATA(insert OID = 522 ( "<=" PGUID 0 b t f 21 21 16 524 520 0 0 int2le intltsel intltjoinsel )); +DATA(insert OID = 523 ( "<=" PGUID 0 b t f 23 23 16 525 521 0 0 int4le intltsel intltjoinsel )); +DATA(insert OID = 524 ( ">=" PGUID 0 b t f 21 21 16 522 95 0 0 int2ge intgtsel intgtjoinsel )); +DATA(insert OID = 525 ( ">=" PGUID 0 b t f 23 23 16 523 97 0 0 int4ge intgtsel intgtjoinsel )); +DATA(insert OID = 526 ( "*" PGUID 0 b t f 21 21 21 526 0 0 0 int2mul intltsel intltjoinsel )); +DATA(insert OID = 527 ( "/" PGUID 0 b t f 21 21 21 0 0 0 0 int2div intltsel intltjoinsel )); +DATA(insert OID = 528 ( "/" PGUID 0 b t f 23 23 23 0 0 0 0 int4div intltsel intltjoinsel )); +DATA(insert OID = 529 ( "%" PGUID 0 b t f 21 21 21 6 0 0 0 int2mod intltsel intltjoinsel )); +DATA(insert OID = 530 ( "%" PGUID 0 b t f 23 23 23 6 0 0 0 int4mod intltsel intltjoinsel )); +DATA(insert OID = 531 ( "<>" PGUID 0 b t f 25 25 16 531 98 0 0 textne neqsel neqjoinsel )); +DATA(insert OID = 532 ( "=" PGUID 0 b t t 21 23 16 533 538 95 97 int24eq eqsel eqjoinsel )); +DATA(insert OID = 533 ( "=" PGUID 0 b t t 23 21 16 532 539 97 95 int42eq eqsel eqjoinsel )); +DATA(insert OID = 534 ( "<" PGUID 0 b t f 21 23 16 537 542 0 0 int24lt intltsel intltjoinsel )); +DATA(insert OID = 535 ( "<" PGUID 0 b t f 23 21 16 536 543 0 0 int42lt intltsel intltjoinsel )); +DATA(insert OID = 536 ( ">" PGUID 0 b t f 21 23 16 535 540 0 0 int24gt intgtsel intgtjoinsel )); +DATA(insert OID = 537 ( ">" PGUID 0 b t f 23 21 16 534 541 0 0 int42gt intgtsel intgtjoinsel )); +DATA(insert OID = 538 ( "<>" PGUID 0 b t f 21 23 16 539 532 0 0 int24ne neqsel neqjoinsel )); +DATA(insert OID = 539 ( "<>" PGUID 0 b t f 23 21 16 538 533 0 0 int42ne neqsel neqjoinsel )); +DATA(insert OID = 540 ( "<=" PGUID 0 b t f 21 23 16 543 536 0 0 int24le intltsel intltjoinsel )); +DATA(insert OID = 541 ( "<=" PGUID 0 b t f 23 21 16 542 537 0 0 int42le intltsel intltjoinsel )); +DATA(insert OID = 542 ( ">=" PGUID 0 b t f 21 23 16 541 534 0 0 int24ge intgtsel intgtjoinsel )); +DATA(insert OID = 543 ( ">=" PGUID 0 b t f 23 21 16 540 535 0 0 int42ge intgtsel intgtjoinsel )); +DATA(insert OID = 544 ( "*" PGUID 0 b t f 21 23 23 545 0 0 0 int24mul intltsel intltjoinsel )); +DATA(insert OID = 545 ( "*" PGUID 0 b t f 23 21 23 544 0 0 0 int42mul intltsel intltjoinsel )); +DATA(insert OID = 546 ( "/" PGUID 0 b t f 21 23 23 0 0 0 0 int24div intltsel intltjoinsel )); +DATA(insert OID = 547 ( "/" PGUID 0 b t f 23 21 23 0 0 0 0 int42div intltsel intltjoinsel )); +DATA(insert OID = 548 ( "%" PGUID 0 b t f 21 23 23 6 0 0 0 int24mod intltsel intltjoinsel )); +DATA(insert OID = 549 ( "%" PGUID 0 b t f 23 21 23 6 0 0 0 int42mod intltsel intltjoinsel )); +DATA(insert OID = 550 ( "+" PGUID 0 b t f 21 21 21 550 0 0 0 int2pl intltsel intltjoinsel )); +DATA(insert OID = 551 ( "+" PGUID 0 b t f 23 23 23 551 0 0 0 int4pl intltsel intltjoinsel )); +DATA(insert OID = 552 ( "+" PGUID 0 b t f 21 23 23 553 0 0 0 int24pl intltsel intltjoinsel )); +DATA(insert OID = 553 ( "+" PGUID 0 b t f 23 21 23 552 0 0 0 int42pl intltsel intltjoinsel )); +DATA(insert OID = 554 ( "-" PGUID 0 b t f 21 21 21 0 0 0 0 int2mi intltsel intltjoinsel )); +DATA(insert OID = 555 ( "-" PGUID 0 b t f 23 23 23 0 0 0 0 int4mi intltsel intltjoinsel )); +DATA(insert OID = 556 ( "-" PGUID 0 b t f 21 23 23 0 0 0 0 int24mi intltsel intltjoinsel )); +DATA(insert OID = 557 ( "-" PGUID 0 b t f 23 21 23 0 0 0 0 int42mi intltsel intltjoinsel )); +DATA(insert OID = 558 ( "-" PGUID 0 l t f 0 23 23 0 0 0 0 int4um intltsel intltjoinsel )); +DATA(insert OID = 559 ( "-" PGUID 0 l t f 0 21 21 0 0 0 0 int2um intltsel intltjoinsel )); +DATA(insert OID = 560 ( "=" PGUID 0 b t t 702 702 16 560 561 562 562 abstimeeq eqsel eqjoinsel )); +DATA(insert OID = 561 ( "<>" PGUID 0 b t f 702 702 16 561 560 0 0 abstimene neqsel neqjoinsel )); +DATA(insert OID = 562 ( "<" PGUID 0 b t f 702 702 16 563 565 0 0 abstimelt intltsel intltjoinsel )); +DATA(insert OID = 563 ( ">" PGUID 0 b t f 702 702 16 562 564 0 0 abstimegt intltsel intltjoinsel )); +DATA(insert OID = 564 ( "<=" PGUID 0 b t f 702 702 16 565 563 0 0 abstimele intltsel intltjoinsel )); +DATA(insert OID = 565 ( ">=" PGUID 0 b t f 702 702 16 564 562 0 0 abstimege intltsel intltjoinsel )); +DATA(insert OID = 566 ( "=" PGUID 0 b t t 703 703 16 566 567 568 568 reltimeeq - - )); +DATA(insert OID = 567 ( "<>" PGUID 0 b t f 703 703 16 567 566 0 0 reltimene - - )); +DATA(insert OID = 568 ( "<" PGUID 0 b t f 703 703 16 569 571 0 0 reltimelt - - )); +DATA(insert OID = 569 ( ">" PGUID 0 b t f 703 703 16 568 570 0 0 reltimegt - - )); +DATA(insert OID = 570 ( "<=" PGUID 0 b t f 703 703 16 571 569 0 0 reltimele - - )); +DATA(insert OID = 571 ( ">=" PGUID 0 b t f 703 703 16 570 568 0 0 reltimege - - )); +DATA(insert OID = 572 ( "=" PGUID 0 b t t 704 704 16 572 0 0 0 intervaleq - - )); +DATA(insert OID = 573 ( "<<" PGUID 0 b t f 704 704 16 0 0 0 0 intervalct - - )); +DATA(insert OID = 574 ( "&&" PGUID 0 b t f 704 704 16 0 0 0 0 intervalov - - )); +DATA(insert OID = 575 ( "#=" PGUID 0 b t f 704 703 16 0 576 0 568 intervalleneq - - )); +DATA(insert OID = 576 ( "#<>" PGUID 0 b t f 704 703 16 0 575 0 568 intervallenne - - )); +DATA(insert OID = 577 ( "#<" PGUID 0 b t f 704 703 16 0 580 0 568 intervallenlt - - )); +DATA(insert OID = 578 ( "#>" PGUID 0 b t f 704 703 16 0 579 0 568 intervallengt - - )); +DATA(insert OID = 579 ( "#<=" PGUID 0 b t f 704 703 16 0 578 0 568 intervallenle - - )); +DATA(insert OID = 580 ( "#>=" PGUID 0 b t f 704 703 16 0 577 0 568 intervallenge - - )); +DATA(insert OID = 581 ( "+" PGUID 0 b t f 702 703 702 581 0 0 0 timepl - - )); +DATA(insert OID = 582 ( "-" PGUID 0 b t f 702 703 702 0 0 0 0 timemi - - )); +DATA(insert OID = 583 ( "<?>" PGUID 0 b t f 702 704 16 0 0 562 0 ininterval - - )); +DATA(insert OID = 584 ( "-" PGUID 0 l t f 0 700 700 0 0 0 0 float4um - - )); +DATA(insert OID = 585 ( "-" PGUID 0 l t f 0 701 701 0 0 0 0 float8um - - )); +DATA(insert OID = 586 ( "+" PGUID 0 b t f 700 700 700 586 0 0 0 float4pl - - )); +DATA(insert OID = 587 ( "-" PGUID 0 b t f 700 700 700 0 0 0 0 float4mi - - )); +DATA(insert OID = 588 ( "/" PGUID 0 b t f 700 700 700 0 0 0 0 float4div - - )); +DATA(insert OID = 589 ( "*" PGUID 0 b t f 700 700 700 589 0 0 0 float4mul - - )); +DATA(insert OID = 590 ( "@" PGUID 0 l t f 0 700 700 0 0 0 0 float4abs - - )); +DATA(insert OID = 591 ( "+" PGUID 0 b t f 701 701 701 591 0 0 0 float8pl - - )); +DATA(insert OID = 592 ( "-" PGUID 0 b t f 701 701 701 0 0 0 0 float8mi - - )); +DATA(insert OID = 593 ( "/" PGUID 0 b t f 701 701 701 0 0 0 0 float8div - - )); +DATA(insert OID = 594 ( "*" PGUID 0 b t f 701 701 701 594 0 0 0 float8mul - - )); +DATA(insert OID = 595 ( "@" PGUID 0 l t f 0 701 701 0 0 0 0 float8abs - - )); +DATA(insert OID = 596 ( "|/" PGUID 0 l t f 0 701 701 0 0 0 0 dsqrt - - )); +DATA(insert OID = 597 ( "||/" PGUID 0 l t f 0 701 701 0 0 0 0 dcbrt - - )); +DATA(insert OID = 598 ( "%" PGUID 0 l t f 0 701 701 0 0 0 0 dtrunc - - )); +DATA(insert OID = 599 ( "%" PGUID 0 r t f 701 0 701 0 0 0 0 dround - - )); +DATA(insert OID = 1282 ( ":" PGUID 0 l t f 0 701 701 0 0 0 0 dexp - - )); +DATA(insert OID = 1283 ( ";" PGUID 0 l t f 0 701 701 0 0 0 0 dlog1 - - )); +DATA(insert OID = 1284 ( "|" PGUID 0 l t f 0 704 702 0 0 0 0 intervalstart - - )); +DATA(insert OID = 606 ( "<#>" PGUID 0 b t f 702 702 704 0 0 0 0 mktinterval - - )); +DATA(insert OID = 607 ( "=" PGUID 0 b t t 26 26 16 607 608 97 97 oideq eqsel eqjoinsel )); +#define OIDEqualOperator 607 /* XXX planner/prep/semanopt.c crock */ +DATA(insert OID = 608 ( "<>" PGUID 0 b t f 26 26 16 608 607 0 0 oidne neqsel neqjoinsel )); +DATA(insert OID = 609 ( "<" PGUID 0 b t f 26 26 16 610 612 0 0 int4lt intltsel intltjoinsel )); +DATA(insert OID = 610 ( ">" PGUID 0 b t f 26 26 16 609 611 0 0 int4gt intgtsel intgtjoinsel )); +DATA(insert OID = 611 ( "<=" PGUID 0 b t f 26 26 16 612 610 0 0 int4le intltsel intltjoinsel )); +DATA(insert OID = 612 ( ">=" PGUID 0 b t f 26 26 16 611 609 0 0 int4ge intgtsel intgtjoinsel )); + +DATA(insert OID = 613 ( "<->" PGUID 0 b t f 600 603 701 0 0 0 0 dist_pl - - )); +DATA(insert OID = 614 ( "<->" PGUID 0 b t f 600 601 701 0 0 0 0 dist_ps - - )); +DATA(insert OID = 615 ( "<->" PGUID 0 b t f 600 603 701 0 0 0 0 dist_pb - - )); +DATA(insert OID = 616 ( "<->" PGUID 0 b t f 601 628 701 0 0 0 0 dist_sl - - )); +DATA(insert OID = 617 ( "<->" PGUID 0 b t f 601 603 701 0 0 0 0 dist_sb - - )); +DATA(insert OID = 618 ( "<->" PGUID 0 b t f 600 602 701 0 0 0 0 dist_ppath - - )); + +DATA(insert OID = 619 ( "<" PGUID 0 b t f 704 704 16 0 0 0 0 intervalct - - )); + +DATA(insert OID = 620 ( "=" PGUID 0 b t t 700 700 16 620 621 622 622 float4eq eqsel eqjoinsel )); +DATA(insert OID = 621 ( "<>" PGUID 0 b t f 700 700 16 621 620 0 0 float4ne neqsel neqjoinsel )); +DATA(insert OID = 622 ( "<" PGUID 0 b t f 700 700 16 623 625 0 0 float4lt intltsel intltjoinsel )); +DATA(insert OID = 623 ( ">" PGUID 0 b t f 700 700 16 622 624 0 0 float4gt intgtsel intgtjoinsel )); +DATA(insert OID = 624 ( "<=" PGUID 0 b t f 700 700 16 625 623 0 0 float4le intltsel intltjoinsel )); +DATA(insert OID = 625 ( ">=" PGUID 0 b t f 700 700 16 624 622 0 0 float4ge intgtsel intgtjoinsel )); +DATA(insert OID = 626 ( "!!=" PGUID 0 b t f 23 19 16 0 0 0 0 int4notin "-" "-")); +DATA(insert OID = 627 ( "!!=" PGUID 0 b t f 26 19 16 0 0 0 0 oidnotin "-" "-")); #define OIDNotInOperator 627 /* XXX planner/prep/semanopt.c crock */ -DATA(insert OID = 630 ( "<>" PGUID 0 b t f 18 18 16 630 92 0 0 charne neqsel neqjoinsel )); - -DATA(insert OID = 631 ( "<" PGUID 0 b t f 18 18 16 633 634 0 0 charlt intltsel intltjoinsel )); -DATA(insert OID = 632 ( "<=" PGUID 0 b t f 18 18 16 634 633 0 0 charle intltsel intltjoinsel )); -DATA(insert OID = 633 ( ">" PGUID 0 b t f 18 18 16 631 632 0 0 chargt intltsel intltjoinsel )); -DATA(insert OID = 634 ( ">=" PGUID 0 b t f 18 18 16 632 631 0 0 charge intltsel intltjoinsel )); - -DATA(insert OID = 635 ( "+" PGUID 0 b t f 18 18 18 0 0 0 0 charpl eqsel eqjoinsel )); -DATA(insert OID = 636 ( "-" PGUID 0 b t f 18 18 18 0 0 0 0 charmi eqsel eqjoinsel )); -DATA(insert OID = 637 ( "*" PGUID 0 b t f 18 18 18 0 0 0 0 charmul eqsel eqjoinsel )); -DATA(insert OID = 638 ( "/" PGUID 0 b t f 18 18 18 0 0 0 0 chardiv eqsel eqjoinsel )); - -DATA(insert OID = 639 ( "~" PGUID 0 b t f 19 25 16 0 640 0 0 nameregexeq eqsel eqjoinsel )); -DATA(insert OID = 640 ( "!~" PGUID 0 b t f 19 25 16 0 639 0 0 nameregexne neqsel neqjoinsel )); -DATA(insert OID = 641 ( "~" PGUID 0 b t f 25 25 16 0 642 0 0 textregexeq eqsel eqjoinsel )); -DATA(insert OID = 642 ( "!~" PGUID 0 b t f 25 25 16 0 641 0 0 textregexne eqsel eqjoinsel )); -DATA(insert OID = 643 ( "<>" PGUID 0 b t f 19 19 16 643 93 0 0 namene neqsel neqjoinsel )); -DATA(insert OID = 644 ( "<>" PGUID 0 b t f 20 20 16 644 1267 0 0 char16ne neqsel neqjoinsel )); -DATA(insert OID = 645 ( "<" PGUID 0 b t f 20 20 16 647 648 0 0 char16lt intltsel intltjoinsel )); -DATA(insert OID = 646 ( "<=" PGUID 0 b t f 20 20 16 648 647 0 0 char16le intltsel intltjoinsel )); -DATA(insert OID = 647 ( ">" PGUID 0 b t f 20 20 16 645 646 0 0 char16gt intltsel intltjoinsel )); -DATA(insert OID = 648 ( ">=" PGUID 0 b t f 20 20 16 646 645 0 0 char16ge intltsel intltjoinsel )); -DATA(insert OID = 649 ( "~" PGUID 0 b t f 20 25 16 0 650 0 0 char16regexeq intltsel intltjoinsel )); -DATA(insert OID = 650 ( "!~" PGUID 0 b t f 20 25 16 650 0 0 0 char16regexne intltsel intltjoinsel )); -DATA(insert OID = 651 ( "~~" PGUID 0 b t f 20 25 16 0 651 0 0 char16like eqsel eqjoinsel )); -DATA(insert OID = 652 ( "!~~" PGUID 0 b t f 20 25 16 651 0 0 0 char16nlike neqsel neqjoinsel )); -DATA(insert OID = 654 ( "||" PGUID 0 b t f 25 25 25 0 0 0 0 textcat - - )); - -DATA(insert OID = 660 ( "<" PGUID 0 b t f 19 19 16 662 663 0 0 namelt intltsel intltjoinsel )); -DATA(insert OID = 661 ( "<=" PGUID 0 b t f 19 19 16 663 662 0 0 namele intltsel intltjoinsel )); -DATA(insert OID = 662 ( ">" PGUID 0 b t f 19 19 16 660 661 0 0 namegt intltsel intltjoinsel )); -DATA(insert OID = 663 ( ">=" PGUID 0 b t f 19 19 16 661 660 0 0 namege intltsel intltjoinsel )); -DATA(insert OID = 664 ( "<" PGUID 0 b t f 25 25 16 666 667 0 0 text_lt intltsel intltjoinsel )); -DATA(insert OID = 665 ( "<=" PGUID 0 b t f 25 25 16 667 666 0 0 text_le intltsel intltjoinsel )); -DATA(insert OID = 666 ( ">" PGUID 0 b t f 25 25 16 664 665 0 0 text_gt intltsel intltjoinsel )); -DATA(insert OID = 667 ( ">=" PGUID 0 b t f 25 25 16 665 664 0 0 text_ge intltsel intltjoinsel )); - -DATA(insert OID = 670 ( "=" PGUID 0 b t f 701 701 16 670 671 0 0 float8eq eqsel eqjoinsel )); -DATA(insert OID = 671 ( "<>" PGUID 0 b t f 701 701 16 671 670 0 0 float8ne neqsel neqjoinsel )); -DATA(insert OID = 672 ( "<" PGUID 0 b t f 701 701 16 674 675 0 0 float8lt intltsel intltjoinsel )); -DATA(insert OID = 673 ( "<=" PGUID 0 b t f 701 701 16 675 674 0 0 float8le intltsel intltjoinsel )); -DATA(insert OID = 674 ( ">" PGUID 0 b t f 701 701 16 672 673 0 0 float8gt intltsel intltjoinsel )); -DATA(insert OID = 675 ( ">=" PGUID 0 b t f 701 701 16 673 672 0 0 float8ge intltsel intltjoinsel )); - -DATA(insert OID = 676 ( "<" PGUID 0 b t f 911 911 16 680 679 0 0 oidnamelt intltsel intltjoinsel )); -DATA(insert OID = 677 ( "<=" PGUID 0 b t f 911 911 16 679 680 0 0 oidnamele intltsel intltjoinsel )); -DATA(insert OID = 678 ( "=" PGUID 0 b t f 911 911 16 678 681 0 0 oidnameeq intltsel intltjoinsel )); -DATA(insert OID = 679 ( ">=" PGUID 0 b t f 911 911 16 677 676 0 0 oidnamege intltsel intltjoinsel )); -DATA(insert OID = 680 ( ">" PGUID 0 b t f 911 911 16 676 677 0 0 oidnamegt intltsel intltjoinsel )); -DATA(insert OID = 681 ( "<>" PGUID 0 b t f 911 911 16 681 678 0 0 oidnamene intltsel intltjoinsel )); - -DATA(insert OID = 697 ( "~" PGUID 0 b t f 411 25 16 0 698 0 0 char8regexeq eqsel eqjoinsel )); -DATA(insert OID = 698 ( "!~" PGUID 0 b t f 411 25 16 0 697 0 0 char8regexne neqsel neqjoinsel )); - -DATA(insert OID = 706 ( "<->" PGUID 0 b t f 603 603 701 706 0 0 0 box_distance intltsel intltjoinsel )); -DATA(insert OID = 707 ( "<->" PGUID 0 b t f 602 602 701 707 0 0 0 path_distance intltsel intltjoinsel )); -DATA(insert OID = 708 ( "<->" PGUID 0 b t f 628 628 701 708 0 0 0 line_distance intltsel intltjoinsel )); -DATA(insert OID = 709 ( "<->" PGUID 0 b t f 601 601 701 709 0 0 0 lseg_distance intltsel intltjoinsel )); -DATA(insert OID = 712 ( "<->" PGUID 0 b t f 604 604 701 712 0 0 0 poly_distance intltsel intltjoinsel )); +DATA(insert OID = 630 ( "<>" PGUID 0 b t f 18 18 16 630 92 0 0 charne neqsel neqjoinsel )); + +DATA(insert OID = 631 ( "<" PGUID 0 b t f 18 18 16 633 634 0 0 charlt intltsel intltjoinsel )); +DATA(insert OID = 632 ( "<=" PGUID 0 b t f 18 18 16 634 633 0 0 charle intltsel intltjoinsel )); +DATA(insert OID = 633 ( ">" PGUID 0 b t f 18 18 16 631 632 0 0 chargt intltsel intltjoinsel )); +DATA(insert OID = 634 ( ">=" PGUID 0 b t f 18 18 16 632 631 0 0 charge intltsel intltjoinsel )); + +DATA(insert OID = 635 ( "+" PGUID 0 b t f 18 18 18 0 0 0 0 charpl eqsel eqjoinsel )); +DATA(insert OID = 636 ( "-" PGUID 0 b t f 18 18 18 0 0 0 0 charmi eqsel eqjoinsel )); +DATA(insert OID = 637 ( "*" PGUID 0 b t f 18 18 18 0 0 0 0 charmul eqsel eqjoinsel )); +DATA(insert OID = 638 ( "/" PGUID 0 b t f 18 18 18 0 0 0 0 chardiv eqsel eqjoinsel )); + +DATA(insert OID = 639 ( "~" PGUID 0 b t f 19 25 16 0 640 0 0 nameregexeq eqsel eqjoinsel )); +DATA(insert OID = 640 ( "!~" PGUID 0 b t f 19 25 16 0 639 0 0 nameregexne neqsel neqjoinsel )); +DATA(insert OID = 641 ( "~" PGUID 0 b t f 25 25 16 0 642 0 0 textregexeq eqsel eqjoinsel )); +DATA(insert OID = 642 ( "!~" PGUID 0 b t f 25 25 16 0 641 0 0 textregexne eqsel eqjoinsel )); +DATA(insert OID = 643 ( "<>" PGUID 0 b t f 19 19 16 643 93 0 0 namene neqsel neqjoinsel )); +DATA(insert OID = 644 ( "<>" PGUID 0 b t f 20 20 16 644 1267 0 0 char16ne neqsel neqjoinsel )); +DATA(insert OID = 645 ( "<" PGUID 0 b t f 20 20 16 647 648 0 0 char16lt intltsel intltjoinsel )); +DATA(insert OID = 646 ( "<=" PGUID 0 b t f 20 20 16 648 647 0 0 char16le intltsel intltjoinsel )); +DATA(insert OID = 647 ( ">" PGUID 0 b t f 20 20 16 645 646 0 0 char16gt intltsel intltjoinsel )); +DATA(insert OID = 648 ( ">=" PGUID 0 b t f 20 20 16 646 645 0 0 char16ge intltsel intltjoinsel )); +DATA(insert OID = 649 ( "~" PGUID 0 b t f 20 25 16 0 650 0 0 char16regexeq intltsel intltjoinsel )); +DATA(insert OID = 650 ( "!~" PGUID 0 b t f 20 25 16 650 0 0 0 char16regexne intltsel intltjoinsel )); +DATA(insert OID = 651 ( "~~" PGUID 0 b t f 20 25 16 0 651 0 0 char16like eqsel eqjoinsel )); +DATA(insert OID = 652 ( "!~~" PGUID 0 b t f 20 25 16 651 0 0 0 char16nlike neqsel neqjoinsel )); +DATA(insert OID = 654 ( "||" PGUID 0 b t f 25 25 25 0 0 0 0 textcat - - )); + +DATA(insert OID = 660 ( "<" PGUID 0 b t f 19 19 16 662 663 0 0 namelt intltsel intltjoinsel )); +DATA(insert OID = 661 ( "<=" PGUID 0 b t f 19 19 16 663 662 0 0 namele intltsel intltjoinsel )); +DATA(insert OID = 662 ( ">" PGUID 0 b t f 19 19 16 660 661 0 0 namegt intltsel intltjoinsel )); +DATA(insert OID = 663 ( ">=" PGUID 0 b t f 19 19 16 661 660 0 0 namege intltsel intltjoinsel )); +DATA(insert OID = 664 ( "<" PGUID 0 b t f 25 25 16 666 667 0 0 text_lt intltsel intltjoinsel )); +DATA(insert OID = 665 ( "<=" PGUID 0 b t f 25 25 16 667 666 0 0 text_le intltsel intltjoinsel )); +DATA(insert OID = 666 ( ">" PGUID 0 b t f 25 25 16 664 665 0 0 text_gt intltsel intltjoinsel )); +DATA(insert OID = 667 ( ">=" PGUID 0 b t f 25 25 16 665 664 0 0 text_ge intltsel intltjoinsel )); + +DATA(insert OID = 670 ( "=" PGUID 0 b t f 701 701 16 670 671 0 0 float8eq eqsel eqjoinsel )); +DATA(insert OID = 671 ( "<>" PGUID 0 b t f 701 701 16 671 670 0 0 float8ne neqsel neqjoinsel )); +DATA(insert OID = 672 ( "<" PGUID 0 b t f 701 701 16 674 675 0 0 float8lt intltsel intltjoinsel )); +DATA(insert OID = 673 ( "<=" PGUID 0 b t f 701 701 16 675 674 0 0 float8le intltsel intltjoinsel )); +DATA(insert OID = 674 ( ">" PGUID 0 b t f 701 701 16 672 673 0 0 float8gt intltsel intltjoinsel )); +DATA(insert OID = 675 ( ">=" PGUID 0 b t f 701 701 16 673 672 0 0 float8ge intltsel intltjoinsel )); + +DATA(insert OID = 676 ( "<" PGUID 0 b t f 911 911 16 680 679 0 0 oidnamelt intltsel intltjoinsel )); +DATA(insert OID = 677 ( "<=" PGUID 0 b t f 911 911 16 679 680 0 0 oidnamele intltsel intltjoinsel )); +DATA(insert OID = 678 ( "=" PGUID 0 b t f 911 911 16 678 681 0 0 oidnameeq intltsel intltjoinsel )); +DATA(insert OID = 679 ( ">=" PGUID 0 b t f 911 911 16 677 676 0 0 oidnamege intltsel intltjoinsel )); +DATA(insert OID = 680 ( ">" PGUID 0 b t f 911 911 16 676 677 0 0 oidnamegt intltsel intltjoinsel )); +DATA(insert OID = 681 ( "<>" PGUID 0 b t f 911 911 16 681 678 0 0 oidnamene intltsel intltjoinsel )); + +DATA(insert OID = 697 ( "~" PGUID 0 b t f 411 25 16 0 698 0 0 char8regexeq eqsel eqjoinsel )); +DATA(insert OID = 698 ( "!~" PGUID 0 b t f 411 25 16 0 697 0 0 char8regexne neqsel neqjoinsel )); + +DATA(insert OID = 706 ( "<->" PGUID 0 b t f 603 603 701 706 0 0 0 box_distance intltsel intltjoinsel )); +DATA(insert OID = 707 ( "<->" PGUID 0 b t f 602 602 701 707 0 0 0 path_distance intltsel intltjoinsel )); +DATA(insert OID = 708 ( "<->" PGUID 0 b t f 628 628 701 708 0 0 0 line_distance intltsel intltjoinsel )); +DATA(insert OID = 709 ( "<->" PGUID 0 b t f 601 601 701 709 0 0 0 lseg_distance intltsel intltjoinsel )); +DATA(insert OID = 712 ( "<->" PGUID 0 b t f 604 604 701 712 0 0 0 poly_distance intltsel intltjoinsel )); /* add translation/rotation/scaling operators for geometric types. - thomas 97/05/10 */ -DATA(insert OID = 731 ( "+" PGUID 0 b t f 600 600 600 731 0 0 0 point_add - - )); -DATA(insert OID = 732 ( "-" PGUID 0 b t f 600 600 600 0 0 0 0 point_sub - - )); -DATA(insert OID = 733 ( "*" PGUID 0 b t f 600 600 600 733 0 0 0 point_mul - - )); -DATA(insert OID = 734 ( "/" PGUID 0 b t f 600 600 600 0 0 0 0 point_div - - )); -DATA(insert OID = 735 ( "+" PGUID 0 b t f 602 602 602 735 0 0 0 path_add - - )); -DATA(insert OID = 736 ( "+" PGUID 0 b t f 602 600 602 736 0 0 0 path_add_pt - - )); -DATA(insert OID = 737 ( "-" PGUID 0 b t f 602 600 602 0 0 0 0 path_sub_pt - - )); -DATA(insert OID = 738 ( "*" PGUID 0 b t f 602 600 602 738 0 0 0 path_mul_pt - - )); -DATA(insert OID = 739 ( "/" PGUID 0 b t f 602 600 602 0 0 0 0 path_div_pt - - )); -DATA(insert OID = 754 ( "@" PGUID 0 b t f 600 602 16 755 0 0 0 pt_contained_path - - )); -DATA(insert OID = 755 ( "~" PGUID 0 b t f 602 600 16 754 0 0 0 path_contain_pt - - )); -DATA(insert OID = 756 ( "@" PGUID 0 b t f 600 604 16 757 0 0 0 pt_contained_poly - - )); -DATA(insert OID = 757 ( "~" PGUID 0 b t f 604 600 16 756 0 0 0 poly_contain_pt - - )); -DATA(insert OID = 758 ( "@" PGUID 0 b t f 600 718 16 759 0 0 0 pt_contained_circle - - )); -DATA(insert OID = 759 ( "~" PGUID 0 b t f 718 600 16 758 0 0 0 circle_contain_pt - - )); +DATA(insert OID = 731 ( "+" PGUID 0 b t f 600 600 600 731 0 0 0 point_add - - )); +DATA(insert OID = 732 ( "-" PGUID 0 b t f 600 600 600 0 0 0 0 point_sub - - )); +DATA(insert OID = 733 ( "*" PGUID 0 b t f 600 600 600 733 0 0 0 point_mul - - )); +DATA(insert OID = 734 ( "/" PGUID 0 b t f 600 600 600 0 0 0 0 point_div - - )); +DATA(insert OID = 735 ( "+" PGUID 0 b t f 602 602 602 735 0 0 0 path_add - - )); +DATA(insert OID = 736 ( "+" PGUID 0 b t f 602 600 602 736 0 0 0 path_add_pt - - )); +DATA(insert OID = 737 ( "-" PGUID 0 b t f 602 600 602 0 0 0 0 path_sub_pt - - )); +DATA(insert OID = 738 ( "*" PGUID 0 b t f 602 600 602 738 0 0 0 path_mul_pt - - )); +DATA(insert OID = 739 ( "/" PGUID 0 b t f 602 600 602 0 0 0 0 path_div_pt - - )); +DATA(insert OID = 754 ( "@" PGUID 0 b t f 600 602 16 755 0 0 0 pt_contained_path - - )); +DATA(insert OID = 755 ( "~" PGUID 0 b t f 602 600 16 754 0 0 0 path_contain_pt - - )); +DATA(insert OID = 756 ( "@" PGUID 0 b t f 600 604 16 757 0 0 0 pt_contained_poly - - )); +DATA(insert OID = 757 ( "~" PGUID 0 b t f 604 600 16 756 0 0 0 poly_contain_pt - - )); +DATA(insert OID = 758 ( "@" PGUID 0 b t f 600 718 16 759 0 0 0 pt_contained_circle - - )); +DATA(insert OID = 759 ( "~" PGUID 0 b t f 718 600 16 758 0 0 0 circle_contain_pt - - )); /* additional operators for geometric types - thomas 1997-07-09 */ -DATA(insert OID = 792 ( "=" PGUID 0 b t f 602 602 701 792 0 0 0 path_n_eq intltsel intltjoinsel )); -DATA(insert OID = 793 ( "<" PGUID 0 b t f 602 602 701 796 0 0 0 path_n_lt intltsel intltjoinsel )); -DATA(insert OID = 794 ( ">" PGUID 0 b t f 602 602 701 795 0 0 0 path_n_gt intltsel intltjoinsel )); -DATA(insert OID = 795 ( "<=" PGUID 0 b t f 602 602 701 794 0 0 0 path_n_le intltsel intltjoinsel )); -DATA(insert OID = 796 ( ">=" PGUID 0 b t f 602 602 701 793 0 0 0 path_n_ge intltsel intltjoinsel )); -DATA(insert OID = 797 ( "#" PGUID 0 l t f 0 602 23 0 0 0 0 path_npoints - - )); -DATA(insert OID = 798 ( "?#" PGUID 0 b t f 602 602 16 0 0 0 0 path_inter - - )); -DATA(insert OID = 799 ( "??" PGUID 0 l t f 0 602 701 0 0 0 0 path_length - - )); -DATA(insert OID = 800 ( ">^" PGUID 0 b t f 603 603 16 0 0 0 0 box_above intltsel intltjoinsel )); -DATA(insert OID = 801 ( "<^" PGUID 0 b t f 603 603 16 0 0 0 0 box_below intltsel intltjoinsel )); -DATA(insert OID = 802 ( "?#" PGUID 0 b t f 603 603 16 0 0 0 0 box_overlap - - )); -DATA(insert OID = 803 ( "#" PGUID 0 b t f 603 603 603 0 0 0 0 box_intersect - - )); -DATA(insert OID = 804 ( "+" PGUID 0 b t f 603 600 603 804 0 0 0 box_add - - )); -DATA(insert OID = 805 ( "-" PGUID 0 b t f 603 600 603 0 0 0 0 box_sub - - )); -DATA(insert OID = 806 ( "*" PGUID 0 b t f 603 600 603 806 0 0 0 box_mul - - )); -DATA(insert OID = 807 ( "/" PGUID 0 b t f 603 600 603 0 0 0 0 box_div - - )); -DATA(insert OID = 808 ( "?-" PGUID 0 b t f 600 600 16 808 0 0 0 point_horiz - - )); -DATA(insert OID = 809 ( "?|" PGUID 0 b t f 600 600 16 809 0 0 0 point_vert - - )); - -DATA(insert OID = 830 ( "<" PGUID 0 b t f 810 810 16 834 833 0 0 oidint2lt intltsel intltjoinsel )); -DATA(insert OID = 831 ( "<=" PGUID 0 b t f 810 810 16 833 834 0 0 oidint2le intltsel intltjoinsel )); -DATA(insert OID = 832 ( "=" PGUID 0 b t f 810 810 16 832 835 0 0 oidint2eq intltsel intltjoinsel )); -DATA(insert OID = 833 ( ">=" PGUID 0 b t f 810 810 16 831 830 0 0 oidint2ge intltsel intltjoinsel )); -DATA(insert OID = 834 ( ">" PGUID 0 b t f 810 810 16 830 831 0 0 oidint2gt intltsel intltjoinsel )); -DATA(insert OID = 835 ( "<>" PGUID 0 b t f 810 810 16 835 832 0 0 oidint2ne intltsel intltjoinsel )); - -DATA(insert OID = 839 ( "~" PGUID 0 b t f 409 25 16 0 841 0 0 char2regexeq eqsel eqjoinsel )); -DATA(insert OID = 841 ( "!~" PGUID 0 b t f 409 25 16 0 839 0 0 char2regexne neqsel neqjoinsel )); -DATA(insert OID = 840 ( "~" PGUID 0 b t f 410 25 16 0 842 0 0 char4regexeq eqsel eqjoinsel )); -DATA(insert OID = 842 ( "!~" PGUID 0 b t f 410 25 16 0 840 0 0 char4regexne neqsel neqjoinsel )); - -DATA(insert OID = 900 ( "=" PGUID 0 b t t 790 790 16 900 901 902 902 cash_eq eqsel eqjoinsel )); -DATA(insert OID = 901 ( "<>" PGUID 0 b t f 790 790 16 901 900 0 0 cash_ne neqsel neqjoinsel )); -DATA(insert OID = 902 ( "<" PGUID 0 b t f 790 790 16 903 905 0 0 cash_lt intltsel intltjoinsel )); -DATA(insert OID = 903 ( ">" PGUID 0 b t f 790 790 16 902 904 0 0 cash_gt intgtsel intgtjoinsel )); -DATA(insert OID = 904 ( "<=" PGUID 0 b t f 790 790 16 905 903 0 0 cash_le intltsel intltjoinsel )); -DATA(insert OID = 905 ( ">=" PGUID 0 b t f 790 790 16 904 902 0 0 cash_ge intgtsel intgtjoinsel )); -DATA(insert OID = 906 ( "+" PGUID 0 b t f 790 790 790 906 0 0 0 cash_pl - - )); -DATA(insert OID = 907 ( "-" PGUID 0 b t f 790 790 790 0 0 0 0 cash_mi - - )); -DATA(insert OID = 908 ( "*" PGUID 0 b t f 790 701 790 909 0 0 0 cash_mul - - )); -DATA(insert OID = 909 ( "/" PGUID 0 b t f 790 701 790 0 0 0 0 cash_div - - )); - -DATA(insert OID = 930 ( "<" PGUID 0 b t f 910 910 16 934 933 0 0 oidint4lt intltsel intltjoinsel )); -DATA(insert OID = 931 ( "<=" PGUID 0 b t f 910 910 16 933 934 0 0 oidint4le intltsel intltjoinsel )); -DATA(insert OID = 932 ( "=" PGUID 0 b t f 910 910 16 932 935 0 0 oidint4eq intltsel intltjoinsel )); -DATA(insert OID = 933 ( ">=" PGUID 0 b t f 910 910 16 931 930 0 0 oidint4ge intltsel intltjoinsel )); -DATA(insert OID = 934 ( ">" PGUID 0 b t f 910 910 16 930 931 0 0 oidint4gt intltsel intltjoinsel )); -DATA(insert OID = 935 ( "<>" PGUID 0 b t f 910 910 16 935 932 0 0 oidint4ne intltsel intltjoinsel )); - -DATA(insert OID = 965 ( "^" PGUID 0 b t f 701 701 701 0 0 0 0 dpow - - )); -DATA(insert OID = 966 ( "+" PGUID 0 b t f 1034 1033 1034 0 0 0 0 aclinsert intltsel intltjoinsel )); -DATA(insert OID = 967 ( "-" PGUID 0 b t f 1034 1033 1034 0 0 0 0 aclremove intltsel intltjoinsel )); -DATA(insert OID = 968 ( "~" PGUID 0 b t f 1034 1033 16 0 0 0 0 aclcontains intltsel intltjoinsel )); +DATA(insert OID = 792 ( "=" PGUID 0 b t f 602 602 701 792 0 0 0 path_n_eq intltsel intltjoinsel )); +DATA(insert OID = 793 ( "<" PGUID 0 b t f 602 602 701 796 0 0 0 path_n_lt intltsel intltjoinsel )); +DATA(insert OID = 794 ( ">" PGUID 0 b t f 602 602 701 795 0 0 0 path_n_gt intltsel intltjoinsel )); +DATA(insert OID = 795 ( "<=" PGUID 0 b t f 602 602 701 794 0 0 0 path_n_le intltsel intltjoinsel )); +DATA(insert OID = 796 ( ">=" PGUID 0 b t f 602 602 701 793 0 0 0 path_n_ge intltsel intltjoinsel )); +DATA(insert OID = 797 ( "#" PGUID 0 l t f 0 602 23 0 0 0 0 path_npoints - - )); +DATA(insert OID = 798 ( "?#" PGUID 0 b t f 602 602 16 0 0 0 0 path_inter - - )); +DATA(insert OID = 799 ( "??" PGUID 0 l t f 0 602 701 0 0 0 0 path_length - - )); +DATA(insert OID = 800 ( ">^" PGUID 0 b t f 603 603 16 0 0 0 0 box_above intltsel intltjoinsel )); +DATA(insert OID = 801 ( "<^" PGUID 0 b t f 603 603 16 0 0 0 0 box_below intltsel intltjoinsel )); +DATA(insert OID = 802 ( "?#" PGUID 0 b t f 603 603 16 0 0 0 0 box_overlap - - )); +DATA(insert OID = 803 ( "#" PGUID 0 b t f 603 603 603 0 0 0 0 box_intersect - - )); +DATA(insert OID = 804 ( "+" PGUID 0 b t f 603 600 603 804 0 0 0 box_add - - )); +DATA(insert OID = 805 ( "-" PGUID 0 b t f 603 600 603 0 0 0 0 box_sub - - )); +DATA(insert OID = 806 ( "*" PGUID 0 b t f 603 600 603 806 0 0 0 box_mul - - )); +DATA(insert OID = 807 ( "/" PGUID 0 b t f 603 600 603 0 0 0 0 box_div - - )); +DATA(insert OID = 808 ( "?-" PGUID 0 b t f 600 600 16 808 0 0 0 point_horiz - - )); +DATA(insert OID = 809 ( "?|" PGUID 0 b t f 600 600 16 809 0 0 0 point_vert - - )); + +DATA(insert OID = 830 ( "<" PGUID 0 b t f 810 810 16 834 833 0 0 oidint2lt intltsel intltjoinsel )); +DATA(insert OID = 831 ( "<=" PGUID 0 b t f 810 810 16 833 834 0 0 oidint2le intltsel intltjoinsel )); +DATA(insert OID = 832 ( "=" PGUID 0 b t f 810 810 16 832 835 0 0 oidint2eq intltsel intltjoinsel )); +DATA(insert OID = 833 ( ">=" PGUID 0 b t f 810 810 16 831 830 0 0 oidint2ge intltsel intltjoinsel )); +DATA(insert OID = 834 ( ">" PGUID 0 b t f 810 810 16 830 831 0 0 oidint2gt intltsel intltjoinsel )); +DATA(insert OID = 835 ( "<>" PGUID 0 b t f 810 810 16 835 832 0 0 oidint2ne intltsel intltjoinsel )); + +DATA(insert OID = 839 ( "~" PGUID 0 b t f 409 25 16 0 841 0 0 char2regexeq eqsel eqjoinsel )); +DATA(insert OID = 841 ( "!~" PGUID 0 b t f 409 25 16 0 839 0 0 char2regexne neqsel neqjoinsel )); +DATA(insert OID = 840 ( "~" PGUID 0 b t f 410 25 16 0 842 0 0 char4regexeq eqsel eqjoinsel )); +DATA(insert OID = 842 ( "!~" PGUID 0 b t f 410 25 16 0 840 0 0 char4regexne neqsel neqjoinsel )); + +DATA(insert OID = 900 ( "=" PGUID 0 b t t 790 790 16 900 901 902 902 cash_eq eqsel eqjoinsel )); +DATA(insert OID = 901 ( "<>" PGUID 0 b t f 790 790 16 901 900 0 0 cash_ne neqsel neqjoinsel )); +DATA(insert OID = 902 ( "<" PGUID 0 b t f 790 790 16 903 905 0 0 cash_lt intltsel intltjoinsel )); +DATA(insert OID = 903 ( ">" PGUID 0 b t f 790 790 16 902 904 0 0 cash_gt intgtsel intgtjoinsel )); +DATA(insert OID = 904 ( "<=" PGUID 0 b t f 790 790 16 905 903 0 0 cash_le intltsel intltjoinsel )); +DATA(insert OID = 905 ( ">=" PGUID 0 b t f 790 790 16 904 902 0 0 cash_ge intgtsel intgtjoinsel )); +DATA(insert OID = 906 ( "+" PGUID 0 b t f 790 790 790 906 0 0 0 cash_pl - - )); +DATA(insert OID = 907 ( "-" PGUID 0 b t f 790 790 790 0 0 0 0 cash_mi - - )); +DATA(insert OID = 908 ( "*" PGUID 0 b t f 790 701 790 909 0 0 0 cash_mul - - )); +DATA(insert OID = 909 ( "/" PGUID 0 b t f 790 701 790 0 0 0 0 cash_div - - )); + +DATA(insert OID = 930 ( "<" PGUID 0 b t f 910 910 16 934 933 0 0 oidint4lt intltsel intltjoinsel )); +DATA(insert OID = 931 ( "<=" PGUID 0 b t f 910 910 16 933 934 0 0 oidint4le intltsel intltjoinsel )); +DATA(insert OID = 932 ( "=" PGUID 0 b t f 910 910 16 932 935 0 0 oidint4eq intltsel intltjoinsel )); +DATA(insert OID = 933 ( ">=" PGUID 0 b t f 910 910 16 931 930 0 0 oidint4ge intltsel intltjoinsel )); +DATA(insert OID = 934 ( ">" PGUID 0 b t f 910 910 16 930 931 0 0 oidint4gt intltsel intltjoinsel )); +DATA(insert OID = 935 ( "<>" PGUID 0 b t f 910 910 16 935 932 0 0 oidint4ne intltsel intltjoinsel )); + +DATA(insert OID = 965 ( "^" PGUID 0 b t f 701 701 701 0 0 0 0 dpow - - )); +DATA(insert OID = 966 ( "+" PGUID 0 b t f 1034 1033 1034 0 0 0 0 aclinsert intltsel intltjoinsel )); +DATA(insert OID = 967 ( "-" PGUID 0 b t f 1034 1033 1034 0 0 0 0 aclremove intltsel intltjoinsel )); +DATA(insert OID = 968 ( "~" PGUID 0 b t f 1034 1033 16 0 0 0 0 aclcontains intltsel intltjoinsel )); /* additional geometric operators - thomas 1997-07-09 */ -DATA(insert OID = 969 ( "@@" PGUID 0 l t f 0 601 600 0 0 0 0 lseg_center - - )); -DATA(insert OID = 970 ( "@@" PGUID 0 l t f 0 602 600 0 0 0 0 path_center - - )); -DATA(insert OID = 971 ( "@@" PGUID 0 l t f 0 604 600 0 0 0 0 poly_center - - )); - -DATA(insert OID = 974 ( "||" PGUID 0 b t f 1042 1042 1042 0 0 0 0 textcat - - )); -DATA(insert OID = 979 ( "||" PGUID 0 b t f 1043 1043 1043 0 0 0 0 textcat - - )); - -DATA(insert OID = 1054 ( "=" PGUID 0 b t t 1042 1042 16 1054 1057 1058 1058 bpchareq eqsel eqjoinsel )); -DATA(insert OID = 1055 ( "~" PGUID 0 b t f 1042 25 16 0 1056 0 0 textregexeq eqsel eqjoinsel )); -DATA(insert OID = 1056 ( "!~" PGUID 0 b t f 1042 25 16 0 1055 0 0 textregexne neqsel neqjoinsel )); -DATA(insert OID = 1057 ( "<>" PGUID 0 b t f 1042 1042 16 1057 1054 0 0 bpcharne neqsel neqjoinsel )); -DATA(insert OID = 1058 ( "<" PGUID 0 b t f 1042 1042 16 1060 1061 0 0 bpcharlt intltsel intltjoinsel )); -DATA(insert OID = 1059 ( "<=" PGUID 0 b t f 1042 1042 16 1061 1060 0 0 bpcharle intltsel intltjoinsel )); -DATA(insert OID = 1060 ( ">" PGUID 0 b t f 1042 1042 16 1058 1059 0 0 bpchargt intltsel intltjoinsel )); -DATA(insert OID = 1061 ( ">=" PGUID 0 b t f 1042 1042 16 1059 1058 0 0 bpcharge intltsel intltjoinsel )); - -DATA(insert OID = 1062 ( "=" PGUID 0 b t t 1043 1043 16 1062 1065 1066 1066 varchareq eqsel eqjoinsel )); -DATA(insert OID = 1063 ( "~" PGUID 0 b t f 1043 25 16 0 1064 0 0 textregexeq eqsel eqjoinsel )); -DATA(insert OID = 1064 ( "!~" PGUID 0 b t f 1043 25 16 0 1063 0 0 textregexne neqsel neqjoinsel )); -DATA(insert OID = 1065 ( "<>" PGUID 0 b t f 1043 1043 16 1065 1062 0 0 varcharne neqsel neqjoinsel )); -DATA(insert OID = 1066 ( "<" PGUID 0 b t f 1043 1043 16 1068 1069 0 0 varcharlt intltsel intltjoinsel )); -DATA(insert OID = 1067 ( "<=" PGUID 0 b t f 1043 1043 16 1069 1068 0 0 varcharle intltsel intltjoinsel )); -DATA(insert OID = 1068 ( ">" PGUID 0 b t f 1043 1043 16 1066 1067 0 0 varchargt intltsel intltjoinsel )); -DATA(insert OID = 1069 ( ">=" PGUID 0 b t f 1043 1043 16 1067 1066 0 0 varcharge intltsel intltjoinsel )); +DATA(insert OID = 969 ( "@@" PGUID 0 l t f 0 601 600 0 0 0 0 lseg_center - - )); +DATA(insert OID = 970 ( "@@" PGUID 0 l t f 0 602 600 0 0 0 0 path_center - - )); +DATA(insert OID = 971 ( "@@" PGUID 0 l t f 0 604 600 0 0 0 0 poly_center - - )); + +DATA(insert OID = 974 ( "||" PGUID 0 b t f 1042 1042 1042 0 0 0 0 textcat - - )); +DATA(insert OID = 979 ( "||" PGUID 0 b t f 1043 1043 1043 0 0 0 0 textcat - - )); + +DATA(insert OID = 1054 ( "=" PGUID 0 b t t 1042 1042 16 1054 1057 1058 1058 bpchareq eqsel eqjoinsel )); +DATA(insert OID = 1055 ( "~" PGUID 0 b t f 1042 25 16 0 1056 0 0 textregexeq eqsel eqjoinsel )); +DATA(insert OID = 1056 ( "!~" PGUID 0 b t f 1042 25 16 0 1055 0 0 textregexne neqsel neqjoinsel )); +DATA(insert OID = 1057 ( "<>" PGUID 0 b t f 1042 1042 16 1057 1054 0 0 bpcharne neqsel neqjoinsel )); +DATA(insert OID = 1058 ( "<" PGUID 0 b t f 1042 1042 16 1060 1061 0 0 bpcharlt intltsel intltjoinsel )); +DATA(insert OID = 1059 ( "<=" PGUID 0 b t f 1042 1042 16 1061 1060 0 0 bpcharle intltsel intltjoinsel )); +DATA(insert OID = 1060 ( ">" PGUID 0 b t f 1042 1042 16 1058 1059 0 0 bpchargt intltsel intltjoinsel )); +DATA(insert OID = 1061 ( ">=" PGUID 0 b t f 1042 1042 16 1059 1058 0 0 bpcharge intltsel intltjoinsel )); + +DATA(insert OID = 1062 ( "=" PGUID 0 b t t 1043 1043 16 1062 1065 1066 1066 varchareq eqsel eqjoinsel )); +DATA(insert OID = 1063 ( "~" PGUID 0 b t f 1043 25 16 0 1064 0 0 textregexeq eqsel eqjoinsel )); +DATA(insert OID = 1064 ( "!~" PGUID 0 b t f 1043 25 16 0 1063 0 0 textregexne neqsel neqjoinsel )); +DATA(insert OID = 1065 ( "<>" PGUID 0 b t f 1043 1043 16 1065 1062 0 0 varcharne neqsel neqjoinsel )); +DATA(insert OID = 1066 ( "<" PGUID 0 b t f 1043 1043 16 1068 1069 0 0 varcharlt intltsel intltjoinsel )); +DATA(insert OID = 1067 ( "<=" PGUID 0 b t f 1043 1043 16 1069 1068 0 0 varcharle intltsel intltjoinsel )); +DATA(insert OID = 1068 ( ">" PGUID 0 b t f 1043 1043 16 1066 1067 0 0 varchargt intltsel intltjoinsel )); +DATA(insert OID = 1069 ( ">=" PGUID 0 b t f 1043 1043 16 1067 1066 0 0 varcharge intltsel intltjoinsel )); /* date operators */ -DATA(insert OID = 1093 ( "=" PGUID 0 b t t 1082 1082 16 1093 1094 1095 1095 date_eq eqsel eqjoinsel )); -DATA(insert OID = 1094 ( "<>" PGUID 0 b t f 1082 1082 16 1094 1093 0 0 date_ne neqsel neqjoinsel )); -DATA(insert OID = 1095 ( "<" PGUID 0 b t f 1082 1082 16 1097 1098 0 0 date_lt intltsel intltjoinsel )); -DATA(insert OID = 1096 ( "<=" PGUID 0 b t f 1082 1082 16 1098 1097 0 0 date_le intltsel intltjoinsel )); -DATA(insert OID = 1097 ( ">" PGUID 0 b t f 1082 1082 16 1095 1096 0 0 date_gt intltsel intltjoinsel )); -DATA(insert OID = 1098 ( ">=" PGUID 0 b t f 1082 1082 16 1096 1065 0 0 date_ge intltsel intltjoinsel )); -DATA(insert OID = 1099 ( "-" PGUID 0 b t f 1082 1082 23 0 0 0 0 date_mi - - )); -DATA(insert OID = 1100 ( "+" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_pli - - )); -DATA(insert OID = 1101 ( "-" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_mii - - )); +DATA(insert OID = 1093 ( "=" PGUID 0 b t t 1082 1082 16 1093 1094 1095 1095 date_eq eqsel eqjoinsel )); +DATA(insert OID = 1094 ( "<>" PGUID 0 b t f 1082 1082 16 1094 1093 0 0 date_ne neqsel neqjoinsel )); +DATA(insert OID = 1095 ( "<" PGUID 0 b t f 1082 1082 16 1097 1098 0 0 date_lt intltsel intltjoinsel )); +DATA(insert OID = 1096 ( "<=" PGUID 0 b t f 1082 1082 16 1098 1097 0 0 date_le intltsel intltjoinsel )); +DATA(insert OID = 1097 ( ">" PGUID 0 b t f 1082 1082 16 1095 1096 0 0 date_gt intltsel intltjoinsel )); +DATA(insert OID = 1098 ( ">=" PGUID 0 b t f 1082 1082 16 1096 1065 0 0 date_ge intltsel intltjoinsel )); +DATA(insert OID = 1099 ( "-" PGUID 0 b t f 1082 1082 23 0 0 0 0 date_mi - - )); +DATA(insert OID = 1100 ( "+" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_pli - - )); +DATA(insert OID = 1101 ( "-" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_mii - - )); /* time operators */ -DATA(insert OID = 1108 ( "=" PGUID 0 b t t 1083 1083 16 1108 1109 1110 1110 time_eq eqsel eqjoinsel )); -DATA(insert OID = 1109 ( "<>" PGUID 0 b t f 1083 1083 16 1109 1108 0 0 time_ne neqsel neqjoinsel )); -DATA(insert OID = 1110 ( "<" PGUID 0 b t f 1083 1083 16 1112 1113 0 0 time_lt intltsel intltjoinsel )); -DATA(insert OID = 1111 ( "<=" PGUID 0 b t f 1083 1083 16 1113 1112 0 0 time_le intltsel intltjoinsel )); -DATA(insert OID = 1112 ( ">" PGUID 0 b t f 1083 1083 16 1110 1111 0 0 time_gt intltsel intltjoinsel )); -DATA(insert OID = 1113 ( ">=" PGUID 0 b t f 1083 1083 16 1111 1065 0 0 time_ge intltsel intltjoinsel )); +DATA(insert OID = 1108 ( "=" PGUID 0 b t t 1083 1083 16 1108 1109 1110 1110 time_eq eqsel eqjoinsel )); +DATA(insert OID = 1109 ( "<>" PGUID 0 b t f 1083 1083 16 1109 1108 0 0 time_ne neqsel neqjoinsel )); +DATA(insert OID = 1110 ( "<" PGUID 0 b t f 1083 1083 16 1112 1113 0 0 time_lt intltsel intltjoinsel )); +DATA(insert OID = 1111 ( "<=" PGUID 0 b t f 1083 1083 16 1113 1112 0 0 time_le intltsel intltjoinsel )); +DATA(insert OID = 1112 ( ">" PGUID 0 b t f 1083 1083 16 1110 1111 0 0 time_gt intltsel intltjoinsel )); +DATA(insert OID = 1113 ( ">=" PGUID 0 b t f 1083 1083 16 1111 1065 0 0 time_ge intltsel intltjoinsel )); /* datetime operators */ /* name, owner, prec, kind, isleft, canhash, left, right, result, com, negate, lsortop, rsortop, oprcode, operrest, oprjoin */ -DATA(insert OID = 1320 ( "=" PGUID 0 b t f 1184 1184 16 1320 1321 1322 1322 datetime_eq eqsel eqjoinsel )); -DATA(insert OID = 1321 ( "<>" PGUID 0 b t f 1184 1184 16 1321 1320 0 0 datetime_ne neqsel neqjoinsel )); -DATA(insert OID = 1322 ( "<" PGUID 0 b t f 1184 1184 16 1325 1325 0 0 datetime_lt intltsel intltjoinsel )); -DATA(insert OID = 1323 ( "<=" PGUID 0 b t f 1184 1184 16 1324 1324 0 0 datetime_le intltsel intltjoinsel )); -DATA(insert OID = 1324 ( ">" PGUID 0 b t f 1184 1184 16 1323 1323 0 0 datetime_gt intltsel intltjoinsel )); -DATA(insert OID = 1325 ( ">=" PGUID 0 b t f 1184 1184 16 1322 1322 0 0 datetime_ge intltsel intltjoinsel )); +DATA(insert OID = 1320 ( "=" PGUID 0 b t f 1184 1184 16 1320 1321 1322 1322 datetime_eq eqsel eqjoinsel )); +DATA(insert OID = 1321 ( "<>" PGUID 0 b t f 1184 1184 16 1321 1320 0 0 datetime_ne neqsel neqjoinsel )); +DATA(insert OID = 1322 ( "<" PGUID 0 b t f 1184 1184 16 1325 1325 0 0 datetime_lt intltsel intltjoinsel )); +DATA(insert OID = 1323 ( "<=" PGUID 0 b t f 1184 1184 16 1324 1324 0 0 datetime_le intltsel intltjoinsel )); +DATA(insert OID = 1324 ( ">" PGUID 0 b t f 1184 1184 16 1323 1323 0 0 datetime_gt intltsel intltjoinsel )); +DATA(insert OID = 1325 ( ">=" PGUID 0 b t f 1184 1184 16 1322 1322 0 0 datetime_ge intltsel intltjoinsel )); -DATA(insert OID = 1327 ( "+" PGUID 0 b t f 1184 1186 1184 1327 0 0 0 datetime_pl_span - - )); -DATA(insert OID = 1328 ( "-" PGUID 0 b t f 1184 1184 1186 0 0 0 0 datetime_mi - - )); -DATA(insert OID = 1329 ( "-" PGUID 0 b t f 1184 1186 1184 0 0 0 0 datetime_mi_span - - )); +DATA(insert OID = 1327 ( "+" PGUID 0 b t f 1184 1186 1184 1327 0 0 0 datetime_pl_span - - )); +DATA(insert OID = 1328 ( "-" PGUID 0 b t f 1184 1184 1186 0 0 0 0 datetime_mi - - )); +DATA(insert OID = 1329 ( "-" PGUID 0 b t f 1184 1186 1184 0 0 0 0 datetime_mi_span - - )); /* timespan operators */ -DATA(insert OID = 1330 ( "=" PGUID 0 b t f 1186 1186 16 1330 1331 1332 1332 timespan_eq eqsel eqjoinsel )); -DATA(insert OID = 1331 ( "<>" PGUID 0 b t f 1186 1186 16 1331 1330 0 0 timespan_ne neqsel neqjoinsel )); -DATA(insert OID = 1332 ( "<" PGUID 0 b t f 1186 1186 16 1335 1335 0 0 timespan_lt intltsel intltjoinsel )); -DATA(insert OID = 1333 ( "<=" PGUID 0 b t f 1186 1186 16 1334 1334 0 0 timespan_le intltsel intltjoinsel )); -DATA(insert OID = 1334 ( ">" PGUID 0 b t f 1186 1186 16 1333 1333 0 0 timespan_gt intltsel intltjoinsel )); -DATA(insert OID = 1335 ( ">=" PGUID 0 b t f 1186 1186 16 1332 1332 0 0 timespan_ge intltsel intltjoinsel )); +DATA(insert OID = 1330 ( "=" PGUID 0 b t f 1186 1186 16 1330 1331 1332 1332 timespan_eq eqsel eqjoinsel )); +DATA(insert OID = 1331 ( "<>" PGUID 0 b t f 1186 1186 16 1331 1330 0 0 timespan_ne neqsel neqjoinsel )); +DATA(insert OID = 1332 ( "<" PGUID 0 b t f 1186 1186 16 1335 1335 0 0 timespan_lt intltsel intltjoinsel )); +DATA(insert OID = 1333 ( "<=" PGUID 0 b t f 1186 1186 16 1334 1334 0 0 timespan_le intltsel intltjoinsel )); +DATA(insert OID = 1334 ( ">" PGUID 0 b t f 1186 1186 16 1333 1333 0 0 timespan_gt intltsel intltjoinsel )); +DATA(insert OID = 1335 ( ">=" PGUID 0 b t f 1186 1186 16 1332 1332 0 0 timespan_ge intltsel intltjoinsel )); -DATA(insert OID = 1336 ( "-" PGUID 0 l t f 0 1186 1186 0 0 0 0 timespan_um 0 0 )); -DATA(insert OID = 1337 ( "+" PGUID 0 b t f 1186 1186 1186 1337 0 0 0 timespan_pl - - )); -DATA(insert OID = 1338 ( "-" PGUID 0 b t f 1186 1186 1186 0 0 0 0 timespan_mi - - )); +DATA(insert OID = 1336 ( "-" PGUID 0 l t f 0 1186 1186 0 0 0 0 timespan_um 0 0 )); +DATA(insert OID = 1337 ( "+" PGUID 0 b t f 1186 1186 1186 1337 0 0 0 timespan_pl - - )); +DATA(insert OID = 1338 ( "-" PGUID 0 b t f 1186 1186 1186 0 0 0 0 timespan_mi - - )); /* float48 operators */ -DATA(insert OID = 1116 ( "+" PGUID 0 b t f 700 701 701 1116 0 0 0 float48pl - - )); -DATA(insert OID = 1117 ( "-" PGUID 0 b t f 700 701 701 0 0 0 0 float48mi - - )); -DATA(insert OID = 1118 ( "/" PGUID 0 b t f 700 701 701 0 0 0 0 float48div - - )); -DATA(insert OID = 1119 ( "*" PGUID 0 b t f 700 701 701 1119 0 0 0 float48mul - - )); -DATA(insert OID = 1120 ( "=" PGUID 0 b t t 700 701 16 1120 1121 1122 1122 float48eq eqsel eqjoinsel )); -DATA(insert OID = 1121 ( "<>" PGUID 0 b t f 700 701 16 1121 1120 0 0 float48ne neqsel neqjoinsel )); -DATA(insert OID = 1122 ( "<" PGUID 0 b t f 700 701 16 1123 1125 0 0 float48lt intltsel intltjoinsel )); -DATA(insert OID = 1123 ( ">" PGUID 0 b t f 700 701 16 1122 1124 0 0 float48gt intgtsel intgtjoinsel )); -DATA(insert OID = 1124 ( "<=" PGUID 0 b t f 700 701 16 1125 1123 0 0 float48le intltsel intltjoinsel )); -DATA(insert OID = 1125 ( ">=" PGUID 0 b t f 700 701 16 1124 1122 0 0 float48ge intgtsel intgtjoinsel )); +DATA(insert OID = 1116 ( "+" PGUID 0 b t f 700 701 701 1116 0 0 0 float48pl - - )); +DATA(insert OID = 1117 ( "-" PGUID 0 b t f 700 701 701 0 0 0 0 float48mi - - )); +DATA(insert OID = 1118 ( "/" PGUID 0 b t f 700 701 701 0 0 0 0 float48div - - )); +DATA(insert OID = 1119 ( "*" PGUID 0 b t f 700 701 701 1119 0 0 0 float48mul - - )); +DATA(insert OID = 1120 ( "=" PGUID 0 b t t 700 701 16 1120 1121 1122 1122 float48eq eqsel eqjoinsel )); +DATA(insert OID = 1121 ( "<>" PGUID 0 b t f 700 701 16 1121 1120 0 0 float48ne neqsel neqjoinsel )); +DATA(insert OID = 1122 ( "<" PGUID 0 b t f 700 701 16 1123 1125 0 0 float48lt intltsel intltjoinsel )); +DATA(insert OID = 1123 ( ">" PGUID 0 b t f 700 701 16 1122 1124 0 0 float48gt intgtsel intgtjoinsel )); +DATA(insert OID = 1124 ( "<=" PGUID 0 b t f 700 701 16 1125 1123 0 0 float48le intltsel intltjoinsel )); +DATA(insert OID = 1125 ( ">=" PGUID 0 b t f 700 701 16 1124 1122 0 0 float48ge intgtsel intgtjoinsel )); /* float84 operators */ -DATA(insert OID = 1126 ( "+" PGUID 0 b t f 701 700 701 1126 0 0 0 float84pl - - )); -DATA(insert OID = 1127 ( "-" PGUID 0 b t f 701 700 701 0 0 0 0 float84mi - - )); -DATA(insert OID = 1128 ( "/" PGUID 0 b t f 701 700 701 0 0 0 0 float84div - - )); -DATA(insert OID = 1129 ( "*" PGUID 0 b t f 701 700 701 1129 0 0 0 float84mul - - )); -DATA(insert OID = 1130 ( "=" PGUID 0 b t t 701 700 16 1130 1131 1132 1132 float84eq eqsel eqjoinsel )); -DATA(insert OID = 1131 ( "<>" PGUID 0 b t f 701 700 16 1131 1130 0 0 float84ne neqsel neqjoinsel )); -DATA(insert OID = 1132 ( "<" PGUID 0 b t f 701 700 16 1133 1135 0 0 float84lt intltsel intltjoinsel )); -DATA(insert OID = 1133 ( ">" PGUID 0 b t f 701 700 16 1132 1134 0 0 float84gt intgtsel intgtjoinsel )); -DATA(insert OID = 1134 ( "<=" PGUID 0 b t f 701 700 16 1135 1133 0 0 float84le intltsel intltjoinsel )); -DATA(insert OID = 1135 ( ">=" PGUID 0 b t f 701 700 16 1134 1132 0 0 float84ge intgtsel intgtjoinsel )); +DATA(insert OID = 1126 ( "+" PGUID 0 b t f 701 700 701 1126 0 0 0 float84pl - - )); +DATA(insert OID = 1127 ( "-" PGUID 0 b t f 701 700 701 0 0 0 0 float84mi - - )); +DATA(insert OID = 1128 ( "/" PGUID 0 b t f 701 700 701 0 0 0 0 float84div - - )); +DATA(insert OID = 1129 ( "*" PGUID 0 b t f 701 700 701 1129 0 0 0 float84mul - - )); +DATA(insert OID = 1130 ( "=" PGUID 0 b t t 701 700 16 1130 1131 1132 1132 float84eq eqsel eqjoinsel )); +DATA(insert OID = 1131 ( "<>" PGUID 0 b t f 701 700 16 1131 1130 0 0 float84ne neqsel neqjoinsel )); +DATA(insert OID = 1132 ( "<" PGUID 0 b t f 701 700 16 1133 1135 0 0 float84lt intltsel intltjoinsel )); +DATA(insert OID = 1133 ( ">" PGUID 0 b t f 701 700 16 1132 1134 0 0 float84gt intgtsel intgtjoinsel )); +DATA(insert OID = 1134 ( "<=" PGUID 0 b t f 701 700 16 1135 1133 0 0 float84le intltsel intltjoinsel )); +DATA(insert OID = 1135 ( ">=" PGUID 0 b t f 701 700 16 1134 1132 0 0 float84ge intgtsel intgtjoinsel )); /* int4 and oid equality */ -DATA(insert OID = 1136 ( "=" PGUID 0 b t t 23 26 16 1137 0 0 0 int4eqoid eqsel eqjoinsel )); -DATA(insert OID = 1137 ( "=" PGUID 0 b t t 26 23 16 1136 0 0 0 oideqint4 eqsel eqjoinsel )); +DATA(insert OID = 1136 ( "=" PGUID 0 b t t 23 26 16 1137 0 0 0 int4eqoid eqsel eqjoinsel )); +DATA(insert OID = 1137 ( "=" PGUID 0 b t t 26 23 16 1136 0 0 0 oideqint4 eqsel eqjoinsel )); /* LIKE hacks by Keith Parks. */ -DATA(insert OID = 1201 ( "~~" PGUID 0 b t f 409 25 16 0 1202 0 0 char2like eqsel eqjoinsel )); +DATA(insert OID = 1201 ( "~~" PGUID 0 b t f 409 25 16 0 1202 0 0 char2like eqsel eqjoinsel )); DATA(insert OID = 1202 ( "!~~" PGUID 0 b t f 409 25 16 0 1201 0 0 char2nlike neqsel neqjoinsel )); -DATA(insert OID = 1203 ( "~~" PGUID 0 b t f 410 25 16 0 1204 0 0 char4like eqsel eqjoinsel )); +DATA(insert OID = 1203 ( "~~" PGUID 0 b t f 410 25 16 0 1204 0 0 char4like eqsel eqjoinsel )); DATA(insert OID = 1204 ( "!~~" PGUID 0 b t f 410 25 16 0 1203 0 0 char4nlike neqsel neqjoinsel )); -DATA(insert OID = 1205 ( "~~" PGUID 0 b t f 411 25 16 0 1206 0 0 char8like eqsel eqjoinsel )); +DATA(insert OID = 1205 ( "~~" PGUID 0 b t f 411 25 16 0 1206 0 0 char8like eqsel eqjoinsel )); DATA(insert OID = 1206 ( "!~~" PGUID 0 b t f 411 25 16 0 1205 0 0 char8nlike neqsel neqjoinsel )); -DATA(insert OID = 1207 ( "~~" PGUID 0 b t f 19 25 16 0 1208 0 0 namelike eqsel eqjoinsel )); +DATA(insert OID = 1207 ( "~~" PGUID 0 b t f 19 25 16 0 1208 0 0 namelike eqsel eqjoinsel )); DATA(insert OID = 1208 ( "!~~" PGUID 0 b t f 19 25 16 0 1207 0 0 namenlike neqsel neqjoinsel )); -DATA(insert OID = 1209 ( "~~" PGUID 0 b t f 25 25 16 0 1210 0 0 textlike eqsel eqjoinsel )); +DATA(insert OID = 1209 ( "~~" PGUID 0 b t f 25 25 16 0 1210 0 0 textlike eqsel eqjoinsel )); DATA(insert OID = 1210 ( "!~~" PGUID 0 b t f 25 25 16 0 1209 0 0 textnlike neqsel neqjoinsel )); -DATA(insert OID = 1211 ( "~~" PGUID 0 b t f 1042 25 16 0 1212 0 0 textlike eqsel eqjoinsel )); +DATA(insert OID = 1211 ( "~~" PGUID 0 b t f 1042 25 16 0 1212 0 0 textlike eqsel eqjoinsel )); DATA(insert OID = 1212 ( "!~~" PGUID 0 b t f 1042 25 16 0 1211 0 0 textnlike neqsel neqjoinsel )); -DATA(insert OID = 1213 ( "~~" PGUID 0 b t f 1043 25 16 0 1214 0 0 textlike eqsel eqjoinsel )); +DATA(insert OID = 1213 ( "~~" PGUID 0 b t f 1043 25 16 0 1214 0 0 textlike eqsel eqjoinsel )); DATA(insert OID = 1214 ( "!~~" PGUID 0 b t f 1043 25 16 0 1213 0 0 textnlike neqsel neqjoinsel )); /* case-insensitive LIKE hacks */ -DATA(insert OID = 1220 ( "~*" PGUID 0 b t f 409 25 16 0 1221 0 0 char2icregexeq eqsel eqjoinsel )); -DATA(insert OID = 1221 ( "!~*" PGUID 0 b t f 409 25 16 0 1220 0 0 char2icregexne neqsel neqjoinsel )); -DATA(insert OID = 1222 ( "~*" PGUID 0 b t f 410 25 16 0 1223 0 0 char4icregexeq eqsel eqjoinsel )); -DATA(insert OID = 1223 ( "!~*" PGUID 0 b t f 410 25 16 0 1222 0 0 char4icregexne neqsel neqjoinsel )); -DATA(insert OID = 1224 ( "~*" PGUID 0 b t f 411 25 16 0 1225 0 0 char8icregexeq eqsel eqjoinsel )); -DATA(insert OID = 1225 ( "!~*" PGUID 0 b t f 411 25 16 0 1224 0 0 char8icregexne neqsel neqjoinsel )); -DATA(insert OID = 1226 ( "~*" PGUID 0 b t f 19 25 16 0 1227 0 0 nameicregexeq eqsel eqjoinsel )); -DATA(insert OID = 1227 ( "!~*" PGUID 0 b t f 19 25 16 0 1226 0 0 nameicregexne neqsel neqjoinsel )); -DATA(insert OID = 1228 ( "~*" PGUID 0 b t f 25 25 16 0 1229 0 0 texticregexeq eqsel eqjoinsel )); -DATA(insert OID = 1229 ( "!~*" PGUID 0 b t f 25 25 16 0 1228 0 0 texticregexne eqsel eqjoinsel )); -DATA(insert OID = 1230 ( "~*" PGUID 0 b t f 20 25 16 0 1231 0 0 char16icregexeq eqsel eqjoinsel )); -DATA(insert OID = 1231 ( "!~*" PGUID 0 b t f 20 25 16 0 1230 0 0 char16icregexne neqsel neqjoinsel )); -DATA(insert OID = 1232 ( "~*" PGUID 0 b t f 1043 25 16 0 1233 0 0 texticregexeq eqsel eqjoinsel )); -DATA(insert OID = 1233 ( "!~*" PGUID 0 b t f 1043 25 16 0 1232 0 0 texticregexne neqsel neqjoinsel )); -DATA(insert OID = 1234 ( "~*" PGUID 0 b t f 1042 25 16 0 1235 0 0 texticregexeq eqsel eqjoinsel )); -DATA(insert OID = 1235 ( "!~*" PGUID 0 b t f 1042 25 16 0 1234 0 0 texticregexne neqsel neqjoinsel )); - -DATA(insert OID = 1300 ( "=" PGUID 0 b t t 1296 1296 16 1300 1301 1302 1302 timestampeq eqsel eqjoinsel )); -DATA(insert OID = 1301 ( "<>" PGUID 0 b t f 1296 1296 16 1301 1300 0 0 timestampne neqsel neqjoinsel )); -DATA(insert OID = 1302 ( "<" PGUID 0 b t f 1296 1296 16 1303 1305 0 0 timestamplt intltsel intltjoinsel )); -DATA(insert OID = 1303 ( ">" PGUID 0 b t f 1296 1296 16 1302 1304 0 0 timestampgt intltsel intltjoinsel )); -DATA(insert OID = 1304 ( "<=" PGUID 0 b t f 1296 1296 16 1305 1303 0 0 timestample intltsel intltjoinsel )); -DATA(insert OID = 1305 ( ">=" PGUID 0 b t f 1296 1296 16 1304 1302 0 0 timestampge intltsel intltjoinsel )); +DATA(insert OID = 1220 ( "~*" PGUID 0 b t f 409 25 16 0 1221 0 0 char2icregexeq eqsel eqjoinsel )); +DATA(insert OID = 1221 ( "!~*" PGUID 0 b t f 409 25 16 0 1220 0 0 char2icregexne neqsel neqjoinsel )); +DATA(insert OID = 1222 ( "~*" PGUID 0 b t f 410 25 16 0 1223 0 0 char4icregexeq eqsel eqjoinsel )); +DATA(insert OID = 1223 ( "!~*" PGUID 0 b t f 410 25 16 0 1222 0 0 char4icregexne neqsel neqjoinsel )); +DATA(insert OID = 1224 ( "~*" PGUID 0 b t f 411 25 16 0 1225 0 0 char8icregexeq eqsel eqjoinsel )); +DATA(insert OID = 1225 ( "!~*" PGUID 0 b t f 411 25 16 0 1224 0 0 char8icregexne neqsel neqjoinsel )); +DATA(insert OID = 1226 ( "~*" PGUID 0 b t f 19 25 16 0 1227 0 0 nameicregexeq eqsel eqjoinsel )); +DATA(insert OID = 1227 ( "!~*" PGUID 0 b t f 19 25 16 0 1226 0 0 nameicregexne neqsel neqjoinsel )); +DATA(insert OID = 1228 ( "~*" PGUID 0 b t f 25 25 16 0 1229 0 0 texticregexeq eqsel eqjoinsel )); +DATA(insert OID = 1229 ( "!~*" PGUID 0 b t f 25 25 16 0 1228 0 0 texticregexne eqsel eqjoinsel )); +DATA(insert OID = 1230 ( "~*" PGUID 0 b t f 20 25 16 0 1231 0 0 char16icregexeq eqsel eqjoinsel )); +DATA(insert OID = 1231 ( "!~*" PGUID 0 b t f 20 25 16 0 1230 0 0 char16icregexne neqsel neqjoinsel )); +DATA(insert OID = 1232 ( "~*" PGUID 0 b t f 1043 25 16 0 1233 0 0 texticregexeq eqsel eqjoinsel )); +DATA(insert OID = 1233 ( "!~*" PGUID 0 b t f 1043 25 16 0 1232 0 0 texticregexne neqsel neqjoinsel )); +DATA(insert OID = 1234 ( "~*" PGUID 0 b t f 1042 25 16 0 1235 0 0 texticregexeq eqsel eqjoinsel )); +DATA(insert OID = 1235 ( "!~*" PGUID 0 b t f 1042 25 16 0 1234 0 0 texticregexne neqsel neqjoinsel )); + +DATA(insert OID = 1300 ( "=" PGUID 0 b t t 1296 1296 16 1300 1301 1302 1302 timestampeq eqsel eqjoinsel )); +DATA(insert OID = 1301 ( "<>" PGUID 0 b t f 1296 1296 16 1301 1300 0 0 timestampne neqsel neqjoinsel )); +DATA(insert OID = 1302 ( "<" PGUID 0 b t f 1296 1296 16 1303 1305 0 0 timestamplt intltsel intltjoinsel )); +DATA(insert OID = 1303 ( ">" PGUID 0 b t f 1296 1296 16 1302 1304 0 0 timestampgt intltsel intltjoinsel )); +DATA(insert OID = 1304 ( "<=" PGUID 0 b t f 1296 1296 16 1305 1303 0 0 timestample intltsel intltjoinsel )); +DATA(insert OID = 1305 ( ">=" PGUID 0 b t f 1296 1296 16 1304 1302 0 0 timestampge intltsel intltjoinsel )); /* additional geometric operators - thomas 97/04/18 */ -DATA(insert OID = 1420 ( "@@" PGUID 0 l t f 0 718 600 0 0 0 0 circle_center - - )); -DATA(insert OID = 1500 ( "=" PGUID 0 b t t 718 718 16 1500 1501 1502 1502 circle_eq eqsel eqjoinsel )); -DATA(insert OID = 1501 ( "<>" PGUID 0 b t f 718 718 16 1501 1500 0 0 circle_ne neqsel neqjoinsel )); -DATA(insert OID = 1502 ( "<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_lt areasel areajoinsel )); -DATA(insert OID = 1503 ( ">" PGUID 0 b t f 718 718 16 0 0 0 0 circle_gt areasel areajoinsel )); -DATA(insert OID = 1504 ( "<=" PGUID 0 b t f 718 718 16 0 0 0 0 circle_le areasel areajoinsel )); -DATA(insert OID = 1505 ( ">=" PGUID 0 b t f 718 718 16 0 0 0 0 circle_ge areasel areajoinsel )); - -DATA(insert OID = 1506 ( "<<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_left intltsel intltjoinsel )); -DATA(insert OID = 1507 ( "&<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overleft intltsel intltjoinsel )); -DATA(insert OID = 1508 ( "&>" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overright intltsel intltjoinsel )); -DATA(insert OID = 1509 ( ">>" PGUID 0 b t f 718 718 16 0 0 0 0 circle_right intltsel intltjoinsel )); -DATA(insert OID = 1510 ( "@" PGUID 0 b t f 718 718 16 1511 0 0 0 circle_contained intltsel intltjoinsel )); -DATA(insert OID = 1511 ( "~" PGUID 0 b t f 718 718 16 1510 0 0 0 circle_contain intltsel intltjoinsel )); -DATA(insert OID = 1512 ( "~=" PGUID 0 b t f 718 718 16 1512 0 0 0 circle_same intltsel intltjoinsel )); -DATA(insert OID = 1513 ( "&&" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overlap intltsel intltjoinsel )); -DATA(insert OID = 1514 ( ">^" PGUID 0 b t f 718 718 16 0 0 0 0 circle_above intltsel intltjoinsel )); -DATA(insert OID = 1515 ( "<^" PGUID 0 b t f 718 718 16 0 0 0 0 circle_below intltsel intltjoinsel )); - -DATA(insert OID = 1516 ( "+" PGUID 0 b t f 718 600 718 1516 0 0 0 circle_add_pt - - )); -DATA(insert OID = 1517 ( "-" PGUID 0 b t f 718 600 718 0 0 0 0 circle_sub_pt - - )); -DATA(insert OID = 1518 ( "*" PGUID 0 b t f 718 600 718 1518 0 0 0 circle_mul_pt - - )); -DATA(insert OID = 1519 ( "/" PGUID 0 b t f 718 600 718 0 0 0 0 circle_div_pt - - )); - -DATA(insert OID = 1520 ( "<->" PGUID 0 b t f 718 718 701 1520 0 0 0 circle_distance intltsel intltjoinsel )); -DATA(insert OID = 1521 ( "#" PGUID 0 l t f 0 604 23 0 0 0 0 poly_npoints - - )); -DATA(insert OID = 1522 ( "<->" PGUID 0 b t f 600 718 701 1522 0 0 0 dist_pc intltsel intltjoinsel )); -DATA(insert OID = 1523 ( "<->" PGUID 0 b t f 718 604 701 1523 0 0 0 dist_cpoly intltsel intltjoinsel )); +DATA(insert OID = 1420 ( "@@" PGUID 0 l t f 0 718 600 0 0 0 0 circle_center - - )); +DATA(insert OID = 1500 ( "=" PGUID 0 b t t 718 718 16 1500 1501 1502 1502 circle_eq eqsel eqjoinsel )); +DATA(insert OID = 1501 ( "<>" PGUID 0 b t f 718 718 16 1501 1500 0 0 circle_ne neqsel neqjoinsel )); +DATA(insert OID = 1502 ( "<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_lt areasel areajoinsel )); +DATA(insert OID = 1503 ( ">" PGUID 0 b t f 718 718 16 0 0 0 0 circle_gt areasel areajoinsel )); +DATA(insert OID = 1504 ( "<=" PGUID 0 b t f 718 718 16 0 0 0 0 circle_le areasel areajoinsel )); +DATA(insert OID = 1505 ( ">=" PGUID 0 b t f 718 718 16 0 0 0 0 circle_ge areasel areajoinsel )); + +DATA(insert OID = 1506 ( "<<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_left intltsel intltjoinsel )); +DATA(insert OID = 1507 ( "&<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overleft intltsel intltjoinsel )); +DATA(insert OID = 1508 ( "&>" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overright intltsel intltjoinsel )); +DATA(insert OID = 1509 ( ">>" PGUID 0 b t f 718 718 16 0 0 0 0 circle_right intltsel intltjoinsel )); +DATA(insert OID = 1510 ( "@" PGUID 0 b t f 718 718 16 1511 0 0 0 circle_contained intltsel intltjoinsel )); +DATA(insert OID = 1511 ( "~" PGUID 0 b t f 718 718 16 1510 0 0 0 circle_contain intltsel intltjoinsel )); +DATA(insert OID = 1512 ( "~=" PGUID 0 b t f 718 718 16 1512 0 0 0 circle_same intltsel intltjoinsel )); +DATA(insert OID = 1513 ( "&&" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overlap intltsel intltjoinsel )); +DATA(insert OID = 1514 ( ">^" PGUID 0 b t f 718 718 16 0 0 0 0 circle_above intltsel intltjoinsel )); +DATA(insert OID = 1515 ( "<^" PGUID 0 b t f 718 718 16 0 0 0 0 circle_below intltsel intltjoinsel )); + +DATA(insert OID = 1516 ( "+" PGUID 0 b t f 718 600 718 1516 0 0 0 circle_add_pt - - )); +DATA(insert OID = 1517 ( "-" PGUID 0 b t f 718 600 718 0 0 0 0 circle_sub_pt - - )); +DATA(insert OID = 1518 ( "*" PGUID 0 b t f 718 600 718 1518 0 0 0 circle_mul_pt - - )); +DATA(insert OID = 1519 ( "/" PGUID 0 b t f 718 600 718 0 0 0 0 circle_div_pt - - )); + +DATA(insert OID = 1520 ( "<->" PGUID 0 b t f 718 718 701 1520 0 0 0 circle_distance intltsel intltjoinsel )); +DATA(insert OID = 1521 ( "#" PGUID 0 l t f 0 604 23 0 0 0 0 poly_npoints - - )); +DATA(insert OID = 1522 ( "<->" PGUID 0 b t f 600 718 701 1522 0 0 0 dist_pc intltsel intltjoinsel )); +DATA(insert OID = 1523 ( "<->" PGUID 0 b t f 718 604 701 1523 0 0 0 dist_cpoly intltsel intltjoinsel )); /* additional geometric operators - thomas 1997-07-09 */ DATA(insert OID = 1524 ( "<->" PGUID 0 b t f 628 603 701 1524 0 0 0 dist_lb - - )); -DATA(insert OID = 1525 ( "?#" PGUID 0 b t f 601 601 16 1525 0 0 0 lseg_intersect - - )); -DATA(insert OID = 1526 ( "?||" PGUID 0 b t f 601 601 16 1526 0 0 0 lseg_parallel - - )); -DATA(insert OID = 1527 ( "?-|" PGUID 0 b t f 601 601 16 1527 0 0 0 lseg_perp - - )); -DATA(insert OID = 1528 ( "?-" PGUID 0 l t f 0 601 16 1528 0 0 0 lseg_horizontal - - )); -DATA(insert OID = 1529 ( "?|" PGUID 0 l t f 0 601 16 1529 0 0 0 lseg_vertical - - )); -DATA(insert OID = 1535 ( "=" PGUID 0 b t f 601 601 16 1535 0 0 0 lseg_eq intltsel - )); -DATA(insert OID = 1536 ( "#" PGUID 0 b t f 601 601 600 1536 0 0 0 lseg_interpt - - )); -DATA(insert OID = 1537 ( "?#" PGUID 0 b t f 601 628 16 1537 0 0 0 inter_sl - - )); -DATA(insert OID = 1538 ( "?#" PGUID 0 b t f 601 603 16 1538 0 0 0 inter_sb - - )); -DATA(insert OID = 1539 ( "?#" PGUID 0 b t f 628 603 16 1539 0 0 0 inter_lb - - )); - -DATA(insert OID = 1546 ( "@" PGUID 0 b t f 600 628 16 0 0 0 0 on_pl - - )); -DATA(insert OID = 1547 ( "@" PGUID 0 b t f 600 601 16 0 0 0 0 on_ps - - )); -DATA(insert OID = 1548 ( "@" PGUID 0 b t f 601 628 16 0 0 0 0 on_sl - - )); -DATA(insert OID = 1549 ( "@" PGUID 0 b t f 601 603 16 0 0 0 0 on_sb - - )); - -DATA(insert OID = 1557 ( "##" PGUID 0 b t f 600 628 600 0 0 0 0 close_pl - - )); -DATA(insert OID = 1558 ( "##" PGUID 0 b t f 600 601 600 0 0 0 0 close_ps - - )); -DATA(insert OID = 1559 ( "##" PGUID 0 b t f 600 603 600 0 0 0 0 close_pb - - )); - -DATA(insert OID = 1566 ( "##" PGUID 0 b t f 601 628 600 0 0 0 0 close_sl - - )); -DATA(insert OID = 1567 ( "##" PGUID 0 b t f 601 603 600 0 0 0 0 close_sb - - )); -DATA(insert OID = 1568 ( "##" PGUID 0 b t f 628 603 600 0 0 0 0 close_lb - - )); -DATA(insert OID = 1585 ( "/" PGUID 0 b t f 1186 1186 1186 0 0 0 0 timespan_div - - )); +DATA(insert OID = 1525 ( "?#" PGUID 0 b t f 601 601 16 1525 0 0 0 lseg_intersect - - )); +DATA(insert OID = 1526 ( "?||" PGUID 0 b t f 601 601 16 1526 0 0 0 lseg_parallel - - )); +DATA(insert OID = 1527 ( "?-|" PGUID 0 b t f 601 601 16 1527 0 0 0 lseg_perp - - )); +DATA(insert OID = 1528 ( "?-" PGUID 0 l t f 0 601 16 1528 0 0 0 lseg_horizontal - - )); +DATA(insert OID = 1529 ( "?|" PGUID 0 l t f 0 601 16 1529 0 0 0 lseg_vertical - - )); +DATA(insert OID = 1535 ( "=" PGUID 0 b t f 601 601 16 1535 0 0 0 lseg_eq intltsel - )); +DATA(insert OID = 1536 ( "#" PGUID 0 b t f 601 601 600 1536 0 0 0 lseg_interpt - - )); +DATA(insert OID = 1537 ( "?#" PGUID 0 b t f 601 628 16 1537 0 0 0 inter_sl - - )); +DATA(insert OID = 1538 ( "?#" PGUID 0 b t f 601 603 16 1538 0 0 0 inter_sb - - )); +DATA(insert OID = 1539 ( "?#" PGUID 0 b t f 628 603 16 1539 0 0 0 inter_lb - - )); + +DATA(insert OID = 1546 ( "@" PGUID 0 b t f 600 628 16 0 0 0 0 on_pl - - )); +DATA(insert OID = 1547 ( "@" PGUID 0 b t f 600 601 16 0 0 0 0 on_ps - - )); +DATA(insert OID = 1548 ( "@" PGUID 0 b t f 601 628 16 0 0 0 0 on_sl - - )); +DATA(insert OID = 1549 ( "@" PGUID 0 b t f 601 603 16 0 0 0 0 on_sb - - )); + +DATA(insert OID = 1557 ( "##" PGUID 0 b t f 600 628 600 0 0 0 0 close_pl - - )); +DATA(insert OID = 1558 ( "##" PGUID 0 b t f 600 601 600 0 0 0 0 close_ps - - )); +DATA(insert OID = 1559 ( "##" PGUID 0 b t f 600 603 600 0 0 0 0 close_pb - - )); + +DATA(insert OID = 1566 ( "##" PGUID 0 b t f 601 628 600 0 0 0 0 close_sl - - )); +DATA(insert OID = 1567 ( "##" PGUID 0 b t f 601 603 600 0 0 0 0 close_sb - - )); +DATA(insert OID = 1568 ( "##" PGUID 0 b t f 628 603 600 0 0 0 0 close_lb - - )); +DATA(insert OID = 1585 ( "/" PGUID 0 b t f 1186 1186 1186 0 0 0 0 timespan_div - - )); /* * function prototypes */ -extern void OperatorCreate(char *operatorName, +extern void +OperatorCreate(char *operatorName, char *leftTypeName, char *rightTypeName, char *procedureName, - uint16 precedence, + uint16 precedence, bool isLeftAssociative, char *commutatorName, char *negatorName, @@ -647,4 +649,4 @@ extern void OperatorCreate(char *operatorName, char *leftSortName, char *rightSortName); -#endif /* PG_OPERATOR_H */ +#endif /* PG_OPERATOR_H */ diff --git a/src/include/catalog/pg_parg.h b/src/include/catalog/pg_parg.h index caecdfa37fa..f5423f70862 100644 --- a/src/include/catalog/pg_parg.h +++ b/src/include/catalog/pg_parg.h @@ -1,18 +1,18 @@ /*------------------------------------------------------------------------- * * pg_parg.h-- - * definition of the system "parg" relation (pg_parg) - * along with the relation's initial contents. + * definition of the system "parg" relation (pg_parg) + * along with the relation's initial contents. * * [whatever this relation was, it doesn't seem to be used anymore --djm] * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_parg.h,v 1.3 1996/11/13 20:51:00 scrappy Exp $ + * $Id: pg_parg.h,v 1.4 1997/09/07 04:57:01 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -20,43 +20,44 @@ #define PG_PARG_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_parg definition. cpp turns this into - * typedef struct FormData_pg_parg + * pg_parg definition. cpp turns this into + * typedef struct FormData_pg_parg * ---------------- - */ -CATALOG(pg_parg) { - Oid parproid; - int2 parnum; - char parbound; - Oid partype; + */ +CATALOG(pg_parg) +{ + Oid parproid; + int2 parnum; + char parbound; + Oid partype; } FormData_pg_parg; /* ---------------- - * Form_pg_parg corresponds to a pointer to a tuple with - * the format of pg_parg relation. + * Form_pg_parg corresponds to a pointer to a tuple with + * the format of pg_parg relation. * ---------------- */ -typedef FormData_pg_parg *Form_pg_parg; +typedef FormData_pg_parg *Form_pg_parg; /* ---------------- - * compiler constants for pg_parg + * compiler constants for pg_parg * ---------------- */ -#define Natts_pg_parg 4 -#define Anum_pg_parg_parproid 1 -#define Anum_pg_parg_parnum 2 -#define Anum_pg_parg_parbound 3 -#define Anum_pg_parg_partype 4 +#define Natts_pg_parg 4 +#define Anum_pg_parg_parproid 1 +#define Anum_pg_parg_parnum 2 +#define Anum_pg_parg_parbound 3 +#define Anum_pg_parg_partype 4 /* ---------------- - * initial contents of pg_parg + * initial contents of pg_parg * ---------------- */ @@ -113,4 +114,4 @@ DATA(insert OID = 0 ( 66 2 - 23 )); DATA(insert OID = 0 ( 67 1 - 25 )); DATA(insert OID = 0 ( 67 2 - 25 )); -#endif /* PG_PARG_H */ +#endif /* PG_PARG_H */ diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 0663d78a5ff..2c9dfc9710e 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * pg_proc.h-- - * definition of the system "procedure" relation (pg_proc) - * along with the relation's initial contents. + * definition of the system "procedure" relation (pg_proc) + * along with the relation's initial contents. * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_proc.h,v 1.27 1997/09/04 18:43:59 thomas Exp $ + * $Id: pg_proc.h,v 1.28 1997/09/07 04:57:03 momjian Exp $ * * NOTES - * The script catalog/genbki.sh reads this file and generates .bki - * information from the DATA() statements. utils/Gen_fmgrtab.sh - * generates fmgr.h and fmgrtab.c the same way. + * The script catalog/genbki.sh reads this file and generates .bki + * information from the DATA() statements. utils/Gen_fmgrtab.sh + * generates fmgr.h and fmgrtab.c the same way. * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... - * XXX (eg. #if 0 #endif won't do what you think) + * XXX do NOT break up DATA() statements into multiple lines! + * the scripts are not as smart as you might think... + * XXX (eg. #if 0 #endif won't do what you think) * *------------------------------------------------------------------------- */ @@ -25,67 +25,68 @@ #include <tcop/dest.h> /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_proc definition. cpp turns this into - * typedef struct FormData_pg_proc + * pg_proc definition. cpp turns this into + * typedef struct FormData_pg_proc * ---------------- */ -CATALOG(pg_proc) BOOTSTRAP { - NameData proname; - Oid proowner; - Oid prolang; - bool proisinh; - bool proistrusted; - bool proiscachable; - int2 pronargs; - bool proretset; - Oid prorettype; - oid8 proargtypes; - int4 probyte_pct; - int4 properbyte_cpu; - int4 propercall_cpu; - int4 prooutin_ratio; - text prosrc; /* VARIABLE LENGTH FIELD */ - bytea probin; /* VARIABLE LENGTH FIELD */ +CATALOG(pg_proc) BOOTSTRAP +{ + NameData proname; + Oid proowner; + Oid prolang; + bool proisinh; + bool proistrusted; + bool proiscachable; + int2 pronargs; + bool proretset; + Oid prorettype; + oid8 proargtypes; + int4 probyte_pct; + int4 properbyte_cpu; + int4 propercall_cpu; + int4 prooutin_ratio; + text prosrc; /* VARIABLE LENGTH FIELD */ + bytea probin; /* VARIABLE LENGTH FIELD */ } FormData_pg_proc; /* ---------------- - * Form_pg_proc corresponds to a pointer to a tuple with - * the format of pg_proc relation. + * Form_pg_proc corresponds to a pointer to a tuple with + * the format of pg_proc relation. * ---------------- */ -typedef FormData_pg_proc *Form_pg_proc; +typedef FormData_pg_proc *Form_pg_proc; /* ---------------- - * compiler constants for pg_proc + * compiler constants for pg_proc * ---------------- */ -#define Natts_pg_proc 16 -#define Anum_pg_proc_proname 1 -#define Anum_pg_proc_proowner 2 -#define Anum_pg_proc_prolang 3 -#define Anum_pg_proc_proisinh 4 -#define Anum_pg_proc_proistrusted 5 -#define Anum_pg_proc_proiscachable 6 -#define Anum_pg_proc_pronargs 7 -#define Anum_pg_proc_proretset 8 -#define Anum_pg_proc_prorettype 9 -#define Anum_pg_proc_proargtypes 10 -#define Anum_pg_proc_probyte_pct 11 -#define Anum_pg_proc_properbyte_cpu 12 -#define Anum_pg_proc_propercall_cpu 13 -#define Anum_pg_proc_prooutin_ratio 14 -#define Anum_pg_proc_prosrc 15 -#define Anum_pg_proc_probin 16 +#define Natts_pg_proc 16 +#define Anum_pg_proc_proname 1 +#define Anum_pg_proc_proowner 2 +#define Anum_pg_proc_prolang 3 +#define Anum_pg_proc_proisinh 4 +#define Anum_pg_proc_proistrusted 5 +#define Anum_pg_proc_proiscachable 6 +#define Anum_pg_proc_pronargs 7 +#define Anum_pg_proc_proretset 8 +#define Anum_pg_proc_prorettype 9 +#define Anum_pg_proc_proargtypes 10 +#define Anum_pg_proc_probyte_pct 11 +#define Anum_pg_proc_properbyte_cpu 12 +#define Anum_pg_proc_propercall_cpu 13 +#define Anum_pg_proc_prooutin_ratio 14 +#define Anum_pg_proc_prosrc 15 +#define Anum_pg_proc_probin 16 /* ---------------- - * initial contents of pg_proc + * initial contents of pg_proc * ---------------- */ @@ -93,470 +94,470 @@ typedef FormData_pg_proc *Form_pg_proc; /* OIDS 1 - 99 */ -DATA(insert OID = 1242 ( boolin PGUID 11 f t f 1 f 16 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1243 ( boolout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1244 ( byteain PGUID 11 f t f 1 f 17 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 31 ( byteaout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1245 ( charin PGUID 11 f t f 1 f 18 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 33 ( charout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 34 ( namein PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 35 ( nameout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 36 ( char16in PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 37 ( char16out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 38 ( int2in PGUID 11 f t f 1 f 21 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 39 ( int2out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 40 ( int28in PGUID 11 f t f 1 f 22 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 41 ( int28out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 42 ( int4in PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 43 ( int4out PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 44 ( regprocin PGUID 11 f t f 1 f 24 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 45 ( regprocout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 46 ( textin PGUID 11 f t f 1 f 25 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1242 ( boolin PGUID 11 f t f 1 f 16 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1243 ( boolout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1244 ( byteain PGUID 11 f t f 1 f 17 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 31 ( byteaout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1245 ( charin PGUID 11 f t f 1 f 18 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 33 ( charout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 34 ( namein PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 35 ( nameout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 36 ( char16in PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 37 ( char16out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 38 ( int2in PGUID 11 f t f 1 f 21 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 39 ( int2out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 40 ( int28in PGUID 11 f t f 1 f 22 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 41 ( int28out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 42 ( int4in PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 43 ( int4out PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 44 ( regprocin PGUID 11 f t f 1 f 24 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 45 ( regprocout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 46 ( textin PGUID 11 f t f 1 f 25 "0" 100 0 0 100 foo bar )); #define TextInRegProcedure 46 -DATA(insert OID = 47 ( textout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 48 ( tidin PGUID 11 f t f 1 f 27 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 49 ( tidout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 50 ( xidin PGUID 11 f t f 1 f 28 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 51 ( xidout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 52 ( cidin PGUID 11 f t f 1 f 29 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 53 ( cidout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 54 ( oid8in PGUID 11 f t f 1 f 30 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 55 ( oid8out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 56 ( boollt PGUID 11 f t f 2 f 16 "16 16" 100 0 0 100 foo bar )); -DATA(insert OID = 57 ( boolgt PGUID 11 f t f 2 f 16 "16 16" 100 0 0 100 foo bar )); -DATA(insert OID = 60 ( booleq PGUID 11 f t f 2 f 16 "16 16" 100 0 0 100 foo bar )); -DATA(insert OID = 61 ( chareq PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); -#define CharacterEqualRegProcedure 61 - -DATA(insert OID = 62 ( nameeq PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -#define NameEqualRegProcedure 62 - -DATA(insert OID = 63 ( int2eq PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); -#define Integer16EqualRegProcedure 63 - -DATA(insert OID = 64 ( int2lt PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 65 ( int4eq PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); -#define Integer32EqualRegProcedure 65 - -DATA(insert OID = 66 ( int4lt PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 67 ( texteq PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); -#define TextEqualRegProcedure 67 - -DATA(insert OID = 68 ( xideq PGUID 11 f t f 2 f 16 "28 28" 100 0 0 100 foo bar )); -DATA(insert OID = 69 ( cideq PGUID 11 f t f 2 f 16 "29 29" 100 0 0 100 foo bar )); -DATA(insert OID = 70 ( charne PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 1246 ( charlt PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 72 ( charle PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 73 ( chargt PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 74 ( charge PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 1248 ( charpl PGUID 11 f t f 2 f 18 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 1250 ( charmi PGUID 11 f t f 2 f 18 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 77 ( charmul PGUID 11 f t f 2 f 18 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 78 ( chardiv PGUID 11 f t f 2 f 18 "18 18" 100 0 0 100 foo bar )); - -DATA(insert OID = 79 ( nameregexeq PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); -DATA(insert OID = 1252 ( nameregexne PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); -DATA(insert OID = 1254 ( textregexeq PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); -DATA(insert OID = 1256 ( textregexne PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); -DATA(insert OID = 1258 ( textcat PGUID 11 f t f 2 f 25 "25 25" 100 0 1 0 foo bar )); -DATA(insert OID = 84 ( boolne PGUID 11 f t f 2 f 16 "16 16" 100 0 0 100 foo bar )); - -DATA(insert OID = 1265 ( rtsel PGUID 11 f t f 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); -DATA(insert OID = 1266 ( rtnpage PGUID 11 f t f 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); -DATA(insert OID = 1268 ( btreesel PGUID 11 f t f 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); +DATA(insert OID = 47 ( textout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 48 ( tidin PGUID 11 f t f 1 f 27 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 49 ( tidout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 50 ( xidin PGUID 11 f t f 1 f 28 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 51 ( xidout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 52 ( cidin PGUID 11 f t f 1 f 29 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 53 ( cidout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 54 ( oid8in PGUID 11 f t f 1 f 30 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 55 ( oid8out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 56 ( boollt PGUID 11 f t f 2 f 16 "16 16" 100 0 0 100 foo bar )); +DATA(insert OID = 57 ( boolgt PGUID 11 f t f 2 f 16 "16 16" 100 0 0 100 foo bar )); +DATA(insert OID = 60 ( booleq PGUID 11 f t f 2 f 16 "16 16" 100 0 0 100 foo bar )); +DATA(insert OID = 61 ( chareq PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); +#define CharacterEqualRegProcedure 61 + +DATA(insert OID = 62 ( nameeq PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +#define NameEqualRegProcedure 62 + +DATA(insert OID = 63 ( int2eq PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); +#define Integer16EqualRegProcedure 63 + +DATA(insert OID = 64 ( int2lt PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 65 ( int4eq PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); +#define Integer32EqualRegProcedure 65 + +DATA(insert OID = 66 ( int4lt PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 67 ( texteq PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); +#define TextEqualRegProcedure 67 + +DATA(insert OID = 68 ( xideq PGUID 11 f t f 2 f 16 "28 28" 100 0 0 100 foo bar )); +DATA(insert OID = 69 ( cideq PGUID 11 f t f 2 f 16 "29 29" 100 0 0 100 foo bar )); +DATA(insert OID = 70 ( charne PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 1246 ( charlt PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 72 ( charle PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 73 ( chargt PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 74 ( charge PGUID 11 f t f 2 f 16 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 1248 ( charpl PGUID 11 f t f 2 f 18 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 1250 ( charmi PGUID 11 f t f 2 f 18 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 77 ( charmul PGUID 11 f t f 2 f 18 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 78 ( chardiv PGUID 11 f t f 2 f 18 "18 18" 100 0 0 100 foo bar )); + +DATA(insert OID = 79 ( nameregexeq PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); +DATA(insert OID = 1252 ( nameregexne PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); +DATA(insert OID = 1254 ( textregexeq PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); +DATA(insert OID = 1256 ( textregexne PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); +DATA(insert OID = 1258 ( textcat PGUID 11 f t f 2 f 25 "25 25" 100 0 1 0 foo bar )); +DATA(insert OID = 84 ( boolne PGUID 11 f t f 2 f 16 "16 16" 100 0 0 100 foo bar )); + +DATA(insert OID = 1265 ( rtsel PGUID 11 f t f 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); +DATA(insert OID = 1266 ( rtnpage PGUID 11 f t f 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); +DATA(insert OID = 1268 ( btreesel PGUID 11 f t f 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); /* OIDS 100 - 199 */ -DATA(insert OID = 1270 ( btreenpage PGUID 11 f t f 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); -DATA(insert OID = 1272 ( eqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); +DATA(insert OID = 1270 ( btreenpage PGUID 11 f t f 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); +DATA(insert OID = 1272 ( eqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); #define EqualSelectivityProcedure 1272 -DATA(insert OID = 102 ( neqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); -DATA(insert OID = 103 ( intltsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); -DATA(insert OID = 104 ( intgtsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); -DATA(insert OID = 105 ( eqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 foo bar )); -DATA(insert OID = 106 ( neqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 foo bar )); -DATA(insert OID = 107 ( intltjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 foo bar )); -DATA(insert OID = 108 ( intgtjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 foo bar )); - -DATA(insert OID = 115 ( box_above PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); -DATA(insert OID = 116 ( box_below PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); - -DATA(insert OID = 117 ( point_in PGUID 11 f t f 1 f 600 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 118 ( point_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 119 ( lseg_in PGUID 11 f t f 1 f 601 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 120 ( lseg_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 121 ( path_in PGUID 11 f t f 1 f 602 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 122 ( path_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 123 ( box_in PGUID 11 f t f 1 f 603 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 124 ( box_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 125 ( box_overlap PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); -DATA(insert OID = 126 ( box_ge PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); -DATA(insert OID = 127 ( box_gt PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); -DATA(insert OID = 128 ( box_eq PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); -DATA(insert OID = 129 ( box_lt PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); -DATA(insert OID = 130 ( box_le PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); -DATA(insert OID = 131 ( point_above PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 132 ( point_left PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 133 ( point_right PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 134 ( point_below PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 135 ( point_eq PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 136 ( on_pb PGUID 11 f t f 2 f 16 "600 603" 100 0 0 100 foo bar )); -DATA(insert OID = 137 ( on_ppath PGUID 11 f t f 2 f 16 "600 602" 100 0 1 0 foo bar )); -DATA(insert OID = 138 ( box_center PGUID 11 f t f 1 f 600 "603" 100 1 0 100 foo bar )); -DATA(insert OID = 139 ( areasel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); -DATA(insert OID = 140 ( areajoinsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); -DATA(insert OID = 141 ( int4mul PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 142 ( int4fac PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 143 ( pointdist PGUID 11 f t f 2 f 23 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 144 ( int4ne PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 145 ( int2ne PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 146 ( int2gt PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 147 ( int4gt PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 148 ( int2le PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 149 ( int4le PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 150 ( int4ge PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 102 ( neqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); +DATA(insert OID = 103 ( intltsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); +DATA(insert OID = 104 ( intgtsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); +DATA(insert OID = 105 ( eqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 foo bar )); +DATA(insert OID = 106 ( neqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 foo bar )); +DATA(insert OID = 107 ( intltjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 foo bar )); +DATA(insert OID = 108 ( intgtjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 foo bar )); + +DATA(insert OID = 115 ( box_above PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); +DATA(insert OID = 116 ( box_below PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); + +DATA(insert OID = 117 ( point_in PGUID 11 f t f 1 f 600 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 118 ( point_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 119 ( lseg_in PGUID 11 f t f 1 f 601 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 120 ( lseg_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 121 ( path_in PGUID 11 f t f 1 f 602 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 122 ( path_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 123 ( box_in PGUID 11 f t f 1 f 603 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 124 ( box_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 125 ( box_overlap PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); +DATA(insert OID = 126 ( box_ge PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); +DATA(insert OID = 127 ( box_gt PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); +DATA(insert OID = 128 ( box_eq PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); +DATA(insert OID = 129 ( box_lt PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); +DATA(insert OID = 130 ( box_le PGUID 11 f t f 2 f 16 "603 603" 100 1 0 100 foo bar )); +DATA(insert OID = 131 ( point_above PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 132 ( point_left PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 133 ( point_right PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 134 ( point_below PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 135 ( point_eq PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 136 ( on_pb PGUID 11 f t f 2 f 16 "600 603" 100 0 0 100 foo bar )); +DATA(insert OID = 137 ( on_ppath PGUID 11 f t f 2 f 16 "600 602" 100 0 1 0 foo bar )); +DATA(insert OID = 138 ( box_center PGUID 11 f t f 1 f 600 "603" 100 1 0 100 foo bar )); +DATA(insert OID = 139 ( areasel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); +DATA(insert OID = 140 ( areajoinsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 foo bar )); +DATA(insert OID = 141 ( int4mul PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 142 ( int4fac PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 143 ( pointdist PGUID 11 f t f 2 f 23 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 144 ( int4ne PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 145 ( int2ne PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 146 ( int2gt PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 147 ( int4gt PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 148 ( int2le PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 149 ( int4le PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 150 ( int4ge PGUID 11 f t f 2 f 16 "23 23" 100 0 0 100 foo bar )); #define INT4GE_PROC_OID 150 -DATA(insert OID = 151 ( int2ge PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 152 ( int2mul PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 153 ( int2div PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 154 ( int4div PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 155 ( int2mod PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 156 ( int4mod PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 157 ( textne PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); -DATA(insert OID = 158 ( int24eq PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 159 ( int42eq PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 160 ( int24lt PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 161 ( int42lt PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 162 ( int24gt PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 163 ( int42gt PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 164 ( int24ne PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 165 ( int42ne PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 166 ( int24le PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 167 ( int42le PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 168 ( int24ge PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 169 ( int42ge PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 170 ( int24mul PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 171 ( int42mul PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 172 ( int24div PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 173 ( int42div PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 174 ( int24mod PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 175 ( int42mod PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 176 ( int2pl PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 177 ( int4pl PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 178 ( int24pl PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 179 ( int42pl PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 180 ( int2mi PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 181 ( int4mi PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 182 ( int24mi PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 183 ( int42mi PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 184 ( oideq PGUID 11 f t f 2 f 16 "26 26" 100 0 0 100 foo bar )); -#define ObjectIdEqualRegProcedure 184 - -DATA(insert OID = 185 ( oidne PGUID 11 f t f 2 f 16 "26 26" 100 0 0 100 foo bar )); -DATA(insert OID = 186 ( box_same PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 187 ( box_contain PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 188 ( box_left PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 189 ( box_overleft PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 190 ( box_overright PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 191 ( box_right PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 192 ( box_contained PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 193 ( rt_box_union PGUID 11 f t f 2 f 603 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 194 ( rt_box_inter PGUID 11 f t f 2 f 603 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 195 ( rt_box_size PGUID 11 f t f 2 f 700 "603 700" 100 0 0 100 foo bar )); +DATA(insert OID = 151 ( int2ge PGUID 11 f t f 2 f 16 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 152 ( int2mul PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 153 ( int2div PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 154 ( int4div PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 155 ( int2mod PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 156 ( int4mod PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 157 ( textne PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); +DATA(insert OID = 158 ( int24eq PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 159 ( int42eq PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 160 ( int24lt PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 161 ( int42lt PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 162 ( int24gt PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 163 ( int42gt PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 164 ( int24ne PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 165 ( int42ne PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 166 ( int24le PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 167 ( int42le PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 168 ( int24ge PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 169 ( int42ge PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 170 ( int24mul PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 171 ( int42mul PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 172 ( int24div PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 173 ( int42div PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 174 ( int24mod PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 175 ( int42mod PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 176 ( int2pl PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 177 ( int4pl PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 178 ( int24pl PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 179 ( int42pl PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 180 ( int2mi PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 181 ( int4mi PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 182 ( int24mi PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 183 ( int42mi PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 184 ( oideq PGUID 11 f t f 2 f 16 "26 26" 100 0 0 100 foo bar )); +#define ObjectIdEqualRegProcedure 184 + +DATA(insert OID = 185 ( oidne PGUID 11 f t f 2 f 16 "26 26" 100 0 0 100 foo bar )); +DATA(insert OID = 186 ( box_same PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 187 ( box_contain PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 188 ( box_left PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 189 ( box_overleft PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 190 ( box_overright PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 191 ( box_right PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 192 ( box_contained PGUID 11 f t f 2 f 16 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 193 ( rt_box_union PGUID 11 f t f 2 f 603 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 194 ( rt_box_inter PGUID 11 f t f 2 f 603 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 195 ( rt_box_size PGUID 11 f t f 2 f 700 "603 700" 100 0 0 100 foo bar )); DATA(insert OID = 196 ( rt_bigbox_size PGUID 11 f t f 2 f 700 "603 700" 100 0 0 100 foo bar )); -DATA(insert OID = 197 ( rt_poly_union PGUID 11 f t f 2 f 604 "604 604" 100 0 0 100 foo bar )); -DATA(insert OID = 198 ( rt_poly_inter PGUID 11 f t f 2 f 604 "604 604" 100 0 0 100 foo bar )); -DATA(insert OID = 199 ( rt_poly_size PGUID 11 f t f 2 f 23 "604 23" 100 0 0 100 foo bar )); +DATA(insert OID = 197 ( rt_poly_union PGUID 11 f t f 2 f 604 "604 604" 100 0 0 100 foo bar )); +DATA(insert OID = 198 ( rt_poly_inter PGUID 11 f t f 2 f 604 "604 604" 100 0 0 100 foo bar )); +DATA(insert OID = 199 ( rt_poly_size PGUID 11 f t f 2 f 23 "604 23" 100 0 0 100 foo bar )); /* OIDS 200 - 299 */ -DATA(insert OID = 200 ( float4in PGUID 11 f t f 1 f 700 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 201 ( float4out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 202 ( float4mul PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 203 ( float4div PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 204 ( float4pl PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 205 ( float4mi PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 206 ( float4um PGUID 11 f t f 1 f 700 "700" 100 0 0 100 foo bar )); -DATA(insert OID = 207 ( float4abs PGUID 11 f t f 1 f 700 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 208 ( float4inc PGUID 11 f t f 1 f 700 "700" 100 0 0 100 foo bar )); -DATA(insert OID = 209 ( float4larger PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 211 ( float4smaller PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); - -DATA(insert OID = 212 ( int4um PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 213 ( int2um PGUID 11 f t f 1 f 21 "21" 100 0 0 100 foo bar )); - -DATA(insert OID = 214 ( float8in PGUID 11 f t f 1 f 701 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 215 ( float8out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 216 ( float8mul PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 217 ( float8div PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 218 ( float8pl PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 219 ( float8mi PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 220 ( float8um PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 221 ( float8abs PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 222 ( float8inc PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 223 ( float8larger PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 224 ( float8smaller PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); - -DATA(insert OID = 225 ( lseg_center PGUID 11 f t f 1 f 600 "601" 100 0 0 100 foo bar )); -DATA(insert OID = 226 ( path_center PGUID 11 f t f 1 f 600 "602" 100 0 0 100 foo bar )); -DATA(insert OID = 227 ( poly_center PGUID 11 f t f 1 f 600 "604" 100 0 0 100 foo bar )); - -DATA(insert OID = 228 ( dround PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 229 ( dtrunc PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 230 ( dsqrt PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 231 ( dcbrt PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 232 ( dpow PGUID 11 f t f 2 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 233 ( dexp PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 234 ( dlog1 PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); - -DATA(insert OID = 235 ( i2tod PGUID 11 f t f 1 f 701 "21" 100 0 0 100 foo bar )); -DATA(insert OID = 236 ( i2tof PGUID 11 f t f 1 f 700 "21" 100 0 0 100 foo bar )); -DATA(insert OID = 237 ( dtoi2 PGUID 11 f t f 1 f 21 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 238 ( ftoi2 PGUID 11 f t f 1 f 21 "700" 100 0 0 100 foo bar )); -DATA(insert OID = 239 ( line_distance PGUID 11 f t f 2 f 701 "628 628" 100 0 0 100 foo bar )); - -DATA(insert OID = 240 ( nabstimein PGUID 11 f t f 1 f 702 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 241 ( nabstimeout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 242 ( reltimein PGUID 11 f t f 1 f 703 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 243 ( reltimeout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 244 ( timepl PGUID 11 f t f 2 f 702 "702 703" 100 0 0 100 foo bar )); -DATA(insert OID = 245 ( timemi PGUID 11 f t f 2 f 702 "702 703" 100 0 0 100 foo bar )); -DATA(insert OID = 246 ( tintervalin PGUID 11 f t f 1 f 704 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 247 ( tintervalout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 248 ( ininterval PGUID 11 f t f 2 f 16 "702 704" 100 0 0 100 foo bar )); -DATA(insert OID = 249 ( intervalrel PGUID 11 f t f 1 f 703 "704" 100 0 0 100 foo bar )); -DATA(insert OID = 250 ( timenow PGUID 11 f t f 0 f 702 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 251 ( abstimeeq PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); -DATA(insert OID = 252 ( abstimene PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); -DATA(insert OID = 253 ( abstimelt PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); -DATA(insert OID = 254 ( abstimegt PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); -DATA(insert OID = 255 ( abstimele PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); -DATA(insert OID = 256 ( abstimege PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); -DATA(insert OID = 257 ( reltimeeq PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); -DATA(insert OID = 258 ( reltimene PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); -DATA(insert OID = 259 ( reltimelt PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); -DATA(insert OID = 260 ( reltimegt PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); -DATA(insert OID = 261 ( reltimele PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); -DATA(insert OID = 262 ( reltimege PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); -DATA(insert OID = 263 ( intervaleq PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 foo bar )); -DATA(insert OID = 264 ( intervalct PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 foo bar )); -DATA(insert OID = 265 ( intervalov PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 foo bar )); -DATA(insert OID = 266 ( intervalleneq PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); -DATA(insert OID = 267 ( intervallenne PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); -DATA(insert OID = 268 ( intervallenlt PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); -DATA(insert OID = 269 ( intervallengt PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); -DATA(insert OID = 270 ( intervallenle PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); -DATA(insert OID = 271 ( intervallenge PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); -DATA(insert OID = 272 ( intervalstart PGUID 11 f t f 1 f 702 "704" 100 0 0 100 foo bar )); -DATA(insert OID = 273 ( intervalend PGUID 11 f t f 1 f 702 "704" 100 0 0 100 foo bar )); -DATA(insert OID = 274 ( timeofday PGUID 11 f t f 0 f 25 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 275 ( abstime_finite PGUID 11 f t f 1 f 16 "702" 100 0 0 100 foo bar )); - -DATA(insert OID = 276 ( int2fac PGUID 11 f t f 1 f 21 "21" 100 0 0 100 foo bar )); - -DATA(insert OID = 277 ( inter_sl PGUID 11 f t f 2 f 16 "601 628" 100 0 0 100 foo bar )); -DATA(insert OID = 278 ( inter_lb PGUID 11 f t f 2 f 16 "628 603" 100 0 0 100 foo bar )); - -DATA(insert OID = 279 ( float48mul PGUID 11 f t f 2 f 701 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 280 ( float48div PGUID 11 f t f 2 f 701 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 281 ( float48pl PGUID 11 f t f 2 f 701 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 282 ( float48mi PGUID 11 f t f 2 f 701 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 283 ( float84mul PGUID 11 f t f 2 f 701 "701 700" 100 0 0 100 foo bar )); -DATA(insert OID = 284 ( float84div PGUID 11 f t f 2 f 701 "701 700" 100 0 0 100 foo bar )); -DATA(insert OID = 285 ( float84pl PGUID 11 f t f 2 f 701 "701 700" 100 0 0 100 foo bar )); -DATA(insert OID = 286 ( float84mi PGUID 11 f t f 2 f 701 "701 700" 100 0 0 100 foo bar )); - -DATA(insert OID = 287 ( float4eq PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 288 ( float4ne PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 289 ( float4lt PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 290 ( float4le PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 291 ( float4gt PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 292 ( float4ge PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); - -DATA(insert OID = 293 ( float8eq PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 294 ( float8ne PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 295 ( float8lt PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 296 ( float8le PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 297 ( float8gt PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 298 ( float8ge PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); - -DATA(insert OID = 299 ( float48eq PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 200 ( float4in PGUID 11 f t f 1 f 700 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 201 ( float4out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 202 ( float4mul PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 203 ( float4div PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 204 ( float4pl PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 205 ( float4mi PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 206 ( float4um PGUID 11 f t f 1 f 700 "700" 100 0 0 100 foo bar )); +DATA(insert OID = 207 ( float4abs PGUID 11 f t f 1 f 700 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 208 ( float4inc PGUID 11 f t f 1 f 700 "700" 100 0 0 100 foo bar )); +DATA(insert OID = 209 ( float4larger PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 211 ( float4smaller PGUID 11 f t f 2 f 700 "700 700" 100 0 0 100 foo bar )); + +DATA(insert OID = 212 ( int4um PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 213 ( int2um PGUID 11 f t f 1 f 21 "21" 100 0 0 100 foo bar )); + +DATA(insert OID = 214 ( float8in PGUID 11 f t f 1 f 701 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 215 ( float8out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 216 ( float8mul PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 217 ( float8div PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 218 ( float8pl PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 219 ( float8mi PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 220 ( float8um PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 221 ( float8abs PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 222 ( float8inc PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 223 ( float8larger PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 224 ( float8smaller PGUID 11 f t f 2 f 701 "701 701" 100 0 0 100 foo bar )); + +DATA(insert OID = 225 ( lseg_center PGUID 11 f t f 1 f 600 "601" 100 0 0 100 foo bar )); +DATA(insert OID = 226 ( path_center PGUID 11 f t f 1 f 600 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 227 ( poly_center PGUID 11 f t f 1 f 600 "604" 100 0 0 100 foo bar )); + +DATA(insert OID = 228 ( dround PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 229 ( dtrunc PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 230 ( dsqrt PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 231 ( dcbrt PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 232 ( dpow PGUID 11 f t f 2 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 233 ( dexp PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 234 ( dlog1 PGUID 11 f t f 1 f 701 "701" 100 0 0 100 foo bar )); + +DATA(insert OID = 235 ( i2tod PGUID 11 f t f 1 f 701 "21" 100 0 0 100 foo bar )); +DATA(insert OID = 236 ( i2tof PGUID 11 f t f 1 f 700 "21" 100 0 0 100 foo bar )); +DATA(insert OID = 237 ( dtoi2 PGUID 11 f t f 1 f 21 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 238 ( ftoi2 PGUID 11 f t f 1 f 21 "700" 100 0 0 100 foo bar )); +DATA(insert OID = 239 ( line_distance PGUID 11 f t f 2 f 701 "628 628" 100 0 0 100 foo bar )); + +DATA(insert OID = 240 ( nabstimein PGUID 11 f t f 1 f 702 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 241 ( nabstimeout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 242 ( reltimein PGUID 11 f t f 1 f 703 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 243 ( reltimeout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 244 ( timepl PGUID 11 f t f 2 f 702 "702 703" 100 0 0 100 foo bar )); +DATA(insert OID = 245 ( timemi PGUID 11 f t f 2 f 702 "702 703" 100 0 0 100 foo bar )); +DATA(insert OID = 246 ( tintervalin PGUID 11 f t f 1 f 704 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 247 ( tintervalout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 248 ( ininterval PGUID 11 f t f 2 f 16 "702 704" 100 0 0 100 foo bar )); +DATA(insert OID = 249 ( intervalrel PGUID 11 f t f 1 f 703 "704" 100 0 0 100 foo bar )); +DATA(insert OID = 250 ( timenow PGUID 11 f t f 0 f 702 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 251 ( abstimeeq PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); +DATA(insert OID = 252 ( abstimene PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); +DATA(insert OID = 253 ( abstimelt PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); +DATA(insert OID = 254 ( abstimegt PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); +DATA(insert OID = 255 ( abstimele PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); +DATA(insert OID = 256 ( abstimege PGUID 11 f t f 2 f 16 "702 702" 100 0 0 100 foo bar )); +DATA(insert OID = 257 ( reltimeeq PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); +DATA(insert OID = 258 ( reltimene PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); +DATA(insert OID = 259 ( reltimelt PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); +DATA(insert OID = 260 ( reltimegt PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); +DATA(insert OID = 261 ( reltimele PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); +DATA(insert OID = 262 ( reltimege PGUID 11 f t f 2 f 16 "703 703" 100 0 0 100 foo bar )); +DATA(insert OID = 263 ( intervaleq PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 foo bar )); +DATA(insert OID = 264 ( intervalct PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 foo bar )); +DATA(insert OID = 265 ( intervalov PGUID 11 f t f 2 f 16 "704 704" 100 0 0 100 foo bar )); +DATA(insert OID = 266 ( intervalleneq PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); +DATA(insert OID = 267 ( intervallenne PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); +DATA(insert OID = 268 ( intervallenlt PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); +DATA(insert OID = 269 ( intervallengt PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); +DATA(insert OID = 270 ( intervallenle PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); +DATA(insert OID = 271 ( intervallenge PGUID 11 f t f 2 f 16 "704 703" 100 0 0 100 foo bar )); +DATA(insert OID = 272 ( intervalstart PGUID 11 f t f 1 f 702 "704" 100 0 0 100 foo bar )); +DATA(insert OID = 273 ( intervalend PGUID 11 f t f 1 f 702 "704" 100 0 0 100 foo bar )); +DATA(insert OID = 274 ( timeofday PGUID 11 f t f 0 f 25 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 275 ( abstime_finite PGUID 11 f t f 1 f 16 "702" 100 0 0 100 foo bar )); + +DATA(insert OID = 276 ( int2fac PGUID 11 f t f 1 f 21 "21" 100 0 0 100 foo bar )); + +DATA(insert OID = 277 ( inter_sl PGUID 11 f t f 2 f 16 "601 628" 100 0 0 100 foo bar )); +DATA(insert OID = 278 ( inter_lb PGUID 11 f t f 2 f 16 "628 603" 100 0 0 100 foo bar )); + +DATA(insert OID = 279 ( float48mul PGUID 11 f t f 2 f 701 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 280 ( float48div PGUID 11 f t f 2 f 701 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 281 ( float48pl PGUID 11 f t f 2 f 701 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 282 ( float48mi PGUID 11 f t f 2 f 701 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 283 ( float84mul PGUID 11 f t f 2 f 701 "701 700" 100 0 0 100 foo bar )); +DATA(insert OID = 284 ( float84div PGUID 11 f t f 2 f 701 "701 700" 100 0 0 100 foo bar )); +DATA(insert OID = 285 ( float84pl PGUID 11 f t f 2 f 701 "701 700" 100 0 0 100 foo bar )); +DATA(insert OID = 286 ( float84mi PGUID 11 f t f 2 f 701 "701 700" 100 0 0 100 foo bar )); + +DATA(insert OID = 287 ( float4eq PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 288 ( float4ne PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 289 ( float4lt PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 290 ( float4le PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 291 ( float4gt PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 292 ( float4ge PGUID 11 f t f 2 f 16 "700 700" 100 0 0 100 foo bar )); + +DATA(insert OID = 293 ( float8eq PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 294 ( float8ne PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 295 ( float8lt PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 296 ( float8le PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 297 ( float8gt PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 298 ( float8ge PGUID 11 f t f 2 f 16 "701 701" 100 0 0 100 foo bar )); + +DATA(insert OID = 299 ( float48eq PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); /* OIDS 300 - 399 */ -DATA(insert OID = 300 ( float48ne PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 301 ( float48lt PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 302 ( float48le PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 303 ( float48gt PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 304 ( float48ge PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); -DATA(insert OID = 305 ( float84eq PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); -DATA(insert OID = 306 ( float84ne PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); -DATA(insert OID = 307 ( float84lt PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); -DATA(insert OID = 308 ( float84le PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); -DATA(insert OID = 309 ( float84gt PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); -DATA(insert OID = 310 ( float84ge PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); - -DATA(insert OID = 311 ( ftod PGUID 11 f t f 2 f 701 "700" 100 0 0 100 foo bar )); -DATA(insert OID = 312 ( dtof PGUID 11 f t f 2 f 700 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 313 ( i2toi4 PGUID 11 f t f 1 f 23 "21" 100 0 0 100 foo bar )); -DATA(insert OID = 314 ( i4toi2 PGUID 11 f t f 1 f 21 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 315 ( keyfirsteq PGUID 11 f t f 2 f 16 "0 21" 100 0 0 100 foo bar )); -DATA(insert OID = 316 ( i4tod PGUID 11 f t f 1 f 701 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 317 ( dtoi4 PGUID 11 f t f 1 f 23 "701" 100 0 0 100 foo bar )); -DATA(insert OID = 318 ( i4tof PGUID 11 f t f 1 f 700 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 319 ( ftoi4 PGUID 11 f t f 1 f 23 "700" 100 0 0 100 foo bar )); - -DATA(insert OID = 320 ( rtinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 321 ( rtdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 322 ( rtgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 323 ( rtbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 324 ( rtbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 325 ( rtendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 326 ( rtmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 327 ( rtrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 328 ( rtrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 foo bar )); - -DATA(insert OID = 330 ( btgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 331 ( btinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 332 ( btdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 333 ( btbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 334 ( btrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 335 ( btendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 336 ( btmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 337 ( btrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 338 ( btbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 339 ( poly_same PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); -DATA(insert OID = 340 ( poly_contain PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); -DATA(insert OID = 341 ( poly_left PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); -DATA(insert OID = 342 ( poly_overleft PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); +DATA(insert OID = 300 ( float48ne PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 301 ( float48lt PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 302 ( float48le PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 303 ( float48gt PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 304 ( float48ge PGUID 11 f t f 2 f 16 "700 701" 100 0 0 100 foo bar )); +DATA(insert OID = 305 ( float84eq PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); +DATA(insert OID = 306 ( float84ne PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); +DATA(insert OID = 307 ( float84lt PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); +DATA(insert OID = 308 ( float84le PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); +DATA(insert OID = 309 ( float84gt PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); +DATA(insert OID = 310 ( float84ge PGUID 11 f t f 2 f 16 "701 700" 100 0 0 100 foo bar )); + +DATA(insert OID = 311 ( ftod PGUID 11 f t f 2 f 701 "700" 100 0 0 100 foo bar )); +DATA(insert OID = 312 ( dtof PGUID 11 f t f 2 f 700 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 313 ( i2toi4 PGUID 11 f t f 1 f 23 "21" 100 0 0 100 foo bar )); +DATA(insert OID = 314 ( i4toi2 PGUID 11 f t f 1 f 21 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 315 ( keyfirsteq PGUID 11 f t f 2 f 16 "0 21" 100 0 0 100 foo bar )); +DATA(insert OID = 316 ( i4tod PGUID 11 f t f 1 f 701 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 317 ( dtoi4 PGUID 11 f t f 1 f 23 "701" 100 0 0 100 foo bar )); +DATA(insert OID = 318 ( i4tof PGUID 11 f t f 1 f 700 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 319 ( ftoi4 PGUID 11 f t f 1 f 23 "700" 100 0 0 100 foo bar )); + +DATA(insert OID = 320 ( rtinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 321 ( rtdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 322 ( rtgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 323 ( rtbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 324 ( rtbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 325 ( rtendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 326 ( rtmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 327 ( rtrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 328 ( rtrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 foo bar )); + +DATA(insert OID = 330 ( btgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 331 ( btinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 332 ( btdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 333 ( btbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 334 ( btrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 335 ( btendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 336 ( btmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 337 ( btrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 338 ( btbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 339 ( poly_same PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); +DATA(insert OID = 340 ( poly_contain PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); +DATA(insert OID = 341 ( poly_left PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); +DATA(insert OID = 342 ( poly_overleft PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); DATA(insert OID = 343 ( poly_overright PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); -DATA(insert OID = 344 ( poly_right PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); +DATA(insert OID = 344 ( poly_right PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); DATA(insert OID = 345 ( poly_contained PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); -DATA(insert OID = 346 ( poly_overlap PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); -DATA(insert OID = 347 ( poly_in PGUID 11 f t f 1 f 604 "0" 100 0 1 0 foo bar )); -DATA(insert OID = 348 ( poly_out PGUID 11 f t f 1 f 23 "0" 100 0 1 0 foo bar )); - -DATA(insert OID = 350 ( btint2cmp PGUID 11 f t f 2 f 23 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 351 ( btint4cmp PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 352 ( btint42cmp PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); -DATA(insert OID = 353 ( btint24cmp PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); -DATA(insert OID = 354 ( btfloat4cmp PGUID 11 f t f 2 f 23 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 355 ( btfloat8cmp PGUID 11 f t f 2 f 23 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 356 ( btoidcmp PGUID 11 f t f 2 f 23 "26 26" 100 0 0 100 foo bar )); -DATA(insert OID = 357 ( btabstimecmp PGUID 11 f t f 2 f 23 "702 702" 100 0 0 100 foo bar )); -DATA(insert OID = 358 ( btcharcmp PGUID 11 f t f 2 f 23 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 359 ( btnamecmp PGUID 11 f t f 2 f 23 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 360 ( bttextcmp PGUID 11 f t f 2 f 23 "25 25" 100 0 0 100 foo bar )); - -DATA(insert OID = 361 ( lseg_distance PGUID 11 f t f 2 f 701 "601 601" 100 0 0 100 foo bar )); -DATA(insert OID = 362 ( lseg_interpt PGUID 11 f t f 2 f 600 "601 601" 100 0 0 100 foo bar )); -DATA(insert OID = 363 ( dist_ps PGUID 11 f t f 2 f 701 "600 601" 100 0 0 100 foo bar )); -DATA(insert OID = 364 ( dist_pb PGUID 11 f t f 2 f 701 "600 603" 100 0 0 100 foo bar )); -DATA(insert OID = 365 ( dist_sb PGUID 11 f t f 2 f 701 "601 603" 100 0 0 100 foo bar )); -DATA(insert OID = 366 ( close_ps PGUID 11 f t f 2 f 600 "600 601" 100 0 0 100 foo bar )); -DATA(insert OID = 367 ( close_pb PGUID 11 f t f 2 f 600 "600 603" 100 0 0 100 foo bar )); -DATA(insert OID = 368 ( close_sb PGUID 11 f t f 2 f 600 "601 603" 100 0 0 100 foo bar )); -DATA(insert OID = 369 ( on_ps PGUID 11 f t f 2 f 16 "600 601" 100 0 0 100 foo bar )); -DATA(insert OID = 370 ( path_distance PGUID 11 f t f 2 f 701 "602 602" 100 0 1 0 foo bar )); -DATA(insert OID = 371 ( dist_ppath PGUID 11 f t f 2 f 701 "600 602" 100 0 1 0 foo bar )); -DATA(insert OID = 372 ( on_sb PGUID 11 f t f 2 f 16 "601 603" 100 0 0 100 foo bar )); -DATA(insert OID = 373 ( inter_sb PGUID 11 f t f 2 f 16 "601 603" 100 0 0 100 foo bar )); -DATA(insert OID = 1274 ( btchar16cmp PGUID 11 f t f 2 f 23 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 346 ( poly_overlap PGUID 11 f t f 2 f 16 "604 604" 100 0 1 0 foo bar )); +DATA(insert OID = 347 ( poly_in PGUID 11 f t f 1 f 604 "0" 100 0 1 0 foo bar )); +DATA(insert OID = 348 ( poly_out PGUID 11 f t f 1 f 23 "0" 100 0 1 0 foo bar )); + +DATA(insert OID = 350 ( btint2cmp PGUID 11 f t f 2 f 23 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 351 ( btint4cmp PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 352 ( btint42cmp PGUID 11 f t f 2 f 23 "23 21" 100 0 0 100 foo bar )); +DATA(insert OID = 353 ( btint24cmp PGUID 11 f t f 2 f 23 "21 23" 100 0 0 100 foo bar )); +DATA(insert OID = 354 ( btfloat4cmp PGUID 11 f t f 2 f 23 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 355 ( btfloat8cmp PGUID 11 f t f 2 f 23 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 356 ( btoidcmp PGUID 11 f t f 2 f 23 "26 26" 100 0 0 100 foo bar )); +DATA(insert OID = 357 ( btabstimecmp PGUID 11 f t f 2 f 23 "702 702" 100 0 0 100 foo bar )); +DATA(insert OID = 358 ( btcharcmp PGUID 11 f t f 2 f 23 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 359 ( btnamecmp PGUID 11 f t f 2 f 23 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 360 ( bttextcmp PGUID 11 f t f 2 f 23 "25 25" 100 0 0 100 foo bar )); + +DATA(insert OID = 361 ( lseg_distance PGUID 11 f t f 2 f 701 "601 601" 100 0 0 100 foo bar )); +DATA(insert OID = 362 ( lseg_interpt PGUID 11 f t f 2 f 600 "601 601" 100 0 0 100 foo bar )); +DATA(insert OID = 363 ( dist_ps PGUID 11 f t f 2 f 701 "600 601" 100 0 0 100 foo bar )); +DATA(insert OID = 364 ( dist_pb PGUID 11 f t f 2 f 701 "600 603" 100 0 0 100 foo bar )); +DATA(insert OID = 365 ( dist_sb PGUID 11 f t f 2 f 701 "601 603" 100 0 0 100 foo bar )); +DATA(insert OID = 366 ( close_ps PGUID 11 f t f 2 f 600 "600 601" 100 0 0 100 foo bar )); +DATA(insert OID = 367 ( close_pb PGUID 11 f t f 2 f 600 "600 603" 100 0 0 100 foo bar )); +DATA(insert OID = 368 ( close_sb PGUID 11 f t f 2 f 600 "601 603" 100 0 0 100 foo bar )); +DATA(insert OID = 369 ( on_ps PGUID 11 f t f 2 f 16 "600 601" 100 0 0 100 foo bar )); +DATA(insert OID = 370 ( path_distance PGUID 11 f t f 2 f 701 "602 602" 100 0 1 0 foo bar )); +DATA(insert OID = 371 ( dist_ppath PGUID 11 f t f 2 f 701 "600 602" 100 0 1 0 foo bar )); +DATA(insert OID = 372 ( on_sb PGUID 11 f t f 2 f 16 "601 603" 100 0 0 100 foo bar )); +DATA(insert OID = 373 ( inter_sb PGUID 11 f t f 2 f 16 "601 603" 100 0 0 100 foo bar )); +DATA(insert OID = 1274 ( btchar16cmp PGUID 11 f t f 2 f 23 "19 19" 100 0 0 100 foo bar )); /* OIDS 400 - 499 */ -DATA(insert OID = 438 ( hashsel PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); -DATA(insert OID = 439 ( hashnpage PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); - -DATA(insert OID = 440 ( hashgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 441 ( hashinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 442 ( hashdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 443 ( hashbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 444 ( hashrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 445 ( hashendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 446 ( hashmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 447 ( hashrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 448 ( hashbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 449 ( hashint2 PGUID 11 f t f 2 f 23 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 450 ( hashint4 PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 451 ( hashfloat4 PGUID 11 f t f 2 f 23 "700 700" 100 0 0 100 foo bar )); -DATA(insert OID = 452 ( hashfloat8 PGUID 11 f t f 2 f 23 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 453 ( hashoid PGUID 11 f t f 2 f 23 "26 26" 100 0 0 100 foo bar )); -DATA(insert OID = 454 ( hashchar PGUID 11 f t f 2 f 23 "18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 455 ( hashname PGUID 11 f t f 2 f 23 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 456 ( hashtext PGUID 11 f t f 2 f 23 "25 25" 100 0 0 100 foo bar )); -DATA(insert OID = 466 ( char2in PGUID 11 f t f 1 f 409 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 467 ( char4in PGUID 11 f t f 1 f 410 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 468 ( char8in PGUID 11 f t f 1 f 411 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 469 ( char2out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 470 ( char4out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 471 ( char8out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 472 ( char2eq PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); -DATA(insert OID = 473 ( char4eq PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); -DATA(insert OID = 474 ( char8eq PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); -DATA(insert OID = 475 ( char2lt PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); -DATA(insert OID = 476 ( char4lt PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); -DATA(insert OID = 477 ( char8lt PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); -DATA(insert OID = 478 ( char2le PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); -DATA(insert OID = 479 ( char4le PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); -DATA(insert OID = 480 ( char8le PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); -DATA(insert OID = 481 ( char2gt PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); -DATA(insert OID = 482 ( char4gt PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); -DATA(insert OID = 483 ( char8gt PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); -DATA(insert OID = 484 ( char2ge PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); -DATA(insert OID = 1275 ( char16eq PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 438 ( hashsel PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); +DATA(insert OID = 439 ( hashnpage PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); + +DATA(insert OID = 440 ( hashgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 441 ( hashinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 442 ( hashdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 443 ( hashbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 444 ( hashrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 445 ( hashendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 446 ( hashmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 447 ( hashrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 448 ( hashbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 449 ( hashint2 PGUID 11 f t f 2 f 23 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 450 ( hashint4 PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 451 ( hashfloat4 PGUID 11 f t f 2 f 23 "700 700" 100 0 0 100 foo bar )); +DATA(insert OID = 452 ( hashfloat8 PGUID 11 f t f 2 f 23 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 453 ( hashoid PGUID 11 f t f 2 f 23 "26 26" 100 0 0 100 foo bar )); +DATA(insert OID = 454 ( hashchar PGUID 11 f t f 2 f 23 "18 18" 100 0 0 100 foo bar )); +DATA(insert OID = 455 ( hashname PGUID 11 f t f 2 f 23 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 456 ( hashtext PGUID 11 f t f 2 f 23 "25 25" 100 0 0 100 foo bar )); +DATA(insert OID = 466 ( char2in PGUID 11 f t f 1 f 409 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 467 ( char4in PGUID 11 f t f 1 f 410 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 468 ( char8in PGUID 11 f t f 1 f 411 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 469 ( char2out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 470 ( char4out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 471 ( char8out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 472 ( char2eq PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); +DATA(insert OID = 473 ( char4eq PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); +DATA(insert OID = 474 ( char8eq PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); +DATA(insert OID = 475 ( char2lt PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); +DATA(insert OID = 476 ( char4lt PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); +DATA(insert OID = 477 ( char8lt PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); +DATA(insert OID = 478 ( char2le PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); +DATA(insert OID = 479 ( char4le PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); +DATA(insert OID = 480 ( char8le PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); +DATA(insert OID = 481 ( char2gt PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); +DATA(insert OID = 482 ( char4gt PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); +DATA(insert OID = 483 ( char8gt PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); +DATA(insert OID = 484 ( char2ge PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); +DATA(insert OID = 1275 ( char16eq PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); #define Character16EqualRegProcedure 1275 -DATA(insert OID = 1276 ( char16lt PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 1277 ( char16le PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 1278 ( char16gt PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 1279 ( char16ge PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 1280 ( char16ne PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 1276 ( char16lt PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 1277 ( char16le PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 1278 ( char16gt PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 1279 ( char16ge PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 1280 ( char16ne PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 1281 ( hashchar16 PGUID 11 f t f 2 f 23 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 1281 ( hashchar16 PGUID 11 f t f 2 f 23 "19 19" 100 0 0 100 foo bar )); /* OIDS 500 - 599 */ /* OIDS 600 - 699 */ -DATA(insert OID = 1285 ( int4notin PGUID 11 f t f 2 f 16 "21 0" 100 0 0 100 foo bar )); -DATA(insert OID = 1286 ( oidnotin PGUID 11 f t f 2 f 16 "26 0" 100 0 0 100 foo bar )); -DATA(insert OID = 1287 ( int44in PGUID 11 f t f 1 f 22 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 653 ( int44out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 655 ( namelt PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 656 ( namele PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 657 ( namegt PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 658 ( namege PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 659 ( namene PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); -DATA(insert OID = 682 ( mktinterval PGUID 11 f t f 2 f 704 "702 702" 100 0 0 100 foo bar )); -DATA(insert OID = 683 ( oid8eq PGUID 11 f t f 2 f 16 "30 30" 100 0 0 100 foo bar )); -DATA(insert OID = 684 ( char4ge PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); -DATA(insert OID = 685 ( char8ge PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); -DATA(insert OID = 686 ( char2ne PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); -DATA(insert OID = 687 ( char4ne PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); -DATA(insert OID = 688 ( char8ne PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); -DATA(insert OID = 689 ( btchar2cmp PGUID 11 f t f 2 f 23 "409 409" 100 0 0 100 foo bar )); -DATA(insert OID = 690 ( btchar4cmp PGUID 11 f t f 2 f 23 "410 410" 100 0 0 100 foo bar )); -DATA(insert OID = 691 ( btchar8cmp PGUID 11 f t f 2 f 23 "411 411" 100 0 0 100 foo bar )); -DATA(insert OID = 692 ( hashchar2 PGUID 11 f t f 2 f 23 "409 409" 100 0 0 100 foo bar )); -DATA(insert OID = 693 ( hashchar4 PGUID 11 f t f 2 f 23 "410 410" 100 0 0 100 foo bar )); -DATA(insert OID = 694 ( hashchar8 PGUID 11 f t f 2 f 23 "411 411" 100 0 0 100 foo bar )); -DATA(insert OID = 695 ( char8regexeq PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); -DATA(insert OID = 696 ( char8regexne PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); -DATA(insert OID = 699 ( char2regexeq PGUID 11 f t f 2 f 16 "409 25" 100 0 0 100 foo bar )); +DATA(insert OID = 1285 ( int4notin PGUID 11 f t f 2 f 16 "21 0" 100 0 0 100 foo bar )); +DATA(insert OID = 1286 ( oidnotin PGUID 11 f t f 2 f 16 "26 0" 100 0 0 100 foo bar )); +DATA(insert OID = 1287 ( int44in PGUID 11 f t f 1 f 22 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 653 ( int44out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 655 ( namelt PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 656 ( namele PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 657 ( namegt PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 658 ( namege PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 659 ( namene PGUID 11 f t f 2 f 16 "19 19" 100 0 0 100 foo bar )); +DATA(insert OID = 682 ( mktinterval PGUID 11 f t f 2 f 704 "702 702" 100 0 0 100 foo bar )); +DATA(insert OID = 683 ( oid8eq PGUID 11 f t f 2 f 16 "30 30" 100 0 0 100 foo bar )); +DATA(insert OID = 684 ( char4ge PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); +DATA(insert OID = 685 ( char8ge PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); +DATA(insert OID = 686 ( char2ne PGUID 11 f t f 2 f 16 "409 409" 100 0 0 100 foo bar )); +DATA(insert OID = 687 ( char4ne PGUID 11 f t f 2 f 16 "410 410" 100 0 0 100 foo bar )); +DATA(insert OID = 688 ( char8ne PGUID 11 f t f 2 f 16 "411 411" 100 0 0 100 foo bar )); +DATA(insert OID = 689 ( btchar2cmp PGUID 11 f t f 2 f 23 "409 409" 100 0 0 100 foo bar )); +DATA(insert OID = 690 ( btchar4cmp PGUID 11 f t f 2 f 23 "410 410" 100 0 0 100 foo bar )); +DATA(insert OID = 691 ( btchar8cmp PGUID 11 f t f 2 f 23 "411 411" 100 0 0 100 foo bar )); +DATA(insert OID = 692 ( hashchar2 PGUID 11 f t f 2 f 23 "409 409" 100 0 0 100 foo bar )); +DATA(insert OID = 693 ( hashchar4 PGUID 11 f t f 2 f 23 "410 410" 100 0 0 100 foo bar )); +DATA(insert OID = 694 ( hashchar8 PGUID 11 f t f 2 f 23 "411 411" 100 0 0 100 foo bar )); +DATA(insert OID = 695 ( char8regexeq PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); +DATA(insert OID = 696 ( char8regexne PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); +DATA(insert OID = 699 ( char2regexeq PGUID 11 f t f 2 f 16 "409 25" 100 0 0 100 foo bar )); /* OIDS 700 - 799 */ DATA(insert OID = 1288 ( char16regexeq PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); DATA(insert OID = 1289 ( char16regexne PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); -DATA(insert OID = 710 ( getpgusername PGUID 11 f t f 0 f 19 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 711 ( userfntest PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 713 ( oidrand PGUID 11 f t f 2 f 16 "26 23" 100 0 0 100 foo bar )); -DATA(insert OID = 715 ( oidsrand PGUID 11 f t f 1 f 16 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 716 ( oideqint4 PGUID 11 f t f 2 f 16 "26 23" 100 0 0 100 foo bar )); -DATA(insert OID = 717 ( int4eqoid PGUID 11 f t f 2 f 16 "23 26" 100 0 0 100 foo bar )); +DATA(insert OID = 710 ( getpgusername PGUID 11 f t f 0 f 19 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 711 ( userfntest PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 713 ( oidrand PGUID 11 f t f 2 f 16 "26 23" 100 0 0 100 foo bar )); +DATA(insert OID = 715 ( oidsrand PGUID 11 f t f 1 f 16 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 716 ( oideqint4 PGUID 11 f t f 2 f 16 "26 23" 100 0 0 100 foo bar )); +DATA(insert OID = 717 ( int4eqoid PGUID 11 f t f 2 f 16 "23 26" 100 0 0 100 foo bar )); DATA(insert OID = 720 ( byteaGetSize PGUID 11 f t f 1 f 23 "17" 100 0 0 100 foo bar )); DATA(insert OID = 721 ( byteaGetByte PGUID 11 f t f 2 f 23 "17 23" 100 0 0 100 foo bar )); @@ -564,300 +565,300 @@ DATA(insert OID = 722 ( byteaSetByte PGUID 11 f t f 3 f 17 "17 23 23" 100 0 DATA(insert OID = 723 ( byteaGetBit PGUID 11 f t f 2 f 23 "17 23" 100 0 0 100 foo bar )); DATA(insert OID = 724 ( byteaSetBit PGUID 11 f t f 3 f 17 "17 23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 725 ( dist_pl PGUID 11 f t f 2 f 701 "600 628" 100 0 0 100 foo bar )); -DATA(insert OID = 726 ( dist_lb PGUID 11 f t f 2 f 701 "628 603" 100 0 0 100 foo bar )); -DATA(insert OID = 727 ( dist_sl PGUID 11 f t f 2 f 701 "601 628" 100 0 0 100 foo bar )); -DATA(insert OID = 728 ( dist_cpoly PGUID 11 f t f 2 f 701 "718 604" 100 0 0 100 foo bar )); -DATA(insert OID = 729 ( poly_distance PGUID 11 f t f 2 f 701 "604 604" 100 0 0 100 foo bar )); - -DATA(insert OID = 730 ( pqtest PGUID 11 f t f 1 f 23 "25" 100 0 0 100 foo bar )); - -DATA(insert OID = 740 ( text_lt PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); -DATA(insert OID = 741 ( text_le PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); -DATA(insert OID = 742 ( text_gt PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); -DATA(insert OID = 743 ( text_ge PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); - -DATA(insert OID = 744 ( array_eq PGUID 11 f t f 2 f 16 "0 0" 100 0 0 100 foo bar)); -DATA(insert OID = 745 ( array_assgn PGUID 11 f t f 8 f 23 "0 23 0 0 0 23 23 0" 100 0 0 100 foo bar)); -DATA(insert OID = 746 ( array_clip PGUID 11 f t f 7 f 23 "0 23 0 0 23 23 0" 100 0 0 100 foo bar)); -DATA(insert OID = 747 ( array_dims PGUID 11 f t f 1 f 25 "0" 100 0 0 100 foo bar)); -DATA(insert OID = 748 ( array_set PGUID 11 f t f 8 f 23 "0 23 0 0 23 23 23 0" 100 0 0 100 foo bar)); -DATA(insert OID = 749 ( array_ref PGUID 11 f t f 7 f 23 "0 23 0 23 23 23 0" 100 0 0 100 foo bar)); -DATA(insert OID = 750 ( array_in PGUID 11 f t f 2 f 23 "0 0" 100 0 0 100 foo bar )); -DATA(insert OID = 751 ( array_out PGUID 11 f t f 2 f 23 "0 0" 100 0 0 100 foo bar )); - -DATA(insert OID = 752 ( filename_in PGUID 11 f t f 2 f 605 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 753 ( filename_out PGUID 11 f t f 2 f 19 "0" 100 0 0 100 foo bar )); - -DATA(insert OID = 760 ( smgrin PGUID 11 f t f 1 f 210 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 761 ( smgrout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 762 ( smgreq PGUID 11 f t f 2 f 16 "210 210" 100 0 0 100 foo bar )); -DATA(insert OID = 763 ( smgrne PGUID 11 f t f 2 f 16 "210 210" 100 0 0 100 foo bar )); - -DATA(insert OID = 764 ( lo_import PGUID 11 f t f 1 f 26 "25" 100 0 0 100 foo bar )); -DATA(insert OID = 765 ( lo_export PGUID 11 f t f 2 f 23 "26 25" 100 0 0 100 foo bar )); - -DATA(insert OID = 766 ( int4inc PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 767 ( int2inc PGUID 11 f t f 1 f 21 "21" 100 0 0 100 foo bar )); -DATA(insert OID = 768 ( int4larger PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 769 ( int4smaller PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 770 ( int2larger PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 771 ( int2smaller PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); -DATA(insert OID = 772 ( gistsel PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); -DATA(insert OID = 773 ( gistnpage PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); -DATA(insert OID = 774 ( gistgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 775 ( gistinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 776 ( gistdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 777 ( gistbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 778 ( gistrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 779 ( gistendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 780 ( gistmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 781 ( gistrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 782 ( gistbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 725 ( dist_pl PGUID 11 f t f 2 f 701 "600 628" 100 0 0 100 foo bar )); +DATA(insert OID = 726 ( dist_lb PGUID 11 f t f 2 f 701 "628 603" 100 0 0 100 foo bar )); +DATA(insert OID = 727 ( dist_sl PGUID 11 f t f 2 f 701 "601 628" 100 0 0 100 foo bar )); +DATA(insert OID = 728 ( dist_cpoly PGUID 11 f t f 2 f 701 "718 604" 100 0 0 100 foo bar )); +DATA(insert OID = 729 ( poly_distance PGUID 11 f t f 2 f 701 "604 604" 100 0 0 100 foo bar )); + +DATA(insert OID = 730 ( pqtest PGUID 11 f t f 1 f 23 "25" 100 0 0 100 foo bar )); + +DATA(insert OID = 740 ( text_lt PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); +DATA(insert OID = 741 ( text_le PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); +DATA(insert OID = 742 ( text_gt PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); +DATA(insert OID = 743 ( text_ge PGUID 11 f t f 2 f 16 "25 25" 100 0 0 0 foo bar )); + +DATA(insert OID = 744 ( array_eq PGUID 11 f t f 2 f 16 "0 0" 100 0 0 100 foo bar)); +DATA(insert OID = 745 ( array_assgn PGUID 11 f t f 8 f 23 "0 23 0 0 0 23 23 0" 100 0 0 100 foo bar)); +DATA(insert OID = 746 ( array_clip PGUID 11 f t f 7 f 23 "0 23 0 0 23 23 0" 100 0 0 100 foo bar)); +DATA(insert OID = 747 ( array_dims PGUID 11 f t f 1 f 25 "0" 100 0 0 100 foo bar)); +DATA(insert OID = 748 ( array_set PGUID 11 f t f 8 f 23 "0 23 0 0 23 23 23 0" 100 0 0 100 foo bar)); +DATA(insert OID = 749 ( array_ref PGUID 11 f t f 7 f 23 "0 23 0 23 23 23 0" 100 0 0 100 foo bar)); +DATA(insert OID = 750 ( array_in PGUID 11 f t f 2 f 23 "0 0" 100 0 0 100 foo bar )); +DATA(insert OID = 751 ( array_out PGUID 11 f t f 2 f 23 "0 0" 100 0 0 100 foo bar )); + +DATA(insert OID = 752 ( filename_in PGUID 11 f t f 2 f 605 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 753 ( filename_out PGUID 11 f t f 2 f 19 "0" 100 0 0 100 foo bar )); + +DATA(insert OID = 760 ( smgrin PGUID 11 f t f 1 f 210 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 761 ( smgrout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 762 ( smgreq PGUID 11 f t f 2 f 16 "210 210" 100 0 0 100 foo bar )); +DATA(insert OID = 763 ( smgrne PGUID 11 f t f 2 f 16 "210 210" 100 0 0 100 foo bar )); + +DATA(insert OID = 764 ( lo_import PGUID 11 f t f 1 f 26 "25" 100 0 0 100 foo bar )); +DATA(insert OID = 765 ( lo_export PGUID 11 f t f 2 f 23 "26 25" 100 0 0 100 foo bar )); + +DATA(insert OID = 766 ( int4inc PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 767 ( int2inc PGUID 11 f t f 1 f 21 "21" 100 0 0 100 foo bar )); +DATA(insert OID = 768 ( int4larger PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 769 ( int4smaller PGUID 11 f t f 2 f 23 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 770 ( int2larger PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 771 ( int2smaller PGUID 11 f t f 2 f 21 "21 21" 100 0 0 100 foo bar )); +DATA(insert OID = 772 ( gistsel PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); +DATA(insert OID = 773 ( gistnpage PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar )); +DATA(insert OID = 774 ( gistgettuple PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 775 ( gistinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 776 ( gistdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 777 ( gistbeginscan PGUID 11 f t f 4 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 778 ( gistrescan PGUID 11 f t f 3 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 779 ( gistendscan PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 780 ( gistmarkpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 781 ( gistrestrpos PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 782 ( gistbuild PGUID 11 f t f 9 f 23 "0" 100 0 0 100 foo bar )); /* OIDS 800 - 899 */ -DATA(insert OID = 820 ( oidint2in PGUID 11 f t f 1 f 810 "0" 100 0 0 100 foo bar)); -DATA(insert OID = 821 ( oidint2out PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar)); -DATA(insert OID = 822 ( oidint2lt PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); -DATA(insert OID = 823 ( oidint2le PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); -DATA(insert OID = 824 ( oidint2eq PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); +DATA(insert OID = 820 ( oidint2in PGUID 11 f t f 1 f 810 "0" 100 0 0 100 foo bar)); +DATA(insert OID = 821 ( oidint2out PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar)); +DATA(insert OID = 822 ( oidint2lt PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); +DATA(insert OID = 823 ( oidint2le PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); +DATA(insert OID = 824 ( oidint2eq PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); #define OidInt2EqRegProcedure 824 -DATA(insert OID = 825 ( oidint2ge PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); -DATA(insert OID = 826 ( oidint2gt PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); -DATA(insert OID = 827 ( oidint2ne PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); -DATA(insert OID = 828 ( oidint2cmp PGUID 11 f t f 2 f 21 "810 810" 100 0 0 100 foo bar)); -DATA(insert OID = 829 ( mkoidint2 PGUID 11 f t f 2 f 810 "26 21" 100 0 0 100 foo bar)); - -DATA(insert OID = 837 ( char2regexne PGUID 11 f t f 2 f 16 "409 25" 100 0 0 100 foo bar )); -DATA(insert OID = 836 ( char4regexeq PGUID 11 f t f 2 f 16 "410 25" 100 0 0 100 foo bar )); -DATA(insert OID = 838 ( char4regexne PGUID 11 f t f 2 f 16 "410 25" 100 0 0 100 foo bar )); - -DATA(insert OID = 849 ( textpos PGUID 11 f t f 2 f 23 "25 25" 100 0 1 0 foo bar )); -DATA(insert OID = 850 ( textlike PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); -DATA(insert OID = 851 ( textnlike PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); -DATA(insert OID = 852 ( char2like PGUID 11 f t f 2 f 16 "409 25" 100 0 0 100 foo bar )); -DATA(insert OID = 853 ( char2nlike PGUID 11 f t f 2 f 16 "409 25" 100 0 0 100 foo bar )); -DATA(insert OID = 854 ( char4like PGUID 11 f t f 2 f 16 "410 25" 100 0 0 100 foo bar )); -DATA(insert OID = 855 ( char4nlike PGUID 11 f t f 2 f 16 "410 25" 100 0 0 100 foo bar )); -DATA(insert OID = 856 ( char8like PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); -DATA(insert OID = 857 ( char8nlike PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); -DATA(insert OID = 858 ( namelike PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); -DATA(insert OID = 859 ( namenlike PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); -DATA(insert OID = 860 ( char16like PGUID 11 f t f 2 f 16 "20 25" 100 0 0 100 foo bar )); -DATA(insert OID = 861 ( char16nlike PGUID 11 f t f 2 f 16 "20 25" 100 0 0 100 foo bar )); - -DATA(insert OID = 886 ( cash_in PGUID 11 f t f 1 f 790 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 887 ( cash_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 888 ( cash_eq PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 889 ( cash_ne PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 890 ( cash_lt PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 891 ( cash_le PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 892 ( cash_gt PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 893 ( cash_ge PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 894 ( cash_pl PGUID 11 f t f 2 f 790 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 895 ( cash_mi PGUID 11 f t f 2 f 790 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 896 ( cash_mul PGUID 11 f t f 2 f 790 "790 701" 100 0 0 100 foo bar )); -DATA(insert OID = 897 ( cash_div PGUID 11 f t f 2 f 790 "790 701" 100 0 0 100 foo bar )); -DATA(insert OID = 898 ( cashlarger PGUID 11 f t f 2 f 790 "790 790" 100 0 0 100 foo bar )); -DATA(insert OID = 899 ( cashsmaller PGUID 11 f t f 2 f 790 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 825 ( oidint2ge PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); +DATA(insert OID = 826 ( oidint2gt PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); +DATA(insert OID = 827 ( oidint2ne PGUID 11 f t f 2 f 16 "810 810" 100 0 0 100 foo bar)); +DATA(insert OID = 828 ( oidint2cmp PGUID 11 f t f 2 f 21 "810 810" 100 0 0 100 foo bar)); +DATA(insert OID = 829 ( mkoidint2 PGUID 11 f t f 2 f 810 "26 21" 100 0 0 100 foo bar)); + +DATA(insert OID = 837 ( char2regexne PGUID 11 f t f 2 f 16 "409 25" 100 0 0 100 foo bar )); +DATA(insert OID = 836 ( char4regexeq PGUID 11 f t f 2 f 16 "410 25" 100 0 0 100 foo bar )); +DATA(insert OID = 838 ( char4regexne PGUID 11 f t f 2 f 16 "410 25" 100 0 0 100 foo bar )); + +DATA(insert OID = 849 ( textpos PGUID 11 f t f 2 f 23 "25 25" 100 0 1 0 foo bar )); +DATA(insert OID = 850 ( textlike PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); +DATA(insert OID = 851 ( textnlike PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); +DATA(insert OID = 852 ( char2like PGUID 11 f t f 2 f 16 "409 25" 100 0 0 100 foo bar )); +DATA(insert OID = 853 ( char2nlike PGUID 11 f t f 2 f 16 "409 25" 100 0 0 100 foo bar )); +DATA(insert OID = 854 ( char4like PGUID 11 f t f 2 f 16 "410 25" 100 0 0 100 foo bar )); +DATA(insert OID = 855 ( char4nlike PGUID 11 f t f 2 f 16 "410 25" 100 0 0 100 foo bar )); +DATA(insert OID = 856 ( char8like PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); +DATA(insert OID = 857 ( char8nlike PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); +DATA(insert OID = 858 ( namelike PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); +DATA(insert OID = 859 ( namenlike PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); +DATA(insert OID = 860 ( char16like PGUID 11 f t f 2 f 16 "20 25" 100 0 0 100 foo bar )); +DATA(insert OID = 861 ( char16nlike PGUID 11 f t f 2 f 16 "20 25" 100 0 0 100 foo bar )); + +DATA(insert OID = 886 ( cash_in PGUID 11 f t f 1 f 790 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 887 ( cash_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 888 ( cash_eq PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 889 ( cash_ne PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 890 ( cash_lt PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 891 ( cash_le PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 892 ( cash_gt PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 893 ( cash_ge PGUID 11 f t f 2 f 16 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 894 ( cash_pl PGUID 11 f t f 2 f 790 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 895 ( cash_mi PGUID 11 f t f 2 f 790 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 896 ( cash_mul PGUID 11 f t f 2 f 790 "790 701" 100 0 0 100 foo bar )); +DATA(insert OID = 897 ( cash_div PGUID 11 f t f 2 f 790 "790 701" 100 0 0 100 foo bar )); +DATA(insert OID = 898 ( cashlarger PGUID 11 f t f 2 f 790 "790 790" 100 0 0 100 foo bar )); +DATA(insert OID = 899 ( cashsmaller PGUID 11 f t f 2 f 790 "790 790" 100 0 0 100 foo bar )); /* OIDS 900 - 999 */ -DATA(insert OID = 920 ( oidint4in PGUID 11 f t f 1 f 910 "0" 100 0 0 100 foo bar)); -DATA(insert OID = 921 ( oidint4out PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar)); -DATA(insert OID = 922 ( oidint4lt PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); -DATA(insert OID = 923 ( oidint4le PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); -DATA(insert OID = 924 ( oidint4eq PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); +DATA(insert OID = 920 ( oidint4in PGUID 11 f t f 1 f 910 "0" 100 0 0 100 foo bar)); +DATA(insert OID = 921 ( oidint4out PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar)); +DATA(insert OID = 922 ( oidint4lt PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); +DATA(insert OID = 923 ( oidint4le PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); +DATA(insert OID = 924 ( oidint4eq PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); #define OidInt4EqRegProcedure 924 -DATA(insert OID = 925 ( oidint4ge PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); -DATA(insert OID = 926 ( oidint4gt PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); -DATA(insert OID = 927 ( oidint4ne PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); -DATA(insert OID = 928 ( oidint4cmp PGUID 11 f t f 2 f 23 "910 910" 100 0 0 100 foo bar)); -DATA(insert OID = 929 ( mkoidint4 PGUID 11 f t f 2 f 910 "26 23" 100 0 0 100 foo bar)); +DATA(insert OID = 925 ( oidint4ge PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); +DATA(insert OID = 926 ( oidint4gt PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); +DATA(insert OID = 927 ( oidint4ne PGUID 11 f t f 2 f 16 "910 910" 100 0 0 100 foo bar)); +DATA(insert OID = 928 ( oidint4cmp PGUID 11 f t f 2 f 23 "910 910" 100 0 0 100 foo bar)); +DATA(insert OID = 929 ( mkoidint4 PGUID 11 f t f 2 f 910 "26 23" 100 0 0 100 foo bar)); /* isoldpath, upgradepath, upgradepoly, revertpoly are used to update pre-v6.1 to v6.1 - tgl 97/06/03 */ -DATA(insert OID = 936 ( isoldpath PGUID 11 f t f 1 f 16 "602" 100 0 0 100 foo bar )); -DATA(insert OID = 937 ( upgradepath PGUID 11 f t f 1 f 602 "602" 100 0 0 100 foo bar )); -DATA(insert OID = 938 ( upgradepoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 foo bar )); -DATA(insert OID = 939 ( revertpoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 foo bar )); +DATA(insert OID = 936 ( isoldpath PGUID 11 f t f 1 f 16 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 937 ( upgradepath PGUID 11 f t f 1 f 602 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 938 ( upgradepoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 foo bar )); +DATA(insert OID = 939 ( revertpoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 foo bar )); -DATA(insert OID = 940 ( oidnamein PGUID 11 f t f 1 f 911 "0" 100 0 0 100 foo bar)); -DATA(insert OID = 941 ( oidnameout PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar)); -DATA(insert OID = 942 ( oidnamelt PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); -DATA(insert OID = 943 ( oidnamele PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); -DATA(insert OID = 944 ( oidnameeq PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); +DATA(insert OID = 940 ( oidnamein PGUID 11 f t f 1 f 911 "0" 100 0 0 100 foo bar)); +DATA(insert OID = 941 ( oidnameout PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar)); +DATA(insert OID = 942 ( oidnamelt PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); +DATA(insert OID = 943 ( oidnamele PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); +DATA(insert OID = 944 ( oidnameeq PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); #define OidNameEqRegProcedure 944 -DATA(insert OID = 945 ( oidnamege PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); -DATA(insert OID = 946 ( oidnamegt PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); -DATA(insert OID = 947 ( oidnamene PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); -DATA(insert OID = 948 ( oidnamecmp PGUID 11 f t f 2 f 23 "911 911" 100 0 0 100 foo bar)); -DATA(insert OID = 949 ( mkoidname PGUID 11 f t f 2 f 911 "26 19" 100 0 0 100 foo bar)); - -DATA(insert OID = 952 ( lo_open PGUID 11 f t f 2 f 23 "26 23" 100 0 0 100 foo bar )); -DATA(insert OID = 953 ( lo_close PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 954 ( loread PGUID 11 f t f 2 f 17 "23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 955 ( lowrite PGUID 11 f t f 2 f 23 "23 17" 100 0 0 100 foo bar )); -DATA(insert OID = 956 ( lo_lseek PGUID 11 f t f 3 f 23 "23 23 23" 100 0 0 100 foo bar )); -DATA(insert OID = 957 ( lo_creat PGUID 11 f t f 1 f 26 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 958 ( lo_tell PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); - -DATA(insert OID = 959 ( on_pl PGUID 11 f t f 2 f 16 "600 628" 100 0 10 100 foo bar )); -DATA(insert OID = 960 ( on_sl PGUID 11 f t f 2 f 16 "601 628" 100 0 10 100 foo bar )); -DATA(insert OID = 961 ( close_pl PGUID 11 f t f 2 f 600 "600 628" 100 0 10 100 foo bar )); -DATA(insert OID = 962 ( close_sl PGUID 11 f t f 2 f 600 "601 628" 100 0 10 100 foo bar )); -DATA(insert OID = 963 ( close_lb PGUID 11 f t f 2 f 600 "628 603" 100 0 10 100 foo bar )); - -DATA(insert OID = 964 ( lo_unlink PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); -DATA(insert OID = 972 ( regproctooid PGUID 11 f t f 1 f 26 "24" 100 0 0 100 foo bar )); - -DATA(insert OID = 973 ( path_inter PGUID 11 f t f 2 f 16 "602 602" 100 0 10 100 foo bar )); -DATA(insert OID = 975 ( box_area PGUID 11 f t f 1 f 701 "603" 100 0 0 100 foo bar )); -DATA(insert OID = 976 ( box_width PGUID 11 f t f 1 f 701 "603" 100 0 0 100 foo bar )); -DATA(insert OID = 977 ( box_height PGUID 11 f t f 1 f 701 "603" 100 0 0 100 foo bar )); -DATA(insert OID = 978 ( box_distance PGUID 11 f t f 2 f 701 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 980 ( box_intersect PGUID 11 f t f 2 f 603 "603 603" 100 0 0 100 foo bar )); -DATA(insert OID = 981 ( box_diagonal PGUID 11 f t f 1 f 601 "603" 100 0 0 100 foo bar )); -DATA(insert OID = 982 ( path_n_lt PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); -DATA(insert OID = 983 ( path_n_gt PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); -DATA(insert OID = 984 ( path_n_eq PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); -DATA(insert OID = 985 ( path_n_le PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); -DATA(insert OID = 986 ( path_n_ge PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); -DATA(insert OID = 987 ( path_length PGUID 11 f t f 1 f 701 "602" 100 0 1 0 foo bar )); -DATA(insert OID = 989 ( point_vert PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 990 ( point_horiz PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 945 ( oidnamege PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); +DATA(insert OID = 946 ( oidnamegt PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); +DATA(insert OID = 947 ( oidnamene PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); +DATA(insert OID = 948 ( oidnamecmp PGUID 11 f t f 2 f 23 "911 911" 100 0 0 100 foo bar)); +DATA(insert OID = 949 ( mkoidname PGUID 11 f t f 2 f 911 "26 19" 100 0 0 100 foo bar)); + +DATA(insert OID = 952 ( lo_open PGUID 11 f t f 2 f 23 "26 23" 100 0 0 100 foo bar )); +DATA(insert OID = 953 ( lo_close PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 954 ( loread PGUID 11 f t f 2 f 17 "23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 955 ( lowrite PGUID 11 f t f 2 f 23 "23 17" 100 0 0 100 foo bar )); +DATA(insert OID = 956 ( lo_lseek PGUID 11 f t f 3 f 23 "23 23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 957 ( lo_creat PGUID 11 f t f 1 f 26 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 958 ( lo_tell PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); + +DATA(insert OID = 959 ( on_pl PGUID 11 f t f 2 f 16 "600 628" 100 0 10 100 foo bar )); +DATA(insert OID = 960 ( on_sl PGUID 11 f t f 2 f 16 "601 628" 100 0 10 100 foo bar )); +DATA(insert OID = 961 ( close_pl PGUID 11 f t f 2 f 600 "600 628" 100 0 10 100 foo bar )); +DATA(insert OID = 962 ( close_sl PGUID 11 f t f 2 f 600 "601 628" 100 0 10 100 foo bar )); +DATA(insert OID = 963 ( close_lb PGUID 11 f t f 2 f 600 "628 603" 100 0 10 100 foo bar )); + +DATA(insert OID = 964 ( lo_unlink PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar )); +DATA(insert OID = 972 ( regproctooid PGUID 11 f t f 1 f 26 "24" 100 0 0 100 foo bar )); + +DATA(insert OID = 973 ( path_inter PGUID 11 f t f 2 f 16 "602 602" 100 0 10 100 foo bar )); +DATA(insert OID = 975 ( box_area PGUID 11 f t f 1 f 701 "603" 100 0 0 100 foo bar )); +DATA(insert OID = 976 ( box_width PGUID 11 f t f 1 f 701 "603" 100 0 0 100 foo bar )); +DATA(insert OID = 977 ( box_height PGUID 11 f t f 1 f 701 "603" 100 0 0 100 foo bar )); +DATA(insert OID = 978 ( box_distance PGUID 11 f t f 2 f 701 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 980 ( box_intersect PGUID 11 f t f 2 f 603 "603 603" 100 0 0 100 foo bar )); +DATA(insert OID = 981 ( box_diagonal PGUID 11 f t f 1 f 601 "603" 100 0 0 100 foo bar )); +DATA(insert OID = 982 ( path_n_lt PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); +DATA(insert OID = 983 ( path_n_gt PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); +DATA(insert OID = 984 ( path_n_eq PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); +DATA(insert OID = 985 ( path_n_le PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); +DATA(insert OID = 986 ( path_n_ge PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar )); +DATA(insert OID = 987 ( path_length PGUID 11 f t f 1 f 701 "602" 100 0 1 0 foo bar )); +DATA(insert OID = 989 ( point_vert PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 990 ( point_horiz PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar )); DATA(insert OID = 991 ( point_distance PGUID 11 f t f 2 f 701 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 992 ( point_slope PGUID 11 f t f 2 f 701 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 992 ( point_slope PGUID 11 f t f 2 f 701 "600 600" 100 0 0 100 foo bar )); DATA(insert OID = 993 ( lseg_construct PGUID 11 f t f 2 f 601 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 994 ( lseg_intersect PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar )); -DATA(insert OID = 995 ( lseg_parallel PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar )); -DATA(insert OID = 996 ( lseg_perp PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar )); -DATA(insert OID = 997 ( lseg_vertical PGUID 11 f t f 1 f 16 "601" 100 0 0 100 foo bar )); -DATA(insert OID = 998 ( lseg_horizontal PGUID 11 f t f 1 f 16 "601" 100 0 0 100 foo bar )); -DATA(insert OID = 999 ( lseg_eq PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar )); +DATA(insert OID = 994 ( lseg_intersect PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar )); +DATA(insert OID = 995 ( lseg_parallel PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar )); +DATA(insert OID = 996 ( lseg_perp PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar )); +DATA(insert OID = 997 ( lseg_vertical PGUID 11 f t f 1 f 16 "601" 100 0 0 100 foo bar )); +DATA(insert OID = 998 ( lseg_horizontal PGUID 11 f t f 1 f 16 "601" 100 0 0 100 foo bar )); +DATA(insert OID = 999 ( lseg_eq PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar )); /* OIDS 1000 - 1999 */ -DATA(insert OID = 1029 ( nullvalue PGUID 11 f t f 1 f 16 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1029 ( nullvalue PGUID 11 f t f 1 f 16 "0" 100 0 0 100 foo bar )); #define NullValueRegProcedure 1029 -DATA(insert OID = 1030 ( nonnullvalue PGUID 11 f t f 1 f 16 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1030 ( nonnullvalue PGUID 11 f t f 1 f 16 "0" 100 0 0 100 foo bar )); #define NonNullValueRegProcedure 1030 -DATA(insert OID = 1031 ( aclitemin PGUID 11 f t f 1 f 1033 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1032 ( aclitemout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1035 ( aclinsert PGUID 11 f t f 2 f 1034 "1034 1033" 100 0 0 100 foo bar )); -DATA(insert OID = 1036 ( aclremove PGUID 11 f t f 2 f 1034 "1034 1033" 100 0 0 100 foo bar )); -DATA(insert OID = 1037 ( aclcontains PGUID 11 f t f 2 f 16 "1034 1033" 100 0 0 100 foo bar )); -DATA(insert OID = 1038 ( seteval PGUID 11 f t f 1 f 23 "26" 100 0 0 100 foo bar )); +DATA(insert OID = 1031 ( aclitemin PGUID 11 f t f 1 f 1033 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1032 ( aclitemout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1035 ( aclinsert PGUID 11 f t f 2 f 1034 "1034 1033" 100 0 0 100 foo bar )); +DATA(insert OID = 1036 ( aclremove PGUID 11 f t f 2 f 1034 "1034 1033" 100 0 0 100 foo bar )); +DATA(insert OID = 1037 ( aclcontains PGUID 11 f t f 2 f 16 "1034 1033" 100 0 0 100 foo bar )); +DATA(insert OID = 1038 ( seteval PGUID 11 f t f 1 f 23 "26" 100 0 0 100 foo bar )); #define SetEvalRegProcedure 1038 -DATA(insert OID = 1044 ( bpcharin PGUID 11 f t f 3 f 1042 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1045 ( bpcharout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1046 ( varcharin PGUID 11 f t f 3 f 1043 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1047 ( varcharout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1048 ( bpchareq PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); -DATA(insert OID = 1049 ( bpcharlt PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); -DATA(insert OID = 1050 ( bpcharle PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); -DATA(insert OID = 1051 ( bpchargt PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); -DATA(insert OID = 1052 ( bpcharge PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); -DATA(insert OID = 1053 ( bpcharne PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); -DATA(insert OID = 1070 ( varchareq PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); -DATA(insert OID = 1071 ( varcharlt PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); -DATA(insert OID = 1072 ( varcharle PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); -DATA(insert OID = 1073 ( varchargt PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); -DATA(insert OID = 1074 ( varcharge PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); -DATA(insert OID = 1075 ( varcharne PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); -DATA(insert OID = 1078 ( bpcharcmp PGUID 11 f t f 2 f 23 "1042 1042" 100 0 0 100 foo bar )); -DATA(insert OID = 1079 ( varcharcmp PGUID 11 f t f 2 f 23 "1043 1043" 100 0 0 100 foo bar )); -DATA(insert OID = 1080 ( hashbpchar PGUID 11 f t f 1 f 23 "1042" 100 0 0 100 foo bar )); -DATA(insert OID = 1081 ( hashvarchar PGUID 11 f t f 1 f 23 "1043" 100 0 0 100 foo bar )); - -DATA(insert OID = 1084 ( date_in PGUID 11 f t f 1 f 1082 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1085 ( date_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1086 ( date_eq PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1087 ( date_lt PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1088 ( date_le PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1089 ( date_gt PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1090 ( date_ge PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1091 ( date_ne PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1092 ( date_cmp PGUID 11 f t f 2 f 23 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1044 ( bpcharin PGUID 11 f t f 3 f 1042 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1045 ( bpcharout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1046 ( varcharin PGUID 11 f t f 3 f 1043 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1047 ( varcharout PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1048 ( bpchareq PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); +DATA(insert OID = 1049 ( bpcharlt PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); +DATA(insert OID = 1050 ( bpcharle PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); +DATA(insert OID = 1051 ( bpchargt PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); +DATA(insert OID = 1052 ( bpcharge PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); +DATA(insert OID = 1053 ( bpcharne PGUID 11 f t f 2 f 16 "1042 1042" 100 0 0 100 foo bar )); +DATA(insert OID = 1070 ( varchareq PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); +DATA(insert OID = 1071 ( varcharlt PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); +DATA(insert OID = 1072 ( varcharle PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); +DATA(insert OID = 1073 ( varchargt PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); +DATA(insert OID = 1074 ( varcharge PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); +DATA(insert OID = 1075 ( varcharne PGUID 11 f t f 2 f 16 "1043 1043" 100 0 0 100 foo bar )); +DATA(insert OID = 1078 ( bpcharcmp PGUID 11 f t f 2 f 23 "1042 1042" 100 0 0 100 foo bar )); +DATA(insert OID = 1079 ( varcharcmp PGUID 11 f t f 2 f 23 "1043 1043" 100 0 0 100 foo bar )); +DATA(insert OID = 1080 ( hashbpchar PGUID 11 f t f 1 f 23 "1042" 100 0 0 100 foo bar )); +DATA(insert OID = 1081 ( hashvarchar PGUID 11 f t f 1 f 23 "1043" 100 0 0 100 foo bar )); + +DATA(insert OID = 1084 ( date_in PGUID 11 f t f 1 f 1082 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1085 ( date_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1086 ( date_eq PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1087 ( date_lt PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1088 ( date_le PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1089 ( date_gt PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1090 ( date_ge PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1091 ( date_ne PGUID 11 f t f 2 f 16 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1092 ( date_cmp PGUID 11 f t f 2 f 23 "1082 1082" 100 0 0 100 foo bar )); /* OIDS 1100 - 1199 */ -DATA(insert OID = 1102 ( time_lt PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); -DATA(insert OID = 1103 ( time_le PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); -DATA(insert OID = 1104 ( time_gt PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); -DATA(insert OID = 1105 ( time_ge PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); -DATA(insert OID = 1106 ( time_ne PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); -DATA(insert OID = 1107 ( time_cmp PGUID 11 f t f 2 f 23 "1083 1083" 100 0 0 100 foo bar )); -DATA(insert OID = 1138 ( date_larger PGUID 11 f t f 2 f 1082 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1139 ( date_smaller PGUID 11 f t f 2 f 1082 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1140 ( date_mi PGUID 11 f t f 2 f 23 "1082 1082" 100 0 0 100 foo bar )); -DATA(insert OID = 1141 ( date_pli PGUID 11 f t f 2 f 1082 "1082 23" 100 0 0 100 foo bar )); -DATA(insert OID = 1142 ( date_mii PGUID 11 f t f 2 f 1082 "1082 23" 100 0 0 100 foo bar )); -DATA(insert OID = 1143 ( time_in PGUID 11 f t f 1 f 1083 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1144 ( time_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1145 ( time_eq PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); +DATA(insert OID = 1102 ( time_lt PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); +DATA(insert OID = 1103 ( time_le PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); +DATA(insert OID = 1104 ( time_gt PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); +DATA(insert OID = 1105 ( time_ge PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); +DATA(insert OID = 1106 ( time_ne PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); +DATA(insert OID = 1107 ( time_cmp PGUID 11 f t f 2 f 23 "1083 1083" 100 0 0 100 foo bar )); +DATA(insert OID = 1138 ( date_larger PGUID 11 f t f 2 f 1082 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1139 ( date_smaller PGUID 11 f t f 2 f 1082 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1140 ( date_mi PGUID 11 f t f 2 f 23 "1082 1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1141 ( date_pli PGUID 11 f t f 2 f 1082 "1082 23" 100 0 0 100 foo bar )); +DATA(insert OID = 1142 ( date_mii PGUID 11 f t f 2 f 1082 "1082 23" 100 0 0 100 foo bar )); +DATA(insert OID = 1143 ( time_in PGUID 11 f t f 1 f 1083 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1144 ( time_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1145 ( time_eq PGUID 11 f t f 2 f 16 "1083 1083" 100 0 0 100 foo bar )); DATA(insert OID = 1146 ( circle_add_pt PGUID 11 f t f 2 f 718 "718 600" 100 0 0 100 foo bar )); DATA(insert OID = 1147 ( circle_sub_pt PGUID 11 f t f 2 f 718 "718 600" 100 0 0 100 foo bar )); DATA(insert OID = 1148 ( circle_mul_pt PGUID 11 f t f 2 f 718 "718 600" 100 0 0 100 foo bar )); DATA(insert OID = 1149 ( circle_div_pt PGUID 11 f t f 2 f 718 "718 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1150 ( datetime_in PGUID 11 f t f 1 f 1184 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1151 ( datetime_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1152 ( datetime_eq PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1153 ( datetime_ne PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1154 ( datetime_lt PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1155 ( datetime_le PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1156 ( datetime_ge PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1157 ( datetime_gt PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1158 ( datetime_finite PGUID 11 f t f 1 f 16 "1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1159 ( datetime_zone PGUID 11 f t f 2 f 25 "25 1184" 100 0 0 100 foo bar )); - -DATA(insert OID = 1160 ( timespan_in PGUID 11 f t f 1 f 1186 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1161 ( timespan_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1162 ( timespan_eq PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1163 ( timespan_ne PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1164 ( timespan_lt PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1165 ( timespan_le PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1166 ( timespan_ge PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1167 ( timespan_gt PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1168 ( timespan_um PGUID 11 f t f 1 f 1186 "1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1169 ( timespan_pl PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1170 ( timespan_mi PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1150 ( datetime_in PGUID 11 f t f 1 f 1184 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1151 ( datetime_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1152 ( datetime_eq PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1153 ( datetime_ne PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1154 ( datetime_lt PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1155 ( datetime_le PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1156 ( datetime_ge PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1157 ( datetime_gt PGUID 11 f t f 2 f 16 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1158 ( datetime_finite PGUID 11 f t f 1 f 16 "1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1159 ( datetime_zone PGUID 11 f t f 2 f 25 "25 1184" 100 0 0 100 foo bar )); + +DATA(insert OID = 1160 ( timespan_in PGUID 11 f t f 1 f 1186 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1161 ( timespan_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1162 ( timespan_eq PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1163 ( timespan_ne PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1164 ( timespan_lt PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1165 ( timespan_le PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1166 ( timespan_ge PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1167 ( timespan_gt PGUID 11 f t f 2 f 16 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1168 ( timespan_um PGUID 11 f t f 1 f 1186 "1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1169 ( timespan_pl PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1170 ( timespan_mi PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 foo bar )); DATA(insert OID = 1171 ( datetime_part PGUID 11 f t f 2 f 701 "25 1184" 100 0 0 100 foo bar )); DATA(insert OID = 1172 ( timespan_part PGUID 11 f t f 2 f 701 "25 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1173 ( abstime_datetime PGUID 11 f t f 1 f 1184 "702" 100 0 0 100 foo bar )); -DATA(insert OID = 1174 ( date_datetime PGUID 11 f t f 1 f 1184 "1082" 100 0 0 100 foo bar )); +DATA(insert OID = 1173 ( abstime_datetime PGUID 11 f t f 1 f 1184 "702" 100 0 0 100 foo bar )); +DATA(insert OID = 1174 ( date_datetime PGUID 11 f t f 1 f 1184 "1082" 100 0 0 100 foo bar )); DATA(insert OID = 1175 ( timestamp_datetime PGUID 11 f t f 1 f 1184 "1296" 100 0 0 100 foo bar )); DATA(insert OID = 1176 ( datetime_datetime PGUID 11 f t f 2 f 1184 "1082 1083" 100 0 0 100 foo bar )); -DATA(insert OID = 1177 ( reltime_timespan PGUID 11 f t f 1 f 1186 "703" 100 0 0 100 foo bar )); -DATA(insert OID = 1178 ( datetime_date PGUID 11 f t f 1 f 1082 "1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1179 ( abstime_date PGUID 11 f t f 1 f 1082 "702" 100 0 0 100 foo bar )); -DATA(insert OID = 1180 ( datetime_abstime PGUID 11 f t f 1 f 702 "1184" 100 0 0 100 foo bar )); - -DATA(insert OID = 1188 ( datetime_mi PGUID 11 f t f 2 f 1186 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1189 ( datetime_pl_span PGUID 11 f t f 2 f 1184 "1184 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1190 ( datetime_mi_span PGUID 11 f t f 2 f 1184 "1184 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1191 ( text_datetime PGUID 11 f t f 1 f 1184 "25" 100 0 0 100 foo bar )); -DATA(insert OID = 1192 ( datetime_text PGUID 11 f t f 1 f 25 "1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1193 ( timespan_text PGUID 11 f t f 1 f 1186 "25" 100 0 0 100 foo bar )); -DATA(insert OID = 1194 ( timespan_reltime PGUID 11 f t f 1 f 703 "1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1195 ( datetime_smaller PGUID 11 f t f 2 f 1184 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1196 ( datetime_larger PGUID 11 f t f 2 f 1184 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1197 ( timespan_smaller PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1198 ( timespan_larger PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1199 ( datetime_age PGUID 11 f t f 2 f 1186 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1177 ( reltime_timespan PGUID 11 f t f 1 f 1186 "703" 100 0 0 100 foo bar )); +DATA(insert OID = 1178 ( datetime_date PGUID 11 f t f 1 f 1082 "1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1179 ( abstime_date PGUID 11 f t f 1 f 1082 "702" 100 0 0 100 foo bar )); +DATA(insert OID = 1180 ( datetime_abstime PGUID 11 f t f 1 f 702 "1184" 100 0 0 100 foo bar )); + +DATA(insert OID = 1188 ( datetime_mi PGUID 11 f t f 2 f 1186 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1189 ( datetime_pl_span PGUID 11 f t f 2 f 1184 "1184 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1190 ( datetime_mi_span PGUID 11 f t f 2 f 1184 "1184 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1191 ( text_datetime PGUID 11 f t f 1 f 1184 "25" 100 0 0 100 foo bar )); +DATA(insert OID = 1192 ( datetime_text PGUID 11 f t f 1 f 25 "1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1193 ( timespan_text PGUID 11 f t f 1 f 1186 "25" 100 0 0 100 foo bar )); +DATA(insert OID = 1194 ( timespan_reltime PGUID 11 f t f 1 f 703 "1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1195 ( datetime_smaller PGUID 11 f t f 2 f 1184 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1196 ( datetime_larger PGUID 11 f t f 2 f 1184 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1197 ( timespan_smaller PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1198 ( timespan_larger PGUID 11 f t f 2 f 1186 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1199 ( datetime_age PGUID 11 f t f 2 f 1186 "1184 1184" 100 0 0 100 foo bar )); /* OIDS 1200 - 1299 */ -DATA(insert OID = 1200 ( int42reltime PGUID 11 f t f 1 f 703 "21" 100 0 0 100 foo bar )); +DATA(insert OID = 1200 ( int42reltime PGUID 11 f t f 1 f 703 "21" 100 0 0 100 foo bar )); DATA(insert OID = 1217 ( datetime_trunc PGUID 11 f t f 2 f 1184 "25 1184" 100 0 0 100 foo bar )); DATA(insert OID = 1218 ( timespan_trunc PGUID 11 f t f 2 f 1186 "25 1186" 100 0 0 100 foo bar )); @@ -870,51 +871,51 @@ DATA(insert OID = 1294 ( char8icregexeq PGUID 11 f t f 2 f 16 "411 25" 100 0 DATA(insert OID = 1295 ( char8icregexne PGUID 11 f t f 2 f 16 "411 25" 100 0 0 100 foo bar )); DATA(insert OID = 1236 ( char16icregexeq PGUID 11 f t f 2 f 16 "20 25" 100 0 0 100 foo bar )); DATA(insert OID = 1237 ( char16icregexne PGUID 11 f t f 2 f 16 "20 25" 100 0 0 100 foo bar )); -DATA(insert OID = 1238 ( texticregexeq PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); -DATA(insert OID = 1239 ( texticregexne PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); +DATA(insert OID = 1238 ( texticregexeq PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); +DATA(insert OID = 1239 ( texticregexne PGUID 11 f t f 2 f 16 "25 25" 100 0 1 0 foo bar )); DATA(insert OID = 1240 ( nameicregexeq PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); DATA(insert OID = 1241 ( nameicregexne PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar )); -DATA(insert OID = 1297 ( timestamp_in PGUID 11 f t f 1 f 1296 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1297 ( timestamp_in PGUID 11 f t f 1 f 1296 "0" 100 0 0 100 foo bar )); DATA(insert OID = 1298 ( timestamp_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar )); -DATA(insert OID = 1299 ( now PGUID 11 f t f 0 f 1296 "0" 100 0 0 100 foo bar )); +DATA(insert OID = 1299 ( now PGUID 11 f t f 0 f 1296 "0" 100 0 0 100 foo bar )); /* OIDS 1300 - 1399 */ -DATA(insert OID = 1306 ( timestampeq PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); -DATA(insert OID = 1307 ( timestampne PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); -DATA(insert OID = 1308 ( timestamplt PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); -DATA(insert OID = 1309 ( timestampgt PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); -DATA(insert OID = 1310 ( timestample PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); -DATA(insert OID = 1311 ( timestampge PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); +DATA(insert OID = 1306 ( timestampeq PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); +DATA(insert OID = 1307 ( timestampne PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); +DATA(insert OID = 1308 ( timestamplt PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); +DATA(insert OID = 1309 ( timestampgt PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); +DATA(insert OID = 1310 ( timestample PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); +DATA(insert OID = 1311 ( timestampge PGUID 11 f t f 2 f 16 "1296 1296" 100 0 0 100 foo bar )); /* reserve OIDs 1312-1319 for additional date/time conversion routines! tgl 97/04/01 */ -DATA(insert OID = 1314 ( datetime_cmp PGUID 11 f t f 2 f 23 "1184 1184" 100 0 0 100 foo bar )); -DATA(insert OID = 1315 ( timespan_cmp PGUID 11 f t f 2 f 23 "1186 1186" 100 0 0 100 foo bar )); +DATA(insert OID = 1314 ( datetime_cmp PGUID 11 f t f 2 f 23 "1184 1184" 100 0 0 100 foo bar )); +DATA(insert OID = 1315 ( timespan_cmp PGUID 11 f t f 2 f 23 "1186 1186" 100 0 0 100 foo bar )); -DATA(insert OID = 1339 ( date_zone PGUID 14 f t f 2 f 25 "25 1184" 100 0 0 100 "select datetime_zone($1, $2)" - )); -DATA(insert OID = 1340 ( text PGUID 14 f t f 1 f 25 "1184" 100 0 0 100 "select datetime_text($1)" - )); -DATA(insert OID = 1341 ( text PGUID 14 f t f 1 f 25 "1186" 100 0 0 100 "select timespan_text($1)" - )); +DATA(insert OID = 1339 ( date_zone PGUID 14 f t f 2 f 25 "25 1184" 100 0 0 100 "select datetime_zone($1, $2)" - )); +DATA(insert OID = 1340 ( text PGUID 14 f t f 1 f 25 "1184" 100 0 0 100 "select datetime_text($1)" - )); +DATA(insert OID = 1341 ( text PGUID 14 f t f 1 f 25 "1186" 100 0 0 100 "select timespan_text($1)" - )); /* reserve OIDs 1339-1349 for additional date/time conversion routines! tgl 97/04/01 */ -DATA(insert OID = 1350 ( datetime PGUID 14 f t f 1 f 1184 "1184" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1351 ( datetime PGUID 14 f t f 1 f 1184 "25" 100 0 0 100 "select text_datetime($1)" - )); -DATA(insert OID = 1352 ( datetime PGUID 14 f t f 1 f 1184 "702" 100 0 0 100 "select abstime_datetime($1)" - )); -DATA(insert OID = 1353 ( datetime PGUID 14 f t f 1 f 1184 "1082" 100 0 0 100 "select date_datetime($1)" - )); -DATA(insert OID = 1354 ( datetime PGUID 14 f t f 1 f 1184 "1296" 100 0 0 100 "select timestamp_datetime($1)" - )); -DATA(insert OID = 1355 ( datetime PGUID 14 f t f 2 f 1184 "1082 1083" 100 0 0 100 "select datetime_datetime($1, $2)" - )); -DATA(insert OID = 1356 ( timespan PGUID 14 f t f 1 f 1186 "1186" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1357 ( timespan PGUID 14 f t f 1 f 1186 "703" 100 0 0 100 "select reltime_timespan($1)" - )); -DATA(insert OID = 1358 ( timespan PGUID 14 f t f 1 f 1186 "1083" 100 0 0 100 "select time_timespan($1)" - )); -DATA(insert OID = 1359 ( date PGUID 14 f t f 1 f 1082 "1082" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1360 ( date PGUID 14 f t f 1 f 1082 "1184" 100 0 0 100 "select datetime_date($1)" - )); -DATA(insert OID = 1361 ( date PGUID 14 f t f 1 f 1082 "702" 100 0 0 100 "select abstime_date($1)" - )); -DATA(insert OID = 1362 ( time PGUID 14 f t f 1 f 1083 "1083" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1363 ( time PGUID 14 f t f 1 f 1083 "1184" 100 0 0 100 "select datetime_time($1)" - )); -DATA(insert OID = 1364 ( time PGUID 14 f t f 1 f 1083 "702" 100 0 0 100 "select abstime_time($1)" - )); -DATA(insert OID = 1365 ( abstime PGUID 14 f t f 1 f 702 "702" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1366 ( abstime PGUID 14 f t f 1 f 702 "1184" 100 0 0 100 "select datetime_abstime($1)" - )); -DATA(insert OID = 1367 ( reltime PGUID 14 f t f 1 f 703 "703" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1368 ( reltime PGUID 14 f t f 1 f 703 "1186" 100 0 0 100 "select timespan_reltime($1)" - )); +DATA(insert OID = 1350 ( datetime PGUID 14 f t f 1 f 1184 "1184" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1351 ( datetime PGUID 14 f t f 1 f 1184 "25" 100 0 0 100 "select text_datetime($1)" - )); +DATA(insert OID = 1352 ( datetime PGUID 14 f t f 1 f 1184 "702" 100 0 0 100 "select abstime_datetime($1)" - )); +DATA(insert OID = 1353 ( datetime PGUID 14 f t f 1 f 1184 "1082" 100 0 0 100 "select date_datetime($1)" - )); +DATA(insert OID = 1354 ( datetime PGUID 14 f t f 1 f 1184 "1296" 100 0 0 100 "select timestamp_datetime($1)" - )); +DATA(insert OID = 1355 ( datetime PGUID 14 f t f 2 f 1184 "1082 1083" 100 0 0 100 "select datetime_datetime($1, $2)" - )); +DATA(insert OID = 1356 ( timespan PGUID 14 f t f 1 f 1186 "1186" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1357 ( timespan PGUID 14 f t f 1 f 1186 "703" 100 0 0 100 "select reltime_timespan($1)" - )); +DATA(insert OID = 1358 ( timespan PGUID 14 f t f 1 f 1186 "1083" 100 0 0 100 "select time_timespan($1)" - )); +DATA(insert OID = 1359 ( date PGUID 14 f t f 1 f 1082 "1082" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1360 ( date PGUID 14 f t f 1 f 1082 "1184" 100 0 0 100 "select datetime_date($1)" - )); +DATA(insert OID = 1361 ( date PGUID 14 f t f 1 f 1082 "702" 100 0 0 100 "select abstime_date($1)" - )); +DATA(insert OID = 1362 ( time PGUID 14 f t f 1 f 1083 "1083" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1363 ( time PGUID 14 f t f 1 f 1083 "1184" 100 0 0 100 "select datetime_time($1)" - )); +DATA(insert OID = 1364 ( time PGUID 14 f t f 1 f 1083 "702" 100 0 0 100 "select abstime_time($1)" - )); +DATA(insert OID = 1365 ( abstime PGUID 14 f t f 1 f 702 "702" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1366 ( abstime PGUID 14 f t f 1 f 702 "1184" 100 0 0 100 "select datetime_abstime($1)" - )); +DATA(insert OID = 1367 ( reltime PGUID 14 f t f 1 f 703 "703" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1368 ( reltime PGUID 14 f t f 1 f 703 "1186" 100 0 0 100 "select timespan_reltime($1)" - )); DATA(insert OID = 1369 ( timestamp PGUID 14 f t f 1 f 1296 "1296" 100 0 0 100 "select $1" - )); DATA(insert OID = 1370 ( timestamp PGUID 14 f t f 1 f 1296 "1184" 100 0 0 100 "select datetime_timestamp($1)" - )); @@ -926,196 +927,197 @@ DATA(insert OID = 1384 ( date_part PGUID 14 f t f 2 f 701 "25 1082" 100 0 0 DATA(insert OID = 1385 ( date_part PGUID 14 f t f 2 f 701 "25 1083" 100 0 0 100 "select timespan_part($1, timespan($2))" - )); DATA(insert OID = 1386 ( date_trunc PGUID 14 f t f 2 f 1184 "25 1184" 100 0 0 100 "select datetime_trunc($1, $2)" - )); DATA(insert OID = 1387 ( date_trunc PGUID 14 f t f 2 f 1186 "25 1186" 100 0 0 100 "select timespan_trunc($1, $2)" - )); -DATA(insert OID = 1388 ( age PGUID 14 f t f 2 f 1186 "1184 1184" 100 0 0 100 "select datetime_age($1, $2)" - )); -DATA(insert OID = 1389 ( age PGUID 14 f t f 1 f 1186 "1184" 100 0 0 100 "select datetime_age(\'today\', $1)" - )); +DATA(insert OID = 1388 ( age PGUID 14 f t f 2 f 1186 "1184 1184" 100 0 0 100 "select datetime_age($1, $2)" - )); +DATA(insert OID = 1389 ( age PGUID 14 f t f 1 f 1186 "1184" 100 0 0 100 "select datetime_age(\'today\', $1)" - )); -DATA(insert OID = 1390 ( isfinite PGUID 14 f t f 1 f 16 "1184" 100 0 0 100 "select datetime_finite($1)" - )); -DATA(insert OID = 1391 ( isfinite PGUID 14 f t f 1 f 16 "1186" 100 0 0 100 "select timespan_finite($1)" - )); -DATA(insert OID = 1392 ( isfinite PGUID 14 f t f 1 f 16 "702" 100 0 0 100 "select abstime_finite($1)" - )); +DATA(insert OID = 1390 ( isfinite PGUID 14 f t f 1 f 16 "1184" 100 0 0 100 "select datetime_finite($1)" - )); +DATA(insert OID = 1391 ( isfinite PGUID 14 f t f 1 f 16 "1186" 100 0 0 100 "select timespan_finite($1)" - )); +DATA(insert OID = 1392 ( isfinite PGUID 14 f t f 1 f 16 "702" 100 0 0 100 "select abstime_finite($1)" - )); /* reserve OIDs 1370-1399 for additional date/time conversion routines! tgl 97/04/01 */ /* OIDS 1400 - 1499 */ -DATA(insert OID = 1400 ( float PGUID 14 f t f 1 f 701 "701" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1401 ( float PGUID 14 f t f 1 f 701 "700" 100 0 0 100 "select ftod($1)" - )); -DATA(insert OID = 1402 ( float4 PGUID 14 f t f 1 f 700 "700" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1403 ( float4 PGUID 14 f t f 1 f 700 "701" 100 0 0 100 "select dtof($1)" - )); -DATA(insert OID = 1404 ( int PGUID 14 f t f 1 f 23 "23" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1405 ( int2 PGUID 14 f t f 1 f 21 "21" 100 0 0 100 "select $1" - )); - -DATA(insert OID = 1406 ( float8 PGUID 14 f t f 1 f 701 "701" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1407 ( float8 PGUID 14 f t f 1 f 701 "700" 100 0 0 100 "select ftod($1)" - )); -DATA(insert OID = 1408 ( float8 PGUID 14 f t f 1 f 701 "23" 100 0 0 100 "select i4tod($1)" - )); -DATA(insert OID = 1409 ( float8 PGUID 14 f t f 1 f 701 "21" 100 0 0 100 "select i2tod($1)" - )); -DATA(insert OID = 1410 ( float4 PGUID 14 f t f 1 f 700 "23" 100 0 0 100 "select i4tof($1)" - )); -DATA(insert OID = 1411 ( float4 PGUID 14 f t f 1 f 700 "21" 100 0 0 100 "select i2tof($1)" - )); -DATA(insert OID = 1412 ( int4 PGUID 14 f t f 1 f 23 "23" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1413 ( int4 PGUID 14 f t f 1 f 23 "701" 100 0 0 100 "select dtoi4($1)" - )); -DATA(insert OID = 1414 ( int4 PGUID 14 f t f 1 f 23 "21" 100 0 0 100 "select i2toi4($1)" - )); -DATA(insert OID = 1415 ( int4 PGUID 14 f t f 1 f 23 "700" 100 0 0 100 "select ftoi4($1)" - )); -DATA(insert OID = 1416 ( int2 PGUID 14 f t f 1 f 21 "21" 100 0 0 100 "select $1" - )); -DATA(insert OID = 1417 ( int2 PGUID 14 f t f 1 f 21 "23" 100 0 0 100 "select i4toi2($1)" - )); -DATA(insert OID = 1418 ( int2 PGUID 14 f t f 1 f 21 "701" 100 0 0 100 "select dtoi2($1)" - )); -DATA(insert OID = 1419 ( int2 PGUID 14 f t f 1 f 21 "700" 100 0 0 100 "select ftoi2($1)" - )); - -DATA(insert OID = 1421 ( box PGUID 11 f t f 2 f 603 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1422 ( box_add PGUID 11 f t f 2 f 603 "603 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1423 ( box_sub PGUID 11 f t f 2 f 603 "603 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1424 ( box_mul PGUID 11 f t f 2 f 603 "603 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1425 ( box_div PGUID 11 f t f 2 f 603 "603 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1426 ( path_contain_pt PGUID 11 f t f 2 f 16 "601 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1427 ( pt_contained_path PGUID 11 f t f 2 f 16 "600 601" 100 0 0 100 foo bar )); -DATA(insert OID = 1428 ( poly_contain_pt PGUID 11 f t f 2 f 16 "604 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1429 ( pt_contained_poly PGUID 11 f t f 2 f 16 "600 604" 100 0 0 100 foo bar )); - -DATA(insert OID = 1430 ( path_isclosed PGUID 11 f t f 1 f 16 "602" 100 0 0 100 foo bar )); -DATA(insert OID = 1431 ( path_isopen PGUID 11 f t f 1 f 16 "602" 100 0 0 100 foo bar )); -DATA(insert OID = 1432 ( path_npoints PGUID 11 f t f 1 f 23 "602" 100 0 0 100 foo bar )); -DATA(insert OID = 1433 ( path_close PGUID 11 f t f 1 f 602 "602" 100 0 0 100 foo bar )); -DATA(insert OID = 1434 ( path_open PGUID 11 f t f 1 f 602 "602" 100 0 0 100 foo bar )); -DATA(insert OID = 1435 ( path_add PGUID 11 f t f 2 f 602 "602 602" 100 0 0 100 foo bar )); -DATA(insert OID = 1436 ( path_add_pt PGUID 11 f t f 2 f 602 "602 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1437 ( path_sub_pt PGUID 11 f t f 2 f 602 "602 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1438 ( path_mul_pt PGUID 11 f t f 2 f 602 "602 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1439 ( path_div_pt PGUID 11 f t f 2 f 602 "602 600" 100 0 0 100 foo bar )); - -DATA(insert OID = 1440 ( point PGUID 11 f t f 2 f 600 "701 701" 100 0 0 100 foo bar )); -DATA(insert OID = 1441 ( point_add PGUID 11 f t f 2 f 600 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1442 ( point_sub PGUID 11 f t f 2 f 600 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1443 ( point_mul PGUID 11 f t f 2 f 600 "600 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1444 ( point_div PGUID 11 f t f 2 f 600 "600 600" 100 0 0 100 foo bar )); - -DATA(insert OID = 1445 ( poly_npoints PGUID 11 f t f 1 f 23 "604" 100 0 0 100 foo bar )); -DATA(insert OID = 1446 ( poly_box PGUID 11 f t f 1 f 603 "604" 100 0 0 100 foo bar )); -DATA(insert OID = 1447 ( poly_path PGUID 11 f t f 1 f 602 "604" 100 0 0 100 foo bar )); -DATA(insert OID = 1448 ( box_poly PGUID 11 f t f 1 f 604 "603" 100 0 0 100 foo bar )); -DATA(insert OID = 1449 ( path_poly PGUID 11 f t f 1 f 604 "602" 100 0 0 100 foo bar )); - -DATA(insert OID = 1450 ( circle_in PGUID 11 f t f 1 f 718 "0" 100 0 1 0 foo bar )); -DATA(insert OID = 1451 ( circle_out PGUID 11 f t f 1 f 23 "0" 100 0 1 0 foo bar )); -DATA(insert OID = 1452 ( circle_same PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1453 ( circle_contain PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1454 ( circle_left PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1455 ( circle_overleft PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1456 ( circle_overright PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1457 ( circle_right PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1458 ( circle_contained PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1459 ( circle_overlap PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1460 ( circle_below PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1461 ( circle_above PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1462 ( circle_eq PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1463 ( circle_ne PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1464 ( circle_lt PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1465 ( circle_gt PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1466 ( circle_le PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1467 ( circle_ge PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1468 ( circle_area PGUID 11 f t f 1 f 701 "718" 100 0 1 0 foo bar )); -DATA(insert OID = 1469 ( circle_diameter PGUID 11 f t f 1 f 701 "718" 100 0 1 0 foo bar )); -DATA(insert OID = 1470 ( circle_radius PGUID 11 f t f 1 f 701 "718" 100 0 1 0 foo bar )); -DATA(insert OID = 1471 ( circle_distance PGUID 11 f t f 2 f 701 "718 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1472 ( circle_center PGUID 11 f t f 1 f 600 "718" 100 0 1 0 foo bar )); -DATA(insert OID = 1473 ( circle PGUID 11 f t f 2 f 718 "600 701" 100 0 1 0 foo bar )); -DATA(insert OID = 1474 ( poly_circle PGUID 11 f t f 1 f 718 "604" 100 0 1 0 foo bar )); -DATA(insert OID = 1475 ( circle_poly PGUID 11 f t f 2 f 604 "23 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1476 ( dist_pc PGUID 11 f t f 2 f 604 "600 718" 100 0 1 0 foo bar )); -DATA(insert OID = 1477 ( circle_contain_pt PGUID 11 f t f 2 f 16 "718 600" 100 0 0 100 foo bar )); -DATA(insert OID = 1478 ( pt_contained_circle PGUID 11 f t f 2 f 16 "600 718" 100 0 0 100 foo bar )); -DATA(insert OID = 1479 ( box_circle PGUID 11 f t f 1 f 718 "603" 100 0 1 0 foo bar )); -DATA(insert OID = 1480 ( circle_box PGUID 11 f t f 1 f 603 "718" 100 0 1 0 foo bar )); - -DATA(insert OID = 1530 ( point PGUID 14 f t f 2 f 600 "601 601" 100 0 0 100 "select lseg_interpt($1, $2)" - )); -DATA(insert OID = 1531 ( point PGUID 14 f t f 1 f 600 "718" 100 0 0 100 "select circle_center($1)" - )); -DATA(insert OID = 1532 ( isvertical PGUID 14 f t f 2 f 16 "600 600" 100 0 0 100 "select point_vert($1, $2)" - )); -DATA(insert OID = 1533 ( ishorizontal PGUID 14 f t f 2 f 16 "600 600" 100 0 0 100 "select point_horiz($1, $2)" - )); -DATA(insert OID = 1534 ( slope PGUID 14 f t f 2 f 701 "600 600" 100 0 0 100 "select point_slope($1, $2)" - )); - -DATA(insert OID = 1540 ( lseg PGUID 14 f t f 2 f 601 "600 600" 100 0 0 100 "select lseg_construct($1, $2)" - )); -DATA(insert OID = 1541 ( lseg PGUID 14 f t f 1 f 601 "603" 100 0 0 100 "select box_diagonal($1)" - )); -DATA(insert OID = 1542 ( isparallel PGUID 14 f t f 2 f 16 "601 601" 100 0 0 100 "select lseg_parallel($1, $2)" - )); -DATA(insert OID = 1543 ( isperpendicular PGUID 14 f t f 2 f 16 "601 601" 100 0 0 100 "select lseg_perp($1, $2)" - )); -DATA(insert OID = 1544 ( isvertical PGUID 14 f t f 1 f 16 "601" 100 0 0 100 "select lseg_vertical($1)" - )); -DATA(insert OID = 1545 ( ishorizontal PGUID 14 f t f 1 f 16 "601" 100 0 0 100 "select lseg_horizontal($1)" - )); +DATA(insert OID = 1400 ( float PGUID 14 f t f 1 f 701 "701" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1401 ( float PGUID 14 f t f 1 f 701 "700" 100 0 0 100 "select ftod($1)" - )); +DATA(insert OID = 1402 ( float4 PGUID 14 f t f 1 f 700 "700" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1403 ( float4 PGUID 14 f t f 1 f 700 "701" 100 0 0 100 "select dtof($1)" - )); +DATA(insert OID = 1404 ( int PGUID 14 f t f 1 f 23 "23" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1405 ( int2 PGUID 14 f t f 1 f 21 "21" 100 0 0 100 "select $1" - )); + +DATA(insert OID = 1406 ( float8 PGUID 14 f t f 1 f 701 "701" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1407 ( float8 PGUID 14 f t f 1 f 701 "700" 100 0 0 100 "select ftod($1)" - )); +DATA(insert OID = 1408 ( float8 PGUID 14 f t f 1 f 701 "23" 100 0 0 100 "select i4tod($1)" - )); +DATA(insert OID = 1409 ( float8 PGUID 14 f t f 1 f 701 "21" 100 0 0 100 "select i2tod($1)" - )); +DATA(insert OID = 1410 ( float4 PGUID 14 f t f 1 f 700 "23" 100 0 0 100 "select i4tof($1)" - )); +DATA(insert OID = 1411 ( float4 PGUID 14 f t f 1 f 700 "21" 100 0 0 100 "select i2tof($1)" - )); +DATA(insert OID = 1412 ( int4 PGUID 14 f t f 1 f 23 "23" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1413 ( int4 PGUID 14 f t f 1 f 23 "701" 100 0 0 100 "select dtoi4($1)" - )); +DATA(insert OID = 1414 ( int4 PGUID 14 f t f 1 f 23 "21" 100 0 0 100 "select i2toi4($1)" - )); +DATA(insert OID = 1415 ( int4 PGUID 14 f t f 1 f 23 "700" 100 0 0 100 "select ftoi4($1)" - )); +DATA(insert OID = 1416 ( int2 PGUID 14 f t f 1 f 21 "21" 100 0 0 100 "select $1" - )); +DATA(insert OID = 1417 ( int2 PGUID 14 f t f 1 f 21 "23" 100 0 0 100 "select i4toi2($1)" - )); +DATA(insert OID = 1418 ( int2 PGUID 14 f t f 1 f 21 "701" 100 0 0 100 "select dtoi2($1)" - )); +DATA(insert OID = 1419 ( int2 PGUID 14 f t f 1 f 21 "700" 100 0 0 100 "select ftoi2($1)" - )); + +DATA(insert OID = 1421 ( box PGUID 11 f t f 2 f 603 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1422 ( box_add PGUID 11 f t f 2 f 603 "603 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1423 ( box_sub PGUID 11 f t f 2 f 603 "603 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1424 ( box_mul PGUID 11 f t f 2 f 603 "603 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1425 ( box_div PGUID 11 f t f 2 f 603 "603 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1426 ( path_contain_pt PGUID 11 f t f 2 f 16 "601 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1427 ( pt_contained_path PGUID 11 f t f 2 f 16 "600 601" 100 0 0 100 foo bar )); +DATA(insert OID = 1428 ( poly_contain_pt PGUID 11 f t f 2 f 16 "604 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1429 ( pt_contained_poly PGUID 11 f t f 2 f 16 "600 604" 100 0 0 100 foo bar )); + +DATA(insert OID = 1430 ( path_isclosed PGUID 11 f t f 1 f 16 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 1431 ( path_isopen PGUID 11 f t f 1 f 16 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 1432 ( path_npoints PGUID 11 f t f 1 f 23 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 1433 ( path_close PGUID 11 f t f 1 f 602 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 1434 ( path_open PGUID 11 f t f 1 f 602 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 1435 ( path_add PGUID 11 f t f 2 f 602 "602 602" 100 0 0 100 foo bar )); +DATA(insert OID = 1436 ( path_add_pt PGUID 11 f t f 2 f 602 "602 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1437 ( path_sub_pt PGUID 11 f t f 2 f 602 "602 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1438 ( path_mul_pt PGUID 11 f t f 2 f 602 "602 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1439 ( path_div_pt PGUID 11 f t f 2 f 602 "602 600" 100 0 0 100 foo bar )); + +DATA(insert OID = 1440 ( point PGUID 11 f t f 2 f 600 "701 701" 100 0 0 100 foo bar )); +DATA(insert OID = 1441 ( point_add PGUID 11 f t f 2 f 600 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1442 ( point_sub PGUID 11 f t f 2 f 600 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1443 ( point_mul PGUID 11 f t f 2 f 600 "600 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1444 ( point_div PGUID 11 f t f 2 f 600 "600 600" 100 0 0 100 foo bar )); + +DATA(insert OID = 1445 ( poly_npoints PGUID 11 f t f 1 f 23 "604" 100 0 0 100 foo bar )); +DATA(insert OID = 1446 ( poly_box PGUID 11 f t f 1 f 603 "604" 100 0 0 100 foo bar )); +DATA(insert OID = 1447 ( poly_path PGUID 11 f t f 1 f 602 "604" 100 0 0 100 foo bar )); +DATA(insert OID = 1448 ( box_poly PGUID 11 f t f 1 f 604 "603" 100 0 0 100 foo bar )); +DATA(insert OID = 1449 ( path_poly PGUID 11 f t f 1 f 604 "602" 100 0 0 100 foo bar )); + +DATA(insert OID = 1450 ( circle_in PGUID 11 f t f 1 f 718 "0" 100 0 1 0 foo bar )); +DATA(insert OID = 1451 ( circle_out PGUID 11 f t f 1 f 23 "0" 100 0 1 0 foo bar )); +DATA(insert OID = 1452 ( circle_same PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1453 ( circle_contain PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1454 ( circle_left PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1455 ( circle_overleft PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1456 ( circle_overright PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1457 ( circle_right PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1458 ( circle_contained PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1459 ( circle_overlap PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1460 ( circle_below PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1461 ( circle_above PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1462 ( circle_eq PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1463 ( circle_ne PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1464 ( circle_lt PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1465 ( circle_gt PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1466 ( circle_le PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1467 ( circle_ge PGUID 11 f t f 2 f 16 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1468 ( circle_area PGUID 11 f t f 1 f 701 "718" 100 0 1 0 foo bar )); +DATA(insert OID = 1469 ( circle_diameter PGUID 11 f t f 1 f 701 "718" 100 0 1 0 foo bar )); +DATA(insert OID = 1470 ( circle_radius PGUID 11 f t f 1 f 701 "718" 100 0 1 0 foo bar )); +DATA(insert OID = 1471 ( circle_distance PGUID 11 f t f 2 f 701 "718 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1472 ( circle_center PGUID 11 f t f 1 f 600 "718" 100 0 1 0 foo bar )); +DATA(insert OID = 1473 ( circle PGUID 11 f t f 2 f 718 "600 701" 100 0 1 0 foo bar )); +DATA(insert OID = 1474 ( poly_circle PGUID 11 f t f 1 f 718 "604" 100 0 1 0 foo bar )); +DATA(insert OID = 1475 ( circle_poly PGUID 11 f t f 2 f 604 "23 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1476 ( dist_pc PGUID 11 f t f 2 f 604 "600 718" 100 0 1 0 foo bar )); +DATA(insert OID = 1477 ( circle_contain_pt PGUID 11 f t f 2 f 16 "718 600" 100 0 0 100 foo bar )); +DATA(insert OID = 1478 ( pt_contained_circle PGUID 11 f t f 2 f 16 "600 718" 100 0 0 100 foo bar )); +DATA(insert OID = 1479 ( box_circle PGUID 11 f t f 1 f 718 "603" 100 0 1 0 foo bar )); +DATA(insert OID = 1480 ( circle_box PGUID 11 f t f 1 f 603 "718" 100 0 1 0 foo bar )); + +DATA(insert OID = 1530 ( point PGUID 14 f t f 2 f 600 "601 601" 100 0 0 100 "select lseg_interpt($1, $2)" - )); +DATA(insert OID = 1531 ( point PGUID 14 f t f 1 f 600 "718" 100 0 0 100 "select circle_center($1)" - )); +DATA(insert OID = 1532 ( isvertical PGUID 14 f t f 2 f 16 "600 600" 100 0 0 100 "select point_vert($1, $2)" - )); +DATA(insert OID = 1533 ( ishorizontal PGUID 14 f t f 2 f 16 "600 600" 100 0 0 100 "select point_horiz($1, $2)" - )); +DATA(insert OID = 1534 ( slope PGUID 14 f t f 2 f 701 "600 600" 100 0 0 100 "select point_slope($1, $2)" - )); + +DATA(insert OID = 1540 ( lseg PGUID 14 f t f 2 f 601 "600 600" 100 0 0 100 "select lseg_construct($1, $2)" - )); +DATA(insert OID = 1541 ( lseg PGUID 14 f t f 1 f 601 "603" 100 0 0 100 "select box_diagonal($1)" - )); +DATA(insert OID = 1542 ( isparallel PGUID 14 f t f 2 f 16 "601 601" 100 0 0 100 "select lseg_parallel($1, $2)" - )); +DATA(insert OID = 1543 ( isperpendicular PGUID 14 f t f 2 f 16 "601 601" 100 0 0 100 "select lseg_perp($1, $2)" - )); +DATA(insert OID = 1544 ( isvertical PGUID 14 f t f 1 f 16 "601" 100 0 0 100 "select lseg_vertical($1)" - )); +DATA(insert OID = 1545 ( ishorizontal PGUID 14 f t f 1 f 16 "601" 100 0 0 100 "select lseg_horizontal($1)" - )); /* pclose and popen might better be named close and open, but that crashes initdb. * - tgl 97/04/20 */ -DATA(insert OID = 1550 ( path PGUID 14 f t f 1 f 602 "604" 100 0 0 100 "select poly_path($1)" - )); -DATA(insert OID = 1551 ( length PGUID 14 f t f 1 f 701 "602" 100 0 1 0 "select path_length($1)" - )); -DATA(insert OID = 1552 ( points PGUID 14 f t f 1 f 23 "602" 100 0 0 100 "select path_npoints($1)" - )); -DATA(insert OID = 1553 ( pclose PGUID 14 f t f 1 f 602 "602" 100 0 0 100 "select path_close($1)" - )); -DATA(insert OID = 1554 ( popen PGUID 14 f t f 1 f 602 "602" 100 0 0 100 "select path_open($1)" - )); -DATA(insert OID = 1555 ( isopen PGUID 14 f t f 1 f 16 "602" 100 0 0 100 "select path_isopen($1)" - )); -DATA(insert OID = 1556 ( isclosed PGUID 14 f t f 1 f 16 "602" 100 0 0 100 "select path_isclosed($1)" - )); - -DATA(insert OID = 1560 ( box PGUID 14 f t f 2 f 603 "603 603" 100 0 0 100 "select box_intersect($1, $2)" - )); -DATA(insert OID = 1561 ( box PGUID 14 f t f 1 f 603 "604" 100 0 0 100 "select poly_box($1)" - )); -DATA(insert OID = 1562 ( width PGUID 14 f t f 1 f 701 "603" 100 0 0 100 "select box_width($1)" - )); -DATA(insert OID = 1563 ( height PGUID 14 f t f 1 f 701 "603" 100 0 0 100 "select box_height($1)" - )); -DATA(insert OID = 1564 ( center PGUID 14 f t f 1 f 600 "603" 100 0 0 100 "select box_center($1)" - )); -DATA(insert OID = 1565 ( area PGUID 14 f t f 1 f 701 "603" 100 0 0 100 "select box_area($1)" - )); -DATA(insert OID = 1569 ( box PGUID 14 f t f 1 f 603 "718" 100 0 0 100 "select circle_box($1)" - )); - -DATA(insert OID = 1570 ( polygon PGUID 14 f t f 1 f 604 "602" 100 0 0 100 "select path_poly($1)" - )); -DATA(insert OID = 1571 ( polygon PGUID 14 f t f 1 f 604 "603" 100 0 0 100 "select box_poly($1)" - )); -DATA(insert OID = 1572 ( polygon PGUID 14 f t f 2 f 604 "23 718" 100 0 0 100 "select circle_poly($1, $2)" - )); -DATA(insert OID = 1573 ( polygon PGUID 14 f t f 1 f 604 "718" 100 0 0 100 "select circle_poly(12, $1)" - )); -DATA(insert OID = 1574 ( points PGUID 14 f t f 1 f 23 "604" 100 0 0 100 "select poly_npoints($1)" - )); -DATA(insert OID = 1575 ( center PGUID 14 f t f 1 f 600 "604" 100 0 0 100 "select poly_center($1)" - )); - -DATA(insert OID = 1579 ( circle PGUID 14 f t f 1 f 718 "603" 100 0 0 100 "select box_circle($1)" - )); -DATA(insert OID = 1580 ( circle PGUID 14 f t f 1 f 718 "604" 100 0 0 100 "select poly_circle($1)" - )); -DATA(insert OID = 1581 ( center PGUID 14 f t f 1 f 600 "718" 100 0 0 100 "select circle_center($1)" - )); -DATA(insert OID = 1582 ( radius PGUID 14 f t f 1 f 701 "718" 100 0 0 100 "select circle_radius($1)" - )); -DATA(insert OID = 1583 ( diameter PGUID 14 f t f 1 f 701 "718" 100 0 0 100 "select circle_diameter($1)" - )); -DATA(insert OID = 1584 ( area PGUID 14 f t f 1 f 701 "718" 100 0 0 100 "select circle_area($1)" - )); +DATA(insert OID = 1550 ( path PGUID 14 f t f 1 f 602 "604" 100 0 0 100 "select poly_path($1)" - )); +DATA(insert OID = 1551 ( length PGUID 14 f t f 1 f 701 "602" 100 0 1 0 "select path_length($1)" - )); +DATA(insert OID = 1552 ( points PGUID 14 f t f 1 f 23 "602" 100 0 0 100 "select path_npoints($1)" - )); +DATA(insert OID = 1553 ( pclose PGUID 14 f t f 1 f 602 "602" 100 0 0 100 "select path_close($1)" - )); +DATA(insert OID = 1554 ( popen PGUID 14 f t f 1 f 602 "602" 100 0 0 100 "select path_open($1)" - )); +DATA(insert OID = 1555 ( isopen PGUID 14 f t f 1 f 16 "602" 100 0 0 100 "select path_isopen($1)" - )); +DATA(insert OID = 1556 ( isclosed PGUID 14 f t f 1 f 16 "602" 100 0 0 100 "select path_isclosed($1)" - )); + +DATA(insert OID = 1560 ( box PGUID 14 f t f 2 f 603 "603 603" 100 0 0 100 "select box_intersect($1, $2)" - )); +DATA(insert OID = 1561 ( box PGUID 14 f t f 1 f 603 "604" 100 0 0 100 "select poly_box($1)" - )); +DATA(insert OID = 1562 ( width PGUID 14 f t f 1 f 701 "603" 100 0 0 100 "select box_width($1)" - )); +DATA(insert OID = 1563 ( height PGUID 14 f t f 1 f 701 "603" 100 0 0 100 "select box_height($1)" - )); +DATA(insert OID = 1564 ( center PGUID 14 f t f 1 f 600 "603" 100 0 0 100 "select box_center($1)" - )); +DATA(insert OID = 1565 ( area PGUID 14 f t f 1 f 701 "603" 100 0 0 100 "select box_area($1)" - )); +DATA(insert OID = 1569 ( box PGUID 14 f t f 1 f 603 "718" 100 0 0 100 "select circle_box($1)" - )); + +DATA(insert OID = 1570 ( polygon PGUID 14 f t f 1 f 604 "602" 100 0 0 100 "select path_poly($1)" - )); +DATA(insert OID = 1571 ( polygon PGUID 14 f t f 1 f 604 "603" 100 0 0 100 "select box_poly($1)" - )); +DATA(insert OID = 1572 ( polygon PGUID 14 f t f 2 f 604 "23 718" 100 0 0 100 "select circle_poly($1, $2)" - )); +DATA(insert OID = 1573 ( polygon PGUID 14 f t f 1 f 604 "718" 100 0 0 100 "select circle_poly(12, $1)" - )); +DATA(insert OID = 1574 ( points PGUID 14 f t f 1 f 23 "604" 100 0 0 100 "select poly_npoints($1)" - )); +DATA(insert OID = 1575 ( center PGUID 14 f t f 1 f 600 "604" 100 0 0 100 "select poly_center($1)" - )); + +DATA(insert OID = 1579 ( circle PGUID 14 f t f 1 f 718 "603" 100 0 0 100 "select box_circle($1)" - )); +DATA(insert OID = 1580 ( circle PGUID 14 f t f 1 f 718 "604" 100 0 0 100 "select poly_circle($1)" - )); +DATA(insert OID = 1581 ( center PGUID 14 f t f 1 f 600 "718" 100 0 0 100 "select circle_center($1)" - )); +DATA(insert OID = 1582 ( radius PGUID 14 f t f 1 f 701 "718" 100 0 0 100 "select circle_radius($1)" - )); +DATA(insert OID = 1583 ( diameter PGUID 14 f t f 1 f 701 "718" 100 0 0 100 "select circle_diameter($1)" - )); +DATA(insert OID = 1584 ( area PGUID 14 f t f 1 f 701 "718" 100 0 0 100 "select circle_area($1)" - )); /* Oracle Compatibility Related Functions - By Edmund Mergl <[email protected]> */ -DATA(insert OID = 868 ( strpos PGUID 14 f t f 2 f 23 "25 25" 100 0 0 100 "select textpos($1, $2)" - )); - -DATA(insert OID = 869 ( trim PGUID 14 f t f 1 f 25 "25" 100 0 0 100 "select btrim($1, \' \')" - )); -DATA(insert OID = 870 ( lower PGUID 11 f t f 1 f 25 "25" 100 0 0 100 foo bar )); -DATA(insert OID = 871 ( upper PGUID 11 f t f 1 f 25 "25" 100 0 0 100 foo bar )); -DATA(insert OID = 872 ( initcap PGUID 11 f t f 1 f 25 "25" 100 0 0 100 foo bar )); -DATA(insert OID = 873 ( lpad PGUID 11 f t f 3 f 25 "25 23 25" 100 0 0 100 foo bar )); -DATA(insert OID = 874 ( rpad PGUID 11 f t f 3 f 25 "25 23 25" 100 0 0 100 foo bar )); -DATA(insert OID = 875 ( ltrim PGUID 11 f t f 2 f 25 "25 25" 100 0 0 100 foo bar )); -DATA(insert OID = 876 ( rtrim PGUID 11 f t f 2 f 25 "25 25" 100 0 0 100 foo bar )); -DATA(insert OID = 877 ( substr PGUID 11 f t f 3 f 25 "25 23 23" 100 0 0 100 foo bar )); +DATA(insert OID = 868 ( strpos PGUID 14 f t f 2 f 23 "25 25" 100 0 0 100 "select textpos($1, $2)" - )); + +DATA(insert OID = 869 ( trim PGUID 14 f t f 1 f 25 "25" 100 0 0 100 "select btrim($1, \' \')" - )); +DATA(insert OID = 870 ( lower PGUID 11 f t f 1 f 25 "25" 100 0 0 100 foo bar )); +DATA(insert OID = 871 ( upper PGUID 11 f t f 1 f 25 "25" 100 0 0 100 foo bar )); +DATA(insert OID = 872 ( initcap PGUID 11 f t f 1 f 25 "25" 100 0 0 100 foo bar )); +DATA(insert OID = 873 ( lpad PGUID 11 f t f 3 f 25 "25 23 25" 100 0 0 100 foo bar )); +DATA(insert OID = 874 ( rpad PGUID 11 f t f 3 f 25 "25 23 25" 100 0 0 100 foo bar )); +DATA(insert OID = 875 ( ltrim PGUID 11 f t f 2 f 25 "25 25" 100 0 0 100 foo bar )); +DATA(insert OID = 876 ( rtrim PGUID 11 f t f 2 f 25 "25 25" 100 0 0 100 foo bar )); +DATA(insert OID = 877 ( substr PGUID 11 f t f 3 f 25 "25 23 23" 100 0 0 100 foo bar )); DATA(insert OID = 878 ( translate PGUID 11 f t f 3 f 25 "25 18 18" 100 0 0 100 foo bar )); -DATA(insert OID = 879 ( lpad PGUID 14 f t f 2 f 25 "25 23" 100 0 0 100 "select lpad($1, $2, \' \')" - )); -DATA(insert OID = 880 ( rpad PGUID 14 f t f 2 f 25 "25 23" 100 0 0 100 "select rpad($1, $2, \' \')" - )); -DATA(insert OID = 881 ( ltrim PGUID 14 f t f 1 f 25 "25" 100 0 0 100 "select ltrim($1, \' \')" - )); -DATA(insert OID = 882 ( rtrim PGUID 14 f t f 1 f 25 "25" 100 0 0 100 "select rtrim($1, \' \')" - )); -DATA(insert OID = 883 ( substr PGUID 14 f t f 2 f 25 "25 23" 100 0 0 100 "select substr($1, $2, 10000)" - )); -DATA(insert OID = 884 ( btrim PGUID 11 f t f 2 f 25 "25 25" 100 0 0 100 foo bar )); -DATA(insert OID = 885 ( btrim PGUID 14 f t f 1 f 25 "25" 100 0 0 100 "select btrim($1, \' \')" - )); +DATA(insert OID = 879 ( lpad PGUID 14 f t f 2 f 25 "25 23" 100 0 0 100 "select lpad($1, $2, \' \')" - )); +DATA(insert OID = 880 ( rpad PGUID 14 f t f 2 f 25 "25 23" 100 0 0 100 "select rpad($1, $2, \' \')" - )); +DATA(insert OID = 881 ( ltrim PGUID 14 f t f 1 f 25 "25" 100 0 0 100 "select ltrim($1, \' \')" - )); +DATA(insert OID = 882 ( rtrim PGUID 14 f t f 1 f 25 "25" 100 0 0 100 "select rtrim($1, \' \')" - )); +DATA(insert OID = 883 ( substr PGUID 14 f t f 2 f 25 "25 23" 100 0 0 100 "select substr($1, $2, 10000)" - )); +DATA(insert OID = 884 ( btrim PGUID 11 f t f 2 f 25 "25 25" 100 0 0 100 foo bar )); +DATA(insert OID = 885 ( btrim PGUID 14 f t f 1 f 25 "25" 100 0 0 100 "select btrim($1, \' \')" - )); /* XXX Help, where should I go to */ -DATA(insert OID = 1586 ( timespan_div PGUID 11 f t f 2 f 1186 "1186 701" 100 0 0 100 foo bar )); +DATA(insert OID = 1586 ( timespan_div PGUID 11 f t f 2 f 1186 "1186 701" 100 0 0 100 foo bar )); /* SEQUENCEs nextval & currval functions */ -DATA(insert OID = 1317 ( nextval PGUID 11 f t f 1 f 23 "25" 100 0 0 100 foo bar )); -DATA(insert OID = 1319 ( currval PGUID 11 f t f 1 f 23 "25" 100 0 0 100 foo bar )); +DATA(insert OID = 1317 ( nextval PGUID 11 f t f 1 f 23 "25" 100 0 0 100 foo bar )); +DATA(insert OID = 1319 ( currval PGUID 11 f t f 1 f 23 "25" 100 0 0 100 foo bar )); #define SeqNextValueRegProcedure 1317 #define SeqCurrValueRegProcedure 1319 -/* - * prototypes for functions pg_proc.c +/* + * prototypes for functions pg_proc.c */ -extern Oid ProcedureCreate(char* procedureName, - bool returnsSet, - char *returnTypeName, - char *languageName, - char *prosrc, - char *probin, - bool canCache, - bool trusted, - int32 byte_pct, - int32 perbyte_cpu, - int32 percall_cpu, - int32 outin_ratio, - List *argList, - CommandDest dest); - - -#endif /* PG_PROC_H */ +extern Oid +ProcedureCreate(char *procedureName, + bool returnsSet, + char *returnTypeName, + char *languageName, + char *prosrc, + char *probin, + bool canCache, + bool trusted, + int32 byte_pct, + int32 perbyte_cpu, + int32 percall_cpu, + int32 outin_ratio, + List * argList, + CommandDest dest); + + +#endif /* PG_PROC_H */ diff --git a/src/include/catalog/pg_relcheck.h b/src/include/catalog/pg_relcheck.h index 1609f142673..c0ca6604756 100644 --- a/src/include/catalog/pg_relcheck.h +++ b/src/include/catalog/pg_relcheck.h @@ -6,8 +6,8 @@ * Copyright (c) 1994, Regents of the University of California * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -15,39 +15,40 @@ #define PG_RELCHECK_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_relcheck definition. cpp turns this into - * typedef struct FormData_pg_relcheck + * pg_relcheck definition. cpp turns this into + * typedef struct FormData_pg_relcheck * ---------------- - */ -CATALOG(pg_relcheck) BOOTSTRAP { - Oid rcrelid; - NameData rcname; - text rcbin; - text rcsrc; + */ +CATALOG(pg_relcheck) BOOTSTRAP +{ + Oid rcrelid; + NameData rcname; + text rcbin; + text rcsrc; } FormData_pg_relcheck; /* ---------------- - * Form_pg_relcheck corresponds to a pointer to a tuple with - * the format of pg_relcheck relation. + * Form_pg_relcheck corresponds to a pointer to a tuple with + * the format of pg_relcheck relation. * ---------------- */ -typedef FormData_pg_relcheck *Form_pg_relcheck; +typedef FormData_pg_relcheck *Form_pg_relcheck; /* ---------------- - * compiler constants for pg_relcheck + * compiler constants for pg_relcheck * ---------------- */ -#define Natts_pg_relcheck 4 -#define Anum_pg_relcheck_rcrelid 1 -#define Anum_pg_relcheck_rcname 2 -#define Anum_pg_relcheck_rcbin 3 -#define Anum_pg_relcheck_rcsrc 4 +#define Natts_pg_relcheck 4 +#define Anum_pg_relcheck_rcrelid 1 +#define Anum_pg_relcheck_rcname 2 +#define Anum_pg_relcheck_rcbin 3 +#define Anum_pg_relcheck_rcsrc 4 -#endif /* PG_RELCHECK_H */ +#endif /* PG_RELCHECK_H */ diff --git a/src/include/catalog/pg_rewrite.h b/src/include/catalog/pg_rewrite.h index 04c59255962..8491d238954 100644 --- a/src/include/catalog/pg_rewrite.h +++ b/src/include/catalog/pg_rewrite.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_rewrite.h-- - * definition of the system "rewrite-rule" relation (pg_rewrite) - * along with the relation's initial contents. + * definition of the system "rewrite-rule" relation (pg_rewrite) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_rewrite.h,v 1.2 1996/10/31 09:47:54 scrappy Exp $ + * $Id: pg_rewrite.h,v 1.3 1997/09/07 04:57:08 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,45 +19,46 @@ #define PG_REWRITE_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_rewrite definition. cpp turns this into - * typedef struct FormData_pg_rewrite + * pg_rewrite definition. cpp turns this into + * typedef struct FormData_pg_rewrite * ---------------- - */ -CATALOG(pg_rewrite) { - NameData rulename; - char ev_type; - Oid ev_class; - int2 ev_attr; - bool is_instead; - text ev_qual; /* VARLENA */ - text action; /* VARLENA */ + */ +CATALOG(pg_rewrite) +{ + NameData rulename; + char ev_type; + Oid ev_class; + int2 ev_attr; + bool is_instead; + text ev_qual; /* VARLENA */ + text action; /* VARLENA */ } FormData_pg_rewrite; /* ---------------- - * Form_pg_rewrite corresponds to a pointer to a tuple with - * the format of pg_rewrite relation. + * Form_pg_rewrite corresponds to a pointer to a tuple with + * the format of pg_rewrite relation. * ---------------- */ typedef FormData_pg_rewrite *Form_pg_rewrite; /* ---------------- - * compiler constants for pg_rewrite + * compiler constants for pg_rewrite * ---------------- */ -#define Natts_pg_rewrite 7 -#define Anum_pg_rewrite_rulename 1 -#define Anum_pg_rewrite_ev_type 2 -#define Anum_pg_rewrite_ev_class 3 -#define Anum_pg_rewrite_ev_attr 4 -#define Anum_pg_rewrite_is_instead 5 -#define Anum_pg_rewrite_ev_qual 6 -#define Anum_pg_rewrite_action 7 +#define Natts_pg_rewrite 7 +#define Anum_pg_rewrite_rulename 1 +#define Anum_pg_rewrite_ev_type 2 +#define Anum_pg_rewrite_ev_class 3 +#define Anum_pg_rewrite_ev_attr 4 +#define Anum_pg_rewrite_is_instead 5 +#define Anum_pg_rewrite_ev_qual 6 +#define Anum_pg_rewrite_action 7 -#endif /* PG_REWRITE_H */ +#endif /* PG_REWRITE_H */ diff --git a/src/include/catalog/pg_server.h b/src/include/catalog/pg_server.h index 87d917903a7..8c0c642dc13 100644 --- a/src/include/catalog/pg_server.h +++ b/src/include/catalog/pg_server.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_server.h-- - * definition of the system "server" relation (pg_server) - * along with the relation's initial contents. + * definition of the system "server" relation (pg_server) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_server.h,v 1.2 1996/10/31 09:47:55 scrappy Exp $ + * $Id: pg_server.h,v 1.3 1997/09/07 04:57:09 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,37 +19,38 @@ #define PG_SERVER_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_server definition. cpp turns this into - * typedef struct FormData_pg_server + * pg_server definition. cpp turns this into + * typedef struct FormData_pg_server * ---------------- - */ -CATALOG(pg_server) BOOTSTRAP { - NameData sername; - int2 serpid; - int2 serport; + */ +CATALOG(pg_server) BOOTSTRAP +{ + NameData sername; + int2 serpid; + int2 serport; } FormData_pg_server; /* ---------------- - * Form_pg_server corresponds to a pointer to a tuple with - * the format of pg_server relation. + * Form_pg_server corresponds to a pointer to a tuple with + * the format of pg_server relation. * ---------------- */ -typedef FormData_pg_server *Form_pg_server; +typedef FormData_pg_server *Form_pg_server; /* ---------------- - * compiler constants for pg_server + * compiler constants for pg_server * ---------------- */ -#define Natts_pg_server 3 -#define Anum_pg_server_sername 1 -#define Anum_pg_server_serpid 2 -#define Anum_pg_server_serport 3 +#define Natts_pg_server 3 +#define Anum_pg_server_sername 1 +#define Anum_pg_server_serpid 2 +#define Anum_pg_server_serport 3 -#endif /* PG_SERVER_H */ +#endif /* PG_SERVER_H */ diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h index cc76e5d893c..6059bbd477c 100644 --- a/src/include/catalog/pg_statistic.h +++ b/src/include/catalog/pg_statistic.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_statistic.h-- - * definition of the system "statistic" relation (pg_statistic) - * along with the relation's initial contents. + * definition of the system "statistic" relation (pg_statistic) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_statistic.h,v 1.2 1996/10/31 09:47:57 scrappy Exp $ + * $Id: pg_statistic.h,v 1.3 1997/09/07 04:57:10 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,41 +19,42 @@ #define PG_STATISTIC_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_statistic definition. cpp turns this into - * typedef struct FormData_pg_statistic + * pg_statistic definition. cpp turns this into + * typedef struct FormData_pg_statistic * ---------------- - */ -CATALOG(pg_statistic) { - Oid starelid; - int2 staattnum; - Oid staop; - text stalokey; /* VARIABLE LENGTH FIELD */ - text stahikey; /* VARIABLE LENGTH FIELD */ + */ +CATALOG(pg_statistic) +{ + Oid starelid; + int2 staattnum; + Oid staop; + text stalokey; /* VARIABLE LENGTH FIELD */ + text stahikey; /* VARIABLE LENGTH FIELD */ } FormData_pg_statistic; /* ---------------- - * Form_pg_statistic corresponds to a pointer to a tuple with - * the format of pg_statistic relation. + * Form_pg_statistic corresponds to a pointer to a tuple with + * the format of pg_statistic relation. * ---------------- */ -typedef FormData_pg_statistic *Form_pg_statistic; +typedef FormData_pg_statistic *Form_pg_statistic; /* ---------------- - * compiler constants for pg_statistic + * compiler constants for pg_statistic * ---------------- */ -#define Natts_pg_statistic 5 -#define Anum_pg_statistic_starelid 1 -#define Anum_pg_statistic_staattnum 2 -#define Anum_pg_statistic_staop 3 -#define Anum_pg_statistic_stalokey 4 -#define Anum_pg_statistic_stahikey 5 +#define Natts_pg_statistic 5 +#define Anum_pg_statistic_starelid 1 +#define Anum_pg_statistic_staattnum 2 +#define Anum_pg_statistic_staop 3 +#define Anum_pg_statistic_stalokey 4 +#define Anum_pg_statistic_stahikey 5 -#endif /* PG_STATISTIC_H */ +#endif /* PG_STATISTIC_H */ diff --git a/src/include/catalog/pg_time.h b/src/include/catalog/pg_time.h index 5b35d73f25b..f1955930f06 100644 --- a/src/include/catalog/pg_time.h +++ b/src/include/catalog/pg_time.h @@ -1,19 +1,19 @@ /*------------------------------------------------------------------------- * * pg_time.h-- - * the system commit-time relation "pg_time" is not a "heap" relation. - * it is automatically created by the transam/ code and the - * information here is all bogus and is just here to make the - * relcache code happy. + * the system commit-time relation "pg_time" is not a "heap" relation. + * it is automatically created by the transam/ code and the + * information here is all bogus and is just here to make the + * relcache code happy. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_time.h,v 1.2 1996/10/31 09:47:58 scrappy Exp $ + * $Id: pg_time.h,v 1.3 1997/09/07 04:57:10 momjian Exp $ * * NOTES - * The structures and macros used by the transam/ code - * to access pg_time should some day go here -cim 6/18/90 + * The structures and macros used by the transam/ code + * to access pg_time should some day go here -cim 6/18/90 * *------------------------------------------------------------------------- */ @@ -21,20 +21,21 @@ #define PG_TIME_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ -CATALOG(pg_time) BOOTSTRAP { - Oid timefoo; +CATALOG(pg_time) BOOTSTRAP +{ + Oid timefoo; } FormData_pg_time; -typedef FormData_pg_time *Form_pg_time; +typedef FormData_pg_time *Form_pg_time; -#define Natts_pg_time 1 +#define Natts_pg_time 1 #define Anum_pg_time_timefoo 1 -#endif /* PG_TIME_H */ +#endif /* PG_TIME_H */ diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h index 7c675b73db3..08472839ef0 100644 --- a/src/include/catalog/pg_trigger.h +++ b/src/include/catalog/pg_trigger.h @@ -6,8 +6,8 @@ * Copyright (c) 1994, Regents of the University of California * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -15,65 +15,67 @@ #define PG_TRIGGER_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_trigger definition. cpp turns this into - * typedef struct FormData_pg_trigger + * pg_trigger definition. cpp turns this into + * typedef struct FormData_pg_trigger * ---------------- - */ -CATALOG(pg_trigger) BOOTSTRAP { - Oid tgrelid; /* triggered relation */ - NameData tgname; /* trigger' name */ - Oid tgfoid; /* OID of function to be called */ - int2 tgtype; /* BEFORE/AFTER UPDATE/DELETE/INSERT ROW/STATEMENT */ - int2 tgnargs; /* # of extra arguments in tgargs */ - int28 tgattr; /* UPDATE of attr1, attr2 ... (NI) */ - bytea tgargs; /* first\000second\000tgnargs\000 */ + */ +CATALOG(pg_trigger) BOOTSTRAP +{ + Oid tgrelid; /* triggered relation */ + NameData tgname; /* trigger' name */ + Oid tgfoid; /* OID of function to be called */ + int2 tgtype; /* BEFORE/AFTER UPDATE/DELETE/INSERT + * ROW/STATEMENT */ + int2 tgnargs; /* # of extra arguments in tgargs */ + int28 tgattr; /* UPDATE of attr1, attr2 ... (NI) */ + bytea tgargs; /* first\000second\000tgnargs\000 */ } FormData_pg_trigger; /* ---------------- - * Form_pg_trigger corresponds to a pointer to a tuple with - * the format of pg_trigger relation. + * Form_pg_trigger corresponds to a pointer to a tuple with + * the format of pg_trigger relation. * ---------------- */ -typedef FormData_pg_trigger *Form_pg_trigger; +typedef FormData_pg_trigger *Form_pg_trigger; /* ---------------- - * compiler constants for pg_trigger + * compiler constants for pg_trigger * ---------------- */ -#define Natts_pg_trigger 7 -#define Anum_pg_trigger_tgrelid 1 -#define Anum_pg_trigger_tgname 2 -#define Anum_pg_trigger_tgfoid 3 -#define Anum_pg_trigger_tgtype 4 -#define Anum_pg_trigger_tgnargs 5 -#define Anum_pg_trigger_tgattr 6 -#define Anum_pg_trigger_tgargs 7 +#define Natts_pg_trigger 7 +#define Anum_pg_trigger_tgrelid 1 +#define Anum_pg_trigger_tgname 2 +#define Anum_pg_trigger_tgfoid 3 +#define Anum_pg_trigger_tgtype 4 +#define Anum_pg_trigger_tgnargs 5 +#define Anum_pg_trigger_tgattr 6 +#define Anum_pg_trigger_tgargs 7 -#define TRIGGER_TYPE_ROW (1 << 0) -#define TRIGGER_TYPE_BEFORE (1 << 1) -#define TRIGGER_TYPE_INSERT (1 << 2) -#define TRIGGER_TYPE_DELETE (1 << 3) -#define TRIGGER_TYPE_UPDATE (1 << 4) +#define TRIGGER_TYPE_ROW (1 << 0) +#define TRIGGER_TYPE_BEFORE (1 << 1) +#define TRIGGER_TYPE_INSERT (1 << 2) +#define TRIGGER_TYPE_DELETE (1 << 3) +#define TRIGGER_TYPE_UPDATE (1 << 4) -#define TRIGGER_CLEAR_TYPE(type) (type = 0) +#define TRIGGER_CLEAR_TYPE(type) (type = 0) -#define TRIGGER_SETT_ROW(type) (type |= TRIGGER_TYPE_ROW) -#define TRIGGER_SETT_BEFORE(type) (type |= TRIGGER_TYPE_BEFORE) -#define TRIGGER_SETT_INSERT(type) (type |= TRIGGER_TYPE_INSERT) -#define TRIGGER_SETT_DELETE(type) (type |= TRIGGER_TYPE_DELETE) -#define TRIGGER_SETT_UPDATE(type) (type |= TRIGGER_TYPE_UPDATE) +#define TRIGGER_SETT_ROW(type) (type |= TRIGGER_TYPE_ROW) +#define TRIGGER_SETT_BEFORE(type) (type |= TRIGGER_TYPE_BEFORE) +#define TRIGGER_SETT_INSERT(type) (type |= TRIGGER_TYPE_INSERT) +#define TRIGGER_SETT_DELETE(type) (type |= TRIGGER_TYPE_DELETE) +#define TRIGGER_SETT_UPDATE(type) (type |= TRIGGER_TYPE_UPDATE) -#define TRIGGER_FOR_ROW(type) (type & TRIGGER_TYPE_ROW) -#define TRIGGER_FOR_BEFORE(type) (type & TRIGGER_TYPE_BEFORE) -#define TRIGGER_FOR_INSERT(type) (type & TRIGGER_TYPE_INSERT) -#define TRIGGER_FOR_DELETE(type) (type & TRIGGER_TYPE_DELETE) -#define TRIGGER_FOR_UPDATE(type) (type & TRIGGER_TYPE_UPDATE) +#define TRIGGER_FOR_ROW(type) (type & TRIGGER_TYPE_ROW) +#define TRIGGER_FOR_BEFORE(type) (type & TRIGGER_TYPE_BEFORE) +#define TRIGGER_FOR_INSERT(type) (type & TRIGGER_TYPE_INSERT) +#define TRIGGER_FOR_DELETE(type) (type & TRIGGER_TYPE_DELETE) +#define TRIGGER_FOR_UPDATE(type) (type & TRIGGER_TYPE_UPDATE) -#endif /* PG_TRIGGER_H */ +#endif /* PG_TRIGGER_H */ diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index 14a3983ce07..9083dad4452 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_type.h-- - * definition of the system "type" relation (pg_type) - * along with the relation's initial contents. + * definition of the system "type" relation (pg_type) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_type.h,v 1.16 1997/08/31 09:55:24 vadim Exp $ + * $Id: pg_type.h,v 1.17 1997/09/07 04:57:12 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -21,212 +21,220 @@ #include <utils/rel.h> /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_type definition. cpp turns this into - * typedef struct FormData_pg_type + * pg_type definition. cpp turns this into + * typedef struct FormData_pg_type * - * Some of the values in a pg_type instance are copied into - * pg_attribute instances. Some parts of Postgres use the pg_type copy, - * while others use the pg_attribute copy, so they must match. - * See struct FormData_pg_attribute for details. + * Some of the values in a pg_type instance are copied into + * pg_attribute instances. Some parts of Postgres use the pg_type copy, + * while others use the pg_attribute copy, so they must match. + * See struct FormData_pg_attribute for details. * ---------------- */ -CATALOG(pg_type) BOOTSTRAP { - NameData typname; - Oid typowner; - int2 typlen; - /* typlen is the number of bytes we use to represent a value of - this type, e.g. 4 for an int4. But for a variable length - type, typlen is -1. - */ - int2 typprtlen; - bool typbyval; - /* typbyval determines whether internal Postgres routines pass a value - of this type by value or by reference. Postgres uses a 4 byte - area for passing a field value info, so if the value is not 1, 2, - or 4 bytes long, Postgres does not have the option of passing by - value and ignores typbyval. - - (I don't understand why this column exists. The above description - may be an oversimplification. Also, there appear to be bugs in which - Postgres doesn't ignore typbyval when it should, but I'm - afraid to change them until I see proof of damage. -BRYANH 96.08). - - (Postgres crashes if typbyval is true, the declared length is 8, - and the I/O routines are written to expect pass by reference. - Note that float4 is written for pass by reference and has a declared length - of 4 bytes, so it looks like pass by reference must be consistant - with the declared length, and typbyval is used somewhere. - tgl 97/03/20) - */ - char typtype; - bool typisdefined; - char typdelim; - Oid typrelid; - Oid typelem; - /* typelem is NULL if this is not an array type. If this is an array - type, typelem is the OID of the type of the elements of the array - (it identifies another row in Table pg_type). - - (Note that zero ("0") rather than _null_ is used - in the declarations. - tgl 97/03/20) - */ - regproc typinput; - regproc typoutput; - regproc typreceive; - regproc typsend; - char typalign; - /* typalign is the alignment required when storing a value of this - type. It applies to storage on disk as well as most representations - of the value inside Postgres. When multiple values are stored - consecutively, such as in the representation of a complete row - on disk, padding is inserted before a datum of this type so that it - begins on the specified boundary. The alignment reference is the - beginning of the first datum in the sequence. - - 'c' = 1 byte alignment. - 's' = 2 byte alignment. - 'i' = 4 byte alignment. - 'd' = 8 byte alignment. - - (This might actually be flexible depending on machine architecture, - but I doubt it - BRYANH 96.08). - */ - text typdefault; /* VARIABLE LENGTH FIELD */ +CATALOG(pg_type) BOOTSTRAP +{ + NameData typname; + Oid typowner; + int2 typlen; + + /* + * typlen is the number of bytes we use to represent a value of this + * type, e.g. 4 for an int4. But for a variable length type, typlen + * is -1. + */ + int2 typprtlen; + bool typbyval; + + /* + * typbyval determines whether internal Postgres routines pass a value + * of this type by value or by reference. Postgres uses a 4 byte area + * for passing a field value info, so if the value is not 1, 2, or 4 + * bytes long, Postgres does not have the option of passing by value + * and ignores typbyval. + * + * (I don't understand why this column exists. The above description may + * be an oversimplification. Also, there appear to be bugs in which + * Postgres doesn't ignore typbyval when it should, but I'm afraid to + * change them until I see proof of damage. -BRYANH 96.08). + * + * (Postgres crashes if typbyval is true, the declared length is 8, and + * the I/O routines are written to expect pass by reference. Note that + * float4 is written for pass by reference and has a declared length + * of 4 bytes, so it looks like pass by reference must be consistant + * with the declared length, and typbyval is used somewhere. - tgl + * 97/03/20) + */ + char typtype; + bool typisdefined; + char typdelim; + Oid typrelid; + Oid typelem; + + /* + * typelem is NULL if this is not an array type. If this is an array + * type, typelem is the OID of the type of the elements of the array + * (it identifies another row in Table pg_type). + * + * (Note that zero ("0") rather than _null_ is used in the declarations. + * - tgl 97/03/20) + */ + regproc typinput; + regproc typoutput; + regproc typreceive; + regproc typsend; + char typalign; + + /* + * typalign is the alignment required when storing a value of this + * type. It applies to storage on disk as well as most + * representations of the value inside Postgres. When multiple values + * are stored consecutively, such as in the representation of a + * complete row on disk, padding is inserted before a datum of this + * type so that it begins on the specified boundary. The alignment + * reference is the beginning of the first datum in the sequence. + * + * 'c' = 1 byte alignment. 's' = 2 byte alignment. 'i' = 4 byte + * alignment. 'd' = 8 byte alignment. + * + * (This might actually be flexible depending on machine architecture, + * but I doubt it - BRYANH 96.08). + */ + text typdefault; /* VARIABLE LENGTH FIELD */ } TypeTupleFormData; /* ---------------- - * Form_pg_type corresponds to a pointer to a row with - * the format of pg_type relation. + * Form_pg_type corresponds to a pointer to a row with + * the format of pg_type relation. * ---------------- */ -typedef TypeTupleFormData *TypeTupleForm; +typedef TypeTupleFormData *TypeTupleForm; /* ---------------- - * compiler constants for pg_type + * compiler constants for pg_type * ---------------- */ -#define Natts_pg_type 16 -#define Anum_pg_type_typname 1 -#define Anum_pg_type_typowner 2 -#define Anum_pg_type_typlen 3 -#define Anum_pg_type_typprtlen 4 -#define Anum_pg_type_typbyval 5 -#define Anum_pg_type_typtype 6 -#define Anum_pg_type_typisdefined 7 -#define Anum_pg_type_typdelim 8 -#define Anum_pg_type_typrelid 9 -#define Anum_pg_type_typelem 10 -#define Anum_pg_type_typinput 11 -#define Anum_pg_type_typoutput 12 -#define Anum_pg_type_typreceive 13 -#define Anum_pg_type_typsend 14 -#define Anum_pg_type_typalign 15 -#define Anum_pg_type_typdefault 16 +#define Natts_pg_type 16 +#define Anum_pg_type_typname 1 +#define Anum_pg_type_typowner 2 +#define Anum_pg_type_typlen 3 +#define Anum_pg_type_typprtlen 4 +#define Anum_pg_type_typbyval 5 +#define Anum_pg_type_typtype 6 +#define Anum_pg_type_typisdefined 7 +#define Anum_pg_type_typdelim 8 +#define Anum_pg_type_typrelid 9 +#define Anum_pg_type_typelem 10 +#define Anum_pg_type_typinput 11 +#define Anum_pg_type_typoutput 12 +#define Anum_pg_type_typreceive 13 +#define Anum_pg_type_typsend 14 +#define Anum_pg_type_typalign 15 +#define Anum_pg_type_typdefault 16 /* ---------------- - * initial contents of pg_type + * initial contents of pg_type * ---------------- */ /* keep the following ordered by OID so that later changes can be made easier*/ /* Make sure the typlen, typbyval, and typalign values here match the initial - values for attlen, attbyval, and attalign in both places in pg_attribute.h + values for attlen, attbyval, and attalign in both places in pg_attribute.h for every instance. */ /* OIDS 1 - 99 */ -DATA(insert OID = 16 ( bool PGUID 1 1 t b t \054 0 0 boolin boolout boolin boolout c _null_ )); -#define BOOLOID 16 +DATA(insert OID = 16 ( bool PGUID 1 1 t b t \054 0 0 boolin boolout boolin boolout c _null_ )); +#define BOOLOID 16 -DATA(insert OID = 17 ( bytea PGUID -1 -1 f b t \054 0 18 byteain byteaout byteain byteaout i _null_ )); -DATA(insert OID = 18 ( char PGUID 1 1 t b t \054 0 0 charin charout charin charout c _null_ )); +DATA(insert OID = 17 ( bytea PGUID -1 -1 f b t \054 0 18 byteain byteaout byteain byteaout i _null_ )); +DATA(insert OID = 18 ( char PGUID 1 1 t b t \054 0 0 charin charout charin charout c _null_ )); #define CHAROID 18 -DATA(insert OID = 19 ( name PGUID NAMEDATALEN NAMEDATALEN f b t \054 0 18 namein nameout namein nameout d _null_ )); +DATA(insert OID = 19 ( name PGUID NAMEDATALEN NAMEDATALEN f b t \054 0 18 namein nameout namein nameout d _null_ )); #define NAMEOID 19 -DATA(insert OID = 20 ( char16 PGUID 16 16 f b t \054 0 18 char16in char16out char16in char16out i _null_ )); -DATA(insert OID = 21 ( int2 PGUID 2 5 t b t \054 0 0 int2in int2out int2in int2out s _null_ )); -#define INT2OID 21 +DATA(insert OID = 20 ( char16 PGUID 16 16 f b t \054 0 18 char16in char16out char16in char16out i _null_ )); +DATA(insert OID = 21 ( int2 PGUID 2 5 t b t \054 0 0 int2in int2out int2in int2out s _null_ )); +#define INT2OID 21 -DATA(insert OID = 22 ( int28 PGUID 16 50 f b t \054 0 21 int28in int28out int28in int28out i _null_ )); +DATA(insert OID = 22 ( int28 PGUID 16 50 f b t \054 0 21 int28in int28out int28in int28out i _null_ )); /* * XXX -- the implementation of int28's in postgres is a hack, and will - * go away someday. until that happens, there is a case (in the - * catalog cache management code) where we need to step gingerly - * over piles of int28's on the sidewalk. in order to do so, we - * need the OID of the int28 row from pg_type. + * go away someday. until that happens, there is a case (in the + * catalog cache management code) where we need to step gingerly + * over piles of int28's on the sidewalk. in order to do so, we + * need the OID of the int28 row from pg_type. */ -#define INT28OID 22 +#define INT28OID 22 -DATA(insert OID = 23 ( int4 PGUID 4 10 t b t \054 0 0 int4in int4out int4in int4out i _null_ )); -#define INT4OID 23 +DATA(insert OID = 23 ( int4 PGUID 4 10 t b t \054 0 0 int4in int4out int4in int4out i _null_ )); +#define INT4OID 23 -DATA(insert OID = 24 ( regproc PGUID 4 16 t b t \054 0 0 regprocin regprocout regprocin regprocout i _null_ )); -DATA(insert OID = 25 ( text PGUID -1 -1 f b t \054 0 18 textin textout textin textout i _null_ )); +DATA(insert OID = 24 ( regproc PGUID 4 16 t b t \054 0 0 regprocin regprocout regprocin regprocout i _null_ )); +DATA(insert OID = 25 ( text PGUID -1 -1 f b t \054 0 18 textin textout textin textout i _null_ )); #define TEXTOID 25 -DATA(insert OID = 26 ( oid PGUID 4 10 t b t \054 0 0 int4in int4out int4in int4out i _null_ )); -#define OIDOID 26 - -DATA(insert OID = 27 ( tid PGUID 6 19 f b t \054 0 0 tidin tidout tidin tidout i _null_ )); -DATA(insert OID = 28 ( xid PGUID 4 12 t b t \054 0 0 xidin xidout xidin xidout i _null_ )); -DATA(insert OID = 29 ( cid PGUID 2 3 t b t \054 0 0 cidin cidout cidin cidout s _null_ )); -DATA(insert OID = 30 ( oid8 PGUID 32 89 f b t \054 0 26 oid8in oid8out oid8in oid8out i _null_ )); -DATA(insert OID = 32 ( SET PGUID -1 -1 f r t \054 0 -1 textin textout textin textout i _null_ )); - -DATA(insert OID = 71 ( pg_type PGUID 1 1 t b t \054 1247 0 foo bar foo bar c _null_)); -DATA(insert OID = 75 ( pg_attribute PGUID 1 1 t b t \054 1249 0 foo bar foo bar c _null_)); -DATA(insert OID = 76 ( pg_demon PGUID 1 1 t b t \054 1251 0 foo bar foo bar c _null_)); -DATA(insert OID = 80 ( pg_magic PGUID 1 1 t b t \054 1253 0 foo bar foo bar c _null_)); -DATA(insert OID = 81 ( pg_proc PGUID 1 1 t b t \054 1255 0 foo bar foo bar c _null_)); -DATA(insert OID = 82 ( pg_server PGUID 1 1 t b t \054 1257 0 foo bar foo bar c _null_)); -DATA(insert OID = 83 ( pg_class PGUID 1 1 t b t \054 1259 0 foo bar foo bar c _null_)); -DATA(insert OID = 86 ( pg_user PGUID 1 1 t b t \054 1260 0 foo bar foo bar c _null_)); -DATA(insert OID = 87 ( pg_group PGUID 1 1 t b t \054 1261 0 foo bar foo bar c _null_)); -DATA(insert OID = 88 ( pg_database PGUID 1 1 t b t \054 1262 0 foo bar foo bar c _null_)); -DATA(insert OID = 89 ( pg_defaults PGUID 1 1 t b t \054 1263 0 foo bar foo bar c _null_)); -DATA(insert OID = 90 ( pg_variable PGUID 1 1 t b t \054 1264 0 foo bar foo bar c _null_)); -DATA(insert OID = 99 ( pg_log PGUID 1 1 t b t \054 1269 0 foo bar foo bar c _null_)); +DATA(insert OID = 26 ( oid PGUID 4 10 t b t \054 0 0 int4in int4out int4in int4out i _null_ )); +#define OIDOID 26 + +DATA(insert OID = 27 ( tid PGUID 6 19 f b t \054 0 0 tidin tidout tidin tidout i _null_ )); +DATA(insert OID = 28 ( xid PGUID 4 12 t b t \054 0 0 xidin xidout xidin xidout i _null_ )); +DATA(insert OID = 29 ( cid PGUID 2 3 t b t \054 0 0 cidin cidout cidin cidout s _null_ )); +DATA(insert OID = 30 ( oid8 PGUID 32 89 f b t \054 0 26 oid8in oid8out oid8in oid8out i _null_ )); +DATA(insert OID = 32 ( SET PGUID -1 -1 f r t \054 0 -1 textin textout textin textout i _null_ )); + +DATA(insert OID = 71 ( pg_type PGUID 1 1 t b t \054 1247 0 foo bar foo bar c _null_)); +DATA(insert OID = 75 ( pg_attribute PGUID 1 1 t b t \054 1249 0 foo bar foo bar c _null_)); +DATA(insert OID = 76 ( pg_demon PGUID 1 1 t b t \054 1251 0 foo bar foo bar c _null_)); +DATA(insert OID = 80 ( pg_magic PGUID 1 1 t b t \054 1253 0 foo bar foo bar c _null_)); +DATA(insert OID = 81 ( pg_proc PGUID 1 1 t b t \054 1255 0 foo bar foo bar c _null_)); +DATA(insert OID = 82 ( pg_server PGUID 1 1 t b t \054 1257 0 foo bar foo bar c _null_)); +DATA(insert OID = 83 ( pg_class PGUID 1 1 t b t \054 1259 0 foo bar foo bar c _null_)); +DATA(insert OID = 86 ( pg_user PGUID 1 1 t b t \054 1260 0 foo bar foo bar c _null_)); +DATA(insert OID = 87 ( pg_group PGUID 1 1 t b t \054 1261 0 foo bar foo bar c _null_)); +DATA(insert OID = 88 ( pg_database PGUID 1 1 t b t \054 1262 0 foo bar foo bar c _null_)); +DATA(insert OID = 89 ( pg_defaults PGUID 1 1 t b t \054 1263 0 foo bar foo bar c _null_)); +DATA(insert OID = 90 ( pg_variable PGUID 1 1 t b t \054 1264 0 foo bar foo bar c _null_)); +DATA(insert OID = 99 ( pg_log PGUID 1 1 t b t \054 1269 0 foo bar foo bar c _null_)); /* OIDS 100 - 199 */ -DATA(insert OID = 100 ( pg_time PGUID 1 1 t b t \054 1271 0 foo bar foo bar c _null_)); -DATA(insert OID = 101 ( pg_hosts PGUID 1 1 t b t \054 1273 0 foo bar foo bar c _null_)); +DATA(insert OID = 100 ( pg_time PGUID 1 1 t b t \054 1271 0 foo bar foo bar c _null_)); +DATA(insert OID = 101 ( pg_hosts PGUID 1 1 t b t \054 1273 0 foo bar foo bar c _null_)); DATA(insert OID = 109 ( pg_attrdef PGUID 1 1 t b t \054 1215 0 foo bar foo bar c _null_)); DATA(insert OID = 110 ( pg_relcheck PGUID 1 1 t b t \054 1216 0 foo bar foo bar c _null_)); DATA(insert OID = 111 ( pg_trigger PGUID 1 1 t b t \054 1219 0 foo bar foo bar c _null_)); /* OIDS 200 - 299 */ -DATA(insert OID = 210 ( smgr PGUID 2 12 t b t \054 0 -1 smgrin smgrout smgrin smgrout s _null_ )); +DATA(insert OID = 210 ( smgr PGUID 2 12 t b t \054 0 -1 smgrin smgrout smgrin smgrout s _null_ )); /* OIDS 300 - 399 */ /* OIDS 400 - 499 */ -DATA(insert OID = 409 ( char2 PGUID 2 2 t b t \054 0 18 char2in char2out char2in char2out s _null_ )); -DATA(insert OID = 410 ( char4 PGUID 4 4 t b t \054 0 18 char4in char4out char4in char4out i _null_ )); -DATA(insert OID = 411 ( char8 PGUID 8 8 f b t \054 0 18 char8in char8out char8in char8out i _null_ )); +DATA(insert OID = 409 ( char2 PGUID 2 2 t b t \054 0 18 char2in char2out char2in char2out s _null_ )); +DATA(insert OID = 410 ( char4 PGUID 4 4 t b t \054 0 18 char4in char4out char4in char4out i _null_ )); +DATA(insert OID = 411 ( char8 PGUID 8 8 f b t \054 0 18 char8in char8out char8in char8out i _null_ )); /* OIDS 500 - 599 */ /* OIDS 600 - 699 */ -DATA(insert OID = 600 ( point PGUID 16 24 f b t \054 0 701 point_in point_out point_in point_out d _null_ )); -DATA(insert OID = 601 ( lseg PGUID 32 48 f b t \054 0 600 lseg_in lseg_out lseg_in lseg_out d _null_ )); -DATA(insert OID = 602 ( path PGUID -1 -1 f b t \054 0 600 path_in path_out path_in path_out d _null_ )); -DATA(insert OID = 603 ( box PGUID 32 100 f b t \073 0 600 box_in box_out box_in box_out d _null_ )); +DATA(insert OID = 600 ( point PGUID 16 24 f b t \054 0 701 point_in point_out point_in point_out d _null_ )); +DATA(insert OID = 601 ( lseg PGUID 32 48 f b t \054 0 600 lseg_in lseg_out lseg_in lseg_out d _null_ )); +DATA(insert OID = 602 ( path PGUID -1 -1 f b t \054 0 600 path_in path_out path_in path_out d _null_ )); +DATA(insert OID = 603 ( box PGUID 32 100 f b t \073 0 600 box_in box_out box_in box_out d _null_ )); DATA(insert OID = 604 ( polygon PGUID -1 -1 f b t \054 0 -1 poly_in poly_out poly_in poly_out d _null_ )); DATA(insert OID = 605 ( filename PGUID 256 -1 f b t \054 0 18 filename_in filename_out filename_in filename_out i _null_ )); -DATA(insert OID = 628 ( line PGUID 32 48 f b t \054 0 701 line_in line_out line_in line_out d _null_ )); -DATA(insert OID = 629 ( _line PGUID -1 -1 f b t \054 0 628 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 628 ( line PGUID 32 48 f b t \054 0 701 line_in line_out line_in line_out d _null_ )); +DATA(insert OID = 629 ( _line PGUID -1 -1 f b t \054 0 628 array_in array_out array_in array_out d _null_ )); /* OIDS 700 - 799 */ @@ -238,11 +246,11 @@ DATA(insert OID = 702 ( abstime PGUID 4 20 t b t \054 0 0 nabstimein nabs DATA(insert OID = 703 ( reltime PGUID 4 20 t b t \054 0 0 reltimein reltimeout reltimein reltimeout i _null_ )); DATA(insert OID = 704 ( tinterval PGUID 12 47 f b t \054 0 0 tintervalin tintervalout tintervalin tintervalout i _null_ )); DATA(insert OID = 705 ( unknown PGUID -1 -1 f b t \054 0 18 textin textout textin textout i _null_ )); -#define UNKNOWNOID 705 +#define UNKNOWNOID 705 -DATA(insert OID = 718 ( circle PGUID 24 47 f b t \054 0 0 circle_in circle_out circle_in circle_out d _null_ )); +DATA(insert OID = 718 ( circle PGUID 24 47 f b t \054 0 0 circle_in circle_out circle_in circle_out d _null_ )); DATA(insert OID = 719 ( _circle PGUID -1 -1 f b t \054 0 718 array_in array_out array_in array_out d _null_ )); -DATA(insert OID = 790 ( money PGUID 4 24 f b t \054 0 0 cash_in cash_out cash_in cash_out i _null_ )); +DATA(insert OID = 790 ( money PGUID 4 24 f b t \054 0 0 cash_in cash_out cash_in cash_out i _null_ )); #define CASHOID 790 DATA(insert OID = 791 ( _money PGUID -1 -1 f b t \054 0 790 array_in array_out array_in array_out i _null_ )); @@ -254,87 +262,88 @@ DATA(insert OID = 910 ( oidint4 PGUID 8 20 f b t \054 0 0 oidint4in oidin DATA(insert OID = 911 ( oidname PGUID OIDNAMELEN OIDNAMELEN f b t \054 0 0 oidnamein oidnameout oidnamein oidnameout i _null_ )); /* OIDS 1000 - 1099 */ -DATA(insert OID = 1000 ( _bool PGUID -1 -1 f b t \054 0 16 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1001 ( _bytea PGUID -1 -1 f b t \054 0 17 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1002 ( _char PGUID -1 -1 f b t \054 0 18 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1003 ( _name PGUID -1 -1 f b t \054 0 19 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1004 ( _char16 PGUID -1 -1 f b t \054 0 20 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1005 ( _int2 PGUID -1 -1 f b t \054 0 21 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1006 ( _int28 PGUID -1 -1 f b t \054 0 22 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1007 ( _int4 PGUID -1 -1 f b t \054 0 23 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1008 ( _regproc PGUID -1 -1 f b t \054 0 24 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1009 ( _text PGUID -1 -1 f b t \054 0 25 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1028 ( _oid PGUID -1 -1 f b t \054 0 26 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1010 ( _tid PGUID -1 -1 f b t \054 0 27 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1011 ( _xid PGUID -1 -1 f b t \054 0 28 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1012 ( _cid PGUID -1 -1 f b t \054 0 29 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1013 ( _oid8 PGUID -1 -1 f b t \054 0 30 array_in array_out array_in array_out i _null_ )); -/*DATA(insert OID = 1014 ( _lock PGUID -1 -1 f b t \054 0 31 array_in array_out array_in array_out i _null_ ));*/ -DATA(insert OID = 1015 ( _stub PGUID -1 -1 f b t \054 0 33 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1016 ( _ref PGUID -1 -1 f b t \054 0 591 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1017 ( _point PGUID -1 -1 f b t \054 0 600 array_in array_out array_in array_out d _null_ )); -DATA(insert OID = 1018 ( _lseg PGUID -1 -1 f b t \054 0 601 array_in array_out array_in array_out d _null_ )); -DATA(insert OID = 1019 ( _path PGUID -1 -1 f b t \054 0 602 array_in array_out array_in array_out d _null_ )); -DATA(insert OID = 1020 ( _box PGUID -1 -1 f b t \073 0 603 array_in array_out array_in array_out d _null_ )); -DATA(insert OID = 1021 ( _float4 PGUID -1 -1 f b t \054 0 700 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1022 ( _float8 PGUID -1 -1 f b t \054 0 701 array_in array_out array_in array_out d _null_ )); -DATA(insert OID = 1023 ( _abstime PGUID -1 -1 f b t \054 0 702 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1024 ( _reltime PGUID -1 -1 f b t \054 0 703 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1000 ( _bool PGUID -1 -1 f b t \054 0 16 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1001 ( _bytea PGUID -1 -1 f b t \054 0 17 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1002 ( _char PGUID -1 -1 f b t \054 0 18 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1003 ( _name PGUID -1 -1 f b t \054 0 19 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1004 ( _char16 PGUID -1 -1 f b t \054 0 20 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1005 ( _int2 PGUID -1 -1 f b t \054 0 21 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1006 ( _int28 PGUID -1 -1 f b t \054 0 22 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1007 ( _int4 PGUID -1 -1 f b t \054 0 23 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1008 ( _regproc PGUID -1 -1 f b t \054 0 24 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1009 ( _text PGUID -1 -1 f b t \054 0 25 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1028 ( _oid PGUID -1 -1 f b t \054 0 26 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1010 ( _tid PGUID -1 -1 f b t \054 0 27 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1011 ( _xid PGUID -1 -1 f b t \054 0 28 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1012 ( _cid PGUID -1 -1 f b t \054 0 29 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1013 ( _oid8 PGUID -1 -1 f b t \054 0 30 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1014 ( _lock PGUID -1 -1 f b t \054 0 31 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1015 ( _stub PGUID -1 -1 f b t \054 0 33 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1016 ( _ref PGUID -1 -1 f b t \054 0 591 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1017 ( _point PGUID -1 -1 f b t \054 0 600 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1018 ( _lseg PGUID -1 -1 f b t \054 0 601 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1019 ( _path PGUID -1 -1 f b t \054 0 602 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1020 ( _box PGUID -1 -1 f b t \073 0 603 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1021 ( _float4 PGUID -1 -1 f b t \054 0 700 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1022 ( _float8 PGUID -1 -1 f b t \054 0 701 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1023 ( _abstime PGUID -1 -1 f b t \054 0 702 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1024 ( _reltime PGUID -1 -1 f b t \054 0 703 array_in array_out array_in array_out i _null_ )); DATA(insert OID = 1025 ( _tinterval PGUID -1 -1 f b t \054 0 704 array_in array_out array_in array_out i _null_ )); DATA(insert OID = 1026 ( _filename PGUID -1 -1 f b t \054 0 605 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1027 ( _polygon PGUID -1 -1 f b t \054 0 604 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1027 ( _polygon PGUID -1 -1 f b t \054 0 604 array_in array_out array_in array_out d _null_ )); /* Note: the size of an aclitem needs to match sizeof(AclItem) in acl.h */ -DATA(insert OID = 1033 ( aclitem PGUID 8 -1 f b t \054 0 0 aclitemin aclitemout aclitemin aclitemout i _null_ )); -DATA(insert OID = 1034 ( _aclitem PGUID -1 -1 f b t \054 0 1033 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1033 ( aclitem PGUID 8 -1 f b t \054 0 0 aclitemin aclitemout aclitemin aclitemout i _null_ )); +DATA(insert OID = 1034 ( _aclitem PGUID -1 -1 f b t \054 0 1033 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1039 ( _char2 PGUID -1 -1 f b t \054 0 409 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1040 ( _char4 PGUID -1 -1 f b t \054 0 410 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1041 ( _char8 PGUID -1 -1 f b t \054 0 411 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1039 ( _char2 PGUID -1 -1 f b t \054 0 409 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1040 ( _char4 PGUID -1 -1 f b t \054 0 410 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1041 ( _char8 PGUID -1 -1 f b t \054 0 411 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1042 ( bpchar PGUID -1 -1 f b t \054 0 18 bpcharin bpcharout bpcharin bpcharout i _null_ )); -#define BPCHAROID 1042 -DATA(insert OID = 1043 ( varchar PGUID -1 -1 f b t \054 0 18 varcharin varcharout varcharin varcharout i _null_ )); -#define VARCHAROID 1043 +DATA(insert OID = 1042 ( bpchar PGUID -1 -1 f b t \054 0 18 bpcharin bpcharout bpcharin bpcharout i _null_ )); +#define BPCHAROID 1042 +DATA(insert OID = 1043 ( varchar PGUID -1 -1 f b t \054 0 18 varcharin varcharout varcharin varcharout i _null_ )); +#define VARCHAROID 1043 -DATA(insert OID = 1082 ( date PGUID 4 10 t b t \054 0 0 date_in date_out date_in date_out i _null_ )); -#define DATEOID 1082 -DATA(insert OID = 1083 ( time PGUID 8 16 f b t \054 0 0 time_in time_out time_in time_out d _null_ )); -#define TIMEOID 1083 +DATA(insert OID = 1082 ( date PGUID 4 10 t b t \054 0 0 date_in date_out date_in date_out i _null_ )); +#define DATEOID 1082 +DATA(insert OID = 1083 ( time PGUID 8 16 f b t \054 0 0 time_in time_out time_in time_out d _null_ )); +#define TIMEOID 1083 /* OIDS 1100 - 1199 */ -DATA(insert OID = 1182 ( _date PGUID -1 -1 f b t \054 0 1082 array_in array_out array_in array_out i _null_ )); -DATA(insert OID = 1183 ( _time PGUID -1 -1 f b t \054 0 1083 array_in array_out array_in array_out d _null_ )); -DATA(insert OID = 1184 ( datetime PGUID 8 47 f b t \054 0 0 datetime_in datetime_out datetime_in datetime_out d _null_ )); -#define DATETIMEOID 1184 -DATA(insert OID = 1185 ( _datetime PGUID -1 -1 f b t \054 0 1184 array_in array_out array_in array_out d _null_ )); -DATA(insert OID = 1186 ( timespan PGUID 12 47 f b t \054 0 0 timespan_in timespan_out timespan_in timespan_out d _null_ )); -#define TIMESPANOID 1186 -DATA(insert OID = 1187 ( _timespan PGUID -1 -1 f b t \054 0 1186 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1182 ( _date PGUID -1 -1 f b t \054 0 1082 array_in array_out array_in array_out i _null_ )); +DATA(insert OID = 1183 ( _time PGUID -1 -1 f b t \054 0 1083 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1184 ( datetime PGUID 8 47 f b t \054 0 0 datetime_in datetime_out datetime_in datetime_out d _null_ )); +#define DATETIMEOID 1184 +DATA(insert OID = 1185 ( _datetime PGUID -1 -1 f b t \054 0 1184 array_in array_out array_in array_out d _null_ )); +DATA(insert OID = 1186 ( timespan PGUID 12 47 f b t \054 0 0 timespan_in timespan_out timespan_in timespan_out d _null_ )); +#define TIMESPANOID 1186 +DATA(insert OID = 1187 ( _timespan PGUID -1 -1 f b t \054 0 1186 array_in array_out array_in array_out d _null_ )); /* OIDS 1200 - 1299 */ -DATA(insert OID = 1296 ( timestamp PGUID 4 19 t b t \054 0 0 timestamp_in timestamp_out timestamp_in timestamp_out i _null_ )); +DATA(insert OID = 1296 ( timestamp PGUID 4 19 t b t \054 0 0 timestamp_in timestamp_out timestamp_in timestamp_out i _null_ )); #define TIMESTAMPOID 1296 /* - * prototypes for functions in pg_type.c + * prototypes for functions in pg_type.c */ -extern Oid TypeGet(char *typeName, bool *defined); -extern Oid TypeShellMake(char *typeName); -extern Oid TypeCreate(char *typeName, - Oid relationOid, - int16 internalSize, - int16 externalSize, - char typeType, - char typDelim, - char *inputProcedure, - char *outputProcedure, - char *sendProcedure, - char *receiveProcedure, - char *elementTypeName, - char *defaultTypeValue, - bool passedByValue, char alignment); -extern void TypeRename(char *oldTypeName, char *newTypeName); -extern char *makeArrayTypeName(char *typeName); - - -#endif /* PG_TYPE_H */ +extern Oid TypeGet(char *typeName, bool * defined); +extern Oid TypeShellMake(char *typeName); +extern Oid +TypeCreate(char *typeName, + Oid relationOid, + int16 internalSize, + int16 externalSize, + char typeType, + char typDelim, + char *inputProcedure, + char *outputProcedure, + char *sendProcedure, + char *receiveProcedure, + char *elementTypeName, + char *defaultTypeValue, + bool passedByValue, char alignment); +extern void TypeRename(char *oldTypeName, char *newTypeName); +extern char *makeArrayTypeName(char *typeName); + + +#endif /* PG_TYPE_H */ diff --git a/src/include/catalog/pg_user.h b/src/include/catalog/pg_user.h index 5cfc6984520..904e35cd15d 100644 --- a/src/include/catalog/pg_user.h +++ b/src/include/catalog/pg_user.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_user.h-- - * definition of the system "user" relation (pg_user) - * along with the relation's initial contents. + * definition of the system "user" relation (pg_user) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_user.h,v 1.3 1996/11/03 23:49:07 scrappy Exp $ + * $Id: pg_user.h,v 1.4 1997/09/07 04:57:13 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -21,43 +21,44 @@ /* Prototype required for superuser() from superuser.c */ -bool superuser(void); +bool superuser(void); /* ---------------- - * pg_user definition. cpp turns this into - * typedef struct FormData_pg_user + * pg_user definition. cpp turns this into + * typedef struct FormData_pg_user * ---------------- - */ -CATALOG(pg_user) BOOTSTRAP { - NameData usename; - int4 usesysid; - bool usecreatedb; - bool usetrace; - bool usesuper; - bool usecatupd; + */ +CATALOG(pg_user) BOOTSTRAP +{ + NameData usename; + int4 usesysid; + bool usecreatedb; + bool usetrace; + bool usesuper; + bool usecatupd; } FormData_pg_user; /* ---------------- - * Form_pg_user corresponds to a pointer to a tuple with - * the format of pg_user relation. + * Form_pg_user corresponds to a pointer to a tuple with + * the format of pg_user relation. * ---------------- */ -typedef FormData_pg_user *Form_pg_user; +typedef FormData_pg_user *Form_pg_user; /* ---------------- - * compiler constants for pg_user + * compiler constants for pg_user * ---------------- */ -#define Natts_pg_user 6 -#define Anum_pg_user_usename 1 -#define Anum_pg_user_usesysid 2 -#define Anum_pg_user_usecreatedb 3 -#define Anum_pg_user_usetrace 4 -#define Anum_pg_user_usesuper 5 -#define Anum_pg_user_usecatupd 6 +#define Natts_pg_user 6 +#define Anum_pg_user_usename 1 +#define Anum_pg_user_usesysid 2 +#define Anum_pg_user_usecreatedb 3 +#define Anum_pg_user_usetrace 4 +#define Anum_pg_user_usesuper 5 +#define Anum_pg_user_usecatupd 6 /* ---------------- - * initial contents of pg_user + * initial contents of pg_user * ---------------- */ DATA(insert OID = 0 ( postgres PGUID t t t t )); @@ -88,9 +89,9 @@ DATA(insert OID = 0 ( marcel 31113 t t t t )); DATA(insert OID = 0 ( ginger 3692 t t t t )); DATA(insert OID = 0 ( woodruff 31026 t t t t )); DATA(insert OID = 0 ( searcher 8261 t t t t )); - + BKI_BEGIN -#endif /* ALLOW_PG_GROUP */ +#endif /* ALLOW_PG_GROUP */ BKI_END -#endif /* PG_USER_H */ +#endif /* PG_USER_H */ diff --git a/src/include/catalog/pg_variable.h b/src/include/catalog/pg_variable.h index d7b753357bb..ef685f35719 100644 --- a/src/include/catalog/pg_variable.h +++ b/src/include/catalog/pg_variable.h @@ -1,19 +1,19 @@ /*------------------------------------------------------------------------- * * pg_variable.h-- - * the system variable relation "pg_variable" is not a "heap" relation. - * it is automatically created by the transam/ code and the - * information here is all bogus and is just here to make the - * relcache code happy. + * the system variable relation "pg_variable" is not a "heap" relation. + * it is automatically created by the transam/ code and the + * information here is all bogus and is just here to make the + * relcache code happy. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_variable.h,v 1.2 1996/10/31 09:48:02 scrappy Exp $ + * $Id: pg_variable.h,v 1.3 1997/09/07 04:57:15 momjian Exp $ * * NOTES - * The structures and macros used by the transam/ code - * to access pg_variable should someday go here -cim 6/18/90 + * The structures and macros used by the transam/ code + * to access pg_variable should someday go here -cim 6/18/90 * *------------------------------------------------------------------------- */ @@ -21,19 +21,20 @@ #define PG_VARIABLE_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ -CATALOG(pg_variable) BOOTSTRAP { - Oid varfoo; +CATALOG(pg_variable) BOOTSTRAP +{ + Oid varfoo; } FormData_pg_variable; -typedef FormData_pg_variable *Form_pg_variable; +typedef FormData_pg_variable *Form_pg_variable; -#define Natts_pg_variable 1 -#define Anum_pg_variable_varfoo 1 +#define Natts_pg_variable 1 +#define Anum_pg_variable_varfoo 1 -#endif /* PG_VARIABLE_H */ +#endif /* PG_VARIABLE_H */ diff --git a/src/include/catalog/pg_version.h b/src/include/catalog/pg_version.h index 4602199466d..ba1249ab04e 100644 --- a/src/include/catalog/pg_version.h +++ b/src/include/catalog/pg_version.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * pg_version.h-- - * definition of the system "version" relation (pg_version) - * along with the relation's initial contents. + * definition of the system "version" relation (pg_version) + * along with the relation's initial contents. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_version.h,v 1.3 1996/11/06 10:29:23 scrappy Exp $ + * $Id: pg_version.h,v 1.4 1997/09/07 04:57:17 momjian Exp $ * * NOTES - * the genbki.sh script reads this file and generates .bki - * information from the DATA() statements. + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. * *------------------------------------------------------------------------- */ @@ -19,38 +19,39 @@ #define PG_VERSION_H /* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. + * postgres.h contains the system type definintions and the + * CATALOG(), BOOTSTRAP and DATA() sugar words so this file + * can be read by both genbki.sh and the C compiler. * ---------------- */ /* ---------------- - * pg_version definition. cpp turns this into - * typedef struct FormData_pg_version + * pg_version definition. cpp turns this into + * typedef struct FormData_pg_version * ---------------- - */ -CATALOG(pg_version) { - Oid verrelid; - Oid verbaseid; - int4 vertime; /* really should be some abstime */ + */ +CATALOG(pg_version) +{ + Oid verrelid; + Oid verbaseid; + int4 vertime; /* really should be some abstime */ } FormData_pg_version; /* ---------------- - * Form_pg_version corresponds to a pointer to a tuple with - * the format of pg_version relation. + * Form_pg_version corresponds to a pointer to a tuple with + * the format of pg_version relation. * ---------------- */ -typedef FormData_pg_version *VersionTupleForm; +typedef FormData_pg_version *VersionTupleForm; /* ---------------- - * compiler constants for pg_version + * compiler constants for pg_version * ---------------- */ -#define Natts_pg_version 3 -#define Anum_pg_version_verrelid 1 -#define Anum_pg_version_verbaseid 2 -#define Anum_pg_version_vertime 3 +#define Natts_pg_version 3 +#define Anum_pg_version_verrelid 1 +#define Anum_pg_version_verbaseid 2 +#define Anum_pg_version_vertime 3 -#endif /* PG_VERSION_H */ +#endif /* PG_VERSION_H */ diff --git a/src/include/commands/async.h b/src/include/commands/async.h index 7bae5c6f4b4..4f63c7fde71 100644 --- a/src/include/commands/async.h +++ b/src/include/commands/async.h @@ -1,26 +1,26 @@ /*------------------------------------------------------------------------- * * async.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: async.h,v 1.5 1997/08/19 21:38:03 momjian Exp $ + * $Id: async.h,v 1.6 1997/09/07 04:57:19 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef ASYNC_H -#define ASYNC_H +#ifndef ASYNC_H +#define ASYNC_H #include <nodes/memnodes.h> -extern void Async_NotifyHandler(SIGNAL_ARGS); -extern void Async_Notify(char *relname); -extern void Async_NotifyAtCommit(void); -extern void Async_NotifyAtAbort(void); -extern void Async_Listen(char *relname, int pid); +extern void Async_NotifyHandler(SIGNAL_ARGS); +extern void Async_Notify(char *relname); +extern void Async_NotifyAtCommit(void); +extern void Async_NotifyAtAbort(void); +extern void Async_Listen(char *relname, int pid); extern GlobalMemory notifyContext; -#endif /* ASYNC_H */ +#endif /* ASYNC_H */ diff --git a/src/include/commands/cluster.h b/src/include/commands/cluster.h index 45ba116212e..7f305c60144 100644 --- a/src/include/commands/cluster.h +++ b/src/include/commands/cluster.h @@ -1,27 +1,27 @@ /*------------------------------------------------------------------------- * * cluster.h-- - * header file for postgres cluster command stuff + * header file for postgres cluster command stuff * * Copyright (c) 1994-5, Regents of the University of California * - * $Id: cluster.h,v 1.2 1997/08/19 21:38:06 momjian Exp $ + * $Id: cluster.h,v 1.3 1997/09/07 04:57:21 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef CLUSTER_H -#define CLUSTER_H +#ifndef CLUSTER_H +#define CLUSTER_H /* * defines for contant stuff */ -#define _TEMP_RELATION_KEY_ "clXXXXXXXX" -#define _SIZE_OF_TEMP_RELATION_KEY_ 11 +#define _TEMP_RELATION_KEY_ "clXXXXXXXX" +#define _SIZE_OF_TEMP_RELATION_KEY_ 11 /* * functions */ -extern void cluster(char oldrelname[], char oldindexname[]); +extern void cluster(char oldrelname[], char oldindexname[]); -#endif /* CLUSTER_H */ +#endif /* CLUSTER_H */ diff --git a/src/include/commands/command.h b/src/include/commands/command.h index d91d7b3a913..78c4aa5ea0e 100644 --- a/src/include/commands/command.h +++ b/src/include/commands/command.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * command.h-- - * prototypes for command.c. + * prototypes for command.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: command.h,v 1.4 1997/08/19 21:38:07 momjian Exp $ + * $Id: command.h,v 1.5 1997/09/07 04:57:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,29 +19,31 @@ extern MemoryContext PortalExecutorHeapMemory; /* * PerformPortalFetch -- - * Performs the POSTQUEL function FETCH. Fetches count (or all if 0) + * Performs the POSTQUEL function FETCH. Fetches count (or all if 0) * tuples in portal with name in the forward direction iff goForward. * * Exceptions: - * BadArg if forward invalid. - * "WARN" if portal not found. + * BadArg if forward invalid. + * "WARN" if portal not found. */ -extern void PerformPortalFetch(char *name, bool forward, int count, - char *tag, CommandDest dest); +extern void +PerformPortalFetch(char *name, bool forward, int count, + char *tag, CommandDest dest); /* * PerformPortalClose -- - * Performs the POSTQUEL function CLOSE. + * Performs the POSTQUEL function CLOSE. */ -extern void PerformPortalClose(char *name, CommandDest dest); +extern void PerformPortalClose(char *name, CommandDest dest); -extern void PortalCleanup(Portal portal); +extern void PortalCleanup(Portal portal); /* * PerformAddAttribute -- - * Performs the POSTQUEL function ADD. + * Performs the POSTQUEL function ADD. */ -extern void PerformAddAttribute(char *relationName, char *userName, - bool inh, ColumnDef *colDef); +extern void +PerformAddAttribute(char *relationName, char *userName, + bool inh, ColumnDef * colDef); -#endif /* COMMAND_H */ +#endif /* COMMAND_H */ diff --git a/src/include/commands/copy.h b/src/include/commands/copy.h index 1a1228b142d..e1fb6a37838 100644 --- a/src/include/commands/copy.h +++ b/src/include/commands/copy.h @@ -1,20 +1,21 @@ /*------------------------------------------------------------------------- * * copy.h-- - * Definitions for using the POSTGRES copy command. + * Definitions for using the POSTGRES copy command. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: copy.h,v 1.2 1996/10/31 09:48:12 scrappy Exp $ + * $Id: copy.h,v 1.3 1997/09/07 04:57:23 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef COPY_H -#define COPY_H +#define COPY_H -void DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, char *filename, - char *delim); +void +DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, char *filename, + char *delim); -#endif /* COPY_H */ +#endif /* COPY_H */ diff --git a/src/include/commands/creatinh.h b/src/include/commands/creatinh.h index 1728a577a92..52926dbe9f8 100644 --- a/src/include/commands/creatinh.h +++ b/src/include/commands/creatinh.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * creatinh.h-- - * prototypes for creatinh.c. + * prototypes for creatinh.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: creatinh.h,v 1.1 1996/08/28 07:21:45 scrappy Exp $ + * $Id: creatinh.h,v 1.2 1997/09/07 04:57:24 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef CREATINH_H #define CREATINH_H -extern void DefineRelation(CreateStmt *stmt); -extern void RemoveRelation(char *name); -extern char* MakeArchiveName(Oid relid); +extern void DefineRelation(CreateStmt * stmt); +extern void RemoveRelation(char *name); +extern char *MakeArchiveName(Oid relid); -#endif /* CREATINH_H */ +#endif /* CREATINH_H */ diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index f47e7a343ea..8d916477380 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * defrem.h-- - * POSTGRES define and remove utility definitions. + * POSTGRES define and remove utility definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: defrem.h,v 1.7 1997/05/22 00:15:47 scrappy Exp $ + * $Id: defrem.h,v 1.8 1997/09/07 04:57:25 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef DEFREM_H +#ifndef DEFREM_H #define DEFREM_H #include <tcop/dest.h> @@ -19,35 +19,38 @@ /* * prototypes in defind.c */ -extern void DefineIndex(char *heapRelationName, +extern void +DefineIndex(char *heapRelationName, char *indexRelationName, char *accessMethodName, - List *attributeList, - List *parameterList, + List * attributeList, + List * parameterList, bool unique, - Expr *predicate, - List *rangetable); -extern void ExtendIndex(char *indexRelationName, - Expr *predicate, - List *rangetable); -extern void RemoveIndex(char *name); + Expr * predicate, + List * rangetable); +extern void +ExtendIndex(char *indexRelationName, + Expr * predicate, + List * rangetable); +extern void RemoveIndex(char *name); /* * prototypes in define.c */ -extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest); -extern void DefineOperator(char *name, List *parameters); -extern void DefineAggregate(char *name, List *parameters); -extern void DefineType(char *name, List *parameters); -extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest); +extern void CreateFunction(ProcedureStmt * stmt, CommandDest dest); +extern void DefineOperator(char *name, List * parameters); +extern void DefineAggregate(char *name, List * parameters); +extern void DefineType(char *name, List * parameters); +extern void CreateFunction(ProcedureStmt * stmt, CommandDest dest); /* * prototypes in remove.c */ -extern void RemoveFunction(char *functionName, int nargs, List *argNameList); -extern void RemoveOperator(char *operatorName, +extern void RemoveFunction(char *functionName, int nargs, List * argNameList); +extern void +RemoveOperator(char *operatorName, char *typeName1, char *typeName2); -extern void RemoveType(char *typeName); -extern void RemoveAggregate(char *aggName, char *aggType); +extern void RemoveType(char *typeName); +extern void RemoveAggregate(char *aggName, char *aggType); -#endif /* DEFREM_H */ +#endif /* DEFREM_H */ diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h index cac3c59999c..f41f4dfa885 100644 --- a/src/include/commands/explain.h +++ b/src/include/commands/explain.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * explain.h-- - * prototypes for explain.c + * prototypes for explain.c * * Copyright (c) 1994-5, Regents of the University of California * - * $Id: explain.h,v 1.2 1997/01/16 14:56:34 momjian Exp $ + * $Id: explain.h,v 1.3 1997/09/07 04:57:26 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef EXPLAIN_H -#define EXPLAIN_H +#ifndef EXPLAIN_H +#define EXPLAIN_H -extern void ExplainQuery(Query *query, bool verbose, CommandDest dest); +extern void ExplainQuery(Query * query, bool verbose, CommandDest dest); -#endif /* EXPLAIN_H*/ +#endif /* EXPLAIN_H */ diff --git a/src/include/commands/purge.h b/src/include/commands/purge.h index 5f483b26385..7c4d276afdb 100644 --- a/src/include/commands/purge.h +++ b/src/include/commands/purge.h @@ -1,20 +1,21 @@ /*------------------------------------------------------------------------- * * purge.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: purge.h,v 1.1 1996/08/28 07:21:48 scrappy Exp $ + * $Id: purge.h,v 1.2 1997/09/07 04:57:26 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PURGE_H -#define PURGE_H +#ifndef PURGE_H +#define PURGE_H -extern int32 RelationPurge(char *relationName, - char *absoluteTimeString, - char *relativeTimeString); +extern int32 +RelationPurge(char *relationName, + char *absoluteTimeString, + char *relativeTimeString); -#endif /* PURGE_H */ +#endif /* PURGE_H */ diff --git a/src/include/commands/recipe.h b/src/include/commands/recipe.h index 3c8615abb9c..82a3e01cae0 100644 --- a/src/include/commands/recipe.h +++ b/src/include/commands/recipe.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * recipe.h-- - * recipe handling routines + * recipe handling routines * * Copyright (c) 1994, Regents of the University of California * - * $Id: recipe.h,v 1.1 1996/08/28 07:21:50 scrappy Exp $ + * $Id: recipe.h,v 1.2 1997/09/07 04:57:28 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef RECIPE_H #define RECIPE_H -extern void beginRecipe(RecipeStmt* stmt); +extern void beginRecipe(RecipeStmt * stmt); -#endif /* RECIPE_H */ +#endif /* RECIPE_H */ diff --git a/src/include/commands/rename.h b/src/include/commands/rename.h index f559a5c76ee..3675011dbd6 100644 --- a/src/include/commands/rename.h +++ b/src/include/commands/rename.h @@ -1,24 +1,26 @@ /*------------------------------------------------------------------------- * * rename.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rename.h,v 1.1 1996/08/28 07:21:51 scrappy Exp $ + * $Id: rename.h,v 1.2 1997/09/07 04:57:30 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef RENAME_H -#define RENAME_H +#ifndef RENAME_H +#define RENAME_H -extern void renameatt(char *relname, - char *oldattname, - char *newattname, - char *userName, int recurse); +extern void +renameatt(char *relname, + char *oldattname, + char *newattname, + char *userName, int recurse); -extern void renamerel(char *oldrelname, - char *newrelname); +extern void +renamerel(char *oldrelname, + char *newrelname); -#endif /* RENAME_H */ +#endif /* RENAME_H */ diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index 4e341e9277d..88497253b32 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -1,7 +1,7 @@ /*------------------------------------------------------------------------- * * sequence.h-- - * prototypes for sequence.c. + * prototypes for sequence.c. * * *------------------------------------------------------------------------- @@ -9,25 +9,25 @@ #ifndef SEQUENCE_H #define SEQUENCE_H -/* +/* * Columns of a sequnece relation */ - -#define SEQ_COL_NAME 1 -#define SEQ_COL_LASTVAL 2 -#define SEQ_COL_INCBY 3 -#define SEQ_COL_MAXVALUE 4 -#define SEQ_COL_MINVALUE 5 -#define SEQ_COL_CACHE 6 -#define SEQ_COL_CYCLE 7 -#define SEQ_COL_CALLED 8 -#define SEQ_COL_FIRSTCOL SEQ_COL_NAME -#define SEQ_COL_LASTCOL SEQ_COL_CALLED +#define SEQ_COL_NAME 1 +#define SEQ_COL_LASTVAL 2 +#define SEQ_COL_INCBY 3 +#define SEQ_COL_MAXVALUE 4 +#define SEQ_COL_MINVALUE 5 +#define SEQ_COL_CACHE 6 +#define SEQ_COL_CYCLE 7 +#define SEQ_COL_CALLED 8 -extern void DefineSequence (CreateSeqStmt *stmt); -extern int4 nextval (struct varlena *seqname); -extern int4 currval (struct varlena *seqname); -extern void CloseSequences (void); +#define SEQ_COL_FIRSTCOL SEQ_COL_NAME +#define SEQ_COL_LASTCOL SEQ_COL_CALLED -#endif /* SEQUENCE_H */ +extern void DefineSequence(CreateSeqStmt * stmt); +extern int4 nextval(struct varlena * seqname); +extern int4 currval(struct varlena * seqname); +extern void CloseSequences(void); + +#endif /* SEQUENCE_H */ diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index 8cbfe0c5a1b..0f125a0de6a 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -1,7 +1,7 @@ /*------------------------------------------------------------------------- * * trigger.h-- - * prototypes for trigger.c. + * prototypes for trigger.c. * * *------------------------------------------------------------------------- @@ -13,59 +13,60 @@ #include "access/htup.h" #include "utils/rel.h" -typedef uint32 TriggerEvent; +typedef uint32 TriggerEvent; -typedef struct TriggerData { - TriggerEvent tg_event; - Relation tg_relation; - HeapTuple tg_trigtuple; - HeapTuple tg_newtuple; - Trigger *tg_trigger; -} TriggerData; +typedef struct TriggerData +{ + TriggerEvent tg_event; + Relation tg_relation; + HeapTuple tg_trigtuple; + HeapTuple tg_newtuple; + Trigger *tg_trigger; +} TriggerData; extern TriggerData *CurrentTriggerData; -#define TRIGGER_EVENT_INSERT 0x00000000 -#define TRIGGER_EVENT_DELETE 0x00000001 -#define TRIGGER_EVENT_UPDATE 0x00000002 -#define TRIGGER_EVENT_OPMASK 0x00000003 -#define TRIGGER_EVENT_ROW 0x00000004 -#define TRIGGER_EVENT_BEFORE 0x00000008 +#define TRIGGER_EVENT_INSERT 0x00000000 +#define TRIGGER_EVENT_DELETE 0x00000001 +#define TRIGGER_EVENT_UPDATE 0x00000002 +#define TRIGGER_EVENT_OPMASK 0x00000003 +#define TRIGGER_EVENT_ROW 0x00000004 +#define TRIGGER_EVENT_BEFORE 0x00000008 #define TRIGGER_FIRED_BY_INSERT(event) \ - (((TriggerEvent) (event) & TRIGGER_EVENT_OPMASK) == \ - TRIGGER_EVENT_INSERT) + (((TriggerEvent) (event) & TRIGGER_EVENT_OPMASK) == \ + TRIGGER_EVENT_INSERT) #define TRIGGER_FIRED_BY_DELETE(event) \ - (((TriggerEvent) (event) & TRIGGER_EVENT_OPMASK) == \ - TRIGGER_EVENT_DELETE) + (((TriggerEvent) (event) & TRIGGER_EVENT_OPMASK) == \ + TRIGGER_EVENT_DELETE) #define TRIGGER_FIRED_BY_UPDATE(event) \ - (((TriggerEvent) (event) & TRIGGER_EVENT_OPMASK) == \ - TRIGGER_EVENT_UPDATE) + (((TriggerEvent) (event) & TRIGGER_EVENT_OPMASK) == \ + TRIGGER_EVENT_UPDATE) -#define TRIGGER_FIRED_FOR_ROW(event) \ - ((TriggerEvent) (event) & TRIGGER_EVENT_ROW) +#define TRIGGER_FIRED_FOR_ROW(event) \ + ((TriggerEvent) (event) & TRIGGER_EVENT_ROW) -#define TRIGGER_FIRED_FOR_STATEMENT(event) \ - (!TRIGGER_FIRED_FOR_ROW (event)) +#define TRIGGER_FIRED_FOR_STATEMENT(event) \ + (!TRIGGER_FIRED_FOR_ROW (event)) -#define TRIGGER_FIRED_BEFORE(event) \ - ((TriggerEvent) (event) & TRIGGER_EVENT_BEFORE) +#define TRIGGER_FIRED_BEFORE(event) \ + ((TriggerEvent) (event) & TRIGGER_EVENT_BEFORE) -#define TRIGGER_FIRED_AFTER(event) \ - (!TRIGGER_FIRED_BEFORE (event)) +#define TRIGGER_FIRED_AFTER(event) \ + (!TRIGGER_FIRED_BEFORE (event)) -extern void CreateTrigger (CreateTrigStmt *stmt); -extern void DropTrigger (DropTrigStmt *stmt); -extern void RelationRemoveTriggers (Relation rel); +extern void CreateTrigger(CreateTrigStmt * stmt); +extern void DropTrigger(DropTrigStmt * stmt); +extern void RelationRemoveTriggers(Relation rel); -extern HeapTuple ExecBRInsertTriggers (Relation rel, HeapTuple tuple); -extern void ExecARInsertTriggers (Relation rel, HeapTuple tuple); -extern bool ExecBRDeleteTriggers (Relation rel, ItemPointer tupleid); -extern void ExecARDeleteTriggers (Relation rel, ItemPointer tupleid); -extern HeapTuple ExecBRUpdateTriggers (Relation rel, ItemPointer tupleid, HeapTuple tuple); -extern void ExecARUpdateTriggers (Relation rel, ItemPointer tupleid, HeapTuple tuple); +extern HeapTuple ExecBRInsertTriggers(Relation rel, HeapTuple tuple); +extern void ExecARInsertTriggers(Relation rel, HeapTuple tuple); +extern bool ExecBRDeleteTriggers(Relation rel, ItemPointer tupleid); +extern void ExecARDeleteTriggers(Relation rel, ItemPointer tupleid); +extern HeapTuple ExecBRUpdateTriggers(Relation rel, ItemPointer tupleid, HeapTuple tuple); +extern void ExecARUpdateTriggers(Relation rel, ItemPointer tupleid, HeapTuple tuple); -#endif /* TRIGGER_H */ +#endif /* TRIGGER_H */ diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 6ed66f6bc81..59863f2d574 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -1,87 +1,110 @@ /*------------------------------------------------------------------------- * * vacuum.h-- - * header file for postgres vacuum cleaner + * header file for postgres vacuum cleaner * * * Copyright (c) 1994, Regents of the University of California * - * $Id: vacuum.h,v 1.7 1997/04/23 06:28:48 vadim Exp $ + * $Id: vacuum.h,v 1.8 1997/09/07 04:57:33 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef VACUUM_H -#define VACUUM_H +#ifndef VACUUM_H +#define VACUUM_H #include <access/funcindex.h> #include <catalog/pg_index.h> -typedef struct VAttListData { - int val_dummy; - struct VAttListData *val_next; -} VAttListData; - -typedef VAttListData *VAttList; - -typedef struct VPageDescrData { - BlockNumber vpd_blkno; /* BlockNumber of this Page */ - Size vpd_free; /* FreeSpace on this Page */ - uint16 vpd_nusd; /* Number of OffNums used by vacuum */ - uint16 vpd_noff; /* Number of OffNums free or to be free */ - OffsetNumber vpd_voff[1]; /* Array of its OffNums */ -} VPageDescrData; - -typedef VPageDescrData *VPageDescr; - -typedef struct VPageListData { - int vpl_nemend; /* Number of "empty" end-pages */ - int vpl_npages; /* Number of pages in vpl_pgdesc */ - VPageDescr *vpl_pgdesc; /* Descriptions of pages */ -} VPageListData; - -typedef VPageListData *VPageList; - -typedef struct { - FuncIndexInfo finfo; - FuncIndexInfo *finfoP; - IndexTupleForm tform; - int natts; -} IndDesc; - -typedef struct { - AttributeTupleForm attr; - Datum best, guess1, guess2, max, min; - int16 best_len, guess1_len, guess2_len, max_len, min_len; - int32 best_cnt, guess1_cnt, guess1_hits, guess2_hits, null_cnt,nonnull_cnt; - int32 max_cnt, min_cnt; - func_ptr f_cmpeq, f_cmplt, f_cmpgt; - regproc outfunc; - bool initialized; -} VacAttrStats; - -typedef struct VRelListData { - Oid vrl_relid; - struct VRelListData *vrl_next; -} VRelListData; - -typedef VRelListData *VRelList; - -typedef struct VRelStats { - Oid relid; - int ntups; - int npages; - Size min_tlen; - Size max_tlen; - bool hasindex; - int va_natts; /* number of attrs being analyzed */ - VacAttrStats *vacattrstats; -} VRelStats; - -extern bool VacuumRunning; - -extern void vc_abort(void); -extern void vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec); - -#define ATTNVALS_SCALE 1000000000 /* XXX so it can act as a float4 */ - -#endif /* VACUUM_H */ +typedef struct VAttListData +{ + int val_dummy; + struct VAttListData *val_next; +} VAttListData; + +typedef VAttListData *VAttList; + +typedef struct VPageDescrData +{ + BlockNumber vpd_blkno; /* BlockNumber of this Page */ + Size vpd_free; /* FreeSpace on this Page */ + uint16 vpd_nusd; /* Number of OffNums used by vacuum */ + uint16 vpd_noff; /* Number of OffNums free or to be free */ + OffsetNumber vpd_voff[1];/* Array of its OffNums */ +} VPageDescrData; + +typedef VPageDescrData *VPageDescr; + +typedef struct VPageListData +{ + int vpl_nemend; /* Number of "empty" end-pages */ + int vpl_npages; /* Number of pages in vpl_pgdesc */ + VPageDescr *vpl_pgdesc; /* Descriptions of pages */ +} VPageListData; + +typedef VPageListData *VPageList; + +typedef struct +{ + FuncIndexInfo finfo; + FuncIndexInfo *finfoP; + IndexTupleForm tform; + int natts; +} IndDesc; + +typedef struct +{ + AttributeTupleForm attr; + Datum best, + guess1, + guess2, + max, + min; + int16 best_len, + guess1_len, + guess2_len, + max_len, + min_len; + int32 best_cnt, + guess1_cnt, + guess1_hits, + guess2_hits, + null_cnt, + nonnull_cnt; + int32 max_cnt, + min_cnt; + func_ptr f_cmpeq, + f_cmplt, + f_cmpgt; + regproc outfunc; + bool initialized; +} VacAttrStats; + +typedef struct VRelListData +{ + Oid vrl_relid; + struct VRelListData *vrl_next; +} VRelListData; + +typedef VRelListData *VRelList; + +typedef struct VRelStats +{ + Oid relid; + int ntups; + int npages; + Size min_tlen; + Size max_tlen; + bool hasindex; + int va_natts; /* number of attrs being analyzed */ + VacAttrStats *vacattrstats; +} VRelStats; + +extern bool VacuumRunning; + +extern void vc_abort(void); +extern void vacuum(char *vacrel, bool verbose, bool analyze, List * va_spec); + +#define ATTNVALS_SCALE 1000000000 /* XXX so it can act as a float4 */ + +#endif /* VACUUM_H */ diff --git a/src/include/commands/version.h b/src/include/commands/version.h index 1b3e5169d99..7365a829629 100644 --- a/src/include/commands/version.h +++ b/src/include/commands/version.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * version.h-- - * Header file for versions. + * Header file for versions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: version.h,v 1.4 1997/08/19 21:38:10 momjian Exp $ + * $Id: version.h,v 1.5 1997/09/07 04:57:35 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef VERSION_H #define VERSION_H - -#endif /* VERSION_H */ + +#endif /* VERSION_H */ diff --git a/src/include/commands/view.h b/src/include/commands/view.h index da37d3fe2b9..2e46fb6f4df 100644 --- a/src/include/commands/view.h +++ b/src/include/commands/view.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * view.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: view.h,v 1.1 1996/08/28 07:21:54 scrappy Exp $ + * $Id: view.h,v 1.2 1997/09/07 04:57:40 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef VIEW_H -#define VIEW_H +#ifndef VIEW_H +#define VIEW_H -extern char *MakeRetrieveViewRuleName(char *view_name); -extern void DefineView(char *view_name, Query *view_parse); -extern void RemoveView(char *view_name); +extern char *MakeRetrieveViewRuleName(char *view_name); +extern void DefineView(char *view_name, Query * view_parse); +extern void RemoveView(char *view_name); -#endif /* VIEW_H */ +#endif /* VIEW_H */ diff --git a/src/include/executor/execFlatten.h b/src/include/executor/execFlatten.h index 6a7f26a729b..d51864edf0e 100644 --- a/src/include/executor/execFlatten.h +++ b/src/include/executor/execFlatten.h @@ -1,24 +1,21 @@ /*------------------------------------------------------------------------- * * execFlatten.h-- - * prototypes for execFlatten.c. + * prototypes for execFlatten.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: execFlatten.h,v 1.2 1997/08/19 21:38:12 momjian Exp $ + * $Id: execFlatten.h,v 1.3 1997/09/07 04:57:41 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef EXECFLATTEN_H #define EXECFLATTEN_H -extern Datum ExecEvalIter(Iter *iterNode, ExprContext *econtext, bool *resultIsNull, bool *iterIsDone); - -extern void ExecEvalFjoin(TargetEntry *tlist, ExprContext *econtext, bool *isNullVect, bool *fj_isDone); - - -#endif /* EXECFLATTEN_H */ +extern Datum ExecEvalIter(Iter * iterNode, ExprContext * econtext, bool * resultIsNull, bool * iterIsDone); +extern void ExecEvalFjoin(TargetEntry * tlist, ExprContext * econtext, bool * isNullVect, bool * fj_isDone); +#endif /* EXECFLATTEN_H */ diff --git a/src/include/executor/execdebug.h b/src/include/executor/execdebug.h index 3a47ef01aa1..61d298403b3 100644 --- a/src/include/executor/execdebug.h +++ b/src/include/executor/execdebug.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * execdebug.h-- - * #defines governing debugging behaviour in the executor + * #defines governing debugging behaviour in the executor * * * Copyright (c) 1994, Regents of the University of California * - * $Id: execdebug.h,v 1.2 1996/11/08 00:46:14 scrappy Exp $ + * $Id: execdebug.h,v 1.3 1997/09/07 04:57:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,368 +16,368 @@ #include "access/printtup.h" /* ---------------------------------------------------------------- - * debugging defines. + * debugging defines. * - * If you want certain debugging behaviour, then #define - * the variable to 1, else #undef it. -cim 10/26/89 + * If you want certain debugging behaviour, then #define + * the variable to 1, else #undef it. -cim 10/26/89 * ---------------------------------------------------------------- */ /* ---------------- - * EXEC_DEBUGSTORETUP is for tuple table debugging - this - * will print a message every time we call ExecStoreTuple. - * -cim 3/20/91 + * EXEC_DEBUGSTORETUP is for tuple table debugging - this + * will print a message every time we call ExecStoreTuple. + * -cim 3/20/91 * ---------------- */ #undef EXEC_DEBUGSTORETUP /* ---------------- - * EXEC_TUPLECOUNT is a #define which causes the - * executor keep track of tuple counts. This might be - * causing some problems with the decstation stuff so - * you might want to undefine this if you are doing work - * on the decs - cim 10/20/89 + * EXEC_TUPLECOUNT is a #define which causes the + * executor keep track of tuple counts. This might be + * causing some problems with the decstation stuff so + * you might want to undefine this if you are doing work + * on the decs - cim 10/20/89 * ---------------- */ #undef EXEC_TUPLECOUNT /* ---------------- - * EXEC_SHOWBUFSTATS controls whether or not buffer statistics - * are shown for each query. -cim 2/9/89 + * EXEC_SHOWBUFSTATS controls whether or not buffer statistics + * are shown for each query. -cim 2/9/89 * ---------------- */ #undef EXEC_SHOWBUFSTATS /* ---------------- - * EXEC_CONTEXTDEBUG turns on the printing of debugging information - * by CXT_printf() calls regarding which memory context is the - * CurrentMemoryContext for palloc() calls. + * EXEC_CONTEXTDEBUG turns on the printing of debugging information + * by CXT_printf() calls regarding which memory context is the + * CurrentMemoryContext for palloc() calls. * ---------------- */ #undef EXEC_CONTEXTDEBUG /* ---------------- - * EXEC_RETURNSIZE is a compile flag governing the - * behaviour of lispFmgr.. See ExecMakeFunctionResult(). - * Undefining this avoids a problem in the system cache. + * EXEC_RETURNSIZE is a compile flag governing the + * behaviour of lispFmgr.. See ExecMakeFunctionResult(). + * Undefining this avoids a problem in the system cache. * - * Note: undefining this means that there is incorrect - * information in the const nodes corresponding - * to function (or operator) results. The thing is, - * 99% of the time this is fine because when you do - * something like x = emp.sal + 1, you already know - * the type and size of x so the fact that + didn't - * return the correct size doesn't matter. - * With variable length stuff the size is stored in - * the first few bytes of the data so again, it's - * not likely to matter. + * Note: undefining this means that there is incorrect + * information in the const nodes corresponding + * to function (or operator) results. The thing is, + * 99% of the time this is fine because when you do + * something like x = emp.sal + 1, you already know + * the type and size of x so the fact that + didn't + * return the correct size doesn't matter. + * With variable length stuff the size is stored in + * the first few bytes of the data so again, it's + * not likely to matter. * ---------------- */ #undef EXEC_RETURNSIZE /* ---------------- - * EXEC_UTILSDEBUG is a flag which turns on debugging of the - * executor utilities by EU_printf() in eutils.c + * EXEC_UTILSDEBUG is a flag which turns on debugging of the + * executor utilities by EU_printf() in eutils.c * ---------------- */ #undef EXEC_UTILSDEBUG /* ---------------- - * EXEC_NESTLOOPDEBUG is a flag which turns on debugging of the - * nest loop node by NL_printf() and ENL_printf() in nestloop.c + * EXEC_NESTLOOPDEBUG is a flag which turns on debugging of the + * nest loop node by NL_printf() and ENL_printf() in nestloop.c * ---------------- */ #undef EXEC_NESTLOOPDEBUG /* ---------------- - * EXEC_PROCDEBUG is a flag which turns on debugging of - * ExecProcNode() by PN_printf() in procnode.c + * EXEC_PROCDEBUG is a flag which turns on debugging of + * ExecProcNode() by PN_printf() in procnode.c * ---------------- */ #undef EXEC_PROCDEBUG /* ---------------- - * EXEC_EVALDEBUG is a flag which turns on debugging of - * ExecEval and ExecTargetList() stuff by EV_printf() in qual.c + * EXEC_EVALDEBUG is a flag which turns on debugging of + * ExecEval and ExecTargetList() stuff by EV_printf() in qual.c * ---------------- */ #undef EXEC_EVALDEBUG /* ---------------- - * EXEC_SCANDEBUG is a flag which turns on debugging of - * the ExecSeqScan() stuff by S_printf() in seqscan.c + * EXEC_SCANDEBUG is a flag which turns on debugging of + * the ExecSeqScan() stuff by S_printf() in seqscan.c * ---------------- */ #undef EXEC_SCANDEBUG /* ---------------- - * EXEC_SORTDEBUG is a flag which turns on debugging of - * the ExecSort() stuff by SO_printf() in sort.c + * EXEC_SORTDEBUG is a flag which turns on debugging of + * the ExecSort() stuff by SO_printf() in sort.c * ---------------- */ #undef EXEC_SORTDEBUG /* ---------------- - * EXEC_MERGEJOINDEBUG is a flag which turns on debugging of - * the ExecMergeJoin() stuff by MJ_printf() in mergejoin.c + * EXEC_MERGEJOINDEBUG is a flag which turns on debugging of + * the ExecMergeJoin() stuff by MJ_printf() in mergejoin.c * ---------------- */ #undef EXEC_MERGEJOINDEBUG /* ---------------- - * EXEC_MERGEJOINPFREE is a flag which causes merge joins - * to pfree intermittant tuples (which is the proper thing) - * Not defining this means we avoid menory management problems - * at the cost of doing deallocation of stuff only at the - * end of the transaction + * EXEC_MERGEJOINPFREE is a flag which causes merge joins + * to pfree intermittant tuples (which is the proper thing) + * Not defining this means we avoid menory management problems + * at the cost of doing deallocation of stuff only at the + * end of the transaction * ---------------- */ #undef EXEC_MERGEJOINPFREE /* ---------------- - * EXEC_DEBUGINTERACTIVE is a flag which enables the - * user to issue "DEBUG" commands from an interactive - * backend. + * EXEC_DEBUGINTERACTIVE is a flag which enables the + * user to issue "DEBUG" commands from an interactive + * backend. * ---------------- */ #undef EXEC_DEBUGINTERACTIVE /* ---------------- - * EXEC_DEBUGVARIABLEFILE is string, which if defined will - * be loaded when the executor is initialized. If this - * string is not defined then nothing will be loaded.. + * EXEC_DEBUGVARIABLEFILE is string, which if defined will + * be loaded when the executor is initialized. If this + * string is not defined then nothing will be loaded.. * - * Example: + * Example: * * #define EXEC_DEBUGVARIABLEFILE "/a/postgres/cimarron/.pg_debugvars" # - * Note: since these variables are read at execution time, - * they can't affect the first query.. this hack should be - * replaced by something better sometime. -cim 11/2/89 + * Note: since these variables are read at execution time, + * they can't affect the first query.. this hack should be + * replaced by something better sometime. -cim 11/2/89 * ---------------- */ #undef EXEC_DEBUGVARIABLEFILE /* ---------------------------------------------------------------- - * #defines controlled by above definitions + * #defines controlled by above definitions * - * Note: most of these are "incomplete" because I didn't - * need the ones not defined. More should be added - * only as necessary -cim 10/26/89 + * Note: most of these are "incomplete" because I didn't + * need the ones not defined. More should be added + * only as necessary -cim 10/26/89 * ---------------------------------------------------------------- */ -#define T_OR_F(b) (b ? "true" : "false") -#define NULL_OR_TUPLE(slot) (TupIsNull(slot) ? "null" : "a tuple") +#define T_OR_F(b) (b ? "true" : "false") +#define NULL_OR_TUPLE(slot) (TupIsNull(slot) ? "null" : "a tuple") /* #define EXEC_TUPLECOUNT - XXX take out for now for executor stubbing -- jolly*/ /* ---------------- - * tuple count debugging defines + * tuple count debugging defines * ---------------- */ #ifdef EXEC_TUPLECOUNT -extern int NTupleProcessed; -extern int NTupleRetrieved; -extern int NTupleReplaced; -extern int NTupleAppended; -extern int NTupleDeleted; -extern int NIndexTupleProcessed; -extern int NIndexTupleInserted; - -#define IncrRetrieved() NTupleRetrieved++ -#define IncrAppended() NTupleAppended++ -#define IncrDeleted() NTupleDeleted++ -#define IncrReplaced() NTupleReplaced++ -#define IncrInserted() NTupleInserted++ -#define IncrProcessed() NTupleProcessed++ +extern int NTupleProcessed; +extern int NTupleRetrieved; +extern int NTupleReplaced; +extern int NTupleAppended; +extern int NTupleDeleted; +extern int NIndexTupleProcessed; +extern int NIndexTupleInserted; + +#define IncrRetrieved() NTupleRetrieved++ +#define IncrAppended() NTupleAppended++ +#define IncrDeleted() NTupleDeleted++ +#define IncrReplaced() NTupleReplaced++ +#define IncrInserted() NTupleInserted++ +#define IncrProcessed() NTupleProcessed++ #define IncrIndexProcessed() NIndexTupleProcessed++ -#define IncrIndexInserted() NIndexTupleInserted++ +#define IncrIndexInserted() NIndexTupleInserted++ #else #define IncrRetrieved() -#define IncrAppended() -#define IncrDeleted() -#define IncrReplaced() -#define IncrInserted() +#define IncrAppended() +#define IncrDeleted() +#define IncrReplaced() +#define IncrInserted() #define IncrProcessed() #define IncrIndexProcessed() #define IncrIndexInserted() -#endif /* EXEC_TUPLECOUNT */ +#endif /* EXEC_TUPLECOUNT */ /* ---------------- - * memory context debugging defines + * memory context debugging defines * ---------------- */ #ifdef EXEC_CONTEXTDEBUG -#define CXT_printf(s) printf(s) -#define CXT1_printf(s, a) printf(s, a) +#define CXT_printf(s) printf(s) +#define CXT1_printf(s, a) printf(s, a) #else -#define CXT_printf(s) -#define CXT1_printf(s, a) -#endif /* EXEC_CONTEXTDEBUG */ +#define CXT_printf(s) +#define CXT1_printf(s, a) +#endif /* EXEC_CONTEXTDEBUG */ /* ---------------- - * eutils debugging defines + * eutils debugging defines * ---------------- */ #ifdef EXEC_UTILSDEBUG -#define EU_nodeDisplay(l) nodeDisplay(l, 0) -#define EU_printf(s) printf(s) -#define EU1_printf(s, a) printf(s, a) -#define EU2_printf(s, a) printf(s, a, b) -#define EU3_printf(s, a) printf(s, a, b, c) -#define EU4_printf(s, a, b, c, d) printf(s, a, b, c, d) +#define EU_nodeDisplay(l) nodeDisplay(l, 0) +#define EU_printf(s) printf(s) +#define EU1_printf(s, a) printf(s, a) +#define EU2_printf(s, a) printf(s, a, b) +#define EU3_printf(s, a) printf(s, a, b, c) +#define EU4_printf(s, a, b, c, d) printf(s, a, b, c, d) #else -#define EU_nodeDisplay(l) -#define EU_printf(s) -#define EU1_printf(s, a) +#define EU_nodeDisplay(l) +#define EU_printf(s) +#define EU1_printf(s, a) #define EU2_printf(s, a, b) #define EU3_printf(s, a, b, c) -#define EU4_printf(s, a, b, c, d) -#endif /* EXEC_UTILSDEBUG */ +#define EU4_printf(s, a, b, c, d) +#endif /* EXEC_UTILSDEBUG */ /* ---------------- - * nest loop debugging defines + * nest loop debugging defines * ---------------- */ #ifdef EXEC_NESTLOOPDEBUG -#define NL_nodeDisplay(l) nodeDisplay(l, 0) -#define NL_printf(s) printf(s) -#define NL1_printf(s, a) printf(s, a) -#define NL4_printf(s, a, b, c, d) printf(s, a, b, c, d) -#define ENL1_printf(message) printf("ExecNestLoop: %s\n", message) +#define NL_nodeDisplay(l) nodeDisplay(l, 0) +#define NL_printf(s) printf(s) +#define NL1_printf(s, a) printf(s, a) +#define NL4_printf(s, a, b, c, d) printf(s, a, b, c, d) +#define ENL1_printf(message) printf("ExecNestLoop: %s\n", message) #else -#define NL_nodeDisplay(l) -#define NL_printf(s) -#define NL1_printf(s, a) -#define NL4_printf(s, a, b, c, d) +#define NL_nodeDisplay(l) +#define NL_printf(s) +#define NL1_printf(s, a) +#define NL4_printf(s, a, b, c, d) #define ENL1_printf(message) -#endif /* EXEC_NESTLOOPDEBUG */ +#endif /* EXEC_NESTLOOPDEBUG */ /* ---------------- - * proc node debugging defines + * proc node debugging defines * ---------------- */ #ifdef EXEC_PROCDEBUG -#define PN_printf(s) printf(s) -#define PN1_printf(s, p) printf(s, p) +#define PN_printf(s) printf(s) +#define PN1_printf(s, p) printf(s, p) #else -#define PN_printf(s) -#define PN1_printf(s, p) -#endif /* EXEC_PROCDEBUG */ +#define PN_printf(s) +#define PN1_printf(s, p) +#endif /* EXEC_PROCDEBUG */ /* ---------------- - * exec eval / target list debugging defines + * exec eval / target list debugging defines * ---------------- */ #ifdef EXEC_EVALDEBUG -#define EV_nodeDisplay(l) nodeDisplay(l, 0) -#define EV_printf(s) printf(s) -#define EV1_printf(s, a) printf(s, a) +#define EV_nodeDisplay(l) nodeDisplay(l, 0) +#define EV_printf(s) printf(s) +#define EV1_printf(s, a) printf(s, a) #define EV5_printf(s, a, b, c, d, e) printf(s, a, b, c, d, e) #else -#define EV_nodeDisplay(l) -#define EV_printf(s) -#define EV1_printf(s, a) -#define EV5_printf(s, a, b, c, d, e) -#endif /* EXEC_EVALDEBUG */ +#define EV_nodeDisplay(l) +#define EV_printf(s) +#define EV1_printf(s, a) +#define EV5_printf(s, a, b, c, d, e) +#endif /* EXEC_EVALDEBUG */ /* ---------------- - * scan debugging defines + * scan debugging defines * ---------------- */ #ifdef EXEC_SCANDEBUG -#define S_nodeDisplay(l) nodeDisplay(l, 0) -#define S_printf(s) printf(s) -#define S1_printf(s, p) printf(s, p) +#define S_nodeDisplay(l) nodeDisplay(l, 0) +#define S_printf(s) printf(s) +#define S1_printf(s, p) printf(s, p) #else -#define S_nodeDisplay(l) -#define S_printf(s) -#define S1_printf(s, p) -#endif /* EXEC_SCANDEBUG */ - +#define S_nodeDisplay(l) +#define S_printf(s) +#define S1_printf(s, p) +#endif /* EXEC_SCANDEBUG */ + /* ---------------- - * sort node debugging defines + * sort node debugging defines * ---------------- */ #ifdef EXEC_SORTDEBUG -#define SO_nodeDisplay(l) nodeDisplay(l, 0) -#define SO_printf(s) printf(s) -#define SO1_printf(s, p) printf(s, p) +#define SO_nodeDisplay(l) nodeDisplay(l, 0) +#define SO_printf(s) printf(s) +#define SO1_printf(s, p) printf(s, p) #else -#define SO_nodeDisplay(l) -#define SO_printf(s) -#define SO1_printf(s, p) -#endif /* EXEC_SORTDEBUG */ +#define SO_nodeDisplay(l) +#define SO_printf(s) +#define SO1_printf(s, p) +#endif /* EXEC_SORTDEBUG */ /* ---------------- - * merge join debugging defines + * merge join debugging defines * ---------------- */ #ifdef EXEC_MERGEJOINDEBUG -#define MJ_nodeDisplay(l) nodeDisplay(l, 0) -#define MJ_printf(s) printf(s) -#define MJ1_printf(s, p) printf(s, p) -#define MJ2_printf(s, p1, p2) printf(s, p1, p2) -#define MJ_debugtup(tuple, type) debugtup(tuple, type) -#define MJ_dump(context, state) ExecMergeTupleDump(econtext, state) +#define MJ_nodeDisplay(l) nodeDisplay(l, 0) +#define MJ_printf(s) printf(s) +#define MJ1_printf(s, p) printf(s, p) +#define MJ2_printf(s, p1, p2) printf(s, p1, p2) +#define MJ_debugtup(tuple, type) debugtup(tuple, type) +#define MJ_dump(context, state) ExecMergeTupleDump(econtext, state) #define MJ_DEBUG_QUAL(clause, res) \ MJ2_printf(" ExecQual(%s, econtext) returns %s\n", \ - CppAsString(clause), T_OR_F(res)); - + CppAsString(clause), T_OR_F(res)); + #define MJ_DEBUG_MERGE_COMPARE(qual, res) \ MJ2_printf(" MergeCompare(mergeclauses, %s, ..) returns %s\n", \ - CppAsString(qual), T_OR_F(res)); + CppAsString(qual), T_OR_F(res)); #define MJ_DEBUG_PROC_NODE(slot) \ MJ2_printf(" %s = ExecProcNode(innerPlan) returns %s\n", \ - CppAsString(slot), NULL_OR_TUPLE(slot)); + CppAsString(slot), NULL_OR_TUPLE(slot)); #else #define MJ_nodeDisplay(l) -#define MJ_printf(s) -#define MJ1_printf(s, p) +#define MJ_printf(s) +#define MJ1_printf(s, p) #define MJ2_printf(s, p1, p2) #define MJ_debugtup(tuple, type) #define MJ_dump(context, state) #define MJ_DEBUG_QUAL(clause, res) #define MJ_DEBUG_MERGE_COMPARE(qual, res) #define MJ_DEBUG_PROC_NODE(slot) -#endif /* EXEC_MERGEJOINDEBUG */ +#endif /* EXEC_MERGEJOINDEBUG */ /* ---------------------------------------------------------------- - * DO NOT DEFINE THESE EVER OR YOU WILL BURN! + * DO NOT DEFINE THESE EVER OR YOU WILL BURN! * ---------------------------------------------------------------- */ /* ---------------- - * DOESNOTWORK is currently placed around memory manager - * code that is known to cause problems. Code in between - * is likely not converted and probably won't work anyways. + * DOESNOTWORK is currently placed around memory manager + * code that is known to cause problems. Code in between + * is likely not converted and probably won't work anyways. * ---------------- */ #undef DOESNOTWORK /* ---------------- - * PERHAPSNEVER is placed around the "scan attribute" - * support code for the rule manager because for now we - * do things inefficiently. The correct solution to our - * problem is to add code to the parser/planner to save - * attribute information for the rule manager rather than - * have the executor have to grope through the entire plan - * for it so if we ever decide to make things better, - * we should probably delete the stuff in between PERHAPSNEVER.. + * PERHAPSNEVER is placed around the "scan attribute" + * support code for the rule manager because for now we + * do things inefficiently. The correct solution to our + * problem is to add code to the parser/planner to save + * attribute information for the rule manager rather than + * have the executor have to grope through the entire plan + * for it so if we ever decide to make things better, + * we should probably delete the stuff in between PERHAPSNEVER.. * ---------------- */ #undef PERHAPSNEVER /* ---------------- - * NOTYET is placed around any code not yet implemented - * in the executor. Only remove these when actually implementing - * said code. + * NOTYET is placed around any code not yet implemented + * in the executor. Only remove these when actually implementing + * said code. * ---------------- */ #undef NOTYET -extern long NDirectFileRead; -extern long NDirectFileWrite; +extern long NDirectFileRead; +extern long NDirectFileWrite; -#endif /* ExecDebugIncluded */ +#endif /* ExecDebugIncluded */ diff --git a/src/include/executor/execdefs.h b/src/include/executor/execdefs.h index 2d6db792d8d..59748cfe9be 100644 --- a/src/include/executor/execdefs.h +++ b/src/include/executor/execdefs.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * execdefs.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: execdefs.h,v 1.1 1996/08/28 07:22:07 scrappy Exp $ + * $Id: execdefs.h,v 1.2 1997/09/07 04:57:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -14,34 +14,34 @@ #define EXECDEFS_H /* ---------------- - * ExecutePlan() tuplecount definitions + * ExecutePlan() tuplecount definitions * ---------------- */ -#define ALL_TUPLES 0 /* return all tuples */ -#define ONE_TUPLE 1 /* return only one tuple */ +#define ALL_TUPLES 0 /* return all tuples */ +#define ONE_TUPLE 1 /* return only one tuple */ /* ---------------- - * constants used by ExecMain + * constants used by ExecMain * ---------------- */ -#define EXEC_RUN 3 -#define EXEC_FOR 4 -#define EXEC_BACK 5 -#define EXEC_RETONE 6 -#define EXEC_RESULT 7 +#define EXEC_RUN 3 +#define EXEC_FOR 4 +#define EXEC_BACK 5 +#define EXEC_RETONE 6 +#define EXEC_RESULT 7 /* ---------------- - * Merge Join states + * Merge Join states * ---------------- */ -#define EXEC_MJ_INITIALIZE 1 -#define EXEC_MJ_JOINMARK 2 -#define EXEC_MJ_JOINTEST 3 -#define EXEC_MJ_JOINTUPLES 4 -#define EXEC_MJ_NEXTOUTER 5 -#define EXEC_MJ_TESTOUTER 6 -#define EXEC_MJ_NEXTINNER 7 -#define EXEC_MJ_SKIPINNER 8 -#define EXEC_MJ_SKIPOUTER 9 +#define EXEC_MJ_INITIALIZE 1 +#define EXEC_MJ_JOINMARK 2 +#define EXEC_MJ_JOINTEST 3 +#define EXEC_MJ_JOINTUPLES 4 +#define EXEC_MJ_NEXTOUTER 5 +#define EXEC_MJ_TESTOUTER 6 +#define EXEC_MJ_NEXTINNER 7 +#define EXEC_MJ_SKIPINNER 8 +#define EXEC_MJ_SKIPOUTER 9 -#endif /* EXECDEFS_H */ +#endif /* EXECDEFS_H */ diff --git a/src/include/executor/execdesc.h b/src/include/executor/execdesc.h index 2fb13bb9094..7f24b7630f0 100644 --- a/src/include/executor/execdesc.h +++ b/src/include/executor/execdesc.h @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * * execdesc.h-- - * plan and query descriptor accessor macros used by the executor - * and related modules. + * plan and query descriptor accessor macros used by the executor + * and related modules. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: execdesc.h,v 1.3 1996/11/05 08:18:31 scrappy Exp $ + * $Id: execdesc.h,v 1.4 1997/09/07 04:57:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,20 +19,22 @@ #include <nodes/parsenodes.h> /* ---------------- - * query descriptor: - * a QueryDesc encapsulates everything that the executor - * needs to execute the query + * query descriptor: + * a QueryDesc encapsulates everything that the executor + * needs to execute the query * --------------------- */ -typedef struct QueryDesc { - CmdType operation; /* CMD_SELECT, CMD_UPDATE, etc. */ - Query *parsetree; - Plan *plantree; - CommandDest dest; /* the destination output of the execution */ -} QueryDesc; +typedef struct QueryDesc +{ + CmdType operation; /* CMD_SELECT, CMD_UPDATE, etc. */ + Query *parsetree; + Plan *plantree; + CommandDest dest; /* the destination output of the execution */ +} QueryDesc; /* in pquery.c */ -extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree, - CommandDest dest); +extern QueryDesc * +CreateQueryDesc(Query * parsetree, Plan * plantree, + CommandDest dest); -#endif /* EXECDESC_H */ +#endif /* EXECDESC_H */ diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index ec7e61a523d..c96f7439b6c 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * executor.h-- - * support for the POSTGRES executor module + * support for the POSTGRES executor module * * * Copyright (c) 1994, Regents of the University of California * - * $Id: executor.h,v 1.10 1997/08/22 14:39:33 vadim Exp $ + * $Id: executor.h,v 1.11 1997/09/07 04:57:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -26,127 +26,146 @@ /* * prototypes from functions in execAmi.c */ -extern void ExecOpenScanR(Oid relOid, int nkeys, ScanKey skeys, bool isindex, - ScanDirection dir, TimeQual timeRange, - Relation *returnRelation, Pointer *returnScanDesc); -extern void ExecCloseR(Plan *node); -extern void ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent); -extern HeapScanDesc ExecReScanR(Relation relDesc, HeapScanDesc scanDesc, - ScanDirection direction, int nkeys, ScanKey skeys); -extern void ExecMarkPos(Plan *node); -extern void ExecRestrPos(Plan *node); +extern void +ExecOpenScanR(Oid relOid, int nkeys, ScanKey skeys, bool isindex, + ScanDirection dir, TimeQual timeRange, + Relation * returnRelation, Pointer * returnScanDesc); +extern void ExecCloseR(Plan * node); +extern void ExecReScan(Plan * node, ExprContext * exprCtxt, Plan * parent); +extern HeapScanDesc +ExecReScanR(Relation relDesc, HeapScanDesc scanDesc, + ScanDirection direction, int nkeys, ScanKey skeys); +extern void ExecMarkPos(Plan * node); +extern void ExecRestrPos(Plan * node); extern Relation ExecCreatR(TupleDesc tupType, Oid relationOid); /* * prototypes from functions in execJunk.c */ -extern JunkFilter *ExecInitJunkFilter(List *targetList); -extern bool ExecGetJunkAttribute(JunkFilter *junkfilter, TupleTableSlot *slot, - char *attrName, Datum *value, bool *isNull); -extern HeapTuple ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot); +extern JunkFilter *ExecInitJunkFilter(List * targetList); +extern bool +ExecGetJunkAttribute(JunkFilter * junkfilter, TupleTableSlot * slot, + char *attrName, Datum * value, bool * isNull); +extern HeapTuple ExecRemoveJunk(JunkFilter * junkfilter, TupleTableSlot * slot); /* * prototypes from functions in execMain.c */ -extern TupleDesc ExecutorStart(QueryDesc *queryDesc, EState *estate); -extern TupleTableSlot* ExecutorRun(QueryDesc *queryDesc, EState *estate, int feature, int count); -extern void ExecutorEnd(QueryDesc *queryDesc, EState *estate); -extern HeapTuple ExecConstraints (char *caller, Relation rel, HeapTuple tuple); +extern TupleDesc ExecutorStart(QueryDesc * queryDesc, EState * estate); +extern TupleTableSlot *ExecutorRun(QueryDesc * queryDesc, EState * estate, int feature, int count); +extern void ExecutorEnd(QueryDesc * queryDesc, EState * estate); +extern HeapTuple ExecConstraints(char *caller, Relation rel, HeapTuple tuple); /* * prototypes from functions in execProcnode.c */ -extern bool ExecInitNode(Plan *node, EState *estate, Plan *parent); -extern TupleTableSlot *ExecProcNode(Plan *node, Plan *parent); -extern int ExecCountSlotsNode(Plan *node); -extern void ExecEndNode(Plan *node, Plan *parent); +extern bool ExecInitNode(Plan * node, EState * estate, Plan * parent); +extern TupleTableSlot *ExecProcNode(Plan * node, Plan * parent); +extern int ExecCountSlotsNode(Plan * node); +extern void ExecEndNode(Plan * node, Plan * parent); /* * prototypes from functions in execQual.c */ -extern bool execConstByVal; -extern int execConstLen; +extern bool execConstByVal; +extern int execConstLen; + +extern Datum +ExecExtractResult(TupleTableSlot * slot, AttrNumber attnum, + bool * isNull); +extern Datum +ExecEvalParam(Param * expression, ExprContext * econtext, + bool * isNull); -extern Datum ExecExtractResult(TupleTableSlot *slot, AttrNumber attnum, - bool *isNull); -extern Datum ExecEvalParam(Param *expression, ExprContext *econtext, - bool *isNull); /* stop here */ -extern char *GetAttributeByName(TupleTableSlot *slot, char *attname, - bool *isNull); -extern Datum ExecEvalExpr(Node *expression, ExprContext *econtext, bool *isNull, - bool *isDone); -extern bool ExecQual(List *qual, ExprContext *econtext); -extern int ExecTargetListLength(List *targetlist); -extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo, bool *isDone); +extern char * +GetAttributeByName(TupleTableSlot * slot, char *attname, + bool * isNull); +extern Datum +ExecEvalExpr(Node * expression, ExprContext * econtext, bool * isNull, + bool * isDone); +extern bool ExecQual(List * qual, ExprContext * econtext); +extern int ExecTargetListLength(List * targetlist); +extern TupleTableSlot *ExecProject(ProjectionInfo * projInfo, bool * isDone); /* * prototypes from functions in execScan.c */ -extern TupleTableSlot *ExecScan(Scan *node, TupleTableSlot* (*accessMtd)()); +extern TupleTableSlot *ExecScan(Scan * node, TupleTableSlot * (*accessMtd) ()); /* * prototypes from functions in execTuples.c */ extern TupleTable ExecCreateTupleTable(int initialSize); -extern void ExecDestroyTupleTable(TupleTable table, bool shouldFree); -extern TupleTableSlot* ExecAllocTableSlot(TupleTable table); -extern TupleTableSlot* ExecStoreTuple(HeapTuple tuple, - TupleTableSlot *slot, - Buffer buffer, - bool shouldFree); -extern TupleTableSlot* ExecClearTuple(TupleTableSlot* slot); -extern bool ExecSetSlotPolicy(TupleTableSlot *slot, bool shouldFree); -extern TupleDesc ExecSetSlotDescriptor(TupleTableSlot *slot, - TupleDesc tupdesc); -extern void ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, bool isNew); -extern void ExecIncrSlotBufferRefcnt(TupleTableSlot *slot); -extern bool TupIsNull(TupleTableSlot* slot); -extern void ExecInitResultTupleSlot(EState *estate, CommonState *commonstate); -extern void ExecInitScanTupleSlot(EState *estate, - CommonScanState *commonscanstate); -extern void ExecInitMarkedTupleSlot(EState *estate, MergeJoinState *mergestate); -extern void ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate); - -extern TupleDesc ExecGetTupType(Plan *node); -extern TupleDesc ExecTypeFromTL(List *targetList); +extern void ExecDestroyTupleTable(TupleTable table, bool shouldFree); +extern TupleTableSlot *ExecAllocTableSlot(TupleTable table); +extern TupleTableSlot * +ExecStoreTuple(HeapTuple tuple, + TupleTableSlot * slot, + Buffer buffer, + bool shouldFree); +extern TupleTableSlot *ExecClearTuple(TupleTableSlot * slot); +extern bool ExecSetSlotPolicy(TupleTableSlot * slot, bool shouldFree); +extern TupleDesc +ExecSetSlotDescriptor(TupleTableSlot * slot, + TupleDesc tupdesc); +extern void ExecSetSlotDescriptorIsNew(TupleTableSlot * slot, bool isNew); +extern void ExecIncrSlotBufferRefcnt(TupleTableSlot * slot); +extern bool TupIsNull(TupleTableSlot * slot); +extern void ExecInitResultTupleSlot(EState * estate, CommonState * commonstate); +extern void +ExecInitScanTupleSlot(EState * estate, + CommonScanState * commonscanstate); +extern void ExecInitMarkedTupleSlot(EState * estate, MergeJoinState * mergestate); +extern void ExecInitOuterTupleSlot(EState * estate, HashJoinState * hashstate); + +extern TupleDesc ExecGetTupType(Plan * node); +extern TupleDesc ExecTypeFromTL(List * targetList); /* * prototypes from functions in execTuples.c */ -extern void ResetTupleCount(void); -extern void ExecAssignNodeBaseInfo(EState *estate, CommonState *basenode, - Plan *parent); -extern void ExecAssignExprContext(EState *estate, CommonState *commonstate); -extern void ExecAssignResultType(CommonState *commonstate, - TupleDesc tupDesc); -extern void ExecAssignResultTypeFromOuterPlan(Plan *node, - CommonState *commonstate); -extern void ExecAssignResultTypeFromTL(Plan *node, CommonState *commonstate); -extern TupleDesc ExecGetResultType(CommonState *commonstate); -extern void ExecAssignProjectionInfo(Plan *node, CommonState *commonstate); -extern void ExecFreeProjectionInfo(CommonState *commonstate); -extern TupleDesc ExecGetScanType(CommonScanState *csstate); -extern void ExecAssignScanType(CommonScanState *csstate, - TupleDesc tupDesc); -extern void ExecAssignScanTypeFromOuterPlan(Plan *node, - CommonScanState *csstate); +extern void ResetTupleCount(void); +extern void +ExecAssignNodeBaseInfo(EState * estate, CommonState * basenode, + Plan * parent); +extern void ExecAssignExprContext(EState * estate, CommonState * commonstate); +extern void +ExecAssignResultType(CommonState * commonstate, + TupleDesc tupDesc); +extern void +ExecAssignResultTypeFromOuterPlan(Plan * node, + CommonState * commonstate); +extern void ExecAssignResultTypeFromTL(Plan * node, CommonState * commonstate); +extern TupleDesc ExecGetResultType(CommonState * commonstate); +extern void ExecAssignProjectionInfo(Plan * node, CommonState * commonstate); +extern void ExecFreeProjectionInfo(CommonState * commonstate); +extern TupleDesc ExecGetScanType(CommonScanState * csstate); +extern void +ExecAssignScanType(CommonScanState * csstate, + TupleDesc tupDesc); +extern void +ExecAssignScanTypeFromOuterPlan(Plan * node, + CommonScanState * csstate); extern AttributeTupleForm ExecGetTypeInfo(Relation relDesc); -extern void ExecOpenIndices(Oid resultRelationOid, - RelationInfo *resultRelationInfo); -extern void ExecCloseIndices(RelationInfo *resultRelationInfo); -extern void ExecInsertIndexTuples(TupleTableSlot *slot, ItemPointer tupleid, - EState *estate, bool is_update); -extern void resetVarAttrLenForCreateTable(TupleDesc tupType); -extern void setVarAttrLenForCreateTable(TupleDesc tupType, - List *targetList, List *rangeTable); +extern void +ExecOpenIndices(Oid resultRelationOid, + RelationInfo * resultRelationInfo); +extern void ExecCloseIndices(RelationInfo * resultRelationInfo); +extern void +ExecInsertIndexTuples(TupleTableSlot * slot, ItemPointer tupleid, + EState * estate, bool is_update); +extern void resetVarAttrLenForCreateTable(TupleDesc tupType); +extern void +setVarAttrLenForCreateTable(TupleDesc tupType, + List * targetList, List * rangeTable); /* ---------------------------------------------------------------- - * the end + * the end * ---------------------------------------------------------------- */ -#endif /* EXECUTOR_H */ +#endif /* EXECUTOR_H */ diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index e404b0cbe42..475f9309b8c 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -1,22 +1,24 @@ /*------------------------------------------------------------------------- * * functions.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: functions.h,v 1.1 1996/08/28 07:22:12 scrappy Exp $ + * $Id: functions.h,v 1.2 1997/09/07 04:57:48 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef FUNCTIONS_H +#ifndef FUNCTIONS_H #define FUNCTIONS_H -extern Datum ProjectAttribute(TupleDesc TD, TargetEntry *tlist, - HeapTuple tup, bool *isnullP); +extern Datum +ProjectAttribute(TupleDesc TD, TargetEntry * tlist, + HeapTuple tup, bool * isnullP); -extern Datum postquel_function(Func *funcNode, char **args, - bool *isNull, bool *isDone); +extern Datum +postquel_function(Func * funcNode, char **args, + bool * isNull, bool * isDone); -#endif /* FUNCTIONS_H */ +#endif /* FUNCTIONS_H */ diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h index 6bee61ef766..e705c5c77d6 100644 --- a/src/include/executor/hashjoin.h +++ b/src/include/executor/hashjoin.h @@ -1,81 +1,84 @@ /*------------------------------------------------------------------------- * * hashjoin.h-- - * internal structures for hash table and buckets + * internal structures for hash table and buckets * * * Copyright (c) 1994, Regents of the University of California * - * $Id: hashjoin.h,v 1.3 1996/11/04 08:52:46 scrappy Exp $ + * $Id: hashjoin.h,v 1.4 1997/09/07 04:57:49 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef HASHJOIN_H +#ifndef HASHJOIN_H #define HASHJOIN_H #include <storage/ipc.h> /* ----------------- - * have to use relative address as pointers in the hashtable - * because the hashtable may reallocate in difference processes + * have to use relative address as pointers in the hashtable + * because the hashtable may reallocate in difference processes * ----------------- */ -typedef int RelativeAddr; +typedef int RelativeAddr; /* ------------------ - * the relative addresses are always relative to the head of the - * hashtable, the following macro converts them to absolute address. + * the relative addresses are always relative to the head of the + * hashtable, the following macro converts them to absolute address. * ------------------ */ -#define ABSADDR(X) ((X) < 0 ? NULL: (char*)hashtable + X) -#define RELADDR(X) (RelativeAddr)((char*)(X) - (char*)hashtable) +#define ABSADDR(X) ((X) < 0 ? NULL: (char*)hashtable + X) +#define RELADDR(X) (RelativeAddr)((char*)(X) - (char*)hashtable) -typedef char **charPP; -typedef int *intP; +typedef char **charPP; +typedef int *intP; /* ---------------------------------------------------------------- - * hash-join hash table structures + * hash-join hash table structures * ---------------------------------------------------------------- */ -typedef struct HashTableData { - int nbuckets; - int totalbuckets; - int bucketsize; - IpcMemoryId shmid; - RelativeAddr top; /* char* */ - RelativeAddr bottom; /* char* */ - RelativeAddr overflownext; /* char* */ - RelativeAddr batch; /* char* */ - RelativeAddr readbuf; /* char* */ - int nbatch; - RelativeAddr outerbatchNames; /* RelativeAddr* */ - RelativeAddr outerbatchPos; /* RelativeAddr* */ - RelativeAddr innerbatchNames; /* RelativeAddr* */ - RelativeAddr innerbatchPos; /* RelativeAddr* */ - RelativeAddr innerbatchSizes; /* int* */ - int curbatch; - int nprocess; - int pcount; -} HashTableData; /* real hash table follows here */ +typedef struct HashTableData +{ + int nbuckets; + int totalbuckets; + int bucketsize; + IpcMemoryId shmid; + RelativeAddr top; /* char* */ + RelativeAddr bottom; /* char* */ + RelativeAddr overflownext; /* char* */ + RelativeAddr batch; /* char* */ + RelativeAddr readbuf; /* char* */ + int nbatch; + RelativeAddr outerbatchNames; /* RelativeAddr* */ + RelativeAddr outerbatchPos; /* RelativeAddr* */ + RelativeAddr innerbatchNames; /* RelativeAddr* */ + RelativeAddr innerbatchPos; /* RelativeAddr* */ + RelativeAddr innerbatchSizes; /* int* */ + int curbatch; + int nprocess; + int pcount; +} HashTableData; /* real hash table follows here */ -typedef HashTableData *HashJoinTable; +typedef HashTableData *HashJoinTable; -typedef struct OverflowTupleData { - RelativeAddr tuple; /* HeapTuple */ - RelativeAddr next; /* struct OverflowTupleData * */ -} OverflowTupleData; /* real tuple follows here */ +typedef struct OverflowTupleData +{ + RelativeAddr tuple; /* HeapTuple */ + RelativeAddr next; /* struct OverflowTupleData * */ +} OverflowTupleData; /* real tuple follows here */ typedef OverflowTupleData *OverflowTuple; -typedef struct HashBucketData { - RelativeAddr top; /* HeapTuple */ - RelativeAddr bottom; /* HeapTuple */ - RelativeAddr firstotuple; /* OverflowTuple */ - RelativeAddr lastotuple; /* OverflowTuple */ -} HashBucketData; /* real bucket follows here */ +typedef struct HashBucketData +{ + RelativeAddr top; /* HeapTuple */ + RelativeAddr bottom; /* HeapTuple */ + RelativeAddr firstotuple;/* OverflowTuple */ + RelativeAddr lastotuple; /* OverflowTuple */ +} HashBucketData; /* real bucket follows here */ -typedef HashBucketData *HashBucket; +typedef HashBucketData *HashBucket; -#define HASH_PERMISSION 0700 +#define HASH_PERMISSION 0700 -#endif /* HASHJOIN_H */ +#endif /* HASHJOIN_H */ diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h index 9c46a03e207..bae4f1bc726 100644 --- a/src/include/executor/nodeAgg.h +++ b/src/include/executor/nodeAgg.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * nodeAgg.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeAgg.h,v 1.1 1996/08/28 07:22:14 scrappy Exp $ + * $Id: nodeAgg.h,v 1.2 1997/09/07 04:57:50 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEAGG_H -#define NODEAGG_H +#ifndef NODEAGG_H +#define NODEAGG_H -extern TupleTableSlot *ExecAgg(Agg *node); -extern bool ExecInitAgg(Agg *node, EState *estate, Plan *parent); -extern int ExecCountSlotsAgg(Agg *node); -extern void ExecEndAgg(Agg *node); +extern TupleTableSlot *ExecAgg(Agg * node); +extern bool ExecInitAgg(Agg * node, EState * estate, Plan * parent); +extern int ExecCountSlotsAgg(Agg * node); +extern void ExecEndAgg(Agg * node); -#endif /* NODEAGG_H */ +#endif /* NODEAGG_H */ diff --git a/src/include/executor/nodeAppend.h b/src/include/executor/nodeAppend.h index f2ac25c2aee..2aa98a67c5b 100644 --- a/src/include/executor/nodeAppend.h +++ b/src/include/executor/nodeAppend.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * nodeAppend.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeAppend.h,v 1.2 1997/08/19 21:38:19 momjian Exp $ + * $Id: nodeAppend.h,v 1.3 1997/09/07 04:57:51 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEAPPEND_H -#define NODEAPPEND_H +#ifndef NODEAPPEND_H +#define NODEAPPEND_H -extern bool ExecInitAppend(Append *node, EState *estate, Plan *parent); -extern int ExecCountSlotsAppend(Append *node); -extern TupleTableSlot *ExecProcAppend(Append *node); -extern void ExecEndAppend(Append *node); +extern bool ExecInitAppend(Append * node, EState * estate, Plan * parent); +extern int ExecCountSlotsAppend(Append * node); +extern TupleTableSlot *ExecProcAppend(Append * node); +extern void ExecEndAppend(Append * node); -#endif /* NODEAPPEND_H */ +#endif /* NODEAPPEND_H */ diff --git a/src/include/executor/nodeGroup.h b/src/include/executor/nodeGroup.h index 6a6da53ce8e..ddf32d766a5 100644 --- a/src/include/executor/nodeGroup.h +++ b/src/include/executor/nodeGroup.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * nodeGroup.h-- - * prototypes for nodeGroup.c + * prototypes for nodeGroup.c * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeGroup.h,v 1.1 1996/08/28 07:22:17 scrappy Exp $ + * $Id: nodeGroup.h,v 1.2 1997/09/07 04:57:52 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEGROUP_H -#define NODEGROUP_H +#ifndef NODEGROUP_H +#define NODEGROUP_H -extern TupleTableSlot *ExecGroup(Group *node); -extern bool ExecInitGroup(Group *node, EState *estate, Plan *parent); -extern int ExecCountSlotsGroup(Group *node); -extern void ExecEndGroup(Group *node); +extern TupleTableSlot *ExecGroup(Group * node); +extern bool ExecInitGroup(Group * node, EState * estate, Plan * parent); +extern int ExecCountSlotsGroup(Group * node); +extern void ExecEndGroup(Group * node); -#endif /* NODEGROUP_H */ +#endif /* NODEGROUP_H */ diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h index b588b44531b..561e192aaf5 100644 --- a/src/include/executor/nodeHash.h +++ b/src/include/executor/nodeHash.h @@ -1,31 +1,34 @@ /*------------------------------------------------------------------------- * * nodeHash.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeHash.h,v 1.2 1997/08/19 21:38:20 momjian Exp $ + * $Id: nodeHash.h,v 1.3 1997/09/07 04:57:52 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEHASH_H -#define NODEHASH_H +#ifndef NODEHASH_H +#define NODEHASH_H -extern TupleTableSlot *ExecHash(Hash *node); -extern bool ExecInitHash(Hash *node, EState *estate, Plan *parent); -extern int ExecCountSlotsHash(Hash *node); -extern void ExecEndHash(Hash *node); -extern HashJoinTable ExecHashTableCreate(Hash *node); -extern void ExecHashTableInsert(HashJoinTable hashtable, ExprContext *econtext, - Var *hashkey, File *batches); -extern void ExecHashTableDestroy(HashJoinTable hashtable); -extern int ExecHashGetBucket(HashJoinTable hashtable, ExprContext *econtext, - Var *hashkey); -extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate, HashBucket bucket, - HeapTuple curtuple, List *hjclauses, - ExprContext *econtext); -extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples); +extern TupleTableSlot *ExecHash(Hash * node); +extern bool ExecInitHash(Hash * node, EState * estate, Plan * parent); +extern int ExecCountSlotsHash(Hash * node); +extern void ExecEndHash(Hash * node); +extern HashJoinTable ExecHashTableCreate(Hash * node); +extern void +ExecHashTableInsert(HashJoinTable hashtable, ExprContext * econtext, + Var * hashkey, File * batches); +extern void ExecHashTableDestroy(HashJoinTable hashtable); +extern int +ExecHashGetBucket(HashJoinTable hashtable, ExprContext * econtext, + Var * hashkey); +extern HeapTuple +ExecScanHashBucket(HashJoinState * hjstate, HashBucket bucket, + HeapTuple curtuple, List * hjclauses, + ExprContext * econtext); +extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples); -#endif /* NODEHASH_H */ +#endif /* NODEHASH_H */ diff --git a/src/include/executor/nodeHashjoin.h b/src/include/executor/nodeHashjoin.h index 62f02c976c6..17d88862432 100644 --- a/src/include/executor/nodeHashjoin.h +++ b/src/include/executor/nodeHashjoin.h @@ -1,28 +1,29 @@ /*------------------------------------------------------------------------- * * nodeHashjoin.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeHashjoin.h,v 1.2 1997/08/19 21:38:22 momjian Exp $ + * $Id: nodeHashjoin.h,v 1.3 1997/09/07 04:57:53 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEHASHJOIN_H -#define NODEHASHJOIN_H +#ifndef NODEHASHJOIN_H +#define NODEHASHJOIN_H -extern TupleTableSlot *ExecHashJoin(HashJoin *node); +extern TupleTableSlot *ExecHashJoin(HashJoin * node); -extern bool ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent); +extern bool ExecInitHashJoin(HashJoin * node, EState * estate, Plan * parent); -extern int ExecCountSlotsHashJoin(HashJoin *node); +extern int ExecCountSlotsHashJoin(HashJoin * node); -extern void ExecEndHashJoin(HashJoin *node); +extern void ExecEndHashJoin(HashJoin * node); -extern char *ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer, - File file, char *position); +extern char * +ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer, + File file, char *position); -#endif /* NODEHASHJOIN_H */ +#endif /* NODEHASHJOIN_H */ diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h index 5e55948ad91..e111f7ed2ee 100644 --- a/src/include/executor/nodeIndexscan.h +++ b/src/include/executor/nodeIndexscan.h @@ -1,33 +1,34 @@ /*------------------------------------------------------------------------- * * nodeIndexscan.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeIndexscan.h,v 1.2 1996/10/23 07:41:34 scrappy Exp $ + * $Id: nodeIndexscan.h,v 1.3 1997/09/07 04:57:54 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEINDEXSCAN_H -#define NODEINDEXSCAN_H +#ifndef NODEINDEXSCAN_H +#define NODEINDEXSCAN_H + +extern TupleTableSlot *ExecIndexScan(IndexScan * node); -extern TupleTableSlot *ExecIndexScan(IndexScan *node); +extern void ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent); -extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent); +extern void ExecEndIndexScan(IndexScan * node); -extern void ExecEndIndexScan(IndexScan *node); +extern void ExecIndexMarkPos(IndexScan * node); -extern void ExecIndexMarkPos(IndexScan *node); +extern void ExecIndexRestrPos(IndexScan * node); -extern void ExecIndexRestrPos(IndexScan *node); +extern void ExecUpdateIndexScanKeys(IndexScan * node, ExprContext * econtext); -extern void ExecUpdateIndexScanKeys(IndexScan *node, ExprContext *econtext); +extern bool ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent); -extern bool ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent); +extern int ExecCountSlotsIndexScan(IndexScan * node); -extern int ExecCountSlotsIndexScan(IndexScan *node); +extern void ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent); -extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan* parent); -#endif /* NODEINDEXSCAN_H */ +#endif /* NODEINDEXSCAN_H */ diff --git a/src/include/executor/nodeMaterial.h b/src/include/executor/nodeMaterial.h index 3560315c533..c1833b11594 100644 --- a/src/include/executor/nodeMaterial.h +++ b/src/include/executor/nodeMaterial.h @@ -1,23 +1,23 @@ /*------------------------------------------------------------------------- * * nodeMaterial.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeMaterial.h,v 1.1 1996/08/28 07:22:21 scrappy Exp $ + * $Id: nodeMaterial.h,v 1.2 1997/09/07 04:57:55 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEMATERIAL_H -#define NODEMATERIAL_H +#ifndef NODEMATERIAL_H +#define NODEMATERIAL_H -extern TupleTableSlot *ExecMaterial(Material *node); -extern bool ExecInitMaterial(Material *node, EState *estate, Plan *parent); -extern int ExecCountSlotsMaterial(Material *node); -extern void ExecEndMaterial(Material *node); -extern List ExecMaterialMarkPos(Material *node); -extern void ExecMaterialRestrPos(Material *node); +extern TupleTableSlot *ExecMaterial(Material * node); +extern bool ExecInitMaterial(Material * node, EState * estate, Plan * parent); +extern int ExecCountSlotsMaterial(Material * node); +extern void ExecEndMaterial(Material * node); +extern List ExecMaterialMarkPos(Material * node); +extern void ExecMaterialRestrPos(Material * node); -#endif /* NODEMATERIAL_H */ +#endif /* NODEMATERIAL_H */ diff --git a/src/include/executor/nodeMergejoin.h b/src/include/executor/nodeMergejoin.h index 3b96ac50c5c..7e496734b44 100644 --- a/src/include/executor/nodeMergejoin.h +++ b/src/include/executor/nodeMergejoin.h @@ -1,24 +1,24 @@ /*------------------------------------------------------------------------- * * nodeMergejoin.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeMergejoin.h,v 1.3 1997/08/19 21:38:22 momjian Exp $ + * $Id: nodeMergejoin.h,v 1.4 1997/09/07 04:57:56 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEMERGEJOIN_H -#define NODEMERGEJOIN_H +#ifndef NODEMERGEJOIN_H +#define NODEMERGEJOIN_H -extern TupleTableSlot *ExecMergeJoin(MergeJoin *node); +extern TupleTableSlot *ExecMergeJoin(MergeJoin * node); -extern bool ExecInitMergeJoin(MergeJoin *node, EState *estate, Plan *parent); +extern bool ExecInitMergeJoin(MergeJoin * node, EState * estate, Plan * parent); -extern int ExecCountSlotsMergeJoin(MergeJoin *node); +extern int ExecCountSlotsMergeJoin(MergeJoin * node); -extern void ExecEndMergeJoin(MergeJoin *node); +extern void ExecEndMergeJoin(MergeJoin * node); -#endif /* NODEMERGEJOIN_H; */ +#endif /* NODEMERGEJOIN_H; */ diff --git a/src/include/executor/nodeNestloop.h b/src/include/executor/nodeNestloop.h index 1fe271c0702..8b387841e60 100644 --- a/src/include/executor/nodeNestloop.h +++ b/src/include/executor/nodeNestloop.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * nodeNestloop.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeNestloop.h,v 1.1 1996/08/28 07:22:23 scrappy Exp $ + * $Id: nodeNestloop.h,v 1.2 1997/09/07 04:57:57 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODENESTLOOP_H -#define NODENESTLOOP_H +#ifndef NODENESTLOOP_H +#define NODENESTLOOP_H -extern TupleTableSlot *ExecNestLoop(NestLoop *node, Plan *parent); -extern bool ExecInitNestLoop(NestLoop *node, EState *estate, Plan *parent); -extern int ExecCountSlotsNestLoop(NestLoop *node); -extern void ExecEndNestLoop(NestLoop *node); +extern TupleTableSlot *ExecNestLoop(NestLoop * node, Plan * parent); +extern bool ExecInitNestLoop(NestLoop * node, EState * estate, Plan * parent); +extern int ExecCountSlotsNestLoop(NestLoop * node); +extern void ExecEndNestLoop(NestLoop * node); -#endif /* NODENESTLOOP_H */ +#endif /* NODENESTLOOP_H */ diff --git a/src/include/executor/nodeResult.h b/src/include/executor/nodeResult.h index ba100ffa54c..40ef4a7b4da 100644 --- a/src/include/executor/nodeResult.h +++ b/src/include/executor/nodeResult.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * nodeResult.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeResult.h,v 1.1 1996/08/28 07:22:24 scrappy Exp $ + * $Id: nodeResult.h,v 1.2 1997/09/07 04:57:58 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODERESULT_H -#define NODERESULT_H +#ifndef NODERESULT_H +#define NODERESULT_H -extern TupleTableSlot *ExecResult(Result *node); -extern bool ExecInitResult(Result *node, EState *estate, Plan *parent); -extern int ExecCountSlotsResult(Result *node); -extern void ExecEndResult(Result *node); +extern TupleTableSlot *ExecResult(Result * node); +extern bool ExecInitResult(Result * node, EState * estate, Plan * parent); +extern int ExecCountSlotsResult(Result * node); +extern void ExecEndResult(Result * node); -#endif /* NODERESULT_H */ +#endif /* NODERESULT_H */ diff --git a/src/include/executor/nodeSeqscan.h b/src/include/executor/nodeSeqscan.h index 99cb83e431c..56237dc80d4 100644 --- a/src/include/executor/nodeSeqscan.h +++ b/src/include/executor/nodeSeqscan.h @@ -1,24 +1,24 @@ /*------------------------------------------------------------------------- * * nodeSeqscan.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeSeqscan.h,v 1.2 1997/08/19 21:38:23 momjian Exp $ + * $Id: nodeSeqscan.h,v 1.3 1997/09/07 04:57:59 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODESEQSCAN_H -#define NODESEQSCAN_H +#ifndef NODESEQSCAN_H +#define NODESEQSCAN_H -extern TupleTableSlot *ExecSeqScan(SeqScan *node); -extern bool ExecInitSeqScan(SeqScan *node, EState *estate, Plan *parent); -extern int ExecCountSlotsSeqScan(SeqScan *node); -extern void ExecEndSeqScan(SeqScan *node); -extern void ExecSeqReScan(SeqScan *node, ExprContext *exprCtxt, Plan* parent); -extern void ExecSeqMarkPos(SeqScan *node); -extern void ExecSeqRestrPos(SeqScan *node); +extern TupleTableSlot *ExecSeqScan(SeqScan * node); +extern bool ExecInitSeqScan(SeqScan * node, EState * estate, Plan * parent); +extern int ExecCountSlotsSeqScan(SeqScan * node); +extern void ExecEndSeqScan(SeqScan * node); +extern void ExecSeqReScan(SeqScan * node, ExprContext * exprCtxt, Plan * parent); +extern void ExecSeqMarkPos(SeqScan * node); +extern void ExecSeqRestrPos(SeqScan * node); -#endif /* NODESEQSCAN_H */ +#endif /* NODESEQSCAN_H */ diff --git a/src/include/executor/nodeSort.h b/src/include/executor/nodeSort.h index a95d9dc0522..428805702eb 100644 --- a/src/include/executor/nodeSort.h +++ b/src/include/executor/nodeSort.h @@ -1,23 +1,23 @@ /*------------------------------------------------------------------------- * * nodeSort.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeSort.h,v 1.1 1996/08/28 07:22:25 scrappy Exp $ + * $Id: nodeSort.h,v 1.2 1997/09/07 04:58:00 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODESORT_H -#define NODESORT_H +#ifndef NODESORT_H +#define NODESORT_H -extern TupleTableSlot *ExecSort(Sort *node); -extern bool ExecInitSort(Sort *node, EState *estate, Plan *parent); -extern int ExecCountSlotsSort(Sort *node); -extern void ExecEndSort(Sort *node); -extern void ExecSortMarkPos(Sort *node); -extern void ExecSortRestrPos(Sort *node); +extern TupleTableSlot *ExecSort(Sort * node); +extern bool ExecInitSort(Sort * node, EState * estate, Plan * parent); +extern int ExecCountSlotsSort(Sort * node); +extern void ExecEndSort(Sort * node); +extern void ExecSortMarkPos(Sort * node); +extern void ExecSortRestrPos(Sort * node); -#endif /* NODESORT_H */ +#endif /* NODESORT_H */ diff --git a/src/include/executor/nodeTee.h b/src/include/executor/nodeTee.h index d70a5984698..7235030d670 100644 --- a/src/include/executor/nodeTee.h +++ b/src/include/executor/nodeTee.h @@ -1,22 +1,22 @@ /*------------------------------------------------------------------------- * * nodeTee.h-- - * support functions for a Tee executor node + * support functions for a Tee executor node * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeTee.h,v 1.1 1996/08/28 07:22:26 scrappy Exp $ + * $Id: nodeTee.h,v 1.2 1997/09/07 04:58:00 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODETEE_H -#define NODETEE_H +#ifndef NODETEE_H +#define NODETEE_H -extern TupleTableSlot* ExecTee(Tee* node, Plan* parent); -extern bool ExecInitTee(Tee* node, EState* estate, Plan* parent); -extern void ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent); -extern void ExecEndTee(Tee* node, Plan* parent); -extern int ExecCountSlotsTee(Tee* node); +extern TupleTableSlot *ExecTee(Tee * node, Plan * parent); +extern bool ExecInitTee(Tee * node, EState * estate, Plan * parent); +extern void ExecTeeReScan(Tee * node, ExprContext * exprCtxt, Plan * parent); +extern void ExecEndTee(Tee * node, Plan * parent); +extern int ExecCountSlotsTee(Tee * node); -#endif /* NODETEE_H */ +#endif /* NODETEE_H */ diff --git a/src/include/executor/nodeUnique.h b/src/include/executor/nodeUnique.h index a3c143e3459..c66fa827cab 100644 --- a/src/include/executor/nodeUnique.h +++ b/src/include/executor/nodeUnique.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * nodeUnique.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeUnique.h,v 1.1 1996/08/28 07:22:27 scrappy Exp $ + * $Id: nodeUnique.h,v 1.2 1997/09/07 04:58:01 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef NODEUNIQUE_H -#define NODEUNIQUE_H +#ifndef NODEUNIQUE_H +#define NODEUNIQUE_H -extern TupleTableSlot *ExecUnique(Unique *node); -extern bool ExecInitUnique(Unique *node, EState *estate, Plan *parent); -extern int ExecCountSlotsUnique(Unique *node); -extern void ExecEndUnique(Unique *node); +extern TupleTableSlot *ExecUnique(Unique * node); +extern bool ExecInitUnique(Unique * node, EState * estate, Plan * parent); +extern int ExecCountSlotsUnique(Unique * node); +extern void ExecEndUnique(Unique * node); -#endif /* NODEUNIQUE_H */ +#endif /* NODEUNIQUE_H */ diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index 8ab7b34b0c8..fee2056f9f8 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------- * * spi.h-- - * + * * *------------------------------------------------------------------------- */ -#ifndef SPI_H +#ifndef SPI_H #define SPI_H #include <string.h> @@ -34,52 +34,53 @@ #include "executor/executor.h" #include "executor/execdefs.h" -typedef struct { - uint32 alloced; /* # of alloced vals */ - uint32 free; /* # of free vals */ - TupleDesc tupdesc; /* tuple descriptor */ - HeapTuple *vals; /* tuples */ -} SPITupleTable; +typedef struct +{ + uint32 alloced; /* # of alloced vals */ + uint32 free; /* # of free vals */ + TupleDesc tupdesc; /* tuple descriptor */ + HeapTuple *vals; /* tuples */ +} SPITupleTable; -#define SPI_ERROR_CONNECT -1 -#define SPI_ERROR_COPY -2 -#define SPI_ERROR_OPUNKNOWN -3 +#define SPI_ERROR_CONNECT -1 +#define SPI_ERROR_COPY -2 +#define SPI_ERROR_OPUNKNOWN -3 #define SPI_ERROR_UNCONNECTED -4 -#define SPI_ERROR_CURSOR -5 -#define SPI_ERROR_ARGUMENT -6 -#define SPI_ERROR_PARAM -7 +#define SPI_ERROR_CURSOR -5 +#define SPI_ERROR_ARGUMENT -6 +#define SPI_ERROR_PARAM -7 #define SPI_ERROR_TRANSACTION -8 #define SPI_ERROR_NOATTRIBUTE -9 -#define SPI_ERROR_NOOUTFUNC -10 +#define SPI_ERROR_NOOUTFUNC -10 #define SPI_ERROR_TYPUNKNOWN -11 -#define SPI_OK_CONNECT 1 -#define SPI_OK_FINISH 2 -#define SPI_OK_FETCH 3 -#define SPI_OK_UTILITY 4 -#define SPI_OK_SELECT 5 -#define SPI_OK_SELINTO 6 -#define SPI_OK_INSERT 7 -#define SPI_OK_DELETE 8 -#define SPI_OK_UPDATE 9 -#define SPI_OK_CURSOR 10 +#define SPI_OK_CONNECT 1 +#define SPI_OK_FINISH 2 +#define SPI_OK_FETCH 3 +#define SPI_OK_UTILITY 4 +#define SPI_OK_SELECT 5 +#define SPI_OK_SELINTO 6 +#define SPI_OK_INSERT 7 +#define SPI_OK_DELETE 8 +#define SPI_OK_UPDATE 9 +#define SPI_OK_CURSOR 10 -extern uint32 SPI_processed; +extern uint32 SPI_processed; extern SPITupleTable *SPI_tuptable; -extern int SPI_result; +extern int SPI_result; -extern int SPI_connect (void); -extern int SPI_finish (void); -extern int SPI_exec (char *src, int tcount); -extern int SPI_execp (void *plan, char **values, char *Nulls, int tcount); -extern void *SPI_prepare (char *src, int nargs, Oid *argtypes); -extern void *SPI_saveplan (void *plan); +extern int SPI_connect(void); +extern int SPI_finish(void); +extern int SPI_exec(char *src, int tcount); +extern int SPI_execp(void *plan, char **values, char *Nulls, int tcount); +extern void *SPI_prepare(char *src, int nargs, Oid * argtypes); +extern void *SPI_saveplan(void *plan); -extern int SPI_fnumber (TupleDesc tupdesc, char *fname); -extern char *SPI_getvalue (HeapTuple tuple, TupleDesc tupdesc, int fnumber); -extern char *SPI_getbinval (HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool *isnull); -extern char *SPI_gettype (TupleDesc tupdesc, int fnumber); -extern Oid SPI_gettypeid (TupleDesc tupdesc, int fnumber); -extern char *SPI_getrelname (Relation rel); +extern int SPI_fnumber(TupleDesc tupdesc, char *fname); +extern char *SPI_getvalue(HeapTuple tuple, TupleDesc tupdesc, int fnumber); +extern char *SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool * isnull); +extern char *SPI_gettype(TupleDesc tupdesc, int fnumber); +extern Oid SPI_gettypeid(TupleDesc tupdesc, int fnumber); +extern char *SPI_getrelname(Relation rel); -#endif /* SPI_H */ +#endif /* SPI_H */ diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h index 4357e1240de..fcef30cd8e4 100644 --- a/src/include/executor/tuptable.h +++ b/src/include/executor/tuptable.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * tuptable.h-- - * tuple table support stuff + * tuple table support stuff * * * Copyright (c) 1994, Regents of the University of California * - * $Id: tuptable.h,v 1.4 1996/11/04 08:52:47 scrappy Exp $ + * $Id: tuptable.h,v 1.5 1997/09/07 04:58:03 momjian Exp $ * * NOTES - * The tuple table interface is getting pretty ugly. - * It should be redesigned soon. + * The tuple table interface is getting pretty ugly. + * It should be redesigned soon. * *------------------------------------------------------------------------- */ @@ -22,55 +22,57 @@ #include <access/htup.h> /* ---------------- - * Note: the executor tuple table is managed and manipulated by special - * code and macros in executor/execTuples.c and tupTable.h + * Note: the executor tuple table is managed and manipulated by special + * code and macros in executor/execTuples.c and tupTable.h * - * TupleTableSlot information + * TupleTableSlot information * - * shouldFree boolean - should we call pfree() on tuple - * descIsNew boolean - true when tupleDescriptor changes - * tupleDescriptor type information kept regarding the tuple data - * buffer the buffer for tuples pointing to disk pages + * shouldFree boolean - should we call pfree() on tuple + * descIsNew boolean - true when tupleDescriptor changes + * tupleDescriptor type information kept regarding the tuple data + * buffer the buffer for tuples pointing to disk pages * - * The executor stores pointers to tuples in a ``tuple table'' - * which is composed of TupleTableSlot's. Some of the tuples - * are pointers to buffer pages and others are pointers to - * palloc'ed memory and the shouldFree variable tells us when - * we may call pfree() on a tuple. -cim 9/23/90 + * The executor stores pointers to tuples in a ``tuple table'' + * which is composed of TupleTableSlot's. Some of the tuples + * are pointers to buffer pages and others are pointers to + * palloc'ed memory and the shouldFree variable tells us when + * we may call pfree() on a tuple. -cim 9/23/90 * - * In the implementation of nested-dot queries such as - * "retrieve (EMP.hobbies.all)", a single scan may return tuples - * of many types, so now we return pointers to tuple descriptors - * along with tuples returned via the tuple table. -cim 1/18/90 + * In the implementation of nested-dot queries such as + * "retrieve (EMP.hobbies.all)", a single scan may return tuples + * of many types, so now we return pointers to tuple descriptors + * along with tuples returned via the tuple table. -cim 1/18/90 * ---------------- */ -typedef struct TupleTableSlot { - NodeTag type; - HeapTuple val; - bool ttc_shouldFree; - bool ttc_descIsNew; - TupleDesc ttc_tupleDescriptor; - Buffer ttc_buffer; - int ttc_whichplan; -} TupleTableSlot; +typedef struct TupleTableSlot +{ + NodeTag type; + HeapTuple val; + bool ttc_shouldFree; + bool ttc_descIsNew; + TupleDesc ttc_tupleDescriptor; + Buffer ttc_buffer; + int ttc_whichplan; +} TupleTableSlot; /* ---------------- - * tuple table data structure + * tuple table data structure * ---------------- */ -typedef struct TupleTableData { - int size; /* size of the table */ - int next; /* next available slot number */ - TupleTableSlot *array; /* array of TupleTableSlot's */ -} TupleTableData; +typedef struct TupleTableData +{ + int size; /* size of the table */ + int next; /* next available slot number */ + TupleTableSlot *array; /* array of TupleTableSlot's */ +} TupleTableData; typedef TupleTableData *TupleTable; -/* +/* tuple table macros are all excised from the system now see executor.h for decls of functions defined in execTuples.c - jolly */ -#endif /* TUPTABLE_H */ +#endif /* TUPTABLE_H */ diff --git a/src/include/lib/dllist.h b/src/include/lib/dllist.h index 4c4534b974c..15a18d88c6f 100644 --- a/src/include/lib/dllist.h +++ b/src/include/lib/dllist.h @@ -1,32 +1,32 @@ /*------------------------------------------------------------------------- * * dllist.h-- - * simple doubly linked list primitives - * the elements of the list are void* so the lists can contain - * anything - * Dlelem can only be in one list at a time - * + * simple doubly linked list primitives + * the elements of the list are void* so the lists can contain + * anything + * Dlelem can only be in one list at a time * - * Here's a small example of how to use Dllist's : - * - * Dllist *lst; - * Dlelem *elt; - * void *in_stuff; -- stuff to stick in the list - * void *out_stuff * - * lst = DLNewList(); -- make a new dllist - * DLAddHead(lst, DLNewElem(in_stuff)); -- add a new element to the list - * with in_stuff as the value - * ... - * elt = DLGetHead(lst); -- retrieve the head element - * out_stuff = (void*)DLE_VAL(elt); -- get the stuff out - * DLRemove(elt); -- removes the element from its list - * DLFreeElem(elt); -- free the element since we don't - * use it anymore + * Here's a small example of how to use Dllist's : + * + * Dllist *lst; + * Dlelem *elt; + * void *in_stuff; -- stuff to stick in the list + * void *out_stuff + * + * lst = DLNewList(); -- make a new dllist + * DLAddHead(lst, DLNewElem(in_stuff)); -- add a new element to the list + * with in_stuff as the value + * ... + * elt = DLGetHead(lst); -- retrieve the head element + * out_stuff = (void*)DLE_VAL(elt); -- get the stuff out + * DLRemove(elt); -- removes the element from its list + * DLFreeElem(elt); -- free the element since we don't + * use it anymore * * Copyright (c) 1994, Regents of the University of California * - * $Id: dllist.h,v 1.4 1997/08/19 21:38:28 momjian Exp $ + * $Id: dllist.h,v 1.5 1997/09/07 04:58:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -38,32 +38,36 @@ struct Dllist; struct Dlelem; -typedef struct Dlelem { - struct Dlelem *dle_next; /* next element */ - struct Dlelem *dle_prev; /* previous element */ - void *dle_val; /* value of the element */ - struct Dllist *dle_list; /* what list this element is in */ -} Dlelem; +typedef struct Dlelem +{ + struct Dlelem *dle_next; /* next element */ + struct Dlelem *dle_prev; /* previous element */ + void *dle_val; /* value of the element */ + struct Dllist *dle_list; /* what list this element is in */ +} Dlelem; + +typedef struct Dllist +{ + Dlelem *dll_head; + Dlelem *dll_tail; +} Dllist; -typedef struct Dllist { - Dlelem *dll_head; - Dlelem *dll_tail; -} Dllist; - -extern Dllist* DLNewList(void); /* initialize a new list */ -extern void DLFreeList(Dllist*); /* free up a list and all the nodes in it*/ -extern Dlelem* DLNewElem(void* val); -extern void DLFreeElem(Dlelem*); -extern Dlelem* DLGetHead(Dllist*); -extern Dlelem* DLGetTail(Dllist*); -extern Dlelem* DLRemTail(Dllist* l); -extern Dlelem* DLGetPred(Dlelem*); /* get predecessor */ -extern Dlelem* DLGetSucc(Dlelem*); /* get successor */ -extern void DLRemove(Dlelem*); /* removes node from list*/ -extern void DLAddHead(Dllist* list, Dlelem* node); -extern void DLAddTail(Dllist* list, Dlelem* node); -extern Dlelem* DLRemHead(Dllist* list); /* remove and return the head */ +extern Dllist *DLNewList(void);/* initialize a new list */ +extern void DLFreeList(Dllist *); /* free up a list and all the + * nodes in it */ +extern Dlelem *DLNewElem(void *val); +extern void DLFreeElem(Dlelem *); +extern Dlelem *DLGetHead(Dllist *); +extern Dlelem *DLGetTail(Dllist *); +extern Dlelem *DLRemTail(Dllist * l); +extern Dlelem *DLGetPred(Dlelem *); /* get predecessor */ +extern Dlelem *DLGetSucc(Dlelem *); /* get successor */ +extern void DLRemove(Dlelem *); /* removes node from list */ +extern void DLAddHead(Dllist * list, Dlelem * node); +extern void DLAddTail(Dllist * list, Dlelem * node); +extern Dlelem *DLRemHead(Dllist * list); /* remove and return the + * head */ -#define DLE_VAL(x) (x->dle_val) +#define DLE_VAL(x) (x->dle_val) -#endif /* DLLIST_H */ +#endif /* DLLIST_H */ diff --git a/src/include/lib/fstack.h b/src/include/lib/fstack.h index de2868142a3..99f10b9006c 100644 --- a/src/include/lib/fstack.h +++ b/src/include/lib/fstack.h @@ -1,112 +1,114 @@ /*------------------------------------------------------------------------- * * fstack.h-- - * Fixed format stack definitions. + * Fixed format stack definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: fstack.h,v 1.2 1996/10/31 09:48:46 scrappy Exp $ + * $Id: fstack.h,v 1.3 1997/09/07 04:58:09 momjian Exp $ * *------------------------------------------------------------------------- */ /* * Note: - * Fixed format stacks assist in the construction of FIFO stacks of - * fixed format structures. Structures which are to be stackable - * should contain a FixedItemData component. A stack is initilized - * with the offset of the FixedItemData component of the structure - * it will hold. By doing so, push and pop operations are simplified - * for the callers. All references to stackable items are pointers - * to the base of the structure instead of pointers to the - * FixedItemData component. + * Fixed format stacks assist in the construction of FIFO stacks of + * fixed format structures. Structures which are to be stackable + * should contain a FixedItemData component. A stack is initilized + * with the offset of the FixedItemData component of the structure + * it will hold. By doing so, push and pop operations are simplified + * for the callers. All references to stackable items are pointers + * to the base of the structure instead of pointers to the + * FixedItemData component. * */ -#ifndef FSTACK_H +#ifndef FSTACK_H #define FSTACK_H /* * FixedItem -- - * Fixed format stackable item chain component. + * Fixed format stackable item chain component. * * Note: - * Structures must contain one FixedItemData component per stack in - * which it will be an item. + * Structures must contain one FixedItemData component per stack in + * which it will be an item. */ -typedef struct FixedItemData FixedItemData; -typedef FixedItemData *FixedItem; +typedef struct FixedItemData FixedItemData; +typedef FixedItemData *FixedItem; -struct FixedItemData { - FixedItem next; /* next item or NULL */ +struct FixedItemData +{ + FixedItem next; /* next item or NULL */ }; /* * FixedStack -- - * Fixed format stack. + * Fixed format stack. */ -typedef struct FixedStackData { - FixedItem top; /* Top item on the stack or NULL */ - Offset offset; /* Offset from struct base to item */ +typedef struct FixedStackData +{ + FixedItem top; /* Top item on the stack or NULL */ + Offset offset; /* Offset from struct base to item */ /* this could be signed short int! */ -} FixedStackData; +} FixedStackData; -typedef FixedStackData *FixedStack; +typedef FixedStackData *FixedStack; /* * FixedStackInit -- - * Iniitializes stack for structures with given fixed component offset. + * Iniitializes stack for structures with given fixed component offset. * * Exceptions: - * BadArg if stack is invalid pointer. + * BadArg if stack is invalid pointer. */ -extern void FixedStackInit(FixedStack stack, Offset offset); +extern void FixedStackInit(FixedStack stack, Offset offset); /* * FixedStackPop -- - * Returns pointer to top structure on stack or NULL if empty stack. + * Returns pointer to top structure on stack or NULL if empty stack. * * Exceptions: - * BadArg if stack is invalid. + * BadArg if stack is invalid. */ -Pointer FixedStackPop(FixedStack stack); +Pointer FixedStackPop(FixedStack stack); /* * FixedStackPush -- - * Places structure associated with pointer onto top of stack. + * Places structure associated with pointer onto top of stack. * * Exceptions: - * BadArg if stack is invalid. - * BadArg if pointer is invalid. + * BadArg if stack is invalid. + * BadArg if pointer is invalid. */ -extern void FixedStackPush(FixedStack stack, Pointer pointer); +extern void FixedStackPush(FixedStack stack, Pointer pointer); /* * FixedStackGetTop -- - * Returns pointer to top structure of a stack. This item is not poped. + * Returns pointer to top structure of a stack. This item is not poped. * * Note: - * This is not part of the normal stack interface. It is intended for - * debugging use only. + * This is not part of the normal stack interface. It is intended for + * debugging use only. * * Exceptions: - * BadArg if stack is invalid. + * BadArg if stack is invalid. */ -extern Pointer FixedStackGetTop(FixedStack stack); +extern Pointer FixedStackGetTop(FixedStack stack); /* * FixedStackGetNext -- - * Returns pointer to next structure after pointer of a stack. + * Returns pointer to next structure after pointer of a stack. * * Note: - * This is not part of the normal stack interface. It is intended for - * debugging use only. + * This is not part of the normal stack interface. It is intended for + * debugging use only. * * Exceptions: - * BadArg if stack is invalid. - * BadArg if pointer is invalid. - * BadArg if stack does not contain pointer. + * BadArg if stack is invalid. + * BadArg if pointer is invalid. + * BadArg if stack does not contain pointer. */ -extern Pointer FixedStackGetNext(FixedStack stack, Pointer pointer); +extern Pointer FixedStackGetNext(FixedStack stack, Pointer pointer); -#endif /* FSTACK_H */ +#endif /* FSTACK_H */ diff --git a/src/include/lib/hasht.h b/src/include/lib/hasht.h index 20f562e1136..1d28c2ca28f 100644 --- a/src/include/lib/hasht.h +++ b/src/include/lib/hasht.h @@ -1,23 +1,23 @@ /*------------------------------------------------------------------------- * * hasht.h-- - * hash table related functions that are not directly supported - * under utils/hash. + * hash table related functions that are not directly supported + * under utils/hash. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: hasht.h,v 1.2 1996/11/05 11:29:45 scrappy Exp $ + * $Id: hasht.h,v 1.3 1997/09/07 04:58:11 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef HASHT_H +#ifndef HASHT_H #define HASHT_H #include <utils/hsearch.h> -typedef void (*HashtFunc)(); +typedef void (*HashtFunc) (); -extern void HashTableWalk(HTAB *hashtable, HashtFunc function, int arg); +extern void HashTableWalk(HTAB * hashtable, HashtFunc function, int arg); -#endif /* HASHT_H */ +#endif /* HASHT_H */ diff --git a/src/include/lib/lispsort.h b/src/include/lib/lispsort.h index 872b14959a3..d4d074ba54d 100644 --- a/src/include/lib/lispsort.h +++ b/src/include/lib/lispsort.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * lispsort.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: lispsort.h,v 1.2 1997/08/19 21:38:30 momjian Exp $ + * $Id: lispsort.h,v 1.3 1997/09/07 04:58:12 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef LISPSORT_H -#define LISPSORT_H +#ifndef LISPSORT_H +#define LISPSORT_H -#endif /* LISPSORT_H */ +#endif /* LISPSORT_H */ diff --git a/src/include/lib/qsort.h b/src/include/lib/qsort.h index 3382d0b34e8..d321ed7fb2c 100644 --- a/src/include/lib/qsort.h +++ b/src/include/lib/qsort.h @@ -1,23 +1,23 @@ /*------------------------------------------------------------------------- * * qsort.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: qsort.h,v 1.2 1996/11/06 10:29:46 scrappy Exp $ + * $Id: qsort.h,v 1.3 1997/09/07 04:58:13 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef QSORT_H -#define QSORT_H +#ifndef QSORT_H +#define QSORT_H -extern void pg_qsort(void *bot, - size_t nmemb, - size_t size, - int (*compar)(void *, void *)); +extern void +pg_qsort(void *bot, + size_t nmemb, + size_t size, + int (*compar) (void *, void *)); -#endif /* QSORT_H */ - +#endif /* QSORT_H */ diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h index 39863fcbcae..f127d8cdd01 100644 --- a/src/include/lib/stringinfo.h +++ b/src/include/lib/stringinfo.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * stringinfo.h-- - * Declarations/definitons for "string" functions. + * Declarations/definitons for "string" functions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: stringinfo.h,v 1.2 1996/10/31 09:48:52 scrappy Exp $ + * $Id: stringinfo.h,v 1.3 1997/09/07 04:58:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,18 +16,19 @@ /*------------------------- * StringInfoData holds information about a string. - * 'data' is the string. - * 'len' is the current string length (as returned by 'strlen') - * 'maxlen' is the size in bytes of 'data', i.e. the maximum string - * size (includeing the terminating '\0' char) that we can - * currently store in 'data' without having to reallocate - * more space. + * 'data' is the string. + * 'len' is the current string length (as returned by 'strlen') + * 'maxlen' is the size in bytes of 'data', i.e. the maximum string + * size (includeing the terminating '\0' char) that we can + * currently store in 'data' without having to reallocate + * more space. */ -typedef struct StringInfoData { - char *data; - int maxlen; - int len; -} StringInfoData; +typedef struct StringInfoData +{ + char *data; + int maxlen; + int len; +} StringInfoData; typedef StringInfoData *StringInfo; @@ -41,6 +42,6 @@ extern StringInfo makeStringInfo(void); * appendStringInfo * similar to 'strcat' but reallocates more space if necessary... */ -extern void appendStringInfo(StringInfo str, char *buffer); +extern void appendStringInfo(StringInfo str, char *buffer); -#endif /* STRINGINFO_H */ +#endif /* STRINGINFO_H */ diff --git a/src/include/libpq/auth.h b/src/include/libpq/auth.h index 40a97cdfb44..a159b7a5ebd 100644 --- a/src/include/libpq/auth.h +++ b/src/include/libpq/auth.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * auth.h-- - * Definitions for network authentication routines + * Definitions for network authentication routines * * * Copyright (c) 1994, Regents of the University of California * - * $Id: auth.h,v 1.4 1997/08/19 21:38:34 momjian Exp $ + * $Id: auth.h,v 1.5 1997/09/07 04:58:16 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef AUTH_H -#define AUTH_H +#define AUTH_H #include <libpq/pqcomm.h> @@ -21,27 +21,27 @@ */ /* what we call "no authentication system" */ -#define UNAUTHNAME "unauth" +#define UNAUTHNAME "unauth" /* what a frontend uses by default */ #if !defined(KRB4) && !defined(KRB5) -#define DEFAULT_CLIENT_AUTHSVC UNAUTHNAME -#else /* KRB4 || KRB5 */ -#define DEFAULT_CLIENT_AUTHSVC "kerberos" -#endif /* KRB4 || KRB5 */ - -extern int fe_sendauth(MsgType msgtype, Port *port, char *hostname); -extern void fe_setauthsvc(char *name); -extern MsgType fe_getauthsvc(); -extern char *fe_getauthname(void); -extern int be_recvauth(MsgType msgtype, Port *port, char *username, StartupInfo* sp); -extern void be_setauthsvc(char *name); +#define DEFAULT_CLIENT_AUTHSVC UNAUTHNAME +#else /* KRB4 || KRB5 */ +#define DEFAULT_CLIENT_AUTHSVC "kerberos" +#endif /* KRB4 || KRB5 */ + +extern int fe_sendauth(MsgType msgtype, Port * port, char *hostname); +extern void fe_setauthsvc(char *name); +extern MsgType fe_getauthsvc(); +extern char *fe_getauthname(void); +extern int be_recvauth(MsgType msgtype, Port * port, char *username, StartupInfo * sp); +extern void be_setauthsvc(char *name); /* the value that matches any dbName value when doing host based authentication*/ -#define ALL_DBNAME "*" +#define ALL_DBNAME "*" -#define PG_KRB4_VERSION "PGVER4.1" /* at most KRB_SENDAUTH_VLEN chars */ -#define PG_KRB5_VERSION "PGVER5.1" +#define PG_KRB4_VERSION "PGVER4.1" /* at most KRB_SENDAUTH_VLEN chars */ +#define PG_KRB5_VERSION "PGVER5.1" -#endif /* AUTH_H */ +#endif /* AUTH_H */ diff --git a/src/include/libpq/be-fsstubs.h b/src/include/libpq/be-fsstubs.h index 34fda6fd60e..2ea347a9b3e 100644 --- a/src/include/libpq/be-fsstubs.h +++ b/src/include/libpq/be-fsstubs.h @@ -1,40 +1,40 @@ /*------------------------------------------------------------------------- * * be-fsstubs.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: be-fsstubs.h,v 1.2 1997/05/06 07:14:34 thomas Exp $ + * $Id: be-fsstubs.h,v 1.3 1997/09/07 04:58:18 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef BE_FSSTUBS_H -#define BE_FSSTUBS_H +#ifndef BE_FSSTUBS_H +#define BE_FSSTUBS_H /* Redefine names LOread() and LOwrite() to be lowercase to allow calling - * using the new v6.1 case-insensitive SQL parser. Define macros to allow - * the existing code to stay the same. - tgl 97/05/03 + * using the new v6.1 case-insensitive SQL parser. Define macros to allow + * the existing code to stay the same. - tgl 97/05/03 */ #define LOread(f,l) loread(f,l) #define LOwrite(f,b) lowrite(f,b) -extern Oid lo_import(text *filename); -extern int4 lo_export(Oid lobjId, text *filename); +extern Oid lo_import(text * filename); +extern int4 lo_export(Oid lobjId, text * filename); -extern Oid lo_creat(int mode); +extern Oid lo_creat(int mode); -extern int lo_open(Oid lobjId, int mode); -extern int lo_close(int fd); -extern int lo_read(int fd, char *buf, int len); -extern int lo_write(int fd, char *buf, int len); -extern int lo_lseek(int fd, int offset, int whence); -extern int lo_tell(int fd); -extern int lo_unlink(Oid lobjId); +extern int lo_open(Oid lobjId, int mode); +extern int lo_close(int fd); +extern int lo_read(int fd, char *buf, int len); +extern int lo_write(int fd, char *buf, int len); +extern int lo_lseek(int fd, int offset, int whence); +extern int lo_tell(int fd); +extern int lo_unlink(Oid lobjId); extern struct varlena *loread(int fd, int len); -extern int lowrite(int fd, struct varlena *wbuf); +extern int lowrite(int fd, struct varlena * wbuf); -#endif /* BE_FSSTUBS_H */ +#endif /* BE_FSSTUBS_H */ diff --git a/src/include/libpq/hba.h b/src/include/libpq/hba.h index 14847438b0d..c54b9938ce4 100644 --- a/src/include/libpq/hba.h +++ b/src/include/libpq/hba.h @@ -1,49 +1,53 @@ /*------------------------------------------------------------------------- * * hba.h-- - * Interface to hba.c + * Interface to hba.c * * - * $Id: hba.h,v 1.3 1997/03/12 21:22:16 scrappy Exp $ + * $Id: hba.h,v 1.4 1997/09/07 04:58:19 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef HBA_H -#define HBA_H +#define HBA_H #include <libpq/pqcomm.h> -#define CONF_FILE "pg_hba.conf" - /* Name of the config file */ +#define CONF_FILE "pg_hba.conf" + /* Name of the config file */ #define MAP_FILE "pg_ident.conf" - /* Name of the usermap file */ + /* Name of the usermap file */ #define OLD_CONF_FILE "pg_hba" - /* Name of the config file in prior releases of Postgres. */ + /* Name of the config file in prior releases of Postgres. */ -#define MAX_LINES 255 - /* Maximum number of config lines that can apply to one database */ +#define MAX_LINES 255 + /* Maximum number of config lines that can apply to one database */ -#define MAX_TOKEN 80 -/* Maximum size of one token in the configuration file */ +#define MAX_TOKEN 80 +/* Maximum size of one token in the configuration file */ -#define USERMAP_NAME_SIZE 16 /* Max size of a usermap name */ +#define USERMAP_NAME_SIZE 16 /* Max size of a usermap name */ #define IDENT_PORT 113 - /* Standard TCP port number for Ident service. Assigned by IANA */ + /* Standard TCP port number for Ident service. Assigned by IANA */ -#define IDENT_USERNAME_MAX 512 - /* Max size of username ident server can return */ +#define IDENT_USERNAME_MAX 512 + /* Max size of username ident server can return */ -enum Userauth {Trust, Ident, Password}; +enum Userauth +{ + Trust, Ident, Password +}; extern int -hba_recvauth(const Port *port, const char database[], const char user[], - const char DataDir[]); -void find_hba_entry(const char DataDir[], const struct in_addr ip_addr, - const char database[], - bool *host_ok_p, enum Userauth *userauth_p, - char usermap_name[], bool find_password_entries); +hba_recvauth(const Port * port, const char database[], const char user[], + const char DataDir[]); +void +find_hba_entry(const char DataDir[], const struct in_addr ip_addr, + const char database[], + bool * host_ok_p, enum Userauth * userauth_p, + char usermap_name[], bool find_password_entries); #endif diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 1d87f17421d..4550461d06e 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * * libpq-be.h-- - * This file contains definitions for structures and - * externs for functions used by the POSTGRES backend. + * This file contains definitions for structures and + * externs for functions used by the POSTGRES backend. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: libpq-be.h,v 1.4 1997/08/19 21:38:37 momjian Exp $ + * $Id: libpq-be.h,v 1.5 1997/09/07 04:58:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,33 +19,35 @@ #include <libpq/libpq.h> /* ---------------- - * include stuff common to fe and be + * include stuff common to fe and be * ---------------- */ /* ---------------- - * declarations for backend libpq support routines + * declarations for backend libpq support routines * ---------------- */ /* in be-dumpdata.c */ -extern void be_portalinit(void); -extern void be_portalpush(PortalEntry *entry); +extern void be_portalinit(void); +extern void be_portalpush(PortalEntry * entry); extern PortalEntry *be_portalpop(void); extern PortalEntry *be_currentportal(void); extern PortalEntry *be_newportal(void); -extern void be_typeinit(PortalEntry *entry, TupleDesc attrs, +extern void +be_typeinit(PortalEntry * entry, TupleDesc attrs, int natts); -extern void be_printtup(HeapTuple tuple, TupleDesc typeinfo); +extern void be_printtup(HeapTuple tuple, TupleDesc typeinfo); /* in be-pqexec.c */ -extern char *PQfn(int fnid, int *result_buf, int result_len, int result_is_int, - PQArgBlock *args, int nargs); -extern char *PQexec(char *query); -extern int pqtest_PQexec(char *q); -extern int pqtest_PQfn(char *q); -extern int32 pqtest(struct varlena *vlena); - -#endif /* LIBPQ_BE_H */ +extern char * +PQfn(int fnid, int *result_buf, int result_len, int result_is_int, + PQArgBlock * args, int nargs); +extern char *PQexec(char *query); +extern int pqtest_PQexec(char *q); +extern int pqtest_PQfn(char *q); +extern int32 pqtest(struct varlena * vlena); + +#endif /* LIBPQ_BE_H */ diff --git a/src/include/libpq/libpq-fs.h b/src/include/libpq/libpq-fs.h index 4bb37e71492..4e7f4e37a2e 100644 --- a/src/include/libpq/libpq-fs.h +++ b/src/include/libpq/libpq-fs.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * libpq-fs.h-- - * definitions for using Inversion file system routines + * definitions for using Inversion file system routines * * * Copyright (c) 1994, Regents of the University of California * - * $Id: libpq-fs.h,v 1.3 1997/02/14 04:18:33 momjian Exp $ + * $Id: libpq-fs.h,v 1.4 1997/09/07 04:58:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,59 +18,60 @@ #ifndef MAXNAMLEN #define MAXNAMLEN 255 -#endif /* MAXNAMLEN */ +#endif /* MAXNAMLEN */ -struct pgdirent { - unsigned long d_ino; - unsigned short d_namlen; - char d_name[MAXNAMLEN+1]; +struct pgdirent +{ + unsigned long d_ino; + unsigned short d_namlen; + char d_name[MAXNAMLEN + 1]; }; /* * SysV struct dirent doesn't have d_namlen. - * This counts on d_name being last, which is moderately safe (ha) since + * This counts on d_name being last, which is moderately safe (ha) since * it's the variable-length part of the structure. */ #ifdef SYSV_DIRENT -#define D_NAMLEN(dp) \ - ((dp)->d_reclen - offsetof(struct dirent, d_name[0])) -#else /* SYSV_DIRENT */ -#define D_NAMLEN(dp) \ - ((dp)->d_namlen) -#endif /* SYSV_DIRENT */ +#define D_NAMLEN(dp) \ + ((dp)->d_reclen - offsetof(struct dirent, d_name[0])) +#else /* SYSV_DIRENT */ +#define D_NAMLEN(dp) \ + ((dp)->d_namlen) +#endif /* SYSV_DIRENT */ /* for stat(2) */ #ifndef S_IRUSR /* file modes */ -#define S_IRWXU 00700 /* read, write, execute: owner */ -#define S_IRUSR 00400 /* read permission: owner */ -#define S_IWUSR 00200 /* write permission: owner */ -#define S_IXUSR 00100 /* execute permission: owner */ +#define S_IRWXU 00700 /* read, write, execute: owner */ +#define S_IRUSR 00400 /* read permission: owner */ +#define S_IWUSR 00200 /* write permission: owner */ +#define S_IXUSR 00100 /* execute permission: owner */ -#define S_IRWXG 00070 /* read, write, execute: group */ -#define S_IRGRP 00040 /* read permission: group */ -#define S_IWGRP 00020 /* write permission: group */ -#define S_IXGRP 00010 /* execute permission: group */ +#define S_IRWXG 00070 /* read, write, execute: group */ +#define S_IRGRP 00040 /* read permission: group */ +#define S_IWGRP 00020 /* write permission: group */ +#define S_IXGRP 00010 /* execute permission: group */ -#define S_IRWXO 00007 /* read, write, execute: other */ -#define S_IROTH 00004 /* read permission: other */ -#define S_IWOTH 00002 /* write permission: other */ -#define S_IXOTH 00001 /* execute permission: other */ +#define S_IRWXO 00007 /* read, write, execute: other */ +#define S_IROTH 00004 /* read permission: other */ +#define S_IWOTH 00002 /* write permission: other */ +#define S_IXOTH 00001 /* execute permission: other */ -#define _S_IFMT 0170000 /* type of file; sync with S_IFMT */ -#define _S_IFBLK 0060000 /* block special; sync with S_IFBLK */ -#define _S_IFCHR 0020000 /* character special sync with S_IFCHR */ -#define _S_IFDIR 0040000 /* directory; sync with S_IFDIR */ -#define _S_IFIFO 0010000 /* FIFO - named pipe; sync with S_IFIFO */ -#define _S_IFREG 0100000 /* regular; sync with S_IFREG */ +#define _S_IFMT 0170000 /* type of file; sync with S_IFMT */ +#define _S_IFBLK 0060000 /* block special; sync with S_IFBLK */ +#define _S_IFCHR 0020000 /* character special sync with S_IFCHR */ +#define _S_IFDIR 0040000 /* directory; sync with S_IFDIR */ +#define _S_IFIFO 0010000 /* FIFO - named pipe; sync with S_IFIFO */ +#define _S_IFREG 0100000 /* regular; sync with S_IFREG */ #define S_IFDIR _S_IFDIR #define S_IFREG _S_IFREG -#define S_ISDIR( mode ) (((mode) & _S_IFMT) == _S_IFDIR) +#define S_ISDIR( mode ) (((mode) & _S_IFMT) == _S_IFDIR) -#endif /* S_IRUSR */ +#endif /* S_IRUSR */ /* * Inversion doesn't have links. @@ -80,28 +81,28 @@ struct pgdirent { #endif /* - * Flags for inversion file system large objects. Normally, creat() - * takes mode arguments, but we don't use them in inversion, since - * you get postgres protections. Instead, we use the low sixteen bits - * of the integer mode argument to store the number of the storage - * manager to be used, and the high sixteen bits for flags. + * Flags for inversion file system large objects. Normally, creat() + * takes mode arguments, but we don't use them in inversion, since + * you get postgres protections. Instead, we use the low sixteen bits + * of the integer mode argument to store the number of the storage + * manager to be used, and the high sixteen bits for flags. */ #define INV_SMGRMASK 0x0000ffff -#define INV_ARCHIVE 0x00010000 -#define INV_WRITE 0x00020000 -#define INV_READ 0x00040000 +#define INV_ARCHIVE 0x00010000 +#define INV_WRITE 0x00020000 +#define INV_READ 0x00040000 /* Error values for p_errno */ -#define PEPERM 1 /* Not owner */ -#define PENOENT 2 /* No such file or directory */ -#define PEACCES 13 /* Permission denied */ -#define PEEXIST 17 /* File exists */ -#define PENOTDIR 20 /* Not a directory*/ -#define PEISDIR 21 /* Is a directory */ -#define PEINVAL 22 /* Invalid argument */ -#define PENAMETOOLONG 63 /* File name too long */ -#define PENOTEMPTY 66 /* Directory not empty */ -#define PEPGIO 99 /* postgres backend had problems */ - -#endif /* LIBPQ_FS_H */ +#define PEPERM 1 /* Not owner */ +#define PENOENT 2 /* No such file or directory */ +#define PEACCES 13 /* Permission denied */ +#define PEEXIST 17 /* File exists */ +#define PENOTDIR 20 /* Not a directory */ +#define PEISDIR 21 /* Is a directory */ +#define PEINVAL 22 /* Invalid argument */ +#define PENAMETOOLONG 63 /* File name too long */ +#define PENOTEMPTY 66 /* Directory not empty */ +#define PEPGIO 99 /* postgres backend had problems */ + +#endif /* LIBPQ_FS_H */ diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h index 080a1052deb..1b074cba118 100644 --- a/src/include/libpq/libpq.h +++ b/src/include/libpq/libpq.h @@ -1,18 +1,18 @@ /*------------------------------------------------------------------------- * * libpq.h-- - * POSTGRES LIBPQ buffer structure definitions. + * POSTGRES LIBPQ buffer structure definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: libpq.h,v 1.5 1996/11/05 07:38:17 scrappy Exp $ + * $Id: libpq.h,v 1.6 1997/09/07 04:58:24 momjian Exp $ * * NOTES - * This file contains definitions for structures and - * externs for functions used by both frontend applications - * and the POSTGRES backend. See the files libpq-fe.h and - * libpq-be.h for frontend/backend specific information + * This file contains definitions for structures and + * externs for functions used by both frontend applications + * and the POSTGRES backend. See the files libpq-fe.h and + * libpq-be.h for frontend/backend specific information * *------------------------------------------------------------------------- */ @@ -23,118 +23,130 @@ /* ---------------- * PQArgBlock -- - * Information (pointer to array of this structure) required - * for the PQfn() call. + * Information (pointer to array of this structure) required + * for the PQfn() call. * ---------------- */ -typedef struct { - int len; - int isint; - union { - int *ptr; /* can't use void (dec compiler barfs) */ - int integer; - } u; -} PQArgBlock; +typedef struct +{ + int len; + int isint; + union + { + int *ptr; /* can't use void (dec compiler barfs) */ + int integer; + } u; +} PQArgBlock; /* ---------------- * TypeBlock -- - * Information about an attribute. + * Information about an attribute. * ---------------- */ #define NameLength 16 -typedef struct TypeBlock { - char name[NAMEDATALEN]; /* name of the attribute */ - int adtid; /* adtid of the type */ - int adtsize; /* adtsize of the type */ -} TypeBlock; +typedef struct TypeBlock +{ + char name[NAMEDATALEN]; /* name of the attribute */ + int adtid; /* adtid of the type */ + int adtsize; /* adtsize of the type */ +} TypeBlock; /* ---------------- * TupleBlock -- - * Data of a tuple. + * Data of a tuple. * ---------------- */ #define TupleBlockSize 100 -typedef struct TupleBlock { - char **values[TupleBlockSize]; /* an array of tuples */ - int *lengths[TupleBlockSize]; /* an array of length vec. foreach - tuple */ - struct TupleBlock *next; /* next tuple block */ - int tuple_index; /* current tuple index */ -} TupleBlock; +typedef struct TupleBlock +{ + char **values[TupleBlockSize]; /* an array of tuples */ + int *lengths[TupleBlockSize]; /* an array of length vec. + * foreach tuple */ + struct TupleBlock *next; /* next tuple block */ + int tuple_index;/* current tuple index */ +} TupleBlock; /* ---------------- * GroupBuffer -- - * A group of tuples with the same attributes. + * A group of tuples with the same attributes. * ---------------- */ -typedef struct GroupBuffer { - int no_tuples; /* number of tuples in this group */ - int no_fields; /* number of attributes */ - TypeBlock *types; /* types of the attributes */ - TupleBlock *tuples; /* tuples in this group */ - struct GroupBuffer *next; /* next group */ -} GroupBuffer; +typedef struct GroupBuffer +{ + int no_tuples; /* number of tuples in this group */ + int no_fields; /* number of attributes */ + TypeBlock *types; /* types of the attributes */ + TupleBlock *tuples; /* tuples in this group */ + struct GroupBuffer *next; /* next group */ +} GroupBuffer; /* ---------------- * PortalBuffer -- - * Data structure of a portal buffer. + * Data structure of a portal buffer. * ---------------- */ -typedef struct PortalBuffer { - int rule_p; /* 1 if this is an asynchronized portal. */ - int no_tuples; /* number of tuples in this portal buffer */ - int no_groups; /* number of tuple groups */ - GroupBuffer *groups; /* linked list of tuple groups */ -} PortalBuffer; +typedef struct PortalBuffer +{ + int rule_p; /* 1 if this is an asynchronized portal. */ + int no_tuples; /* number of tuples in this portal buffer */ + int no_groups; /* number of tuple groups */ + GroupBuffer *groups; /* linked list of tuple groups */ +} PortalBuffer; /* ---------------- * PortalEntry -- - * an entry in the global portal table + * an entry in the global portal table * * Note: the portalcxt is only meaningful for PQcalls made from - * within a postgres backend. frontend apps should ignore it. + * within a postgres backend. frontend apps should ignore it. * ---------------- */ #define PortalNameLength 32 -typedef struct PortalEntry { - char name[PortalNameLength]; /* name of this portal */ - PortalBuffer *portal; /* tuples contained in this portal */ - Pointer portalcxt; /* memory context (for backend) */ - Pointer result; /* result for PQexec */ -} PortalEntry; +typedef struct PortalEntry +{ + char name[PortalNameLength]; /* name of this portal */ + PortalBuffer *portal; /* tuples contained in this portal */ + Pointer portalcxt; /* memory context (for backend) */ + Pointer result; /* result for PQexec */ +} PortalEntry; #define PORTALS_INITIAL_SIZE 32 -#define PORTALS_GROW_BY 32 +#define PORTALS_GROW_BY 32 /* in portalbuf.c */ -extern PortalEntry** portals; -extern size_t portals_array_size; +extern PortalEntry **portals; +extern size_t portals_array_size; /* - * Asynchronous notification + * Asynchronous notification */ -typedef struct PQNotifyList { - char relname[NAMEDATALEN]; /* name of relation containing data */ - int be_pid; /* process id of backend */ - int valid; /* has this already been handled by user. */ -/* SLNode Node; */ -} PQNotifyList; +typedef struct PQNotifyList +{ + char relname[NAMEDATALEN]; /* name of relation + * containing data */ + int be_pid; /* process id of backend */ + int valid; /* has this already been handled by user. */ +/* SLNode Node; */ +} PQNotifyList; /* * Exceptions. */ #define libpq_raise(X, Y) ExcRaise((Exception *)(X), (ExcDetail) (Y),\ - (ExcData)0, (ExcMessage) 0) + (ExcData)0, (ExcMessage) 0) /* in portal.c */ -extern Exception MemoryError, PortalError, PostquelError, ProtocolError; +extern Exception MemoryError, + PortalError, + PostquelError, + ProtocolError; -/* - * POSTGRES backend dependent Constants. +/* + * POSTGRES backend dependent Constants. */ /* ERROR_MSG_LENGTH should really be the same as ELOG_MAXLEN in utils/elog.h*/ @@ -142,107 +154,111 @@ extern Exception MemoryError, PortalError, PostquelError, ProtocolError; #define COMMAND_LENGTH 20 #define REMARK_LENGTH 80 -extern char PQerrormsg[ERROR_MSG_LENGTH]; /* in portal.c */ +extern char PQerrormsg[ERROR_MSG_LENGTH]; /* in portal.c */ /* * External functions. */ -/* - * prototypes for functions in portal.c +/* + * prototypes for functions in portal.c */ -extern void pqdebug(char *target, char *msg); -extern void pqdebug2(char *target, char *msg1, char *msg2); -extern void PQtrace(void); -extern void PQuntrace(void); -extern int PQnportals(int rule_p); -extern void PQpnames(char **pnames, int rule_p); +extern void pqdebug(char *target, char *msg); +extern void pqdebug2(char *target, char *msg1, char *msg2); +extern void PQtrace(void); +extern void PQuntrace(void); +extern int PQnportals(int rule_p); +extern void PQpnames(char **pnames, int rule_p); extern PortalBuffer *PQparray(char *pname); -extern int PQrulep(PortalBuffer *portal); -extern int PQntuples(PortalBuffer *portal); -extern int PQninstances(PortalBuffer *portal); -extern int PQngroups(PortalBuffer *portal); -extern int PQntuplesGroup(PortalBuffer *portal, int group_index); -extern int PQninstancesGroup(PortalBuffer *portal, int group_index); -extern int PQnfieldsGroup(PortalBuffer *portal, int group_index); -extern int PQfnumberGroup(PortalBuffer *portal, int group_index, char *field_name); -extern char *PQfnameGroup(PortalBuffer *portal, int group_index, int field_number); -extern int PQftypeGroup(PortalBuffer *portal, int group_index, - int field_number); -extern int PQfsizeGroup(PortalBuffer *portal, int group_index, - int field_number); -extern GroupBuffer *PQgroup(PortalBuffer *portal, int tuple_index); -extern int PQgetgroup(PortalBuffer *portal, int tuple_index); -extern int PQnfields(PortalBuffer *portal, int tuple_index); -extern int PQfnumber(PortalBuffer *portal, int tuple_index, char *field_name); - extern char *PQfname(PortalBuffer *portal, int tuple_index, int field_number); -extern int PQftype(PortalBuffer *portal, int tuple_index, int field_number); -extern int PQfsize(PortalBuffer *portal, int tuple_index, int field_number); -extern int PQsametype(PortalBuffer *portal, int tuple_index1, int tuple_index2); -extern char *PQgetvalue(PortalBuffer *portal, int tuple_index, int field_number); -extern char *PQgetAttr(PortalBuffer *portal, int tuple_index, int field_number); -extern int PQgetlength(PortalBuffer *portal, int tuple_index, int field_number); -extern void PQclear(char *pname); -extern void PQcleanNotify(void); -extern void PQnotifies_init(void); +extern int PQrulep(PortalBuffer * portal); +extern int PQntuples(PortalBuffer * portal); +extern int PQninstances(PortalBuffer * portal); +extern int PQngroups(PortalBuffer * portal); +extern int PQntuplesGroup(PortalBuffer * portal, int group_index); +extern int PQninstancesGroup(PortalBuffer * portal, int group_index); +extern int PQnfieldsGroup(PortalBuffer * portal, int group_index); +extern int PQfnumberGroup(PortalBuffer * portal, int group_index, char *field_name); +extern char *PQfnameGroup(PortalBuffer * portal, int group_index, int field_number); +extern int +PQftypeGroup(PortalBuffer * portal, int group_index, + int field_number); +extern int +PQfsizeGroup(PortalBuffer * portal, int group_index, + int field_number); +extern GroupBuffer *PQgroup(PortalBuffer * portal, int tuple_index); +extern int PQgetgroup(PortalBuffer * portal, int tuple_index); +extern int PQnfields(PortalBuffer * portal, int tuple_index); +extern int PQfnumber(PortalBuffer * portal, int tuple_index, char *field_name); +extern char *PQfname(PortalBuffer * portal, int tuple_index, int field_number); +extern int PQftype(PortalBuffer * portal, int tuple_index, int field_number); +extern int PQfsize(PortalBuffer * portal, int tuple_index, int field_number); +extern int PQsametype(PortalBuffer * portal, int tuple_index1, int tuple_index2); +extern char *PQgetvalue(PortalBuffer * portal, int tuple_index, int field_number); +extern char *PQgetAttr(PortalBuffer * portal, int tuple_index, int field_number); +extern int PQgetlength(PortalBuffer * portal, int tuple_index, int field_number); +extern void PQclear(char *pname); +extern void PQcleanNotify(void); +extern void PQnotifies_init(void); extern PQNotifyList *PQnotifies(void); -extern void PQremoveNotify(PQNotifyList *nPtr); -extern void PQappendNotify(char *relname, int pid); -/* - * prototypes for functions in portalbuf.c +extern void PQremoveNotify(PQNotifyList * nPtr); +extern void PQappendNotify(char *relname, int pid); + +/* + * prototypes for functions in portalbuf.c */ -extern caddr_t pbuf_alloc(size_t size); -extern void pbuf_free(caddr_t pointer); +extern caddr_t pbuf_alloc(size_t size); +extern void pbuf_free(caddr_t pointer); extern PortalBuffer *pbuf_addPortal(void); -extern GroupBuffer *pbuf_addGroup(PortalBuffer *portal); +extern GroupBuffer *pbuf_addGroup(PortalBuffer * portal); extern TypeBlock *pbuf_addTypes(int n); extern TupleBlock *pbuf_addTuples(void); -extern char **pbuf_addTuple(int n); -extern int *pbuf_addTupleValueLengths(int n); -extern char *pbuf_addValues(int n); +extern char **pbuf_addTuple(int n); +extern int *pbuf_addTupleValueLengths(int n); +extern char *pbuf_addValues(int n); extern PortalEntry *pbuf_addEntry(void); -extern void pbuf_freeEntry(int i); -extern void pbuf_freeTypes(TypeBlock *types); -extern void pbuf_freeTuples(TupleBlock *tuples, int no_tuples, int no_fields); -extern void pbuf_freeGroup(GroupBuffer *group); -extern void pbuf_freePortal(PortalBuffer *portal); -extern int pbuf_getIndex(char *pname); -extern void pbuf_setportalinfo(PortalEntry *entry, char *pname); +extern void pbuf_freeEntry(int i); +extern void pbuf_freeTypes(TypeBlock * types); +extern void pbuf_freeTuples(TupleBlock * tuples, int no_tuples, int no_fields); +extern void pbuf_freeGroup(GroupBuffer * group); +extern void pbuf_freePortal(PortalBuffer * portal); +extern int pbuf_getIndex(char *pname); +extern void pbuf_setportalinfo(PortalEntry * entry, char *pname); extern PortalEntry *pbuf_setup(char *pname); -extern void pbuf_close(char *pname); -extern GroupBuffer *pbuf_findGroup(PortalBuffer *portal, int group_index); -extern int pbuf_findFnumber(GroupBuffer *group, char *field_name); -extern void pbuf_checkFnumber(GroupBuffer *group, int field_number); -extern char *pbuf_findFname(GroupBuffer *group, int field_number); - -/* - * prototypes for functions in pqcomm.c +extern void pbuf_close(char *pname); +extern GroupBuffer *pbuf_findGroup(PortalBuffer * portal, int group_index); +extern int pbuf_findFnumber(GroupBuffer * group, char *field_name); +extern void pbuf_checkFnumber(GroupBuffer * group, int field_number); +extern char *pbuf_findFname(GroupBuffer * group, int field_number); + +/* + * prototypes for functions in pqcomm.c */ -extern void pq_init(int fd); -extern void pq_gettty(char *tp); -extern int pq_getport(void); -extern void pq_close(void); -extern void pq_flush(void); -extern int pq_getstr(char *s, int maxlen); -extern int PQgetline(char *s, int maxlen); -extern int PQputline(char *s); -extern int pq_getnchar(char *s, int off, int maxlen); -extern int pq_getint(int b); -extern void pq_putstr(char *s); -extern void pq_putnchar(char *s, int n); -extern void pq_putint(int i, int b); -extern int pq_sendoob(char *msg, int len); -extern int pq_recvoob(char *msgPtr, int *lenPtr); -extern int pq_getinaddr(struct sockaddr_in *sin, char *host, int port); -extern int pq_getinserv(struct sockaddr_in *sin, char *host, char *serv); -extern int pq_connect(char *dbname, char *user, char *args, char *hostName, - char *debugTty, char *execFile, short portName); -extern int StreamOpen(char *hostName, short portName, Port *port); -extern void pq_regoob(void (*fptr)()); -extern void pq_unregoob(void); -extern void pq_async_notify(void); -extern int StreamServerPort(char *hostName, short portName, int *fdP); -extern int StreamConnection(int server_fd, Port *port); -extern void StreamClose(int sock); - -#endif /* LIBPQ_H */ +extern void pq_init(int fd); +extern void pq_gettty(char *tp); +extern int pq_getport(void); +extern void pq_close(void); +extern void pq_flush(void); +extern int pq_getstr(char *s, int maxlen); +extern int PQgetline(char *s, int maxlen); +extern int PQputline(char *s); +extern int pq_getnchar(char *s, int off, int maxlen); +extern int pq_getint(int b); +extern void pq_putstr(char *s); +extern void pq_putnchar(char *s, int n); +extern void pq_putint(int i, int b); +extern int pq_sendoob(char *msg, int len); +extern int pq_recvoob(char *msgPtr, int *lenPtr); +extern int pq_getinaddr(struct sockaddr_in * sin, char *host, int port); +extern int pq_getinserv(struct sockaddr_in * sin, char *host, char *serv); +extern int +pq_connect(char *dbname, char *user, char *args, char *hostName, + char *debugTty, char *execFile, short portName); +extern int StreamOpen(char *hostName, short portName, Port * port); +extern void pq_regoob(void (*fptr) ()); +extern void pq_unregoob(void); +extern void pq_async_notify(void); +extern int StreamServerPort(char *hostName, short portName, int *fdP); +extern int StreamConnection(int server_fd, Port * port); +extern void StreamClose(int sock); + +#endif /* LIBPQ_H */ diff --git a/src/include/libpq/password.h b/src/include/libpq/password.h index f6b62140950..2b933553d59 100644 --- a/src/include/libpq/password.h +++ b/src/include/libpq/password.h @@ -6,7 +6,8 @@ #define PWFILE_NAME_SIZE USERMAP_NAME_SIZE -int verify_password(char *user, char *password, Port *port, - char *database, char *DataDir); +int +verify_password(char *user, char *password, Port * port, + char *database, char *DataDir); #endif diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index 53f0b970eb5..3aceb3de5b4 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * pqcomm.h-- - * Parameters for the communication module + * Parameters for the communication module * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqcomm.h,v 1.10 1997/03/20 18:23:03 scrappy Exp $ + * $Id: pqcomm.h,v 1.11 1997/09/07 04:58:26 momjian Exp $ * * NOTES - * Some of this should move to libpq.h + * Some of this should move to libpq.h * *------------------------------------------------------------------------- */ #ifndef PQCOMM_H -#define PQCOMM_H +#define PQCOMM_H #include <stdio.h> #include <sys/types.h> @@ -24,126 +24,137 @@ /* * startup msg parameters: path length, argument string length */ -#define PATH_SIZE 64 -#define ARGV_SIZE 64 +#define PATH_SIZE 64 +#define ARGV_SIZE 64 -/* The various kinds of startup messages are for the various kinds of +/* The various kinds of startup messages are for the various kinds of user authentication systems. In the beginning, there was only STARTUP_MSG and all connections were unauthenticated. Now, there are - several choices of authentication method (the client picks one, but + several choices of authentication method (the client picks one, but the server needn't necessarily accept it). So now, the STARTUP_MSG message means to start either an unauthenticated or a host-based - authenticated connection, depending on what the server prefers. This + authenticated connection, depending on what the server prefers. This is possible because the protocol between server and client is the same in both cases (basically, no negotiation is required at all). */ -typedef enum _MsgType { - ACK_MSG = 0, /* acknowledge a message */ - ERROR_MSG=1, /* error response to client from server */ - RESET_MSG=2, /* client must reset connection */ - PRINT_MSG=3, /* tuples for client from server */ - NET_ERROR=4, /* error in net system call */ - FUNCTION_MSG=5, /* fastpath call (unused) */ - QUERY_MSG=6, /* client query to server */ - STARTUP_MSG=7, /* initialize a connection with a backend */ - DUPLICATE_MSG=8, /* duplicate msg arrived (errors msg only) */ - INVALID_MSG=9, /* for some control functions */ - STARTUP_KRB4_MSG=10, /* krb4 session follows startup packet */ - STARTUP_KRB5_MSG=11, /* krb5 session follows startup packet */ - STARTUP_HBA_MSG=12, /* use host-based authentication */ - STARTUP_UNAUTH_MSG=13, /* use unauthenticated connection */ - STARTUP_PASSWORD_MSG=14 /* use plaintext password authentication */ - /* insert new values here -- DO NOT REORDER OR DELETE ENTRIES */ - /* also change LAST_AUTHENTICATION_TYPE below and add to the */ - /* authentication_type_name[] array in pqcomm.c */ +typedef enum _MsgType +{ + ACK_MSG = 0, /* acknowledge a message */ + ERROR_MSG = 1, /* error response to client from server */ + RESET_MSG = 2, /* client must reset connection */ + PRINT_MSG = 3, /* tuples for client from server */ + NET_ERROR = 4, /* error in net system call */ + FUNCTION_MSG = 5, /* fastpath call (unused) */ + QUERY_MSG = 6, /* client query to server */ + STARTUP_MSG = 7, /* initialize a connection with a backend */ + DUPLICATE_MSG = 8, /* duplicate msg arrived (errors msg only) */ + INVALID_MSG = 9, /* for some control functions */ + STARTUP_KRB4_MSG = 10, /* krb4 session follows startup packet */ + STARTUP_KRB5_MSG = 11, /* krb5 session follows startup packet */ + STARTUP_HBA_MSG = 12, /* use host-based authentication */ + STARTUP_UNAUTH_MSG = 13, /* use unauthenticated connection */ + STARTUP_PASSWORD_MSG = 14 /* use plaintext password authentication */ + /* insert new values here -- DO NOT REORDER OR DELETE ENTRIES */ + /* also change LAST_AUTHENTICATION_TYPE below and add to the */ + /* authentication_type_name[] array in pqcomm.c */ } MsgType; #define LAST_AUTHENTICATION_TYPE 14 -typedef char *Addr; -typedef int PacketLen; /* packet length */ +typedef char *Addr; +typedef int PacketLen; /* packet length */ -typedef struct StartupInfo { -/* PacketHdr hdr; */ - char database[PATH_SIZE]; /* database name */ - char user[NAMEDATALEN]; /* user name */ - char options[ARGV_SIZE]; /* possible additional args */ - char execFile[ARGV_SIZE]; /* possible backend to use */ - char tty[PATH_SIZE]; /* possible tty for debug output*/ -} StartupInfo; +typedef struct StartupInfo +{ +/* PacketHdr hdr; */ + char database[PATH_SIZE]; /* database name */ + char user[NAMEDATALEN]; /* user name */ + char options[ARGV_SIZE]; /* possible additional args */ + char execFile[ARGV_SIZE]; /* possible backend to use */ + char tty[PATH_SIZE]; /* possible tty for debug output */ +} StartupInfo; /* amount of available data in a packet buffer */ -#define MESSAGE_SIZE sizeof(StartupInfo) + 5 /* why 5? BJM 2/11/97 */ +#define MESSAGE_SIZE sizeof(StartupInfo) + 5 /* why 5? BJM 2/11/97 */ /* I/O can be blocking or non-blocking */ -#define BLOCKING (FALSE) +#define BLOCKING (FALSE) #define NON_BLOCKING (TRUE) /* a PacketBuf gets shipped from client to server so be careful - of differences in representation. + of differences in representation. Be sure to use htonl() and ntohl() on the len and msgtype fields! */ -typedef struct PacketBuf { - int len; - MsgType msgtype; - char data[MESSAGE_SIZE]; -} PacketBuf; - -/* update the conversion routines +typedef struct PacketBuf +{ + int len; + MsgType msgtype; + char data[MESSAGE_SIZE]; +} PacketBuf; + +/* update the conversion routines StartupInfo2PacketBuf() and PacketBuf2StartupInfo() (decl. below) if StartupInfo or PacketBuf structs ever change */ /* - * socket descriptor port - * we need addresses of both sides to do authentication calls + * socket descriptor port + * we need addresses of both sides to do authentication calls */ -typedef struct Port { - int sock; /* file descriptor */ - int mask; /* select mask */ - int nBytes; /* nBytes read in so far */ - struct sockaddr_in laddr; /* local addr (us) */ - struct sockaddr_in raddr; /* remote addr (them) */ -/* PacketBufId id;*/ /* id of packet buf currently in use */ - PacketBuf buf; /* stream implementation (curr pack buf) */ -} Port; +typedef struct Port +{ + int sock; /* file descriptor */ + int mask; /* select mask */ + int nBytes; /* nBytes read in so far */ + struct sockaddr_in laddr; /* local addr (us) */ + struct sockaddr_in raddr; /* remote addr (them) */ + + /* + * PacketBufId id;*//* id of packet buf currently in + * use + */ + PacketBuf buf; /* stream implementation (curr pack buf) */ +} Port; /* invalid socket descriptor */ #define INVALID_SOCK (-1) #define INVALID_ID (-1) -#define MAX_CONNECTIONS 10 -#define N_PACK_BUFS 20 +#define MAX_CONNECTIONS 10 +#define N_PACK_BUFS 20 /* no multi-packet messages yet */ -#define MAX_PACKET_BACKLOG 1 +#define MAX_PACKET_BACKLOG 1 -#define DEFAULT_STRING "" +#define DEFAULT_STRING "" -extern FILE *Pfout, *Pfin; -extern int PQAsyncNotifyWaiting; +extern FILE *Pfout, + *Pfin; +extern int PQAsyncNotifyWaiting; /* in pqcompriv.c */ -int pqGetShort(int *, FILE *); -int pqGetLong(int *, FILE *); -int pqGetNBytes(char *, size_t, FILE *); -int pqGetString(char *, size_t, FILE *); -int pqGetByte(FILE *); - -int pqPutShort(int, FILE *); -int pqPutLong(int, FILE *); -int pqPutNBytes(const char *, size_t, FILE *); -int pqPutString(const char *, FILE *); -int pqPutByte(int, FILE *); +int pqGetShort(int *, FILE *); +int pqGetLong(int *, FILE *); +int pqGetNBytes(char *, size_t, FILE *); +int pqGetString(char *, size_t, FILE *); +int pqGetByte(FILE *); + +int pqPutShort(int, FILE *); +int pqPutLong(int, FILE *); +int pqPutNBytes(const char *, size_t, FILE *); +int pqPutString(const char *, FILE *); +int pqPutByte(int, FILE *); /* * prototypes for functions in pqpacket.c */ -extern int PacketReceive(Port *port, PacketBuf *buf, char nonBlocking); -extern int PacketSend(Port *port, PacketBuf *buf, - PacketLen len, char nonBlocking); +extern int PacketReceive(Port * port, PacketBuf * buf, char nonBlocking); +extern int +PacketSend(Port * port, PacketBuf * buf, + PacketLen len, char nonBlocking); + /* extern PacketBuf* StartupInfo2PacketBuf(StartupInfo*); */ /* extern StartupInfo* PacketBuf2StartupInfo(PacketBuf*); */ -extern char *name_of_authentication_type(int type); +extern char *name_of_authentication_type(int type); -#endif /* PQCOMM_H */ +#endif /* PQCOMM_H */ diff --git a/src/include/libpq/pqsignal.h b/src/include/libpq/pqsignal.h index 389667c859d..69bdb21df7e 100644 --- a/src/include/libpq/pqsignal.h +++ b/src/include/libpq/pqsignal.h @@ -1,24 +1,24 @@ /*------------------------------------------------------------------------- * * pqsignal.h-- - * prototypes for the reliable BSD-style signal(2) routine. + * prototypes for the reliable BSD-style signal(2) routine. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqsignal.h,v 1.5 1996/12/26 22:08:13 momjian Exp $ + * $Id: pqsignal.h,v 1.6 1997/09/07 04:58:27 momjian Exp $ * * NOTES - * This shouldn't be in libpq, but the monitor and some other - * things need it... + * This shouldn't be in libpq, but the monitor and some other + * things need it... * *------------------------------------------------------------------------- */ #ifndef PQSIGNAL_H #define PQSIGNAL_H -typedef void (*pqsigfunc)(int); +typedef void (*pqsigfunc) (int); extern pqsigfunc pqsignal(int signo, pqsigfunc func); -#endif /* PQSIGNAL_H */ +#endif /* PQSIGNAL_H */ diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index e3566638832..3738bd739cd 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * miscadmin.h-- - * this file contains general postgres administration and initialization - * stuff that used to be spread out between the following files: - * globals.h global variables - * pdir.h directory path crud - * pinit.h postgres initialization - * pmod.h processing modes + * this file contains general postgres administration and initialization + * stuff that used to be spread out between the following files: + * globals.h global variables + * pdir.h directory path crud + * pinit.h postgres initialization + * pmod.h processing modes * * * Copyright (c) 1994, Regents of the University of California * - * $Id: miscadmin.h,v 1.11 1997/08/19 21:37:03 momjian Exp $ + * $Id: miscadmin.h,v 1.12 1997/09/07 04:55:37 momjian Exp $ * * NOTES - * some of the information in this file will be moved to - * other files. + * some of the information in this file will be moved to + * other files. * *------------------------------------------------------------------------- */ @@ -23,24 +23,24 @@ #define MISCADMIN_H /***************************************************************************** - * globals.h -- * + * globals.h -- * *****************************************************************************/ /* * from postmaster/postmaster.c */ -extern int PostmasterMain(int argc, char* argv[]); +extern int PostmasterMain(int argc, char *argv[]); /* * from utils/init/globals.c */ -extern int Portfd; -extern int Noversion; -extern int MasterPid; -extern int Quiet; -extern char *DataDir; +extern int Portfd; +extern int Noversion; +extern int MasterPid; +extern int Quiet; +extern char *DataDir; -extern char OutputFileName[]; +extern char OutputFileName[]; /* * done in storage/backendid.h for now. @@ -48,21 +48,21 @@ extern char OutputFileName[]; * extern BackendId MyBackendId; * extern BackendTag MyBackendTag; */ -extern bool MyDatabaseIdIsInitialized; -extern Oid MyDatabaseId; -extern bool TransactionInitWasProcessed; +extern bool MyDatabaseIdIsInitialized; +extern Oid MyDatabaseId; +extern bool TransactionInitWasProcessed; -extern bool IsUnderPostmaster; -extern bool IsPostmaster; +extern bool IsUnderPostmaster; +extern bool IsPostmaster; -extern short DebugLvl; +extern short DebugLvl; /* Date/Time Configuration * * Constants to pass info from runtime environment: - * USE_POSTGRES_DATES specifies traditional postgres format for output. - * USE_ISO_DATES specifies ISO-compliant format for output. - * USE_SQL_DATES specified Oracle/Ingres-compliant format for output. + * USE_POSTGRES_DATES specifies traditional postgres format for output. + * USE_ISO_DATES specifies ISO-compliant format for output. + * USE_SQL_DATES specified Oracle/Ingres-compliant format for output. * * DateStyle specifies preference for date formatting for output. * EuroDates if client prefers dates interpreted and written w/European conventions. @@ -73,120 +73,121 @@ extern short DebugLvl; * CTZName is the timezone label. */ -#define MAXTZLEN 7 +#define MAXTZLEN 7 -#define USE_POSTGRES_DATES 0 -#define USE_ISO_DATES 1 -#define USE_SQL_DATES 2 +#define USE_POSTGRES_DATES 0 +#define USE_ISO_DATES 1 +#define USE_SQL_DATES 2 -extern int DateStyle; -extern bool EuroDates; -extern bool HasCTZSet; -extern bool CDayLight; -extern int CTimeZone; -extern char CTZName[]; +extern int DateStyle; +extern bool EuroDates; +extern bool HasCTZSet; +extern bool CDayLight; +extern int CTimeZone; +extern char CTZName[]; -extern char FloatFormat[]; -extern char DateFormat[]; +extern char FloatFormat[]; +extern char DateFormat[]; -extern int fsyncOff; -extern int SortMem; +extern int fsyncOff; +extern int SortMem; -extern Oid LastOidProcessed; /* for query rewrite */ +extern Oid LastOidProcessed; /* for query rewrite */ #define MAX_PARSE_BUFFER 8192 -/* - * default number of buffers in buffer pool - * +/* + * default number of buffers in buffer pool + * */ #define NDBUFS 64 /***************************************************************************** - * pdir.h -- * - * POSTGRES directory path definitions. * + * pdir.h -- * + * POSTGRES directory path definitions. * *****************************************************************************/ /* now in utils/init/miscinit.c */ -extern char *GetDatabasePath(void); -extern char *GetDatabaseName(void); -extern void SetDatabaseName(char *name); -extern void SetDatabasePath(char *path); -extern char *getpgusername(void); -extern void SetPgUserName(void); -extern Oid GetUserId(void); -extern void SetUserId(void); -extern int ValidateBackend(char *path); -extern int FindBackend(char *backend, char *argv0); -extern int CheckPathAccess(char *path, char *name, int open_mode); +extern char *GetDatabasePath(void); +extern char *GetDatabaseName(void); +extern void SetDatabaseName(char *name); +extern void SetDatabasePath(char *path); +extern char *getpgusername(void); +extern void SetPgUserName(void); +extern Oid GetUserId(void); +extern void SetUserId(void); +extern int ValidateBackend(char *path); +extern int FindBackend(char *backend, char *argv0); +extern int CheckPathAccess(char *path, char *name, int open_mode); /* lower case version for case-insensitive SQL referenced in pg_proc.h */ #define GetPgUserName() getpgusername() /***************************************************************************** - * pmod.h -- * - * POSTGRES processing mode definitions. * + * pmod.h -- * + * POSTGRES processing mode definitions. * *****************************************************************************/ /* * Description: - * There are four processing modes in POSTGRES. They are NoProcessing + * There are four processing modes in POSTGRES. They are NoProcessing * or "none," BootstrapProcessing or "bootstrap," InitProcessing or * "initialization," and NormalProcessing or "normal." * - * If a POSTGRES binary is in normal mode, then all code may be executed + * If a POSTGRES binary is in normal mode, then all code may be executed * normally. In the none mode, only bookkeeping code may be called. In * particular, access method calls may not occur in this mode since the * execution state is outside a transaction. * - * The final two processing modes are used during special times. When the + * The final two processing modes are used during special times. When the * system state indicates bootstrap processing, transactions are all given - * transaction id "one" and are consequently guarenteed to commit. This mode + * transaction id "one" and are consequently guarenteed to commit. This mode * is used during the initial generation of template databases. * * Finally, the execution state is in initialization mode until all normal - * initialization is complete. Some code behaves differently when executed in + * initialization is complete. Some code behaves differently when executed in * this mode to enable system bootstrapping. */ -typedef enum ProcessingMode { - NoProcessing, /* "nothing" can be done */ - BootstrapProcessing, /* bootstrap creation of template database */ - InitProcessing, /* initializing system */ - NormalProcessing /* normal processing */ -} ProcessingMode; +typedef enum ProcessingMode +{ + NoProcessing, /* "nothing" can be done */ + BootstrapProcessing, /* bootstrap creation of template database */ + InitProcessing, /* initializing system */ + NormalProcessing /* normal processing */ +} ProcessingMode; /***************************************************************************** - * pinit.h -- * - * POSTGRES initialization and cleanup definitions. * + * pinit.h -- * + * POSTGRES initialization and cleanup definitions. * *****************************************************************************/ /* * Note: - * XXX AddExitHandler not defined yet. + * XXX AddExitHandler not defined yet. */ -typedef int16 ExitStatus; +typedef int16 ExitStatus; -#define NormalExitStatus (0) -#define FatalExitStatus (127) +#define NormalExitStatus (0) +#define FatalExitStatus (127) /* XXX are there any other meaningful exit codes? */ /* in utils/init/postinit.c */ -extern bool PostgresIsInitialized; +extern bool PostgresIsInitialized; -extern void InitPostgres(char *name); +extern void InitPostgres(char *name); /* in miscinit.c */ -extern void ExitPostgres(ExitStatus status); -extern void StatusBackendExit(int status); -extern void StatusPostmasterExit(int status); - -extern bool IsNoProcessingMode(void); -extern bool IsBootstrapProcessingMode(void); -extern bool IsInitProcessingMode(void); -extern bool IsNormalProcessingMode(void); -extern void SetProcessingMode(ProcessingMode mode); +extern void ExitPostgres(ExitStatus status); +extern void StatusBackendExit(int status); +extern void StatusPostmasterExit(int status); + +extern bool IsNoProcessingMode(void); +extern bool IsBootstrapProcessingMode(void); +extern bool IsInitProcessingMode(void); +extern bool IsNormalProcessingMode(void); +extern void SetProcessingMode(ProcessingMode mode); extern ProcessingMode GetProcessingMode(void); -#endif /* MISCADMIN_H */ +#endif /* MISCADMIN_H */ diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 7cf450785c9..870bdd80186 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * execnodes.h-- - * definitions for executor state nodes + * definitions for executor state nodes * * * Copyright (c) 1994, Regents of the University of California * - * $Id: execnodes.h,v 1.8 1997/08/27 09:04:52 vadim Exp $ + * $Id: execnodes.h,v 1.9 1997/09/07 04:58:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,660 +23,680 @@ #include <access/funcindex.h> /* ---------------- - * IndexInfo information + * IndexInfo information * - * this class holds the information saying what attributes - * are the key attributes for this index. -cim 10/15/89 + * this class holds the information saying what attributes + * are the key attributes for this index. -cim 10/15/89 * - * NumKeyAttributes number of key attributes for this index - * KeyAttributeNumbers array of attribute numbers used as keys - * Predicate partial-index predicate for this index + * NumKeyAttributes number of key attributes for this index + * KeyAttributeNumbers array of attribute numbers used as keys + * Predicate partial-index predicate for this index * ---------------- */ -typedef struct IndexInfo { - NodeTag type; - int ii_NumKeyAttributes; - AttrNumber *ii_KeyAttributeNumbers; - FuncIndexInfoPtr ii_FuncIndexInfo; - Node *ii_Predicate; -} IndexInfo; +typedef struct IndexInfo +{ + NodeTag type; + int ii_NumKeyAttributes; + AttrNumber *ii_KeyAttributeNumbers; + FuncIndexInfoPtr ii_FuncIndexInfo; + Node *ii_Predicate; +} IndexInfo; /* ---------------- - * RelationInfo information - * - * whenever we update an existing relation, we have to - * update indices on the relation. The RelationInfo class - * is used to hold all the information on result relations, - * including indices.. -cim 10/15/89 - * - * RangeTableIndex result relation's range table index - * RelationDesc relation descriptor for result relation - * NumIndices number indices existing on result relation - * IndexRelationDescs array of relation descriptors for indices - * IndexRelationInfo array of key/attr info for indices + * RelationInfo information + * + * whenever we update an existing relation, we have to + * update indices on the relation. The RelationInfo class + * is used to hold all the information on result relations, + * including indices.. -cim 10/15/89 + * + * RangeTableIndex result relation's range table index + * RelationDesc relation descriptor for result relation + * NumIndices number indices existing on result relation + * IndexRelationDescs array of relation descriptors for indices + * IndexRelationInfo array of key/attr info for indices * ---------------- */ -typedef struct RelationInfo { - NodeTag type; - Index ri_RangeTableIndex; - Relation ri_RelationDesc; - int ri_NumIndices; - RelationPtr ri_IndexRelationDescs; - IndexInfo **ri_IndexRelationInfo; -} RelationInfo; +typedef struct RelationInfo +{ + NodeTag type; + Index ri_RangeTableIndex; + Relation ri_RelationDesc; + int ri_NumIndices; + RelationPtr ri_IndexRelationDescs; + IndexInfo **ri_IndexRelationInfo; +} RelationInfo; /* ---------------- - * ExprContext - * - * This class holds the "current context" information - * needed to evaluate expressions for doing tuple qualifications - * and tuple projections. For example, if an expression refers - * to an attribute in the current inner tuple then we need to know - * what the current inner tuple is and so we look at the expression - * context. + * ExprContext + * + * This class holds the "current context" information + * needed to evaluate expressions for doing tuple qualifications + * and tuple projections. For example, if an expression refers + * to an attribute in the current inner tuple then we need to know + * what the current inner tuple is and so we look at the expression + * context. * ---------------- */ -typedef struct ExprContext { - NodeTag type; - TupleTableSlot *ecxt_scantuple; - TupleTableSlot *ecxt_innertuple; - TupleTableSlot *ecxt_outertuple; - Relation ecxt_relation; - Index ecxt_relid; - ParamListInfo ecxt_param_list_info; - List *ecxt_range_table; - Datum *ecxt_values; /* precomputed values for aggreg */ - char *ecxt_nulls; /* null flags for aggreg values */ -} ExprContext; +typedef struct ExprContext +{ + NodeTag type; + TupleTableSlot *ecxt_scantuple; + TupleTableSlot *ecxt_innertuple; + TupleTableSlot *ecxt_outertuple; + Relation ecxt_relation; + Index ecxt_relid; + ParamListInfo ecxt_param_list_info; + List *ecxt_range_table; + Datum *ecxt_values;/* precomputed values for aggreg */ + char *ecxt_nulls; /* null flags for aggreg values */ +} ExprContext; /* ---------------- - * ProjectionInfo node information - * - * This is all the information needed to preform projections - * on a tuple. Nodes which need to do projections create one - * of these. In theory, when a node wants to preform a projection - * it should just update this information as necessary and then - * call ExecProject(). -cim 6/3/91 - * - * targetlist target list for projection - * len length of target list - * tupValue array of pointers to projection results - * exprContext expression context for ExecTargetList - * slot slot to place projection result in + * ProjectionInfo node information + * + * This is all the information needed to preform projections + * on a tuple. Nodes which need to do projections create one + * of these. In theory, when a node wants to preform a projection + * it should just update this information as necessary and then + * call ExecProject(). -cim 6/3/91 + * + * targetlist target list for projection + * len length of target list + * tupValue array of pointers to projection results + * exprContext expression context for ExecTargetList + * slot slot to place projection result in * ---------------- */ -typedef struct ProjectionInfo { - NodeTag type; - List *pi_targetlist; - int pi_len; - Datum *pi_tupValue; - ExprContext *pi_exprContext; - TupleTableSlot *pi_slot; -} ProjectionInfo; +typedef struct ProjectionInfo +{ + NodeTag type; + List *pi_targetlist; + int pi_len; + Datum *pi_tupValue; + ExprContext *pi_exprContext; + TupleTableSlot *pi_slot; +} ProjectionInfo; /* ---------------- - * JunkFilter - * - * this class is used to store information regarding junk attributes. - * A junk attribute is an attribute in a tuple that is needed only for - * storing intermediate information in the executor, and does not belong - * in the tuple proper. For example, when we do a delete or replace - * query, the planner adds an entry to the targetlist so that the tuples - * returned to ExecutePlan() contain an extra attribute: the t_ctid of - * the tuple to be deleted/replaced. This is needed for amdelete() and - * amreplace(). In doing a delete this does not make much of a - * difference, but in doing a replace we have to make sure we disgard - * all the junk in a tuple before calling amreplace(). Otherwise the - * inserted tuple will not have the correct schema. This solves a - * problem with hash-join and merge-sort replace plans. -cim 10/10/90 - * - * targetList: the original target list (including junk attributes). - * length: the length of 'targetList'. - * tupType: the tuple descriptor for the "original" tuple - * (including the junk attributes). - * cleanTargetList: the "clean" target list (junk attributes removed). - * cleanLength: the length of 'cleanTargetList' - * cleanTupTyp: the tuple descriptor of the "clean" tuple (with - * junk attributes removed). - * cleanMap: A map with the correspondance between the non junk - * attributes of the "original" tuple and the - * attributes of the "clean" tuple. + * JunkFilter + * + * this class is used to store information regarding junk attributes. + * A junk attribute is an attribute in a tuple that is needed only for + * storing intermediate information in the executor, and does not belong + * in the tuple proper. For example, when we do a delete or replace + * query, the planner adds an entry to the targetlist so that the tuples + * returned to ExecutePlan() contain an extra attribute: the t_ctid of + * the tuple to be deleted/replaced. This is needed for amdelete() and + * amreplace(). In doing a delete this does not make much of a + * difference, but in doing a replace we have to make sure we disgard + * all the junk in a tuple before calling amreplace(). Otherwise the + * inserted tuple will not have the correct schema. This solves a + * problem with hash-join and merge-sort replace plans. -cim 10/10/90 + * + * targetList: the original target list (including junk attributes). + * length: the length of 'targetList'. + * tupType: the tuple descriptor for the "original" tuple + * (including the junk attributes). + * cleanTargetList: the "clean" target list (junk attributes removed). + * cleanLength: the length of 'cleanTargetList' + * cleanTupTyp: the tuple descriptor of the "clean" tuple (with + * junk attributes removed). + * cleanMap: A map with the correspondance between the non junk + * attributes of the "original" tuple and the + * attributes of the "clean" tuple. * ---------------- */ -typedef struct JunkFilter { - NodeTag type; - List *jf_targetList; - int jf_length; - TupleDesc jf_tupType; - List *jf_cleanTargetList; - int jf_cleanLength; - TupleDesc jf_cleanTupType; - AttrNumber *jf_cleanMap; -} JunkFilter; +typedef struct JunkFilter +{ + NodeTag type; + List *jf_targetList; + int jf_length; + TupleDesc jf_tupType; + List *jf_cleanTargetList; + int jf_cleanLength; + TupleDesc jf_cleanTupType; + AttrNumber *jf_cleanMap; +} JunkFilter; /* ---------------- - * EState information + * EState information * - * direction direction of the scan + * direction direction of the scan * - * range_table array of scan relation information + * range_table array of scan relation information * - * result_relation_information for update queries + * result_relation_information for update queries * - * into_relation_descriptor relation being retrieved "into" + * into_relation_descriptor relation being retrieved "into" * - * param_list_info information needed to transform - * Param nodes into Const nodes + * param_list_info information needed to transform + * Param nodes into Const nodes * - * BaseId during InitPlan(), each node is - * given a number. this is the next - * number to be assigned. + * BaseId during InitPlan(), each node is + * given a number. this is the next + * number to be assigned. * - * tupleTable this is a pointer to an array - * of pointers to tuples used by - * the executor at any given moment. + * tupleTable this is a pointer to an array + * of pointers to tuples used by + * the executor at any given moment. * - * junkFilter contains information used to - * extract junk attributes from a tuple. - * (see JunkFilter above) + * junkFilter contains information used to + * extract junk attributes from a tuple. + * (see JunkFilter above) * - * refcount local buffer refcounts used in - * an ExecMain cycle. this is introduced - * to avoid ExecStart's unpinning each - * other's buffers when called recursively - * ---------------- + * refcount local buffer refcounts used in + * an ExecMain cycle. this is introduced + * to avoid ExecStart's unpinning each + * other's buffers when called recursively + * ---------------- */ -typedef struct EState { - NodeTag type; - ScanDirection es_direction; - List *es_range_table; - RelationInfo *es_result_relation_info; - Relation es_into_relation_descriptor; - ParamListInfo es_param_list_info; - int es_BaseId; - TupleTable es_tupleTable; - JunkFilter *es_junkFilter; - int *es_refcount; - uint32 es_processed; /* # of tuples processed */ - Oid es_lastoid; /* last oid processed (by INSERT) */ -} EState; +typedef struct EState +{ + NodeTag type; + ScanDirection es_direction; + List *es_range_table; + RelationInfo *es_result_relation_info; + Relation es_into_relation_descriptor; + ParamListInfo es_param_list_info; + int es_BaseId; + TupleTable es_tupleTable; + JunkFilter *es_junkFilter; + int *es_refcount; + uint32 es_processed; /* # of tuples processed */ + Oid es_lastoid; /* last oid processed (by INSERT) */ +} EState; /* ---------------- - * Executor Type information needed by plannodes.h - * - *| Note: the bogus classes CommonState and CommonScanState exist only - *| because our inheritance system only allows single inheritance - *| and we have to have unique slot names. Hence two or more - *| classes which want to have a common slot must ALL inherit - *| the slot from some other class. (This is a big hack to - *| allow our classes to share slot names..) + * Executor Type information needed by plannodes.h + * + *| Note: the bogus classes CommonState and CommonScanState exist only + *| because our inheritance system only allows single inheritance + *| and we have to have unique slot names. Hence two or more + *| classes which want to have a common slot must ALL inherit + *| the slot from some other class. (This is a big hack to + *| allow our classes to share slot names..) *| - *| Example: - *| the class Result and the class NestLoop nodes both want - *| a slot called "OuterTuple" so they both have to inherit - *| it from some other class. In this case they inherit - *| it from CommonState. "CommonState" and "CommonScanState" are - *| the best names I could come up with for this sort of - *| stuff. + *| Example: + *| the class Result and the class NestLoop nodes both want + *| a slot called "OuterTuple" so they both have to inherit + *| it from some other class. In this case they inherit + *| it from CommonState. "CommonState" and "CommonScanState" are + *| the best names I could come up with for this sort of + *| stuff. *| - *| As a result, many classes have extra slots which they - *| don't use. These slots are denoted (unused) in the - *| comment preceeding the class definition. If you - *| comes up with a better idea of a way of doing things - *| along these lines, then feel free to make your idea - *| known to me.. -cim 10/15/89 + *| As a result, many classes have extra slots which they + *| don't use. These slots are denoted (unused) in the + *| comment preceeding the class definition. If you + *| comes up with a better idea of a way of doing things + *| along these lines, then feel free to make your idea + *| known to me.. -cim 10/15/89 * ---------------- */ /* ---------------------------------------------------------------- - * Common Executor State Information + * Common Executor State Information * ---------------------------------------------------------------- */ -/* BaseNode removed -- base_id moved into CommonState - jolly */ +/* BaseNode removed -- base_id moved into CommonState - jolly */ /* ---------------- - * CommonState information + * CommonState information * - *| this is a bogus class used to hold slots so other - *| nodes can inherit them... + *| this is a bogus class used to hold slots so other + *| nodes can inherit them... * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * * ---------------- */ -typedef struct CommonState { - NodeTag type; /* its first field is NodeTag */ - int cs_base_id; - TupleTableSlot *cs_OuterTupleSlot; - TupleTableSlot *cs_ResultTupleSlot; - ExprContext *cs_ExprContext; - ProjectionInfo *cs_ProjInfo; - bool cs_TupFromTlist; -} CommonState; +typedef struct CommonState +{ + NodeTag type; /* its first field is NodeTag */ + int cs_base_id; + TupleTableSlot *cs_OuterTupleSlot; + TupleTableSlot *cs_ResultTupleSlot; + ExprContext *cs_ExprContext; + ProjectionInfo *cs_ProjInfo; + bool cs_TupFromTlist; +} CommonState; /* ---------------------------------------------------------------- - * Control Node State Information + * Control Node State Information * ---------------------------------------------------------------- */ /* ---------------- - * ResultState information + * ResultState information * - * done flag which tells us to quit when we - * have already returned a constant tuple. + * done flag which tells us to quit when we + * have already returned a constant tuple. * - * CommonState information + * CommonState information * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct ResultState { - CommonState cstate; /* its first field is NodeTag */ - int rs_done; -} ResultState; +typedef struct ResultState +{ + CommonState cstate; /* its first field is NodeTag */ + int rs_done; +} ResultState; /* ---------------- - * AppendState information - * - * append nodes have this field "unionplans" which is this - * list of plans to execute in sequence.. these variables - * keep track of things.. - * - * whichplan which plan is being executed - * nplans how many plans are in the list - * initialized array of ExecInitNode() results - * rtentries range table for the current plan - * result_relation_info_list array of each subplan's result relation info - * junkFilter_list array of each subplan's junk filter - * - * CommonState information - * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * AppendState information + * + * append nodes have this field "unionplans" which is this + * list of plans to execute in sequence.. these variables + * keep track of things.. + * + * whichplan which plan is being executed + * nplans how many plans are in the list + * initialized array of ExecInitNode() results + * rtentries range table for the current plan + * result_relation_info_list array of each subplan's result relation info + * junkFilter_list array of each subplan's junk filter + * + * CommonState information + * + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct AppendState { - CommonState cstate; /* its first field is NodeTag */ - int as_whichplan; - int as_nplans; - bool *as_initialized; - List *as_rtentries; - List *as_result_relation_info_list; - List *as_junkFilter_list; -} AppendState; +typedef struct AppendState +{ + CommonState cstate; /* its first field is NodeTag */ + int as_whichplan; + int as_nplans; + bool *as_initialized; + List *as_rtentries; + List *as_result_relation_info_list; + List *as_junkFilter_list; +} AppendState; /* ---------------------------------------------------------------- - * Scan State Information + * Scan State Information * ---------------------------------------------------------------- */ /* ---------------- - * CommonScanState information + * CommonScanState information * - * CommonScanState is a class like CommonState, but is used more - * by the nodes like SeqScan and Sort which want to - * keep track of an underlying relation. + * CommonScanState is a class like CommonState, but is used more + * by the nodes like SeqScan and Sort which want to + * keep track of an underlying relation. * - * currentRelation relation being scanned - * currentScanDesc current scan descriptor for scan - * ScanTupleSlot pointer to slot in tuple table holding scan tuple + * currentRelation relation being scanned + * currentScanDesc current scan descriptor for scan + * ScanTupleSlot pointer to slot in tuple table holding scan tuple * - * CommonState information + * CommonState information * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct CommonScanState { - CommonState cstate; /* its first field is NodeTag */ - Relation css_currentRelation; - HeapScanDesc css_currentScanDesc; - TupleTableSlot *css_ScanTupleSlot; -} CommonScanState; +typedef struct CommonScanState +{ + CommonState cstate; /* its first field is NodeTag */ + Relation css_currentRelation; + HeapScanDesc css_currentScanDesc; + TupleTableSlot *css_ScanTupleSlot; +} CommonScanState; /* ---------------- - * IndexScanState information - * - *| index scans don't use CommonScanState because - *| the underlying AM abstractions for heap scans and - *| index scans are too different.. It would be nice - *| if the current abstraction was more useful but ... -cim 10/15/89 - * - * IndexPtr current index in use - * NumIndices number of indices in this scan - * ScanKeys Skey structures to scan index rels - * NumScanKeys array of no of keys in each Skey struct - * RuntimeKeyInfo array of array of flags for Skeys evaled at runtime - * RelationDescs ptr to array of relation descriptors - * ScanDescs ptr to array of scan descriptors - * - * CommonState information - * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * IndexScanState information + * + *| index scans don't use CommonScanState because + *| the underlying AM abstractions for heap scans and + *| index scans are too different.. It would be nice + *| if the current abstraction was more useful but ... -cim 10/15/89 + * + * IndexPtr current index in use + * NumIndices number of indices in this scan + * ScanKeys Skey structures to scan index rels + * NumScanKeys array of no of keys in each Skey struct + * RuntimeKeyInfo array of array of flags for Skeys evaled at runtime + * RelationDescs ptr to array of relation descriptors + * ScanDescs ptr to array of scan descriptors + * + * CommonState information + * + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct IndexScanState { - CommonState cstate; /* its first field is NodeTag */ - int iss_NumIndices; - int iss_IndexPtr; - ScanKey *iss_ScanKeys; - int *iss_NumScanKeys; - Pointer iss_RuntimeKeyInfo; - RelationPtr iss_RelationDescs; - IndexScanDescPtr iss_ScanDescs; -} IndexScanState; +typedef struct IndexScanState +{ + CommonState cstate; /* its first field is NodeTag */ + int iss_NumIndices; + int iss_IndexPtr; + ScanKey *iss_ScanKeys; + int *iss_NumScanKeys; + Pointer iss_RuntimeKeyInfo; + RelationPtr iss_RelationDescs; + IndexScanDescPtr iss_ScanDescs; +} IndexScanState; /* ---------------------------------------------------------------- - * Join State Information + * Join State Information * ---------------------------------------------------------------- */ /* ---------------- - * JoinState information + * JoinState information * - * CommonState information + * CommonState information * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef CommonState JoinState; +typedef CommonState JoinState; /* ---------------- - * NestLoopState information + * NestLoopState information * - * PortalFlag Set to enable portals to work. + * PortalFlag Set to enable portals to work. * - * JoinState information + * JoinState information * - * CommonState information + * CommonState information * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct NestLoopState { - JoinState jstate; /* its first field is NodeTag */ - bool nl_PortalFlag; -} NestLoopState; +typedef struct NestLoopState +{ + JoinState jstate; /* its first field is NodeTag */ + bool nl_PortalFlag; +} NestLoopState; /* ---------------- - * MergeJoinState information + * MergeJoinState information * - * OSortopI outerKey1 sortOp innerKey1 ... - * ISortopO innerkey1 sortOp outerkey1 ... - * JoinState current "state" of join. see executor.h - * MarkedTupleSlot pointer to slot in tuple table for marked tuple + * OSortopI outerKey1 sortOp innerKey1 ... + * ISortopO innerkey1 sortOp outerkey1 ... + * JoinState current "state" of join. see executor.h + * MarkedTupleSlot pointer to slot in tuple table for marked tuple * - * JoinState information + * JoinState information * - * CommonState information + * CommonState information * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct MergeJoinState { - JoinState jstate; /* its first field is NodeTag */ - List *mj_OSortopI; - List *mj_ISortopO; - int mj_JoinState; - TupleTableSlot *mj_MarkedTupleSlot; -} MergeJoinState; +typedef struct MergeJoinState +{ + JoinState jstate; /* its first field is NodeTag */ + List *mj_OSortopI; + List *mj_ISortopO; + int mj_JoinState; + TupleTableSlot *mj_MarkedTupleSlot; +} MergeJoinState; /* ---------------- - * HashJoinState information - * - * hj_HashTable address of the hash table for the hashjoin - * hj_HashTableShmId shared memory id of hash table - * hj_CurBucket the current hash bucket that we are searching - * for matches of the current outer tuple - * hj_CurTuple the current matching inner tuple in the - * current hash bucket - * hj_CurOTuple the current matching inner tuple in the - * current hash overflow chain - * hj_InnerHashKey the inner hash key in the hashjoin condition - * hj_OuterBatches file descriptors for outer batches - * hj_InnerBatches file descriptors for inner batches - * hj_OuterReadPos current read position of outer batch - * hj_OuterReadBlk current read block of outer batch - * hj_OuterTupleSlot tuple slot for outer tuples - * hj_HashTupleSlot tuple slot for hashed tuples - * - * - * - * JoinState information - * - * CommonState information - * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * HashJoinState information + * + * hj_HashTable address of the hash table for the hashjoin + * hj_HashTableShmId shared memory id of hash table + * hj_CurBucket the current hash bucket that we are searching + * for matches of the current outer tuple + * hj_CurTuple the current matching inner tuple in the + * current hash bucket + * hj_CurOTuple the current matching inner tuple in the + * current hash overflow chain + * hj_InnerHashKey the inner hash key in the hashjoin condition + * hj_OuterBatches file descriptors for outer batches + * hj_InnerBatches file descriptors for inner batches + * hj_OuterReadPos current read position of outer batch + * hj_OuterReadBlk current read block of outer batch + * hj_OuterTupleSlot tuple slot for outer tuples + * hj_HashTupleSlot tuple slot for hashed tuples + * + * + * + * JoinState information + * + * CommonState information + * + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct HashJoinState { - JoinState jstate; /* its first field is NodeTag */ - HashJoinTable hj_HashTable; - IpcMemoryId hj_HashTableShmId; - HashBucket hj_CurBucket; - HeapTuple hj_CurTuple; - OverflowTuple hj_CurOTuple; - Var *hj_InnerHashKey; - File *hj_OuterBatches; - File *hj_InnerBatches; - char *hj_OuterReadPos; - int hj_OuterReadBlk; - TupleTableSlot *hj_OuterTupleSlot; - TupleTableSlot *hj_HashTupleSlot; -} HashJoinState; +typedef struct HashJoinState +{ + JoinState jstate; /* its first field is NodeTag */ + HashJoinTable hj_HashTable; + IpcMemoryId hj_HashTableShmId; + HashBucket hj_CurBucket; + HeapTuple hj_CurTuple; + OverflowTuple hj_CurOTuple; + Var *hj_InnerHashKey; + File *hj_OuterBatches; + File *hj_InnerBatches; + char *hj_OuterReadPos; + int hj_OuterReadBlk; + TupleTableSlot *hj_OuterTupleSlot; + TupleTableSlot *hj_HashTupleSlot; +} HashJoinState; /* ---------------------------------------------------------------- - * Materialization State Information + * Materialization State Information * ---------------------------------------------------------------- */ /* ---------------- - * MaterialState information + * MaterialState information * - * materialize nodes are used to materialize the results - * of a subplan into a temporary relation. + * materialize nodes are used to materialize the results + * of a subplan into a temporary relation. * - * Flag indicated whether subplan has been materialized - * TempRelation temporary relation containing result of executing - * the subplan. + * Flag indicated whether subplan has been materialized + * TempRelation temporary relation containing result of executing + * the subplan. * - * CommonScanState information + * CommonScanState information * - * currentRelation relation descriptor of sorted relation - * currentScanDesc current scan descriptor for scan - * ScanTupleSlot pointer to slot in tuple table holding scan tuple + * currentRelation relation descriptor of sorted relation + * currentScanDesc current scan descriptor for scan + * ScanTupleSlot pointer to slot in tuple table holding scan tuple * - * CommonState information + * CommonState information * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct MaterialState { - CommonScanState csstate; /* its first field is NodeTag */ - bool mat_Flag; - Relation mat_TempRelation; -} MaterialState; +typedef struct MaterialState +{ + CommonScanState csstate; /* its first field is NodeTag */ + bool mat_Flag; + Relation mat_TempRelation; +} MaterialState; /* --------------------- - * AggregateState information + * AggregateState information * - * done indicated whether aggregate has been materialized + * done indicated whether aggregate has been materialized * ------------------------- */ -typedef struct AggState { - CommonScanState csstate; /* its first field is NodeTag */ - bool agg_done; -} AggState; +typedef struct AggState +{ + CommonScanState csstate; /* its first field is NodeTag */ + bool agg_done; +} AggState; /* --------------------- - * GroupState information + * GroupState information * * ------------------------- */ -typedef struct GroupState { - CommonScanState csstate; /* its first field is NodeTag */ - bool grp_useLastTuple; /* last tuple not processed yet */ - bool grp_done; - TupleTableSlot *grp_lastSlot; -} GroupState; +typedef struct GroupState +{ + CommonScanState csstate; /* its first field is NodeTag */ + bool grp_useLastTuple; /* last tuple not processed yet */ + bool grp_done; + TupleTableSlot *grp_lastSlot; +} GroupState; /* ---------------- - * SortState information - * - *| sort nodes are really just a kind of a scan since - *| we implement sorts by retrieveing the entire subplan - *| into a temp relation, sorting the temp relation into - *| another sorted relation, and then preforming a simple - *| unqualified sequential scan on the sorted relation.. - *| -cim 10/15/89 - * - * Flag indicated whether relation has been sorted - * Keys scan key structures used to keep info on sort keys - * TempRelation temporary relation containing result of executing - * the subplan. - * - * CommonScanState information - * - * currentRelation relation descriptor of sorted relation - * currentScanDesc current scan descriptor for scan - * ScanTupleSlot pointer to slot in tuple table holding scan tuple - * - * CommonState information - * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * SortState information + * + *| sort nodes are really just a kind of a scan since + *| we implement sorts by retrieveing the entire subplan + *| into a temp relation, sorting the temp relation into + *| another sorted relation, and then preforming a simple + *| unqualified sequential scan on the sorted relation.. + *| -cim 10/15/89 + * + * Flag indicated whether relation has been sorted + * Keys scan key structures used to keep info on sort keys + * TempRelation temporary relation containing result of executing + * the subplan. + * + * CommonScanState information + * + * currentRelation relation descriptor of sorted relation + * currentScanDesc current scan descriptor for scan + * ScanTupleSlot pointer to slot in tuple table holding scan tuple + * + * CommonState information + * + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct SortState { - CommonScanState csstate; /* its first field is NodeTag */ - bool sort_Flag; - ScanKey sort_Keys; - bool cleaned; -} SortState; +typedef struct SortState +{ + CommonScanState csstate; /* its first field is NodeTag */ + bool sort_Flag; + ScanKey sort_Keys; + bool cleaned; +} SortState; /* ---------------- - * UniqueState information - * - * Unique nodes are used "on top of" sort nodes to discard - * duplicate tuples returned from the sort phase. Basically - * all it does is compare the current tuple from the subplan - * with the previously fetched tuple stored in OuterTuple and - * if the two are identical, then we just fetch another tuple - * from the sort and try again. - * - * CommonState information - * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * UniqueState information + * + * Unique nodes are used "on top of" sort nodes to discard + * duplicate tuples returned from the sort phase. Basically + * all it does is compare the current tuple from the subplan + * with the previously fetched tuple stored in OuterTuple and + * if the two are identical, then we just fetch another tuple + * from the sort and try again. + * + * CommonState information + * + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef CommonState UniqueState; +typedef CommonState UniqueState; /* ---------------- - * HashState information + * HashState information * - * hashBatches file descriptors for the batches + * hashBatches file descriptors for the batches * - * CommonState information + * CommonState information * - * OuterTupleSlot pointer to slot containing current "outer" tuple - * ResultTupleSlot pointer to slot in tuple table for projected tuple - * ExprContext node's current expression context - * ProjInfo info this node uses to form tuple projections - * NumScanAttributes size of ScanAttributes array - * ScanAttributes attribute numbers of interest in this tuple + * OuterTupleSlot pointer to slot containing current "outer" tuple + * ResultTupleSlot pointer to slot in tuple table for projected tuple + * ExprContext node's current expression context + * ProjInfo info this node uses to form tuple projections + * NumScanAttributes size of ScanAttributes array + * ScanAttributes attribute numbers of interest in this tuple * ---------------- */ -typedef struct HashState { - CommonState cstate; /* its first field is NodeTag */ - File *hashBatches; -} HashState; +typedef struct HashState +{ + CommonState cstate; /* its first field is NodeTag */ + File *hashBatches; +} HashState; /* ----------------------- - * TeeState information - * leftPlace : next item in the queue unseen by the left parent - * rightPlace : next item in the queue unseen by the right parent - * lastPlace : last item in the queue - * bufferRelname : name of the relation used as the buffer queue - * bufferRel : the relation used as the buffer queue - * mcxt : for now, tee's have their own memory context - * may be cleaned up later if portals are cleaned up - * - * initially, a Tee starts with [left/right]Place variables set to -1. + * TeeState information + * leftPlace : next item in the queue unseen by the left parent + * rightPlace : next item in the queue unseen by the right parent + * lastPlace : last item in the queue + * bufferRelname : name of the relation used as the buffer queue + * bufferRel : the relation used as the buffer queue + * mcxt : for now, tee's have their own memory context + * may be cleaned up later if portals are cleaned up + * + * initially, a Tee starts with [left/right]Place variables set to -1. * on cleanup, queue is free'd when both leftPlace and rightPlace = -1 - * ------------------------- + * ------------------------- */ -typedef struct TeeState { - CommonState cstate; /* its first field is NodeTag */ - int tee_leftPlace; - int tee_rightPlace; - int tee_lastPlace; - char *tee_bufferRelname; - Relation tee_bufferRel; - MemoryContext tee_mcxt; - HeapScanDesc tee_leftScanDesc; - HeapScanDesc tee_rightScanDesc; -} TeeState; - -#endif /* EXECNODES_H */ +typedef struct TeeState +{ + CommonState cstate; /* its first field is NodeTag */ + int tee_leftPlace; + int tee_rightPlace; + int tee_lastPlace; + char *tee_bufferRelname; + Relation tee_bufferRel; + MemoryContext tee_mcxt; + HeapScanDesc tee_leftScanDesc; + HeapScanDesc tee_rightScanDesc; +} TeeState; + +#endif /* EXECNODES_H */ diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h index a10182a33ee..04b2c10c442 100644 --- a/src/include/nodes/makefuncs.h +++ b/src/include/nodes/makefuncs.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * makefuncs.h-- - * prototypes for the creator functions (for primitive nodes) + * prototypes for the creator functions (for primitive nodes) * * * Copyright (c) 1994, Regents of the University of California * - * $Id: makefuncs.h,v 1.3 1997/01/22 01:43:41 momjian Exp $ + * $Id: makefuncs.h,v 1.4 1997/09/07 04:58:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,32 +16,36 @@ #include <nodes/primnodes.h> #include <utils/fcache.h> -extern Oper *makeOper(Oid opno, - Oid opid, - Oid opresulttype, - int opsize, - FunctionCachePtr op_fcache); +extern Oper * +makeOper(Oid opno, + Oid opid, + Oid opresulttype, + int opsize, + FunctionCachePtr op_fcache); -extern Var *makeVar(Index varno, - AttrNumber varattno, - Oid vartype, - Index varnoold, - AttrNumber varoattno); +extern Var * +makeVar(Index varno, + AttrNumber varattno, + Oid vartype, + Index varnoold, + AttrNumber varoattno); -extern Resdom *makeResdom(AttrNumber resno, - Oid restype, - int reslen, - char *resname, - Index reskey, - Oid reskeyop, - int resjunk); - -extern Const *makeConst(Oid consttype, - Size constlen, - Datum constvalue, - bool constisnull, - bool constbyval, - bool constisset, - bool constiscast); +extern Resdom * +makeResdom(AttrNumber resno, + Oid restype, + int reslen, + char *resname, + Index reskey, + Oid reskeyop, + int resjunk); -#endif /* MAKEFUNC_H */ +extern Const * +makeConst(Oid consttype, + Size constlen, + Datum constvalue, + bool constisnull, + bool constbyval, + bool constisset, + bool constiscast); + +#endif /* MAKEFUNC_H */ diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h index 594bff6db42..1d5bced1f3c 100644 --- a/src/include/nodes/memnodes.h +++ b/src/include/nodes/memnodes.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * memnodes.h-- - * POSTGRES memory context node definitions. + * POSTGRES memory context node definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: memnodes.h,v 1.4 1996/11/04 07:59:34 scrappy Exp $ + * $Id: memnodes.h,v 1.5 1997/09/07 04:58:35 momjian Exp $ * * XXX the typedefs in this file are different from the other ???nodes.h; - * they are pointers to structures instead of the structures themselves. - * If you're wondering, this is plain laziness. I don't want to touch - * the memory context code which should be revamped altogether some day. - * - ay 10/94 + * they are pointers to structures instead of the structures themselves. + * If you're wondering, this is plain laziness. I don't want to touch + * the memory context code which should be revamped altogether some day. + * - ay 10/94 *------------------------------------------------------------------------- */ -#ifndef MEMNODES_H +#ifndef MEMNODES_H #define MEMNODES_H #include <lib/fstack.h> @@ -24,75 +24,78 @@ /* * MemoryContext -- - * A logical context in which memory allocations occur. + * A logical context in which memory allocations occur. * * The types of memory contexts can be thought of as members of the * following inheritance hierarchy with properties summarized below. * - * Node - * | - * MemoryContext___ - * / \ - * GlobalMemory PortalMemoryContext - * / \ - * PortalVariableMemory PortalHeapMemory + * Node + * | + * MemoryContext___ + * / \ + * GlobalMemory PortalMemoryContext + * / \ + * PortalVariableMemory PortalHeapMemory * - * Flushed at Flushed at Checkpoints - * Transaction Portal - * Commit Close + * Flushed at Flushed at Checkpoints + * Transaction Portal + * Commit Close * - * GlobalMemory n n n - * PortalVariableMemory n y n - * PortalHeapMemory y y y + * GlobalMemory n n n + * PortalVariableMemory n y n + * PortalHeapMemory y y y */ -typedef struct MemoryContextMethodsData { - Pointer (*alloc)(); - void (*free_p)(); /* need to use free as a #define, - so can't use free */ - Pointer (*realloc)(); - char* (*getName)(); - void (*dump)(); -} *MemoryContextMethods; +typedef struct MemoryContextMethodsData +{ + Pointer(*alloc) (); + void (*free_p) (); /* need to use free as a #define, + * so can't use free */ + Pointer(*realloc) (); + char *(*getName) (); + void (*dump) (); +} *MemoryContextMethods; -typedef struct MemoryContext { - NodeTag type; - MemoryContextMethods method; -} *MemoryContext; +typedef struct MemoryContext +{ + NodeTag type; + MemoryContextMethods method; +} *MemoryContext; /* think about doing this right some time but we'll have explicit fields for now -ay 10/94 */ -typedef struct GlobalMemory { - NodeTag type; - MemoryContextMethods method; - AllocSetData setData; - char *name; - OrderedElemData elemData; -} *GlobalMemory; +typedef struct GlobalMemory +{ + NodeTag type; + MemoryContextMethods method; + AllocSetData setData; + char *name; + OrderedElemData elemData; +} *GlobalMemory; typedef MemoryContext *PortalMemoryContext; -typedef struct PortalVariableMemory { - NodeTag type; - MemoryContextMethods method; - AllocSetData setData; -} *PortalVariableMemory; +typedef struct PortalVariableMemory +{ + NodeTag type; + MemoryContextMethods method; + AllocSetData setData; +} *PortalVariableMemory; -typedef struct PortalHeapMemory { - NodeTag type; - MemoryContextMethods method; - Pointer block; - FixedStackData stackData; -} *PortalHeapMemory; +typedef struct PortalHeapMemory +{ + NodeTag type; + MemoryContextMethods method; + Pointer block; + FixedStackData stackData; +} *PortalHeapMemory; /* * MemoryContextIsValid -- - * True iff memory context is valid. + * True iff memory context is valid. */ #define MemoryContextIsValid(context) \ - (IsA(context,MemoryContext) || IsA(context,GlobalMemory) || \ - IsA(context,PortalVariableMemory) || IsA(context,PortalHeapMemory)) - -#endif /* MEMNODES_H */ - + (IsA(context,MemoryContext) || IsA(context,GlobalMemory) || \ + IsA(context,PortalVariableMemory) || IsA(context,PortalHeapMemory)) +#endif /* MEMNODES_H */ diff --git a/src/include/nodes/nodeFuncs.h b/src/include/nodes/nodeFuncs.h index 12a0ca97813..3edc598a833 100644 --- a/src/include/nodes/nodeFuncs.h +++ b/src/include/nodes/nodeFuncs.h @@ -1,22 +1,22 @@ /*------------------------------------------------------------------------- * * nodeFuncs.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeFuncs.h,v 1.2 1997/08/19 21:38:43 momjian Exp $ + * $Id: nodeFuncs.h,v 1.3 1997/09/07 04:58:37 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEFUNCS_H #define NODEFUNCS_H -extern bool single_node(Node *node); -extern bool var_is_outer(Var *var); -extern bool var_is_rel(Var *var); -extern Oper *replace_opid(Oper *oper); -extern bool non_null(Expr *c); +extern bool single_node(Node * node); +extern bool var_is_outer(Var * var); +extern bool var_is_rel(Var * var); +extern Oper *replace_opid(Oper * oper); +extern bool non_null(Expr * c); -#endif /* NODEFUNCS_H */ +#endif /* NODEFUNCS_H */ diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 66c1b1812ce..944ed7453f2 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * nodes.h-- - * Definitions for tagged nodes. + * Definitions for tagged nodes. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodes.h,v 1.11 1997/09/01 06:04:57 thomas Exp $ + * $Id: nodes.h,v 1.12 1997/09/07 04:58:39 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODES_H -#define NODES_H +#define NODES_H /* * The first field of every node is NodeTag. Each node created (with makeNode) @@ -20,195 +20,196 @@ * Note that the number of the node tags are not contiguous. We left holes * here so that we can add more tags without changing the existing enum's. */ -typedef enum NodeTag { - T_Invalid = 0, +typedef enum NodeTag +{ + T_Invalid = 0, - /*--------------------- - * TAGS FOR PLAN NODES (plannodes.h) - *--------------------- - */ - T_Plan = 10, - T_Existential, - T_Result, - T_Append, - T_Scan, - T_SeqScan, - T_IndexScan, - T_Join, - T_NestLoop, - T_MergeJoin, - T_HashJoin, - T_Temp, - T_Material, - T_Sort, - T_Agg, - T_Unique, - T_Hash, - T_Choose, - T_Tee, - T_Group, + /*--------------------- + * TAGS FOR PLAN NODES (plannodes.h) + *--------------------- + */ + T_Plan = 10, + T_Existential, + T_Result, + T_Append, + T_Scan, + T_SeqScan, + T_IndexScan, + T_Join, + T_NestLoop, + T_MergeJoin, + T_HashJoin, + T_Temp, + T_Material, + T_Sort, + T_Agg, + T_Unique, + T_Hash, + T_Choose, + T_Tee, + T_Group, - /*--------------------- - * TAGS FOR PRIMITIVE NODES (primnodes.h) - *--------------------- - */ - T_Resdom = 100, - T_Fjoin, - T_Expr, - T_Var, - T_Oper, - T_Const, - T_Param, - T_Aggreg, - T_Func, - T_Array, - T_ArrayRef, + /*--------------------- + * TAGS FOR PRIMITIVE NODES (primnodes.h) + *--------------------- + */ + T_Resdom = 100, + T_Fjoin, + T_Expr, + T_Var, + T_Oper, + T_Const, + T_Param, + T_Aggreg, + T_Func, + T_Array, + T_ArrayRef, - /*--------------------- - * TAGS FOR INNER PLAN NODES (relation.h) - *--------------------- - */ - T_Rel = 200, - T_Path, - T_IndexPath, - T_JoinPath, - T_MergePath, - T_HashPath, - T_OrderKey, - T_JoinKey, - T_MergeOrder, - T_CInfo, - T_JoinMethod, - T_HInfo, - T_MInfo, - T_JInfo, - T_Iter, - T_Stream, + /*--------------------- + * TAGS FOR INNER PLAN NODES (relation.h) + *--------------------- + */ + T_Rel = 200, + T_Path, + T_IndexPath, + T_JoinPath, + T_MergePath, + T_HashPath, + T_OrderKey, + T_JoinKey, + T_MergeOrder, + T_CInfo, + T_JoinMethod, + T_HInfo, + T_MInfo, + T_JInfo, + T_Iter, + T_Stream, - /*--------------------- - * TAGS FOR EXECUTOR NODES (execnodes.h) - *--------------------- - */ - T_IndexInfo = 300, - T_RelationInfo, - T_TupleCount, - T_TupleTableSlot, - T_ExprContext, - T_ProjectionInfo, - T_JunkFilter, - T_EState, - T_BaseNode, - T_CommonState, - T_ResultState, - T_AppendState, - T_CommonScanState, - T_ScanState, - T_IndexScanState, - T_JoinState, - T_NestLoopState, - T_MergeJoinState, - T_HashJoinState, - T_MaterialState, - T_AggState, - T_GroupState, - T_SortState, - T_UniqueState, - T_HashState, - T_TeeState, + /*--------------------- + * TAGS FOR EXECUTOR NODES (execnodes.h) + *--------------------- + */ + T_IndexInfo = 300, + T_RelationInfo, + T_TupleCount, + T_TupleTableSlot, + T_ExprContext, + T_ProjectionInfo, + T_JunkFilter, + T_EState, + T_BaseNode, + T_CommonState, + T_ResultState, + T_AppendState, + T_CommonScanState, + T_ScanState, + T_IndexScanState, + T_JoinState, + T_NestLoopState, + T_MergeJoinState, + T_HashJoinState, + T_MaterialState, + T_AggState, + T_GroupState, + T_SortState, + T_UniqueState, + T_HashState, + T_TeeState, - /*--------------------- - * TAGS FOR MEMORY NODES (memnodes.h) - *--------------------- - */ - T_MemoryContext = 400, - T_GlobalMemory, - T_PortalMemoryContext, - T_PortalVariableMemory, - T_PortalHeapMemory, + /*--------------------- + * TAGS FOR MEMORY NODES (memnodes.h) + *--------------------- + */ + T_MemoryContext = 400, + T_GlobalMemory, + T_PortalMemoryContext, + T_PortalVariableMemory, + T_PortalHeapMemory, - /*--------------------- - * TAGS FOR VALUE NODES (pg_list.h) - *--------------------- - */ - T_Value = 500, - T_List, - T_Integer, - T_Float, - T_String, - T_Null, - - /*--------------------- - * TAGS FOR PARSE TREE NODES (parsenode.h) - *--------------------- - */ - T_Query = 600, - T_AppendStmt, - T_DeleteStmt, - T_ReplaceStmt, - T_CursorStmt, - T_RetrieveStmt, - T_AddAttrStmt, - T_AggregateStmt, - T_ChangeACLStmt, - T_ClosePortalStmt, - T_ClusterStmt, - T_CopyStmt, - T_CreateStmt, - T_VersionStmt, - T_DefineStmt, - T_DestroyStmt, - T_ExtendStmt, - T_FetchStmt, - T_IndexStmt, - T_MoveStmt, - T_ProcedureStmt, - T_PurgeStmt, - T_RecipeStmt, - T_RemoveAggrStmt, - T_RemoveFuncStmt, - T_RemoveOperStmt, - T_RemoveStmt, - T_RenameStmt, - T_RuleStmt, - T_NotifyStmt, - T_ListenStmt, - T_TransactionStmt, - T_ViewStmt, - T_LoadStmt, - T_CreatedbStmt, - T_DestroydbStmt, - T_VacuumStmt, - T_ExplainStmt, - T_CreateSeqStmt, - T_VariableSetStmt, - T_VariableShowStmt, - T_VariableResetStmt, - T_CreateTrigStmt, - T_DropTrigStmt, + /*--------------------- + * TAGS FOR VALUE NODES (pg_list.h) + *--------------------- + */ + T_Value = 500, + T_List, + T_Integer, + T_Float, + T_String, + T_Null, - T_A_Expr = 700, - T_Attr, - T_A_Const, - T_ParamNo, - T_Ident, - T_FuncCall, - T_A_Indices, - T_ResTarget, - T_ParamString, - T_TimeRange, - T_RelExpr, - T_SortGroupBy, - T_RangeVar, - T_TypeName, - T_IndexElem, - T_ColumnDef, - T_DefElem, - T_TargetEntry, - T_RangeTblEntry, - T_SortClause, - T_GroupClause, - T_SubSelect -} NodeTag; + /*--------------------- + * TAGS FOR PARSE TREE NODES (parsenode.h) + *--------------------- + */ + T_Query = 600, + T_AppendStmt, + T_DeleteStmt, + T_ReplaceStmt, + T_CursorStmt, + T_RetrieveStmt, + T_AddAttrStmt, + T_AggregateStmt, + T_ChangeACLStmt, + T_ClosePortalStmt, + T_ClusterStmt, + T_CopyStmt, + T_CreateStmt, + T_VersionStmt, + T_DefineStmt, + T_DestroyStmt, + T_ExtendStmt, + T_FetchStmt, + T_IndexStmt, + T_MoveStmt, + T_ProcedureStmt, + T_PurgeStmt, + T_RecipeStmt, + T_RemoveAggrStmt, + T_RemoveFuncStmt, + T_RemoveOperStmt, + T_RemoveStmt, + T_RenameStmt, + T_RuleStmt, + T_NotifyStmt, + T_ListenStmt, + T_TransactionStmt, + T_ViewStmt, + T_LoadStmt, + T_CreatedbStmt, + T_DestroydbStmt, + T_VacuumStmt, + T_ExplainStmt, + T_CreateSeqStmt, + T_VariableSetStmt, + T_VariableShowStmt, + T_VariableResetStmt, + T_CreateTrigStmt, + T_DropTrigStmt, + + T_A_Expr = 700, + T_Attr, + T_A_Const, + T_ParamNo, + T_Ident, + T_FuncCall, + T_A_Indices, + T_ResTarget, + T_ParamString, + T_TimeRange, + T_RelExpr, + T_SortGroupBy, + T_RangeVar, + T_TypeName, + T_IndexElem, + T_ColumnDef, + T_DefElem, + T_TargetEntry, + T_RangeTblEntry, + T_SortClause, + T_GroupClause, + T_SubSelect +} NodeTag; /* * The first field of a node of any type is gauranteed to be the NodeTag. @@ -216,90 +217,93 @@ typedef enum NodeTag { * a variable to be of Node * (instead of void *) can also facilitate * debugging. */ -typedef struct Node { - NodeTag type; -} Node; +typedef struct Node +{ + NodeTag type; +} Node; -#define nodeTag(_node_) ((Node*)_node_)->type +#define nodeTag(_node_) ((Node*)_node_)->type -#define makeNode(_node_) (_node_*)newNode(sizeof(_node_),T_##_node_) -#define NodeSetTag(n, t) ((Node *)n)->type = t +#define makeNode(_node_) (_node_*)newNode(sizeof(_node_),T_##_node_) +#define NodeSetTag(n, t) ((Node *)n)->type = t -#define IsA(_node_,_tag_) (nodeTag(_node_) == T_##_tag_) +#define IsA(_node_,_tag_) (nodeTag(_node_) == T_##_tag_) /* ---------------------------------------------------------------- - * IsA functions (no inheritence any more) + * IsA functions (no inheritence any more) * ---------------------------------------------------------------- */ #define IsA_JoinPath(jp) \ - (nodeTag(jp)==T_JoinPath || nodeTag(jp)==T_MergePath || \ - nodeTag(jp)==T_HashPath) + (nodeTag(jp)==T_JoinPath || nodeTag(jp)==T_MergePath || \ + nodeTag(jp)==T_HashPath) #define IsA_Join(j) \ - (nodeTag(j)==T_Join || nodeTag(j)==T_NestLoop || \ - nodeTag(j)==T_MergeJoin || nodeTag(j)==T_HashJoin) + (nodeTag(j)==T_Join || nodeTag(j)==T_NestLoop || \ + nodeTag(j)==T_MergeJoin || nodeTag(j)==T_HashJoin) #define IsA_Temp(t) \ - (nodeTag(t)==T_Temp || nodeTag(t)==T_Material || nodeTag(t)==T_Sort || \ - nodeTag(t)==T_Unique) + (nodeTag(t)==T_Temp || nodeTag(t)==T_Material || nodeTag(t)==T_Sort || \ + nodeTag(t)==T_Unique) /* ---------------------------------------------------------------- - * extern declarations follow + * extern declarations follow * ---------------------------------------------------------------- */ /* * nodes/nodes.c */ -extern Node *newNode(Size size, NodeTag tag); +extern Node *newNode(Size size, NodeTag tag); /* * nodes/{outfuncs.c,print.c} */ -#define nodeDisplay pprint +#define nodeDisplay pprint -extern char *nodeToString(void *obj); -extern void print(void *obj); +extern char *nodeToString(void *obj); +extern void print(void *obj); /* * nodes/{readfuncs.c,read.c} */ -extern void *stringToNode(char *str); +extern void *stringToNode(char *str); /* * nodes/copyfuncs.c */ -extern void *copyObject(void *obj); +extern void *copyObject(void *obj); /* * nodes/equalfuncs.c */ -extern bool equal(void *a, void *b); +extern bool equal(void *a, void *b); /* ---------------- - * I don't know why this is here. Most likely a hack.. - * -cim 6/3/90 + * I don't know why this is here. Most likely a hack.. + * -cim 6/3/90 * ---------------- */ -typedef float Cost; +typedef float Cost; /* * CmdType - - * enums for type of operation to aid debugging + * enums for type of operation to aid debugging * * ??? could have put this in parsenodes.h but many files not in the - * optimizer also need this... + * optimizer also need this... */ -typedef enum CmdType { - CMD_UNKNOWN, - CMD_SELECT, /* select stmt (formerly retrieve) */ - CMD_UPDATE, /* update stmt (formerly replace) */ - CMD_INSERT, /* insert stmt (formerly append) */ - CMD_DELETE, - CMD_NOTIFY, - CMD_UTILITY /* cmds like create, destroy, copy, vacuum, etc. */ -} CmdType; - +typedef enum CmdType +{ + CMD_UNKNOWN, + CMD_SELECT, /* select stmt (formerly retrieve) */ + CMD_UPDATE, /* update stmt (formerly replace) */ + CMD_INSERT, /* insert stmt (formerly append) */ + CMD_DELETE, + CMD_NOTIFY, + CMD_UTILITY /* cmds like create, destroy, copy, + * vacuum, etc. */ +} CmdType; + -#endif /* NODES_H */ +#endif /* NODES_H */ diff --git a/src/include/nodes/params.h b/src/include/nodes/params.h index 93e79268123..78f0d1cd64b 100644 --- a/src/include/nodes/params.h +++ b/src/include/nodes/params.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * params.h-- - * Declarations/definitions of stuff needed to handle parameterized plans. + * Declarations/definitions of stuff needed to handle parameterized plans. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: params.h,v 1.3 1996/11/04 08:52:57 scrappy Exp $ + * $Id: params.h,v 1.4 1997/09/07 04:58:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,71 +19,72 @@ * * The following are the possible values for the 'paramkind' * field of a Param node. - * + * * PARAM_NAMED: The parameter has a name, i.e. something - * like `$.salary' or `$.foobar'. - * In this case field `paramname' must be a valid Name. - * and field `paramid' must be == 0. + * like `$.salary' or `$.foobar'. + * In this case field `paramname' must be a valid Name. + * and field `paramid' must be == 0. + * + * PARAM_NUM: The parameter has only a numeric identifier, + * i.e. something like `$1', `$2' etc. + * The number is contained in the `parmid' field. * - * PARAM_NUM: The parameter has only a numeric identifier, - * i.e. something like `$1', `$2' etc. - * The number is contained in the `parmid' field. + * PARAM_NEW: Used in PRS2 rule, similar to PARAM_NAMED. + * The `paramname' & `paramid' refer to the "NEW" tuple + * `paramname' is the attribute name and `paramid' its + * attribute number. * - * PARAM_NEW: Used in PRS2 rule, similar to PARAM_NAMED. - * The `paramname' & `paramid' refer to the "NEW" tuple - * `paramname' is the attribute name and `paramid' its - * attribute number. - * - * PARAM_OLD: Same as PARAM_NEW, but in this case we refer to - * the "OLD" tuple. + * PARAM_OLD: Same as PARAM_NEW, but in this case we refer to + * the "OLD" tuple. */ -#define PARAM_NAMED 11 -#define PARAM_NUM 12 -#define PARAM_NEW 13 -#define PARAM_OLD 14 -#define PARAM_INVALID 100 +#define PARAM_NAMED 11 +#define PARAM_NUM 12 +#define PARAM_NEW 13 +#define PARAM_OLD 14 +#define PARAM_INVALID 100 /* ---------------------------------------------------------------- - * ParamListInfo + * ParamListInfo * - * Information needed in order for the executor to handle - * parameterized plans (you know, $.salary, $.name etc. stuff...). + * Information needed in order for the executor to handle + * parameterized plans (you know, $.salary, $.name etc. stuff...). * - * ParamListInfoData contains information needed when substituting a - * Param node with a Const node. + * ParamListInfoData contains information needed when substituting a + * Param node with a Const node. * - * kind : the kind of parameter. - * name : the parameter name (valid if kind == PARAM_NAMED, - * PARAM_NEW or PARAM_OLD) - * id : the parameter id (valid if kind == PARAM_NUM) - * or the attrno (if kind == PARAM_NEW or PARAM_OLD) - * type : PG_TYPE OID of the value - * length : length in bytes of the value - * isnull : true if & only if the value is null (if true then - * the fields 'length' and 'value' are undefined). - * value : the value that has to be substituted in the place - * of the parameter. + * kind : the kind of parameter. + * name : the parameter name (valid if kind == PARAM_NAMED, + * PARAM_NEW or PARAM_OLD) + * id : the parameter id (valid if kind == PARAM_NUM) + * or the attrno (if kind == PARAM_NEW or PARAM_OLD) + * type : PG_TYPE OID of the value + * length : length in bytes of the value + * isnull : true if & only if the value is null (if true then + * the fields 'length' and 'value' are undefined). + * value : the value that has to be substituted in the place + * of the parameter. * - * ParamListInfo is to be used as an array of ParamListInfoData - * records. An 'InvalidName' in the name field of such a record - * indicates that this is the last record in the array. + * ParamListInfo is to be used as an array of ParamListInfoData + * records. An 'InvalidName' in the name field of such a record + * indicates that this is the last record in the array. * * ---------------------------------------------------------------- */ -typedef struct ParamListInfoData { - int kind; - char *name; - AttrNumber id; - Oid type; - Size length; - bool isnull; - bool byval; - Datum value; -} ParamListInfoData; +typedef struct ParamListInfoData +{ + int kind; + char *name; + AttrNumber id; + Oid type; + Size length; + bool isnull; + bool byval; + Datum value; +} ParamListInfoData; typedef ParamListInfoData *ParamListInfo; -#endif /* PARAMS_H */ +#endif /* PARAMS_H */ diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 8492dcde1d8..c24d27918c2 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1,844 +1,914 @@ /*------------------------------------------------------------------------- * * parsenodes.h-- - * definitions for parse tree nodes + * definitions for parse tree nodes * * * Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.23 1997/09/01 08:11:57 vadim Exp $ + * $Id: parsenodes.h,v 1.24 1997/09/07 04:58:44 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PARSENODES_H -#define PARSENODES_H +#ifndef PARSENODES_H +#define PARSENODES_H #include <utils/tqual.h> #include <nodes/primnodes.h> /***************************************************************************** - * Query Tree + * Query Tree *****************************************************************************/ /* * Query - - * all statments are turned into a Query tree (via transformStmt) - * for further processing by the optimizer - * utility statements (i.e. non-optimizable statements) - * have the *utilityStmt field set. + * all statments are turned into a Query tree (via transformStmt) + * for further processing by the optimizer + * utility statements (i.e. non-optimizable statements) + * have the *utilityStmt field set. * * we need the isPortal flag because portal names can be null too; can * get rid of it if we support CURSOR as a commandType. * */ -typedef struct Query { - NodeTag type; - - CmdType commandType; /* select|insert|update|delete|utility */ - - Node *utilityStmt; /* non-null if this is a non-optimizable - statement */ - - int resultRelation; /* target relation (index to rtable) */ - char *into; /* portal (cursor) name */ - bool isPortal; /* is this a retrieve into portal? */ - bool isBinary; /* binary portal? */ - - char *uniqueFlag; /* NULL, '*', or Unique attribute name */ - List *sortClause; /* a list of SortClause's */ - - List *rtable; /* list of range table entries */ - List *targetList; /* target list (of TargetEntry) */ - Node *qual; /* qualifications */ - - List *groupClause; /* list of columns to specified in GROUP BY */ - Node *havingQual; /* qualification of each group */ - - int qry_numAgg; /* number of aggregates in the target list */ - Aggreg **qry_aggs; /* the aggregates */ - - /* internal to planner */ - List *base_relation_list_; /* base relation list */ - List *join_relation_list_; /* list of relations generated by joins */ - bool query_is_archival_; /* archival query flag */ -} Query; +typedef struct Query +{ + NodeTag type; + + CmdType commandType;/* select|insert|update|delete|utility */ + + Node *utilityStmt;/* non-null if this is a non-optimizable + * statement */ + + int resultRelation; /* target relation (index to + * rtable) */ + char *into; /* portal (cursor) name */ + bool isPortal; /* is this a retrieve into portal? */ + bool isBinary; /* binary portal? */ + + char *uniqueFlag; /* NULL, '*', or Unique attribute name */ + List *sortClause; /* a list of SortClause's */ + + List *rtable; /* list of range table entries */ + List *targetList; /* target list (of TargetEntry) */ + Node *qual; /* qualifications */ + + List *groupClause;/* list of columns to specified in GROUP + * BY */ + Node *havingQual; /* qualification of each group */ + + int qry_numAgg; /* number of aggregates in the target list */ + Aggreg **qry_aggs; /* the aggregates */ + + /* internal to planner */ + List *base_relation_list_; /* base relation list */ + List *join_relation_list_; /* list of relations + * generated by joins */ + bool query_is_archival_; /* archival query flag */ +} Query; /***************************************************************************** - * Other Statements (no optimizations required) + * Other Statements (no optimizations required) * - * Some of them require a little bit of transformation (which is also - * done by transformStmt). The whole structure is then passed on to - * ProcessUtility (by-passing the optimization step) as the utilityStmt - * field in Query. + * Some of them require a little bit of transformation (which is also + * done by transformStmt). The whole structure is then passed on to + * ProcessUtility (by-passing the optimization step) as the utilityStmt + * field in Query. *****************************************************************************/ /* ---------------------- - * Add Column Statement + * Add Column Statement * ---------------------- */ -typedef struct AddAttrStmt { - NodeTag type; - char *relname; /* the relation to add attr */ - bool inh; /* add recursively to children? */ - struct ColumnDef *colDef; /* the attribute definition */ -} AddAttrStmt; +typedef struct AddAttrStmt +{ + NodeTag type; + char *relname; /* the relation to add attr */ + bool inh; /* add recursively to children? */ + struct ColumnDef *colDef; /* the attribute definition */ +} AddAttrStmt; /* ---------------------- - * Change ACL Statement + * Change ACL Statement * ---------------------- */ -typedef struct ChangeACLStmt { - NodeTag type; - struct AclItem *aclitem; - unsigned modechg; - List *relNames; -} ChangeACLStmt; +typedef struct ChangeACLStmt +{ + NodeTag type; + struct AclItem *aclitem; + unsigned modechg; + List *relNames; +} ChangeACLStmt; /* ---------------------- - * Close Portal Statement + * Close Portal Statement * ---------------------- */ -typedef struct ClosePortalStmt { - NodeTag type; - char *portalname; /* name of the portal (cursor) */ -} ClosePortalStmt; +typedef struct ClosePortalStmt +{ + NodeTag type; + char *portalname; /* name of the portal (cursor) */ +} ClosePortalStmt; /* ---------------------- - * Copy Statement + * Copy Statement * ---------------------- */ -typedef struct CopyStmt { - NodeTag type; - bool binary; /* is a binary copy? */ - char *relname; /* the relation to copy */ - bool oids; /* copy oid's? */ - int direction; /* TO or FROM */ - char *filename; /* if NULL, use stdin/stdout */ - char *delimiter; /* delimiter character, \t by default*/ -} CopyStmt; +typedef struct CopyStmt +{ + NodeTag type; + bool binary; /* is a binary copy? */ + char *relname; /* the relation to copy */ + bool oids; /* copy oid's? */ + int direction; /* TO or FROM */ + char *filename; /* if NULL, use stdin/stdout */ + char *delimiter; /* delimiter character, \t by default */ +} CopyStmt; /* ---------------------- - * Create Table Statement + * Create Table Statement * ---------------------- */ -typedef enum ArchType { - ARCH_NONE, ARCH_LIGHT, ARCH_HEAVY /* archive mode */ -} ArchType; +typedef enum ArchType +{ + ARCH_NONE, ARCH_LIGHT, ARCH_HEAVY /* archive mode */ +} ArchType; -typedef struct CreateStmt { - NodeTag type; - char *relname; /* the relation to create */ - List *tableElts; /* column definitions - list of ColumnDef */ - List *inhRelnames; /* relations to inherit from - list of Value (string) */ - ArchType archiveType; /* archive mode (ARCH_NONE if none */ - int location; /* smgrid (-1 if none) */ - int archiveLoc; /* smgrid (-1 if none) */ - List *constraints; /* list of constraints (ConstaintDef) */ -} CreateStmt; +typedef struct CreateStmt +{ + NodeTag type; + char *relname; /* the relation to create */ + List *tableElts; /* column definitions list of ColumnDef */ + List *inhRelnames;/* relations to inherit from list of Value + * (string) */ + ArchType archiveType;/* archive mode (ARCH_NONE if none */ + int location; /* smgrid (-1 if none) */ + int archiveLoc; /* smgrid (-1 if none) */ + List *constraints;/* list of constraints (ConstaintDef) */ +} CreateStmt; -typedef enum ConstrType { - CONSTR_NONE, CONSTR_CHECK /* type of constaints */ -} ConstrType; +typedef enum ConstrType +{ + CONSTR_NONE, CONSTR_CHECK /* type of constaints */ +} ConstrType; -typedef struct ConstraintDef { - ConstrType type; - char *name; /* name */ - void *def; /* definition */ -} ConstraintDef; +typedef struct ConstraintDef +{ + ConstrType type; + char *name; /* name */ + void *def; /* definition */ +} ConstraintDef; /* ---------------------- - * Create/Drop TRIGGER Statements + * Create/Drop TRIGGER Statements * ---------------------- */ -typedef struct CreateTrigStmt { - NodeTag type; - char *trigname; /* TRIGGER' name */ - char *relname; /* triggered relation */ - char *funcname; /* function to call (or NULL) */ - List *args; /* list of (T_String) Values or NULL */ - bool before; /* BEFORE/AFTER */ - bool row; /* ROW/STATEMENT */ - char actions[4]; /* Insert, Update, Delete */ - char *lang; /* NULL (which means Clanguage) */ - char *text; /* AS 'text' */ - List *attr; /* UPDATE OF a, b,... (NI) or NULL */ - char *when; /* WHEN 'a > 10 ...' (NI) or NULL */ -} CreateTrigStmt; +typedef struct CreateTrigStmt +{ + NodeTag type; + char *trigname; /* TRIGGER' name */ + char *relname; /* triggered relation */ + char *funcname; /* function to call (or NULL) */ + List *args; /* list of (T_String) Values or NULL */ + bool before; /* BEFORE/AFTER */ + bool row; /* ROW/STATEMENT */ + char actions[4]; /* Insert, Update, Delete */ + char *lang; /* NULL (which means Clanguage) */ + char *text; /* AS 'text' */ + List *attr; /* UPDATE OF a, b,... (NI) or NULL */ + char *when; /* WHEN 'a > 10 ...' (NI) or NULL */ +} CreateTrigStmt; -typedef struct DropTrigStmt { - NodeTag type; - char *trigname; /* TRIGGER' name */ - char *relname; /* triggered relation */ -} DropTrigStmt; +typedef struct DropTrigStmt +{ + NodeTag type; + char *trigname; /* TRIGGER' name */ + char *relname; /* triggered relation */ +} DropTrigStmt; /* ---------------------- - * Create SEQUENCE Statement + * Create SEQUENCE Statement * ---------------------- */ -typedef struct CreateSeqStmt { - NodeTag type; - char *seqname; /* the relation to create */ - List *options; -} CreateSeqStmt; +typedef struct CreateSeqStmt +{ + NodeTag type; + char *seqname; /* the relation to create */ + List *options; +} CreateSeqStmt; /* ---------------------- - * Create Version Statement + * Create Version Statement * ---------------------- */ -typedef struct VersionStmt { - NodeTag type; - char *relname; /* the new relation */ - int direction; /* FORWARD | BACKWARD */ - char *fromRelname; /* relation to create a version */ - char *date; /* date of the snapshot */ -} VersionStmt; +typedef struct VersionStmt +{ + NodeTag type; + char *relname; /* the new relation */ + int direction; /* FORWARD | BACKWARD */ + char *fromRelname;/* relation to create a version */ + char *date; /* date of the snapshot */ +} VersionStmt; /* ---------------------- - * Create {Operator|Type|Aggregate} Statement + * Create {Operator|Type|Aggregate} Statement * ---------------------- */ -typedef struct DefineStmt { - NodeTag type; - int defType; /* OPERATOR|P_TYPE|AGGREGATE*/ - char *defname; - List *definition; /* a list of DefElem */ -} DefineStmt; +typedef struct DefineStmt +{ + NodeTag type; + int defType; /* OPERATOR|P_TYPE|AGGREGATE */ + char *defname; + List *definition; /* a list of DefElem */ +} DefineStmt; /* ---------------------- - * Drop Table Statement + * Drop Table Statement * ---------------------- */ -typedef struct DestroyStmt { - NodeTag type; - List *relNames; /* relations to be dropped */ - bool sequence; -} DestroyStmt; +typedef struct DestroyStmt +{ + NodeTag type; + List *relNames; /* relations to be dropped */ + bool sequence; +} DestroyStmt; /* ---------------------- - * Extend Index Statement + * Extend Index Statement * ---------------------- */ -typedef struct ExtendStmt { - NodeTag type; - char *idxname; /* name of the index */ - Node *whereClause; /* qualifications */ - List *rangetable; /* range table, filled in - by transformStmt() */ -} ExtendStmt; +typedef struct ExtendStmt +{ + NodeTag type; + char *idxname; /* name of the index */ + Node *whereClause;/* qualifications */ + List *rangetable; /* range table, filled in by + * transformStmt() */ +} ExtendStmt; /* ---------------------- - * Begin Recipe Statement + * Begin Recipe Statement * ---------------------- */ -typedef struct RecipeStmt { - NodeTag type; - char *recipeName; /* name of the recipe*/ -} RecipeStmt; +typedef struct RecipeStmt +{ + NodeTag type; + char *recipeName; /* name of the recipe */ +} RecipeStmt; /* ---------------------- - * Fetch Statement + * Fetch Statement * ---------------------- */ -typedef struct FetchStmt { - NodeTag type; - int direction; /* FORWARD or BACKWARD */ - int howMany; /* amount to fetch ("ALL" --> 0) */ - char *portalname; /* name of portal (cursor) */ -} FetchStmt; +typedef struct FetchStmt +{ + NodeTag type; + int direction; /* FORWARD or BACKWARD */ + int howMany; /* amount to fetch ("ALL" --> 0) */ + char *portalname; /* name of portal (cursor) */ +} FetchStmt; /* ---------------------- - * Create Index Statement + * Create Index Statement * ---------------------- */ -typedef struct IndexStmt { - NodeTag type; - char *idxname; /* name of the index */ - char *relname; /* name of relation to index on */ - char *accessMethod; /* name of acess methood (eg. btree) */ - List *indexParams; /* a list of IndexElem */ - List *withClause; /* a list of ParamString */ - Node *whereClause; /* qualifications */ - List *rangetable; /* range table, filled in - by transformStmt() */ - bool *lossy; /* is index lossy? */ - bool unique; /* is index unique? */ -} IndexStmt; +typedef struct IndexStmt +{ + NodeTag type; + char *idxname; /* name of the index */ + char *relname; /* name of relation to index on */ + char *accessMethod; /* name of acess methood (eg. + * btree) */ + List *indexParams;/* a list of IndexElem */ + List *withClause; /* a list of ParamString */ + Node *whereClause;/* qualifications */ + List *rangetable; /* range table, filled in by + * transformStmt() */ + bool *lossy; /* is index lossy? */ + bool unique; /* is index unique? */ +} IndexStmt; /* ---------------------- - * Move Statement (Not implemented) + * Move Statement (Not implemented) * ---------------------- */ -typedef struct MoveStmt { - NodeTag type; - int direction; /* FORWARD or BACKWARD */ - bool to; - int where; - char *portalname; -} MoveStmt; +typedef struct MoveStmt +{ + NodeTag type; + int direction; /* FORWARD or BACKWARD */ + bool to; + int where; + char *portalname; +} MoveStmt; /* ---------------------- - * Create Function Statement + * Create Function Statement * ---------------------- */ -typedef struct ProcedureStmt { - NodeTag type; - char *funcname; /* name of function to create */ - List *defArgs; /* list of definitions - a list of strings (as Value *) */ - Node *returnType; /* the return type (as a string or - a TypeName (ie.setof) */ - List *withClause; /* a list of ParamString */ - char *as; /* the SQL statement or filename */ - char *language; /* C or SQL */ -} ProcedureStmt; +typedef struct ProcedureStmt +{ + NodeTag type; + char *funcname; /* name of function to create */ + List *defArgs; /* list of definitions a list of strings + * (as Value *) */ + Node *returnType; /* the return type (as a string or a + * TypeName (ie.setof) */ + List *withClause; /* a list of ParamString */ + char *as; /* the SQL statement or filename */ + char *language; /* C or SQL */ +} ProcedureStmt; /* ---------------------- - * Purge Statement + * Purge Statement * ---------------------- */ -typedef struct PurgeStmt { - NodeTag type; - char *relname; /* relation to purge */ - char *beforeDate; /* purge before this date */ - char *afterDate; /* purge after this date */ -} PurgeStmt; +typedef struct PurgeStmt +{ + NodeTag type; + char *relname; /* relation to purge */ + char *beforeDate; /* purge before this date */ + char *afterDate; /* purge after this date */ +} PurgeStmt; /* ---------------------- - * Drop Aggregate Statement + * Drop Aggregate Statement * ---------------------- */ -typedef struct RemoveAggrStmt { - NodeTag type; - char *aggname; /* aggregate to drop */ - char *aggtype; /* for this type */ -} RemoveAggrStmt; +typedef struct RemoveAggrStmt +{ + NodeTag type; + char *aggname; /* aggregate to drop */ + char *aggtype; /* for this type */ +} RemoveAggrStmt; /* ---------------------- - * Drop Function Statement + * Drop Function Statement * ---------------------- */ -typedef struct RemoveFuncStmt { - NodeTag type; - char *funcname; /* function to drop */ - List *args; /* types of the arguments */ -} RemoveFuncStmt; +typedef struct RemoveFuncStmt +{ + NodeTag type; + char *funcname; /* function to drop */ + List *args; /* types of the arguments */ +} RemoveFuncStmt; /* ---------------------- - * Drop Operator Statement + * Drop Operator Statement * ---------------------- */ -typedef struct RemoveOperStmt { - NodeTag type; - char *opname; /* operator to drop */ - List *args; /* types of the arguments */ -} RemoveOperStmt; +typedef struct RemoveOperStmt +{ + NodeTag type; + char *opname; /* operator to drop */ + List *args; /* types of the arguments */ +} RemoveOperStmt; /* ---------------------- - * Drop {Type|Index|Rule|View} Statement + * Drop {Type|Index|Rule|View} Statement * ---------------------- */ -typedef struct RemoveStmt { - NodeTag type; - int removeType; /* P_TYPE|INDEX|RULE|VIEW */ - char *name; /* name to drop */ -} RemoveStmt; +typedef struct RemoveStmt +{ + NodeTag type; + int removeType; /* P_TYPE|INDEX|RULE|VIEW */ + char *name; /* name to drop */ +} RemoveStmt; /* ---------------------- - * Alter Table Statement + * Alter Table Statement * ---------------------- */ -typedef struct RenameStmt { - NodeTag type; - char *relname; /* relation to be altered */ - bool inh; /* recursively alter children? */ - char *column; /* if NULL, rename the relation name - to the new name. Otherwise, rename - this column name. */ - char *newname; /* the new name */ -} RenameStmt; +typedef struct RenameStmt +{ + NodeTag type; + char *relname; /* relation to be altered */ + bool inh; /* recursively alter children? */ + char *column; /* if NULL, rename the relation name to + * the new name. Otherwise, rename this + * column name. */ + char *newname; /* the new name */ +} RenameStmt; /* ---------------------- - * Create Rule Statement + * Create Rule Statement * ---------------------- */ -typedef struct RuleStmt { - NodeTag type; - char *rulename; /* name of the rule */ - Node *whereClause; /* qualifications */ - CmdType event; /* RETRIEVE */ - struct Attr *object; /* object affected */ - bool instead; /* is a 'do instead'? */ - List *actions; /* the action statements */ -} RuleStmt; +typedef struct RuleStmt +{ + NodeTag type; + char *rulename; /* name of the rule */ + Node *whereClause;/* qualifications */ + CmdType event; /* RETRIEVE */ + struct Attr *object; /* object affected */ + bool instead; /* is a 'do instead'? */ + List *actions; /* the action statements */ +} RuleStmt; /* ---------------------- - * Notify Statement + * Notify Statement * ---------------------- */ -typedef struct NotifyStmt { - NodeTag type; - char *relname; /* relation to notify */ -} NotifyStmt; +typedef struct NotifyStmt +{ + NodeTag type; + char *relname; /* relation to notify */ +} NotifyStmt; /* ---------------------- - * Listen Statement + * Listen Statement * ---------------------- */ -typedef struct ListenStmt { - NodeTag type; - char *relname; /* relation to listen on */ -} ListenStmt; +typedef struct ListenStmt +{ + NodeTag type; + char *relname; /* relation to listen on */ +} ListenStmt; /* ---------------------- - * {Begin|Abort|End} Transaction Statement + * {Begin|Abort|End} Transaction Statement * ---------------------- */ -typedef struct TransactionStmt { - NodeTag type; - int command; /* BEGIN|END|ABORT */ -} TransactionStmt; +typedef struct TransactionStmt +{ + NodeTag type; + int command; /* BEGIN|END|ABORT */ +} TransactionStmt; /* ---------------------- - * Create View Statement + * Create View Statement * ---------------------- */ -typedef struct ViewStmt { - NodeTag type; - char *viewname; /* name of the view */ - Query *query; /* the SQL statement */ -} ViewStmt; +typedef struct ViewStmt +{ + NodeTag type; + char *viewname; /* name of the view */ + Query *query; /* the SQL statement */ +} ViewStmt; /* ---------------------- - * Load Statement + * Load Statement * ---------------------- */ -typedef struct LoadStmt { - NodeTag type; - char *filename; /* file to load */ -} LoadStmt; +typedef struct LoadStmt +{ + NodeTag type; + char *filename; /* file to load */ +} LoadStmt; /* ---------------------- - * Createdb Statement + * Createdb Statement * ---------------------- */ -typedef struct CreatedbStmt { - NodeTag type; - char *dbname; /* database to create */ -} CreatedbStmt; +typedef struct CreatedbStmt +{ + NodeTag type; + char *dbname; /* database to create */ +} CreatedbStmt; /* ---------------------- - * Destroydb Statement + * Destroydb Statement * ---------------------- */ -typedef struct DestroydbStmt { - NodeTag type; - char *dbname; /* database to drop */ -} DestroydbStmt; +typedef struct DestroydbStmt +{ + NodeTag type; + char *dbname; /* database to drop */ +} DestroydbStmt; /* ---------------------- - * Cluster Statement (support pbrown's cluster index implementation) + * Cluster Statement (support pbrown's cluster index implementation) * ---------------------- */ -typedef struct ClusterStmt { - NodeTag type; - char *relname; /* relation being indexed */ - char *indexname; /* original index defined */ -} ClusterStmt; +typedef struct ClusterStmt +{ + NodeTag type; + char *relname; /* relation being indexed */ + char *indexname; /* original index defined */ +} ClusterStmt; /* ---------------------- - * Vacuum Statement + * Vacuum Statement * ---------------------- */ -typedef struct VacuumStmt { - NodeTag type; - bool verbose; /* print status info */ - bool analyze; /* analyze data */ - char *vacrel; /* table to vacuum */ - List *va_spec; /* columns to analyse */ -} VacuumStmt; +typedef struct VacuumStmt +{ + NodeTag type; + bool verbose; /* print status info */ + bool analyze; /* analyze data */ + char *vacrel; /* table to vacuum */ + List *va_spec; /* columns to analyse */ +} VacuumStmt; /* ---------------------- - * Explain Statement + * Explain Statement * ---------------------- */ -typedef struct ExplainStmt { - NodeTag type; - Query *query; /* the query */ - bool verbose; /* print plan info */ -} ExplainStmt; +typedef struct ExplainStmt +{ + NodeTag type; + Query *query; /* the query */ + bool verbose; /* print plan info */ +} ExplainStmt; /* ---------------------- * Set Statement * ---------------------- */ -typedef struct VariableSetStmt { - NodeTag type; - char *name; - char *value; -} VariableSetStmt; +typedef struct VariableSetStmt +{ + NodeTag type; + char *name; + char *value; +} VariableSetStmt; /* ---------------------- * Show Statement * ---------------------- */ -typedef struct VariableShowStmt { - NodeTag type; - char *name; -} VariableShowStmt; +typedef struct VariableShowStmt +{ + NodeTag type; + char *name; +} VariableShowStmt; /* ---------------------- * Reset Statement * ---------------------- */ -typedef struct VariableResetStmt { - NodeTag type; - char *name; -} VariableResetStmt; +typedef struct VariableResetStmt +{ + NodeTag type; + char *name; +} VariableResetStmt; /***************************************************************************** - * Optimizable Statements + * Optimizable Statements *****************************************************************************/ /* ---------------------- - * Insert Statement + * Insert Statement * ---------------------- */ -typedef struct AppendStmt { - NodeTag type; - char *relname; /* relation to insert into */ - List *cols; /* names of the columns */ - List *targetList; /* the target list (of ResTarget) */ - List *fromClause; /* the from clause */ - Node *whereClause; /* qualifications */ -} AppendStmt; +typedef struct AppendStmt +{ + NodeTag type; + char *relname; /* relation to insert into */ + List *cols; /* names of the columns */ + List *targetList; /* the target list (of ResTarget) */ + List *fromClause; /* the from clause */ + Node *whereClause;/* qualifications */ +} AppendStmt; /* ---------------------- - * Delete Statement + * Delete Statement * ---------------------- */ -typedef struct DeleteStmt { - NodeTag type; - char *relname; /* relation to delete from */ - Node *whereClause; /* qualifications */ -} DeleteStmt; +typedef struct DeleteStmt +{ + NodeTag type; + char *relname; /* relation to delete from */ + Node *whereClause;/* qualifications */ +} DeleteStmt; /* ---------------------- - * Update Statement + * Update Statement * ---------------------- */ -typedef struct ReplaceStmt { - NodeTag type; - char *relname; /* relation to update */ - List *targetList; /* the target list (of ResTarget) */ - Node *whereClause; /* qualifications */ - List *fromClause; /* the from clause */ -} ReplaceStmt; +typedef struct ReplaceStmt +{ + NodeTag type; + char *relname; /* relation to update */ + List *targetList; /* the target list (of ResTarget) */ + Node *whereClause;/* qualifications */ + List *fromClause; /* the from clause */ +} ReplaceStmt; /* ---------------------- - * Create Cursor Statement + * Create Cursor Statement * ---------------------- */ -typedef struct CursorStmt { - NodeTag type; - char *portalname; /* the portal (cursor) to create */ - bool binary; /* a binary (internal) portal? */ - char *unique; /* NULL, "*", or unique attribute name */ - List *targetList; /* the target list (of ResTarget) */ - List *fromClause; /* the from clause */ - Node *whereClause; /* qualifications */ - List *groupClause; /* group by clause */ - List *sortClause; /* sort clause (a list of SortGroupBy's) */ -} CursorStmt; +typedef struct CursorStmt +{ + NodeTag type; + char *portalname; /* the portal (cursor) to create */ + bool binary; /* a binary (internal) portal? */ + char *unique; /* NULL, "*", or unique attribute name */ + List *targetList; /* the target list (of ResTarget) */ + List *fromClause; /* the from clause */ + Node *whereClause;/* qualifications */ + List *groupClause;/* group by clause */ + List *sortClause; /* sort clause (a list of SortGroupBy's) */ +} CursorStmt; /* ---------------------- - * Select Statement + * Select Statement * ---------------------- */ -typedef struct RetrieveStmt { - NodeTag type; - char *unique; /* NULL, '*', or unique attribute name */ - char *into; /* name of table (for select into table) */ - List *targetList; /* the target list (of ResTarget) */ - List *fromClause; /* the from clause */ - Node *whereClause; /* qualifications */ - List *groupClause; /* group by clause */ - Node *havingClause; /* having conditional-expression */ - List *selectClause; /* subselect parameters */ - List *sortClause; /* sort clause (a list of SortGroupBy's) */ -} RetrieveStmt; +typedef struct RetrieveStmt +{ + NodeTag type; + char *unique; /* NULL, '*', or unique attribute name */ + char *into; /* name of table (for select into table) */ + List *targetList; /* the target list (of ResTarget) */ + List *fromClause; /* the from clause */ + Node *whereClause;/* qualifications */ + List *groupClause;/* group by clause */ + Node *havingClause; /* having conditional-expression */ + List *selectClause; /* subselect parameters */ + List *sortClause; /* sort clause (a list of SortGroupBy's) */ +} RetrieveStmt; /**************************************************************************** - * Supporting data structures for Parse Trees + * Supporting data structures for Parse Trees ****************************************************************************/ /* * SubSelect - specifies subselect parameters */ -typedef struct SubSelect { - NodeTag type; - char *unique; /* NULL, '*', or unique attribute name */ - List *targetList; /* the target list (of ResTarget) */ - List *fromClause; /* the from clause */ - Node *whereClause; /* qualifications */ - List *groupClause; /* group by clause */ - Node *havingClause; /* having conditional-expression */ -} SubSelect; +typedef struct SubSelect +{ + NodeTag type; + char *unique; /* NULL, '*', or unique attribute name */ + List *targetList; /* the target list (of ResTarget) */ + List *fromClause; /* the from clause */ + Node *whereClause;/* qualifications */ + List *groupClause;/* group by clause */ + Node *havingClause; /* having conditional-expression */ +} SubSelect; /* * TypeName - specifies a type in definitions */ -typedef struct TypeName { - NodeTag type; - char *name; /* name of the type */ - bool timezone; /* timezone specified? */ - bool setof; /* is a set? */ - List *arrayBounds; /* array bounds */ - int typlen; /* length for char() and varchar() */ -} TypeName; +typedef struct TypeName +{ + NodeTag type; + char *name; /* name of the type */ + bool timezone; /* timezone specified? */ + bool setof; /* is a set? */ + List *arrayBounds;/* array bounds */ + int typlen; /* length for char() and varchar() */ +} TypeName; /* * ParamNo - specifies a parameter reference */ -typedef struct ParamNo { - NodeTag type; - int number; /* the number of the parameter */ - TypeName *typename; /* the typecast */ -} ParamNo; +typedef struct ParamNo +{ + NodeTag type; + int number; /* the number of the parameter */ + TypeName *typename; /* the typecast */ +} ParamNo; /* * A_Expr - binary expressions */ -typedef struct A_Expr { - NodeTag type; - int oper; /* type of operation - {OP,OR,AND,NOT,ISNULL,NOTNULL} */ - char *opname; /* name of operator/function */ - Node *lexpr; /* left argument */ - Node *rexpr; /* right argument */ -} A_Expr; +typedef struct A_Expr +{ + NodeTag type; + int oper; /* type of operation + * {OP,OR,AND,NOT,ISNULL,NOTNULL} */ + char *opname; /* name of operator/function */ + Node *lexpr; /* left argument */ + Node *rexpr; /* right argument */ +} A_Expr; /* * Attr - - * specifies an Attribute (ie. a Column); could have nested dots or - * array references. + * specifies an Attribute (ie. a Column); could have nested dots or + * array references. * */ -typedef struct Attr { - NodeTag type; - char *relname; /* name of relation (can be "*") */ - ParamNo *paramNo; /* or a parameter */ - List *attrs; /* attributes (possibly nested); - list of Values (strings) */ - List *indirection; /* array refs (list of A_Indices') */ -} Attr; +typedef struct Attr +{ + NodeTag type; + char *relname; /* name of relation (can be "*") */ + ParamNo *paramNo; /* or a parameter */ + List *attrs; /* attributes (possibly nested); list of + * Values (strings) */ + List *indirection;/* array refs (list of A_Indices') */ +} Attr; /* * A_Const - a constant expression */ -typedef struct A_Const { - NodeTag type; - Value val; /* the value (with the tag) */ - TypeName *typename; /* typecast */ -} A_Const; +typedef struct A_Const +{ + NodeTag type; + Value val; /* the value (with the tag) */ + TypeName *typename; /* typecast */ +} A_Const; /* * ColumnDef - column definition (used in various creates) */ -typedef struct ColumnDef { - NodeTag type; - char *colname; /* name of column */ - TypeName *typename; /* type of column */ - bool is_not_null; /* flag to NOT NULL constraint */ - char *defval; /* default value of column */ -} ColumnDef; +typedef struct ColumnDef +{ + NodeTag type; + char *colname; /* name of column */ + TypeName *typename; /* type of column */ + bool is_not_null;/* flag to NOT NULL constraint */ + char *defval; /* default value of column */ +} ColumnDef; /* - * Ident - - * an identifier (could be an attribute or a relation name). Depending - * on the context at transformStmt time, the identifier is treated as - * either a relation name (in which case, isRel will be set) or an - * attribute (in which case, it will be transformed into an Attr). - */ -typedef struct Ident { - NodeTag type; - char *name; /* its name */ - List *indirection; /* array references */ - bool isRel; /* is a relation - filled in by - transformExpr() */ -} Ident; + * Ident - + * an identifier (could be an attribute or a relation name). Depending + * on the context at transformStmt time, the identifier is treated as + * either a relation name (in which case, isRel will be set) or an + * attribute (in which case, it will be transformed into an Attr). + */ +typedef struct Ident +{ + NodeTag type; + char *name; /* its name */ + List *indirection;/* array references */ + bool isRel; /* is a relation - filled in by + * transformExpr() */ +} Ident; /* * FuncCall - a function/aggregate invocation */ -typedef struct FuncCall { - NodeTag type; - char *funcname; /* name of function */ - List *args; /* the arguments (list of exprs) */ -} FuncCall; +typedef struct FuncCall +{ + NodeTag type; + char *funcname; /* name of function */ + List *args; /* the arguments (list of exprs) */ +} FuncCall; /* * A_Indices - array reference or bounds ([lidx:uidx] or [uidx]) */ -typedef struct A_Indices { - NodeTag type; - Node *lidx; /* could be NULL */ - Node *uidx; -} A_Indices; +typedef struct A_Indices +{ + NodeTag type; + Node *lidx; /* could be NULL */ + Node *uidx; +} A_Indices; /* - * ResTarget - - * result target (used in target list of pre-transformed Parse trees) - */ -typedef struct ResTarget { - NodeTag type; - char *name; /* name of the result column */ - List *indirection; /* array references */ - Node *val; /* the value of the result - (A_Expr or Attr) (or A_Const) */ -} ResTarget; + * ResTarget - + * result target (used in target list of pre-transformed Parse trees) + */ +typedef struct ResTarget +{ + NodeTag type; + char *name; /* name of the result column */ + List *indirection;/* array references */ + Node *val; /* the value of the result (A_Expr or + * Attr) (or A_Const) */ +} ResTarget; /* * ParamString - used in with clauses */ -typedef struct ParamString { - NodeTag type; - char *name; - char *val; -} ParamString; +typedef struct ParamString +{ + NodeTag type; + char *name; + char *val; +} ParamString; /* * TimeRange - specifies a time range */ -typedef struct TimeRange { - NodeTag type; - char *startDate; - char *endDate; /* snapshot if NULL */ -} TimeRange; +typedef struct TimeRange +{ + NodeTag type; + char *startDate; + char *endDate; /* snapshot if NULL */ +} TimeRange; /* * RelExpr - relation expressions */ -typedef struct RelExpr { - NodeTag type; - char *relname; /* the relation name */ - bool inh; /* inheritance query */ - TimeRange *timeRange; /* the time range */ -} RelExpr; +typedef struct RelExpr +{ + NodeTag type; + char *relname; /* the relation name */ + bool inh; /* inheritance query */ + TimeRange *timeRange; /* the time range */ +} RelExpr; /* * SortGroupBy - for order by clause */ -typedef struct SortGroupBy { - NodeTag type; - int resno; /* target number */ - char *range; - char *name; /* name of column to sort on */ - char *useOp; /* operator to use */ -} SortGroupBy; +typedef struct SortGroupBy +{ + NodeTag type; + int resno; /* target number */ + char *range; + char *name; /* name of column to sort on */ + char *useOp; /* operator to use */ +} SortGroupBy; /* * RangeVar - range variable, used in from clauses */ -typedef struct RangeVar { - NodeTag type; - RelExpr *relExpr; /* the relation expression */ - char *name; /* the name to be referenced - (optional) */ -} RangeVar; +typedef struct RangeVar +{ + NodeTag type; + RelExpr *relExpr; /* the relation expression */ + char *name; /* the name to be referenced (optional) */ +} RangeVar; /* * IndexElem - index parameters (used in create index) */ -typedef struct IndexElem { - NodeTag type; - char *name; /* name of index */ - List *args; /* if not NULL, function index */ - char *class; - TypeName *tname; /* type of index's keys (optional) */ -} IndexElem; +typedef struct IndexElem +{ + NodeTag type; + char *name; /* name of index */ + List *args; /* if not NULL, function index */ + char *class; + TypeName *tname; /* type of index's keys (optional) */ +} IndexElem; /* * DefElem - - * a definition (used in definition lists in the form of defname = arg) + * a definition (used in definition lists in the form of defname = arg) */ -typedef struct DefElem { - NodeTag type; - char *defname; - Node *arg; /* a (Value *) or a (TypeName *) */ -} DefElem; +typedef struct DefElem +{ + NodeTag type; + char *defname; + Node *arg; /* a (Value *) or a (TypeName *) */ +} DefElem; /**************************************************************************** - * Nodes for a Query tree + * Nodes for a Query tree ****************************************************************************/ /* * TargetEntry - - * a target entry (used in the transformed target list) + * a target entry (used in the transformed target list) * * one of resdom or fjoin is not NULL. a target list is - * ((<resdom | fjoin> expr) (<resdom | fjoin> expr) ...) + * ((<resdom | fjoin> expr) (<resdom | fjoin> expr) ...) */ -typedef struct TargetEntry { - NodeTag type; - Resdom *resdom; /* fjoin overload this to be a list??*/ - Fjoin *fjoin; - Node *expr; /* can be a list too */ -} TargetEntry; +typedef struct TargetEntry +{ + NodeTag type; + Resdom *resdom; /* fjoin overload this to be a list?? */ + Fjoin *fjoin; + Node *expr; /* can be a list too */ +} TargetEntry; /* * RangeTblEntry - - * used in range tables. Some of the following are only used in one of - * the parsing, optimizing, execution stages. + * used in range tables. Some of the following are only used in one of + * the parsing, optimizing, execution stages. * - * inFromCl marks those range variables that are listed in the from clause. - * In SQL, the targetlist can only refer to range variables listed in the - * from clause but POSTQUEL allows you to refer to tables not specified, in - * which case a range table entry will be generated. We use POSTQUEL - * semantics which is more powerful. However, we need SQL semantics in - * some cases (eg. when expanding a '*') - */ -typedef struct RangeTblEntry { - NodeTag type; - char *relname; /* real name of the relation */ - TimeRange *timeRange; /* time range */ - char *refname; /* the reference name (specified in - the from clause) */ - Oid relid; - bool inh; /* inheritance? */ - bool archive; /* filled in by plan_archive */ - bool inFromCl; /* comes from From Clause */ - TimeQual timeQual; /* filled in by pg_plan */ -} RangeTblEntry; + * inFromCl marks those range variables that are listed in the from clause. + * In SQL, the targetlist can only refer to range variables listed in the + * from clause but POSTQUEL allows you to refer to tables not specified, in + * which case a range table entry will be generated. We use POSTQUEL + * semantics which is more powerful. However, we need SQL semantics in + * some cases (eg. when expanding a '*') + */ +typedef struct RangeTblEntry +{ + NodeTag type; + char *relname; /* real name of the relation */ + TimeRange *timeRange; /* time range */ + char *refname; /* the reference name (specified in the + * from clause) */ + Oid relid; + bool inh; /* inheritance? */ + bool archive; /* filled in by plan_archive */ + bool inFromCl; /* comes from From Clause */ + TimeQual timeQual; /* filled in by pg_plan */ +} RangeTblEntry; /* * SortClause - - * used in the sort clause for retrieves and cursors + * used in the sort clause for retrieves and cursors */ -typedef struct SortClause { - NodeTag type; - Resdom *resdom; /* attributes in tlist to be sorted */ - Oid opoid; /* sort operators */ -} SortClause; +typedef struct SortClause +{ + NodeTag type; + Resdom *resdom; /* attributes in tlist to be sorted */ + Oid opoid; /* sort operators */ +} SortClause; /* * GroupClause - - * used in the GROUP BY clause + * used in the GROUP BY clause */ -typedef struct GroupClause { - NodeTag type; - TargetEntry *entry; /* attributes to group on */ - Oid grpOpoid; /* the sort operator to use */ -} GroupClause; +typedef struct GroupClause +{ + NodeTag type; + TargetEntry *entry; /* attributes to group on */ + Oid grpOpoid; /* the sort operator to use */ +} GroupClause; -#endif /* PARSENODES_H */ +#endif /* PARSENODES_H */ diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h index b3848fb59fa..9afe6dfac5e 100644 --- a/src/include/nodes/pg_list.h +++ b/src/include/nodes/pg_list.h @@ -1,116 +1,120 @@ /*------------------------------------------------------------------------- * * pg_list.h-- - * POSTGRES generic list package + * POSTGRES generic list package * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_list.h,v 1.5 1997/08/19 21:38:51 momjian Exp $ + * $Id: pg_list.h,v 1.6 1997/09/07 04:58:45 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PG_LIST_H -#define PG_LIST_H +#ifndef PG_LIST_H +#define PG_LIST_H #include <nodes/nodes.h> /* ---------------------------------------------------------------- - * node definitions + * node definitions * ---------------------------------------------------------------- */ /*---------------------- - * Value node + * Value node *---------------------- */ -typedef struct Value { - NodeTag type; /* tag appropriately (eg. T_String) */ - union ValUnion { - char *str; /* string */ - long ival; - double dval; - } val; -} Value; - -#define intVal(v) (((Value *)v)->val.ival) -#define floatVal(v) (((Value *)v)->val.dval) -#define strVal(v) (((Value *)v)->val.str) +typedef struct Value +{ + NodeTag type; /* tag appropriately (eg. T_String) */ + union ValUnion + { + char *str; /* string */ + long ival; + double dval; + } val; +} Value; + +#define intVal(v) (((Value *)v)->val.ival) +#define floatVal(v) (((Value *)v)->val.dval) +#define strVal(v) (((Value *)v)->val.str) /*---------------------- - * List node + * List node *---------------------- */ -typedef struct List { - NodeTag type; - union { - void *ptr_value; - int int_value; - } elem; - struct List *next; -} List; - -#define NIL ((List *) NULL) +typedef struct List +{ + NodeTag type; + union + { + void *ptr_value; + int int_value; + } elem; + struct List *next; +} List; + +#define NIL ((List *) NULL) /* ---------------- - * accessor macros + * accessor macros * ---------------- */ /* anything that doesn't end in 'i' is assumed to be referring to the */ -/* pointer version of the list (where it makes a difference) */ -#define lfirst(l) ((l)->elem.ptr_value) -#define lnext(l) ((l)->next) -#define lsecond(l) (lfirst(lnext(l))) +/* pointer version of the list (where it makes a difference) */ +#define lfirst(l) ((l)->elem.ptr_value) +#define lnext(l) ((l)->next) +#define lsecond(l) (lfirst(lnext(l))) -#define lfirsti(l) ((l)->elem.int_value) +#define lfirsti(l) ((l)->elem.int_value) /* * foreach - - * a convenience macro which loops through the list + * a convenience macro which loops through the list */ -#define foreach(_elt_,_list_) \ - for(_elt_=_list_; _elt_!=NIL;_elt_=lnext(_elt_)) +#define foreach(_elt_,_list_) \ + for(_elt_=_list_; _elt_!=NIL;_elt_=lnext(_elt_)) /* * function prototypes in nodes/list.c */ -extern int length(List *list); -extern List *append(List *list1, List *list2); -extern List *nconc(List *list1, List *list2); -extern List *lcons(void *datum, List *list); -extern bool member(void *foo, List *bar); -extern Value *makeInteger(long i); -extern Value *makeFloat(double d); -extern Value *makeString(char *str); -extern List *makeList(void *elem, ...); -extern List *lappend(List *list, void *obj); -extern List *lremove(void *elem, List *list); -extern void freeList(List *list); -extern List *LispRemove(void *elem, List *list); - -extern void *nth(int n, List *l); -extern void set_nth(List *l, int n, void *elem); - -List *lconsi(int datum, List *list); -List *lappendi(List *list, int datum); -extern bool intMember(int, List *); -extern List *intAppend(List *list1, List *list2); - -extern int nthi(int n, List *l); - -extern List *nreverse(List *); -extern List *set_difference(List *, List *); -extern List *set_differencei(List *, List *); -extern List *LispUnion(List *foo, List *bar); -extern List *LispUnioni(List *foo, List *bar); -extern bool same(List *foo, List *bar); +extern int length(List * list); +extern List *append(List * list1, List * list2); +extern List *nconc(List * list1, List * list2); +extern List *lcons(void *datum, List * list); +extern bool member(void *foo, List * bar); +extern Value *makeInteger(long i); +extern Value *makeFloat(double d); +extern Value *makeString(char *str); +extern List *makeList(void *elem,...); +extern List *lappend(List * list, void *obj); +extern List *lremove(void *elem, List * list); +extern void freeList(List * list); +extern List *LispRemove(void *elem, List * list); + +extern void *nth(int n, List * l); +extern void set_nth(List * l, int n, void *elem); + +List *lconsi(int datum, List * list); +List *lappendi(List * list, int datum); +extern bool intMember(int, List *); +extern List *intAppend(List * list1, List * list2); + +extern int nthi(int n, List * l); + +extern List *nreverse(List *); +extern List *set_difference(List *, List *); +extern List *set_differencei(List *, List *); +extern List *LispUnion(List * foo, List * bar); +extern List *LispUnioni(List * foo, List * bar); +extern bool same(List * foo, List * bar); /* should be in nodes.h but needs List */ /* in copyfuncs.c */ -extern List *listCopy(List *); +extern List *listCopy(List *); -#endif /* PG_LIST_H */ +#endif /* PG_LIST_H */ diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 6e786c34f0e..3353602e02c 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -1,90 +1,91 @@ /*------------------------------------------------------------------------- * * plannodes.h-- - * definitions for query plan nodes + * definitions for query plan nodes * * * Copyright (c) 1994, Regents of the University of California * - * $Id: plannodes.h,v 1.6 1997/08/06 03:42:04 momjian Exp $ + * $Id: plannodes.h,v 1.7 1997/09/07 04:58:46 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef PLANNODES_H -#define PLANNODES_H +#define PLANNODES_H #include <nodes/execnodes.h> /* ---------------------------------------------------------------- - * Executor State types are used in the plannode structures - * so we have to include their definitions too. + * Executor State types are used in the plannode structures + * so we have to include their definitions too. * - * Node Type node information used by executor + * Node Type node information used by executor * * control nodes * - * Existential ExistentialState exstate; - * Result ResultState resstate; - * Append AppendState unionstate; + * Existential ExistentialState exstate; + * Result ResultState resstate; + * Append AppendState unionstate; * * scan nodes * - * Scan *** CommonScanState scanstate; - * IndexScan IndexScanState indxstate; + * Scan *** CommonScanState scanstate; + * IndexScan IndexScanState indxstate; * - * (*** nodes which inherit Scan also inherit scanstate) + * (*** nodes which inherit Scan also inherit scanstate) * * join nodes * - * NestLoop NestLoopState nlstate; - * MergeJoin MergeJoinState mergestate; - * HashJoin HashJoinState hashjoinstate; + * NestLoop NestLoopState nlstate; + * MergeJoin MergeJoinState mergestate; + * HashJoin HashJoinState hashjoinstate; * * materialize nodes * - * Material MaterialState matstate; - * Sort SortState sortstate; - * Unique UniqueState uniquestate; - * Hash HashState hashstate; + * Material MaterialState matstate; + * Sort SortState sortstate; + * Unique UniqueState uniquestate; + * Hash HashState hashstate; * * ---------------------------------------------------------------- */ /* ---------------------------------------------------------------- - * node definitions + * node definitions * ---------------------------------------------------------------- */ /* ---------------- - * Plan node + * Plan node * ---------------- */ -typedef struct Plan { - NodeTag type; - Cost cost; - int plan_size; - int plan_width; - int plan_tupperpage; - EState *state; /* at execution time, state's of individual - nodes point to one EState for the - whole top-level plan */ - List *targetlist; - List *qual; /* Node* or List* ?? */ - struct Plan *lefttree; - struct Plan *righttree; -} Plan; +typedef struct Plan +{ + NodeTag type; + Cost cost; + int plan_size; + int plan_width; + int plan_tupperpage; + EState *state; /* at execution time, state's of + * individual nodes point to one EState + * for the whole top-level plan */ + List *targetlist; + List *qual; /* Node* or List* ?? */ + struct Plan *lefttree; + struct Plan *righttree; +} Plan; /* ---------------- - * these are are defined to avoid confusion problems with "left" - * and "right" and "inner" and "outer". The convention is that - * the "left" plan is the "outer" plan and the "right" plan is - * the inner plan, but these make the code more readable. + * these are are defined to avoid confusion problems with "left" + * and "right" and "inner" and "outer". The convention is that + * the "left" plan is the "outer" plan and the "right" plan is + * the inner plan, but these make the code more readable. * ---------------- */ -#define innerPlan(node) (((Plan *)(node))->righttree) -#define outerPlan(node) (((Plan *)(node))->lefttree) +#define innerPlan(node) (((Plan *)(node))->righttree) +#define outerPlan(node) (((Plan *)(node))->lefttree) /* @@ -100,61 +101,65 @@ typedef struct Plan { /* ---------------- - * existential node + * existential node * ---------------- */ typedef Plan Existential; /* ---------------- - * result node - - * returns tuples from outer plan that satisfy the qualifications + * result node - + * returns tuples from outer plan that satisfy the qualifications * ---------------- */ -typedef struct Result { - Plan plan; - Node *resconstantqual; - ResultState *resstate; -} Result; +typedef struct Result +{ + Plan plan; + Node *resconstantqual; + ResultState *resstate; +} Result; /* ---------------- - * append node + * append node * ---------------- */ -typedef struct Append { - Plan plan; - List *unionplans; - Index unionrelid; - List *unionrtentries; - AppendState *unionstate; -} Append; +typedef struct Append +{ + Plan plan; + List *unionplans; + Index unionrelid; + List *unionrtentries; + AppendState *unionstate; +} Append; /* * ========== * Scan nodes * ========== */ -typedef struct Scan { - Plan plan; - Index scanrelid; /* relid is index into the range table */ - CommonScanState *scanstate; -} Scan; +typedef struct Scan +{ + Plan plan; + Index scanrelid; /* relid is index into the range table */ + CommonScanState *scanstate; +} Scan; /* ---------------- - * sequential scan node + * sequential scan node * ---------------- */ typedef Scan SeqScan; /* ---------------- - * index scan node + * index scan node * ---------------- */ -typedef struct IndexScan { - Scan scan; - List *indxid; - List *indxqual; - IndexScanState *indxstate; -} IndexScan; +typedef struct IndexScan +{ + Scan scan; + List *indxid; + List *indxqual; + IndexScanState *indxstate; +} IndexScan; /* * ========== @@ -163,165 +168,179 @@ typedef struct IndexScan { */ /* ---------------- - * Join node + * Join node * ---------------- */ -typedef Plan Join; +typedef Plan Join; /* ---------------- - * nest loop join node + * nest loop join node * ---------------- */ -typedef struct NestLoop { - Join join; - NestLoopState *nlstate; -} NestLoop; +typedef struct NestLoop +{ + Join join; + NestLoopState *nlstate; +} NestLoop; /* ---------------- - * merge join node + * merge join node * ---------------- */ -typedef struct MergeJoin { - Join join; - List *mergeclauses; - Oid mergesortop; - Oid *mergerightorder; /* inner sort operator */ - Oid *mergeleftorder; /* outer sort operator */ - MergeJoinState *mergestate; -} MergeJoin; +typedef struct MergeJoin +{ + Join join; + List *mergeclauses; + Oid mergesortop; + Oid *mergerightorder; /* inner sort operator */ + Oid *mergeleftorder; /* outer sort operator */ + MergeJoinState *mergestate; +} MergeJoin; /* ---------------- - * hash join (probe) node + * hash join (probe) node * ---------------- */ -typedef struct HashJoin { - Join join; - List *hashclauses; - Oid hashjoinop; - HashJoinState *hashjoinstate; - HashJoinTable hashjointable; - IpcMemoryKey hashjointablekey; - int hashjointablesize; - bool hashdone; -} HashJoin; +typedef struct HashJoin +{ + Join join; + List *hashclauses; + Oid hashjoinop; + HashJoinState *hashjoinstate; + HashJoinTable hashjointable; + IpcMemoryKey hashjointablekey; + int hashjointablesize; + bool hashdone; +} HashJoin; /* --------------- - * aggregate node + * aggregate node * --------------- */ -typedef struct Agg { - Plan plan; - int numAgg; - Aggreg **aggs; - AggState *aggstate; -} Agg; +typedef struct Agg +{ + Plan plan; + int numAgg; + Aggreg **aggs; + AggState *aggstate; +} Agg; /* --------------- - * group node - - * use for queries with GROUP BY specified. + * group node - + * use for queries with GROUP BY specified. * - * If tuplePerGroup is true, one tuple (with group columns only) is - * returned for each group and NULL is returned when there are no more - * groups. Otherwise, all the tuples of a group are returned with a - * NULL returned at the end of each group. (see nodeGroup.c for details) + * If tuplePerGroup is true, one tuple (with group columns only) is + * returned for each group and NULL is returned when there are no more + * groups. Otherwise, all the tuples of a group are returned with a + * NULL returned at the end of each group. (see nodeGroup.c for details) * --------------- */ -typedef struct Group { - Plan plan; - bool tuplePerGroup; /* what tuples to return (see above) */ - int numCols; /* number of group columns */ - AttrNumber *grpColIdx; /* index into the target list */ - GroupState *grpstate; -} Group; +typedef struct Group +{ + Plan plan; + bool tuplePerGroup; /* what tuples to return (see + * above) */ + int numCols; /* number of group columns */ + AttrNumber *grpColIdx; /* index into the target list */ + GroupState *grpstate; +} Group; /* * ========== * Temp nodes * ========== */ -typedef struct Temp { - Plan plan; - Oid tempid; - int keycount; -} Temp; +typedef struct Temp +{ + Plan plan; + Oid tempid; + int keycount; +} Temp; /* ---------------- - * materialization node + * materialization node * ---------------- */ -typedef struct Material { - Plan plan; /* temp node flattened out */ - Oid tempid; - int keycount; - MaterialState *matstate; -} Material; +typedef struct Material +{ + Plan plan; /* temp node flattened out */ + Oid tempid; + int keycount; + MaterialState *matstate; +} Material; /* ---------------- - * sort node + * sort node * ---------------- */ -typedef struct Sort { - Plan plan; /* temp node flattened out */ - Oid tempid; - int keycount; - SortState *sortstate; - void *psortstate; - bool cleaned; -} Sort; +typedef struct Sort +{ + Plan plan; /* temp node flattened out */ + Oid tempid; + int keycount; + SortState *sortstate; + void *psortstate; + bool cleaned; +} Sort; /* ---------------- - * unique node + * unique node * ---------------- */ -typedef struct Unique { - Plan plan; /* temp node flattened out */ - Oid tempid; - int keycount; - char *uniqueAttr; /* NULL if all attrs, - or unique attribute name */ - AttrNumber uniqueAttrNum; /* attribute number of attribute - to select distinct on */ - UniqueState *uniquestate; -} Unique; +typedef struct Unique +{ + Plan plan; /* temp node flattened out */ + Oid tempid; + int keycount; + char *uniqueAttr; /* NULL if all attrs, or unique attribute + * name */ + AttrNumber uniqueAttrNum; /* attribute number of attribute + * to select distinct on */ + UniqueState *uniquestate; +} Unique; /* ---------------- - * hash build node + * hash build node * ---------------- */ -typedef struct Hash { - Plan plan; - Var *hashkey; - HashState *hashstate; - HashJoinTable hashtable; - IpcMemoryKey hashtablekey; - int hashtablesize; -} Hash; +typedef struct Hash +{ + Plan plan; + Var *hashkey; + HashState *hashstate; + HashJoinTable hashtable; + IpcMemoryKey hashtablekey; + int hashtablesize; +} Hash; /* --------------------- - * choose node + * choose node * --------------------- */ -typedef struct Choose { - Plan plan; - List *chooseplanlist; -} Choose; +typedef struct Choose +{ + Plan plan; + List *chooseplanlist; +} Choose; /* ------------------- - * Tee node information + * Tee node information * - * leftParent : the left parent of this node - * rightParent: the right parent of this node + * leftParent : the left parent of this node + * rightParent: the right parent of this node * ------------------- */ -typedef struct Tee { - Plan plan; - Plan* leftParent; - Plan* rightParent; - TeeState *teestate; - char *teeTableName; /* the name of the table to materialize - the tee into */ - List *rtentries; /* the range table for the plan below the Tee - may be different than the parent plans */ -} Tee; - -#endif /* PLANNODES_H */ +typedef struct Tee +{ + Plan plan; + Plan *leftParent; + Plan *rightParent; + TeeState *teestate; + char *teeTableName; /* the name of the table to + * materialize the tee into */ + List *rtentries; /* the range table for the plan below the + * Tee may be different than the parent + * plans */ +} Tee; + +#endif /* PLANNODES_H */ diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index cd30f229c9c..66d5a52a17e 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -1,312 +1,324 @@ /*------------------------------------------------------------------------- * * primnodes.h-- - * Definitions for parse tree/query tree ("primitive") nodes. + * Definitions for parse tree/query tree ("primitive") nodes. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: primnodes.h,v 1.7 1997/01/22 01:43:44 momjian Exp $ + * $Id: primnodes.h,v 1.8 1997/09/07 04:58:46 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef PRIMNODES_H -#define PRIMNODES_H +#define PRIMNODES_H #include <utils/fcache.h> #include <access/attnum.h> #include <nodes/pg_list.h> /* ---------------------------------------------------------------- - * node definitions + * node definitions * ---------------------------------------------------------------- */ /* ---------------- * Resdom (Result Domain) - * resno - attribute number - * restype - type of the resdom - * reslen - length (in bytes) of the result - * resname - name of the resdom (could be NULL) - * reskey - order of key in a sort (for those > 0) - * reskeyop - sort operator Oid - * resjunk - set to nonzero to eliminate the attribute - * from final target list e.g., ctid for replace - * and delete + * resno - attribute number + * restype - type of the resdom + * reslen - length (in bytes) of the result + * resname - name of the resdom (could be NULL) + * reskey - order of key in a sort (for those > 0) + * reskeyop - sort operator Oid + * resjunk - set to nonzero to eliminate the attribute + * from final target list e.g., ctid for replace + * and delete * * ---------------- */ -typedef struct Resdom { - NodeTag type; - AttrNumber resno; - Oid restype; - int reslen; - char *resname; - Index reskey; - Oid reskeyop; - int resjunk; -} Resdom; +typedef struct Resdom +{ + NodeTag type; + AttrNumber resno; + Oid restype; + int reslen; + char *resname; + Index reskey; + Oid reskeyop; + int resjunk; +} Resdom; /* ------------- * Fjoin - * initialized - true if the Fjoin has already been initialized for - * the current target list evaluation - * nNodes - The number of Iter nodes returning sets that the - * node will flatten - * outerList - 1 or more Iter nodes - * inner - exactly one Iter node. We eval every node in the - * outerList once then eval the inner node to completion - * pair the outerList result vector with each inner - * result to form the full result. When the inner has - * been exhausted, we get the next outer result vector - * and reset the inner. - * results - The complete (flattened) result vector - * alwaysNull - a null vector to indicate sets with a cardinality of - * 0, we treat them as the set {NULL}. + * initialized - true if the Fjoin has already been initialized for + * the current target list evaluation + * nNodes - The number of Iter nodes returning sets that the + * node will flatten + * outerList - 1 or more Iter nodes + * inner - exactly one Iter node. We eval every node in the + * outerList once then eval the inner node to completion + * pair the outerList result vector with each inner + * result to form the full result. When the inner has + * been exhausted, we get the next outer result vector + * and reset the inner. + * results - The complete (flattened) result vector + * alwaysNull - a null vector to indicate sets with a cardinality of + * 0, we treat them as the set {NULL}. */ -typedef struct Fjoin { - NodeTag type; - bool fj_initialized; - int fj_nNodes; - List *fj_innerNode; - DatumPtr fj_results; - BoolPtr fj_alwaysDone; -} Fjoin; +typedef struct Fjoin +{ + NodeTag type; + bool fj_initialized; + int fj_nNodes; + List *fj_innerNode; + DatumPtr fj_results; + BoolPtr fj_alwaysDone; +} Fjoin; /* ---------------- * Expr - * typeOid - oid of the type of this expression - * opType - type of this expression - * oper - the Oper node if it is an OPER_EXPR or the - * Func node if it is a FUNC_EXPR - * args - arguments to this expression + * typeOid - oid of the type of this expression + * opType - type of this expression + * oper - the Oper node if it is an OPER_EXPR or the + * Func node if it is a FUNC_EXPR + * args - arguments to this expression * ---------------- */ -typedef enum OpType { - OP_EXPR, FUNC_EXPR, OR_EXPR, AND_EXPR, NOT_EXPR -} OpType; +typedef enum OpType +{ + OP_EXPR, FUNC_EXPR, OR_EXPR, AND_EXPR, NOT_EXPR +} OpType; -typedef struct Expr { - NodeTag type; - Oid typeOid; /* oid of the type of this expr */ - OpType opType; /* type of the op */ - Node *oper; /* could be Oper or Func */ - List *args; /* list of argument nodes */ -} Expr; +typedef struct Expr +{ + NodeTag type; + Oid typeOid; /* oid of the type of this expr */ + OpType opType; /* type of the op */ + Node *oper; /* could be Oper or Func */ + List *args; /* list of argument nodes */ +} Expr; /* ---------------- * Var - * varno - index of this var's relation in the range table - * (could be INNER or OUTER) - * varattno - attribute number of this var, or zero for all - * vartype - pg_type tuple oid for the type of this var - * varnoold - keep varno around in case it got changed to INNER/ - * OUTER (see match_varid) - * varoattno - attribute number of this var - * [ '(varnoold varoattno) was varid -ay 2/95] + * varno - index of this var's relation in the range table + * (could be INNER or OUTER) + * varattno - attribute number of this var, or zero for all + * vartype - pg_type tuple oid for the type of this var + * varnoold - keep varno around in case it got changed to INNER/ + * OUTER (see match_varid) + * varoattno - attribute number of this var + * [ '(varnoold varoattno) was varid -ay 2/95] * ---------------- */ -#define INNER 65000 -#define OUTER 65001 +#define INNER 65000 +#define OUTER 65001 -#define PRS2_CURRENT_VARNO 1 -#define PRS2_NEW_VARNO 2 +#define PRS2_CURRENT_VARNO 1 +#define PRS2_NEW_VARNO 2 -typedef struct Var { - NodeTag type; - Index varno; - AttrNumber varattno; - Oid vartype; - Index varnoold; /* only used by optimizer */ - AttrNumber varoattno; /* only used by optimizer */ -} Var; +typedef struct Var +{ + NodeTag type; + Index varno; + AttrNumber varattno; + Oid vartype; + Index varnoold; /* only used by optimizer */ + AttrNumber varoattno; /* only used by optimizer */ +} Var; /* ---------------- * Oper - * opno - PG_OPERATOR OID of the operator - * opid - PG_PROC OID for the operator - * opresulttype - PG_TYPE OID of the operator's return value - * opsize - size of return result (cached by executor) - * op_fcache - XXX comment me. + * opno - PG_OPERATOR OID of the operator + * opid - PG_PROC OID for the operator + * opresulttype - PG_TYPE OID of the operator's return value + * opsize - size of return result (cached by executor) + * op_fcache - XXX comment me. * * ---- * NOTE: in the good old days 'opno' used to be both (or either, or - * neither) the pg_operator oid, and/or the pg_proc oid depending + * neither) the pg_operator oid, and/or the pg_proc oid depending * on the postgres module in question (parser->pg_operator, * executor->pg_proc, planner->both), the mood of the programmer, * and the phase of the moon (rumors that it was also depending on the day * of the week are probably false). To make things even more postgres-like * (i.e. a mess) some comments were referring to 'opno' using the name * 'opid'. Anyway, now we have two separate fields, and of course that - * immediately removes all bugs from the code... [ sp :-) ]. + * immediately removes all bugs from the code... [ sp :-) ]. * ---------------- */ -typedef struct Oper { - NodeTag type; - Oid opno; - Oid opid; - Oid opresulttype; - int opsize; - FunctionCachePtr op_fcache; -} Oper; +typedef struct Oper +{ + NodeTag type; + Oid opno; + Oid opid; + Oid opresulttype; + int opsize; + FunctionCachePtr op_fcache; +} Oper; /* ---------------- * Const - * consttype - PG_TYPE OID of the constant's value - * constlen - length in bytes of the constant's value - * constvalue - the constant's value - * constisnull - whether the constant is null - * (if true, the other fields are undefined) - * constbyval - whether the information in constvalue - * if passed by value. If true, then all the information - * is stored in the datum. If false, then the datum - * contains a pointer to the information. - * constisset - whether the const represents a set. The const - * value corresponding will be the query that defines - * the set. + * consttype - PG_TYPE OID of the constant's value + * constlen - length in bytes of the constant's value + * constvalue - the constant's value + * constisnull - whether the constant is null + * (if true, the other fields are undefined) + * constbyval - whether the information in constvalue + * if passed by value. If true, then all the information + * is stored in the datum. If false, then the datum + * contains a pointer to the information. + * constisset - whether the const represents a set. The const + * value corresponding will be the query that defines + * the set. * ---------------- */ -typedef struct Const { - NodeTag type; - Oid consttype; - Size constlen; - Datum constvalue; - bool constisnull; - bool constbyval; - bool constisset; - bool constiscast; -} Const; +typedef struct Const +{ + NodeTag type; + Oid consttype; + Size constlen; + Datum constvalue; + bool constisnull; + bool constbyval; + bool constisset; + bool constiscast; +} Const; /* ---------------- * Param - * paramkind - specifies the kind of parameter. The possible values - * for this field are specified in "params.h", and they are: + * paramkind - specifies the kind of parameter. The possible values + * for this field are specified in "params.h", and they are: * - * PARAM_NAMED: The parameter has a name, i.e. something - * like `$.salary' or `$.foobar'. - * In this case field `paramname' must be a valid Name. + * PARAM_NAMED: The parameter has a name, i.e. something + * like `$.salary' or `$.foobar'. + * In this case field `paramname' must be a valid Name. * - * PARAM_NUM: The parameter has only a numeric identifier, - * i.e. something like `$1', `$2' etc. - * The number is contained in the `paramid' field. + * PARAM_NUM: The parameter has only a numeric identifier, + * i.e. something like `$1', `$2' etc. + * The number is contained in the `paramid' field. * - * PARAM_NEW: Used in PRS2 rule, similar to PARAM_NAMED. - * The `paramname' and `paramid' refer to the "NEW" tuple - * The `pramname' is the attribute name and `paramid' - * is the attribute number. + * PARAM_NEW: Used in PRS2 rule, similar to PARAM_NAMED. + * The `paramname' and `paramid' refer to the "NEW" tuple + * The `pramname' is the attribute name and `paramid' + * is the attribute number. * - * PARAM_OLD: Same as PARAM_NEW, but in this case we refer to - * the "OLD" tuple. + * PARAM_OLD: Same as PARAM_NEW, but in this case we refer to + * the "OLD" tuple. * - * paramid - numeric identifier for literal-constant parameters ("$1") - * paramname - attribute name for tuple-substitution parameters ("$.foo") - * paramtype - PG_TYPE OID of the parameter's value - * param_tlist - allows for projection in a param node. + * paramid - numeric identifier for literal-constant parameters ("$1") + * paramname - attribute name for tuple-substitution parameters ("$.foo") + * paramtype - PG_TYPE OID of the parameter's value + * param_tlist - allows for projection in a param node. * ---------------- */ -typedef struct Param { - NodeTag type; - int paramkind; - AttrNumber paramid; - char *paramname; - Oid paramtype; - List *param_tlist; -} Param; +typedef struct Param +{ + NodeTag type; + int paramkind; + AttrNumber paramid; + char *paramname; + Oid paramtype; + List *param_tlist; +} Param; /* ---------------- * Func - * funcid - PG_FUNCTION OID of the function - * functype - PG_TYPE OID of the function's return value - * funcisindex - the function can be evaluated by scanning an index - * (set during query optimization) - * funcsize - size of return result (cached by executor) - * func_fcache - runtime state while running this function. Where - * we are in the execution of the function if it - * returns more than one value, etc. - * See utils/fcache.h - * func_tlist - projection of functions returning tuples - * func_planlist - result of planning this func, if it's a PQ func + * funcid - PG_FUNCTION OID of the function + * functype - PG_TYPE OID of the function's return value + * funcisindex - the function can be evaluated by scanning an index + * (set during query optimization) + * funcsize - size of return result (cached by executor) + * func_fcache - runtime state while running this function. Where + * we are in the execution of the function if it + * returns more than one value, etc. + * See utils/fcache.h + * func_tlist - projection of functions returning tuples + * func_planlist - result of planning this func, if it's a PQ func * ---------------- */ -typedef struct Func { - NodeTag type; - Oid funcid; - Oid functype; - bool funcisindex; - int funcsize; - FunctionCachePtr func_fcache; - List *func_tlist; - List *func_planlist; -} Func; +typedef struct Func +{ + NodeTag type; + Oid funcid; + Oid functype; + bool funcisindex; + int funcsize; + FunctionCachePtr func_fcache; + List *func_tlist; + List *func_planlist; +} Func; /* ---------------- * Aggreg - * aggname - name of the aggregate - * basetype - base type Oid of the aggregate - * aggtype - type Oid of final result of the aggregate - * query - XXX comment me - * target - XXX comment me + * aggname - name of the aggregate + * basetype - base type Oid of the aggregate + * aggtype - type Oid of final result of the aggregate + * query - XXX comment me + * target - XXX comment me * ---------------- */ -typedef struct Aggreg { - NodeTag type; - char *aggname; - Oid basetype; /* base type of the aggregate */ - Oid aggtype; /* type of final result */ - Node *target; /* attribute to aggreg on */ - int aggno; /* index to ecxt_values */ -} Aggreg; +typedef struct Aggreg +{ + NodeTag type; + char *aggname; + Oid basetype; /* base type of the aggregate */ + Oid aggtype; /* type of final result */ + Node *target; /* attribute to aggreg on */ + int aggno; /* index to ecxt_values */ +} Aggreg; /* ---------------- * Array - * arrayelemtype - base type of the array's elements (homogenous!) - * arrayelemlength - length of that type - * arrayelembyval - can you pass this element by value? - * arrayndim - number of dimensions of the array - * arraylow - base for array indexing - * arrayhigh - limit for array indexing - * arraylen - + * arrayelemtype - base type of the array's elements (homogenous!) + * arrayelemlength - length of that type + * arrayelembyval - can you pass this element by value? + * arrayndim - number of dimensions of the array + * arraylow - base for array indexing + * arrayhigh - limit for array indexing + * arraylen - * ---------------- * - * memo from mao: the array support we inherited from 3.1 is just - * wrong. when time exists, we should redesign this stuff to get - * around a bunch of unfortunate implementation decisions made there. + * memo from mao: the array support we inherited from 3.1 is just + * wrong. when time exists, we should redesign this stuff to get + * around a bunch of unfortunate implementation decisions made there. */ -typedef struct Array { - NodeTag type; - Oid arrayelemtype; - int arrayelemlength; - bool arrayelembyval; - int arrayndim; - IntArray arraylow; - IntArray arrayhigh; - int arraylen; -} Array; +typedef struct Array +{ + NodeTag type; + Oid arrayelemtype; + int arrayelemlength; + bool arrayelembyval; + int arrayndim; + IntArray arraylow; + IntArray arrayhigh; + int arraylen; +} Array; /* ---------------- - * ArrayRef: - * refelemtype - type of the element referenced here - * refelemlength - length of that type - * refelembyval - can you pass this element type by value? - * refupperindexpr - expressions that evaluate to upper array index - * reflowerexpr- the expressions that evaluate to a lower array index - * refexpr - the expression that evaluates to an array - * refassignexpr- the expression that evaluates to the new value - * to be assigned to the array in case of replace. + * ArrayRef: + * refelemtype - type of the element referenced here + * refelemlength - length of that type + * refelembyval - can you pass this element type by value? + * refupperindexpr - expressions that evaluate to upper array index + * reflowerexpr- the expressions that evaluate to a lower array index + * refexpr - the expression that evaluates to an array + * refassignexpr- the expression that evaluates to the new value + * to be assigned to the array in case of replace. * ---------------- */ -typedef struct ArrayRef { - NodeTag type; - int refattrlength; - int refelemlength; - Oid refelemtype; - bool refelembyval; - List *refupperindexpr; - List *reflowerindexpr; - Node *refexpr; - Node *refassgnexpr; -} ArrayRef; +typedef struct ArrayRef +{ + NodeTag type; + int refattrlength; + int refelemlength; + Oid refelemtype; + bool refelembyval; + List *refupperindexpr; + List *reflowerindexpr; + Node *refexpr; + Node *refassgnexpr; +} ArrayRef; -#endif /* PRIMNODES_H */ +#endif /* PRIMNODES_H */ diff --git a/src/include/nodes/print.h b/src/include/nodes/print.h index 0e2585f1de1..8e1a80267d0 100644 --- a/src/include/nodes/print.h +++ b/src/include/nodes/print.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * execnodes.h-- - * definitions for executor state nodes + * definitions for executor state nodes * * * Copyright (c) 1994, Regents of the University of California * - * $Id: print.h,v 1.2 1997/08/19 21:38:54 momjian Exp $ + * $Id: print.h,v 1.3 1997/09/07 04:58:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,15 +19,16 @@ #include "nodes/relation.h" #include "executor/tuptable.h" -extern void print(void *obj); -extern void pprint(void *obj); -extern void print_rt(List *rtable); -extern void print_expr(Node *expr, List *rtable); -extern void print_keys(List *keys, List *rtable); -extern void print_tl(List *tlist, List *rtable); -extern void print_slot(TupleTableSlot *slot); -extern void print_plan_recursive (Plan* p, Query *parsetree, - int indentLevel, char* label); -extern void print_plan (Plan* p, Query* parsetree); +extern void print(void *obj); +extern void pprint(void *obj); +extern void print_rt(List * rtable); +extern void print_expr(Node * expr, List * rtable); +extern void print_keys(List * keys, List * rtable); +extern void print_tl(List * tlist, List * rtable); +extern void print_slot(TupleTableSlot * slot); +extern void +print_plan_recursive(Plan * p, Query * parsetree, + int indentLevel, char *label); +extern void print_plan(Plan * p, Query * parsetree); -#endif /* PRINT_H */ +#endif /* PRINT_H */ diff --git a/src/include/nodes/readfuncs.h b/src/include/nodes/readfuncs.h index 79e18ff61b7..8a23d550a90 100644 --- a/src/include/nodes/readfuncs.h +++ b/src/include/nodes/readfuncs.h @@ -1,27 +1,27 @@ /*------------------------------------------------------------------------- * * readfuncs.h-- - * header file for read.c and readfuncs.c. These functions are internal - * to the stringToNode interface and should not be used by anyone else. + * header file for read.c and readfuncs.c. These functions are internal + * to the stringToNode interface and should not be used by anyone else. * * Copyright (c) 1994, Regents of the University of California * - * $Id: readfuncs.h,v 1.2 1996/11/10 03:05:30 momjian Exp $ + * $Id: readfuncs.h,v 1.3 1997/09/07 04:58:48 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef READFUNCS_H -#define READFUNCS_H +#ifndef READFUNCS_H +#define READFUNCS_H /* * prototypes for functions in read.c (the lisp token parser) */ -extern char *lsptok(char *string, int *length); -extern void *nodeRead(bool read_car_only); +extern char *lsptok(char *string, int *length); +extern void *nodeRead(bool read_car_only); /* - * prototypes for functions in readfuncs.c + * prototypes for functions in readfuncs.c */ -extern Node *parsePlanString(void); +extern Node *parsePlanString(void); -#endif /* READFUNCS_H */ +#endif /* READFUNCS_H */ diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 16c7dd29955..7acbc3d466c 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * relation.h-- - * Definitions for internal planner nodes. + * Definitions for internal planner nodes. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: relation.h,v 1.4 1997/03/18 18:41:37 scrappy Exp $ + * $Id: relation.h,v 1.5 1997/09/07 04:58:48 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,260 +18,280 @@ /* * Relid - * List of relation identifiers (indexes into the rangetable). + * List of relation identifiers (indexes into the rangetable). */ -typedef List *Relid; +typedef List *Relid; /* * Rel - * Per-base-relation information + * Per-base-relation information * - * Parts of this data structure are specific to various scan and join - * mechanisms. It didn't seem worth creating new node types for them. + * Parts of this data structure are specific to various scan and join + * mechanisms. It didn't seem worth creating new node types for them. * - * relids - List of relation indentifiers - * indexed - true if the relation has secondary indices - * pages - number of pages in the relation - * tuples - number of tuples in the relation - * size - number of tuples in the relation after restrictions clauses - * have been applied - * width - number of bytes per tuple in the relation after the - * appropriate projections have been done - * targetlist - List of TargetList nodes - * pathlist - List of Path nodes, one for each possible method of - * generating the relation - * unorderedpath - a Path node generating this relation whose resulting - * tuples are unordered (this isn't necessarily a - * sequential scan path, e.g., scanning with a hash index - * leaves the tuples unordered) - * cheapestpath - least expensive Path (regardless of final order) - * pruneable - flag to let the planner know whether it can prune the plan - * space of this Rel or not. -- JMH, 11/11/92 + * relids - List of relation indentifiers + * indexed - true if the relation has secondary indices + * pages - number of pages in the relation + * tuples - number of tuples in the relation + * size - number of tuples in the relation after restrictions clauses + * have been applied + * width - number of bytes per tuple in the relation after the + * appropriate projections have been done + * targetlist - List of TargetList nodes + * pathlist - List of Path nodes, one for each possible method of + * generating the relation + * unorderedpath - a Path node generating this relation whose resulting + * tuples are unordered (this isn't necessarily a + * sequential scan path, e.g., scanning with a hash index + * leaves the tuples unordered) + * cheapestpath - least expensive Path (regardless of final order) + * pruneable - flag to let the planner know whether it can prune the plan + * space of this Rel or not. -- JMH, 11/11/92 * - * * If the relation is a (secondary) index it will have the following - * three fields: + * * If the relation is a (secondary) index it will have the following + * three fields: * - * classlist - List of PG_AMOPCLASS OIDs for the index - * indexkeys - List of base-relation attribute numbers that are index keys - * ordering - List of PG_OPERATOR OIDs which order the indexscan result - * relam - the OID of the pg_am of the index + * classlist - List of PG_AMOPCLASS OIDs for the index + * indexkeys - List of base-relation attribute numbers that are index keys + * ordering - List of PG_OPERATOR OIDs which order the indexscan result + * relam - the OID of the pg_am of the index * - * * The presence of the remaining fields depends on the restrictions - * and joins which the relation participates in: + * * The presence of the remaining fields depends on the restrictions + * and joins which the relation participates in: * - * clauseinfo - List of ClauseInfo nodes, containing info about each - * qualification clause in which this relation participates - * joininfo - List of JoinInfo nodes, containing info about each join - * clause in which this relation participates - * innerjoin - List of Path nodes that represent indices that may be used - * as inner paths of nestloop joins + * clauseinfo - List of ClauseInfo nodes, containing info about each + * qualification clause in which this relation participates + * joininfo - List of JoinInfo nodes, containing info about each join + * clause in which this relation participates + * innerjoin - List of Path nodes that represent indices that may be used + * as inner paths of nestloop joins * * NB. the last element of the arrays classlist, indexkeys and ordering - * is always 0. 2/95 - ay + * is always 0. 2/95 - ay */ -typedef struct Rel { - NodeTag type; - - /* all relations: */ - Relid relids; - - /* catalog statistics information */ - bool indexed; - int pages; - int tuples; - int size; - int width; - - /* materialization information */ - List *targetlist; - List *pathlist; - struct Path *unorderedpath; - struct Path *cheapestpath; - bool pruneable; - - /* used solely by indices: */ - Oid *classlist; /* classes of AM operators */ - int *indexkeys; /* keys over which we're indexing */ - Oid relam; /* OID of the access method (in pg_am) */ - - Oid indproc; - List *indpred; - - /* used by various scans and joins: */ - Oid *ordering; /* OID of operators in sort order */ - List *clauseinfo; /* restriction clauses */ - List *joininfo; /* join clauses */ - List *innerjoin; - List *superrels; -} Rel; - -extern Var *get_expr(TargetEntry *foo); - -typedef struct MergeOrder { - NodeTag type; - Oid join_operator; - Oid left_operator; - Oid right_operator; - Oid left_type; - Oid right_type; -} MergeOrder; - -typedef enum OrderType { - MERGE_ORDER, SORTOP_ORDER -} OrderType; - -typedef struct PathOrder { - OrderType ordtype; - union { - Oid *sortop; - MergeOrder *merge; - } ord; -} PathOrder; - -typedef struct Path { - NodeTag type; - - Rel *parent; - Cost path_cost; - - NodeTag pathtype; - - PathOrder p_ordering; - - List *keys; - Cost outerjoincost; - Relid joinid; - List *locclauseinfo; -} Path; - -typedef struct IndexPath { - Path path; - List *indexid; - List *indexqual; - int *indexkeys; /* to transform heap attnos into index ones */ -} IndexPath; - -typedef struct JoinPath { - Path path; - List *pathclauseinfo; - Path *outerjoinpath; - Path *innerjoinpath; -} JoinPath; - -typedef struct MergePath { - JoinPath jpath; - List *path_mergeclauses; - List *outersortkeys; - List *innersortkeys; -} MergePath; - -typedef struct HashPath { - JoinPath jpath; - List *path_hashclauses; - List *outerhashkeys; - List *innerhashkeys; -} HashPath; +typedef struct Rel +{ + NodeTag type; + + /* all relations: */ + Relid relids; + + /* catalog statistics information */ + bool indexed; + int pages; + int tuples; + int size; + int width; + + /* materialization information */ + List *targetlist; + List *pathlist; + struct Path *unorderedpath; + struct Path *cheapestpath; + bool pruneable; + + /* used solely by indices: */ + Oid *classlist; /* classes of AM operators */ + int *indexkeys; /* keys over which we're indexing */ + Oid relam; /* OID of the access method (in pg_am) */ + + Oid indproc; + List *indpred; + + /* used by various scans and joins: */ + Oid *ordering; /* OID of operators in sort order */ + List *clauseinfo; /* restriction clauses */ + List *joininfo; /* join clauses */ + List *innerjoin; + List *superrels; +} Rel; + +extern Var *get_expr(TargetEntry * foo); + +typedef struct MergeOrder +{ + NodeTag type; + Oid join_operator; + Oid left_operator; + Oid right_operator; + Oid left_type; + Oid right_type; +} MergeOrder; + +typedef enum OrderType +{ + MERGE_ORDER, SORTOP_ORDER +} OrderType; + +typedef struct PathOrder +{ + OrderType ordtype; + union + { + Oid *sortop; + MergeOrder *merge; + } ord; +} PathOrder; + +typedef struct Path +{ + NodeTag type; + + Rel *parent; + Cost path_cost; + + NodeTag pathtype; + + PathOrder p_ordering; + + List *keys; + Cost outerjoincost; + Relid joinid; + List *locclauseinfo; +} Path; + +typedef struct IndexPath +{ + Path path; + List *indexid; + List *indexqual; + int *indexkeys; /* to transform heap attnos into index + * ones */ +} IndexPath; + +typedef struct JoinPath +{ + Path path; + List *pathclauseinfo; + Path *outerjoinpath; + Path *innerjoinpath; +} JoinPath; + +typedef struct MergePath +{ + JoinPath jpath; + List *path_mergeclauses; + List *outersortkeys; + List *innersortkeys; +} MergePath; + +typedef struct HashPath +{ + JoinPath jpath; + List *path_hashclauses; + List *outerhashkeys; + List *innerhashkeys; +} HashPath; /****** * Keys ******/ -typedef struct OrderKey { - NodeTag type; - int attribute_number; - Index array_index; -} OrderKey; +typedef struct OrderKey +{ + NodeTag type; + int attribute_number; + Index array_index; +} OrderKey; -typedef struct JoinKey { - NodeTag type; - Var *outer; - Var *inner; -} JoinKey; +typedef struct JoinKey +{ + NodeTag type; + Var *outer; + Var *inner; +} JoinKey; /******* * clause info *******/ -typedef struct CInfo { - NodeTag type; - Expr *clause; /* should be an OP clause */ - Cost selectivity; - bool notclause; - List *indexids; - - /* mergesort only */ - MergeOrder *mergesortorder; - - /* hashjoin only */ - Oid hashjoinoperator; - Relid cinfojoinid; -} CInfo; - -typedef struct JoinMethod { - NodeTag type; - List *jmkeys; - List *clauses; -} JoinMethod; - -typedef struct HInfo { - JoinMethod jmethod; - Oid hashop; -} HInfo; - -typedef struct MInfo { - JoinMethod jmethod; - MergeOrder *m_ordering; -} MInfo; - -typedef struct JInfo { - NodeTag type; - List *otherrels; - List *jinfoclauseinfo; - bool mergesortable; - bool hashjoinable; - bool inactive; -} JInfo; - -typedef struct Iter { - NodeTag type; - Node *iterexpr; - Oid itertype; /* type of the iter expr (use for type - checking) */ -} Iter; +typedef struct CInfo +{ + NodeTag type; + Expr *clause; /* should be an OP clause */ + Cost selectivity; + bool notclause; + List *indexids; + + /* mergesort only */ + MergeOrder *mergesortorder; + + /* hashjoin only */ + Oid hashjoinoperator; + Relid cinfojoinid; +} CInfo; + +typedef struct JoinMethod +{ + NodeTag type; + List *jmkeys; + List *clauses; +} JoinMethod; + +typedef struct HInfo +{ + JoinMethod jmethod; + Oid hashop; +} HInfo; + +typedef struct MInfo +{ + JoinMethod jmethod; + MergeOrder *m_ordering; +} MInfo; + +typedef struct JInfo +{ + NodeTag type; + List *otherrels; + List *jinfoclauseinfo; + bool mergesortable; + bool hashjoinable; + bool inactive; +} JInfo; + +typedef struct Iter +{ + NodeTag type; + Node *iterexpr; + Oid itertype; /* type of the iter expr (use for type + * checking) */ +} Iter; /* ** Stream: -** A stream represents a root-to-leaf path in a plan tree (i.e. a tree of +** A stream represents a root-to-leaf path in a plan tree (i.e. a tree of ** JoinPaths and Paths). The stream includes pointers to all Path nodes, -** as well as to any clauses that reside above Path nodes. This structure +** as well as to any clauses that reside above Path nodes. This structure ** is used to make Path nodes and clauses look similar, so that Predicate ** Migration can run. ** -** pathptr -- pointer to the current path node -** cinfo -- if NULL, this stream node referes to the path node. -** Otherwise this is a pointer to the current clause. -** clausetype -- whether cinfo is in locclauseinfo or pathclauseinfo in the -** path node -** upstream -- linked list pointer upwards -** downstream -- ditto, downwards -** groupup -- whether or not this node is in a group with the node upstream -** groupcost -- total cost of the group that node is in -** groupsel -- total selectivity of the group that node is in +** pathptr -- pointer to the current path node +** cinfo -- if NULL, this stream node referes to the path node. +** Otherwise this is a pointer to the current clause. +** clausetype -- whether cinfo is in locclauseinfo or pathclauseinfo in the +** path node +** upstream -- linked list pointer upwards +** downstream -- ditto, downwards +** groupup -- whether or not this node is in a group with the node upstream +** groupcost -- total cost of the group that node is in +** groupsel -- total selectivity of the group that node is in */ typedef struct Stream *StreamPtr; -typedef struct Stream { - NodeTag type; - Path *pathptr; - CInfo *cinfo; - int *clausetype; - struct Stream *upstream; - struct Stream *downstream; - bool groupup; - Cost groupcost; - Cost groupsel; -} Stream; - -#endif /* RELATION_H */ +typedef struct Stream +{ + NodeTag type; + Path *pathptr; + CInfo *cinfo; + int *clausetype; + struct Stream *upstream; + struct Stream *downstream; + bool groupup; + Cost groupcost; + Cost groupsel; +} Stream; + +#endif /* RELATION_H */ diff --git a/src/include/optimizer/clauseinfo.h b/src/include/optimizer/clauseinfo.h index 922571aa07a..028979eeb11 100644 --- a/src/include/optimizer/clauseinfo.h +++ b/src/include/optimizer/clauseinfo.h @@ -1,24 +1,26 @@ /*------------------------------------------------------------------------- * * clauseinfo.h-- - * prototypes for clauseinfo.c. + * prototypes for clauseinfo.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: clauseinfo.h,v 1.1 1996/08/28 07:23:10 scrappy Exp $ + * $Id: clauseinfo.h,v 1.2 1997/09/07 04:58:52 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef CLAUSEINFO_H #define CLAUSEINFO_H -extern bool valid_or_clause(CInfo *clauseinfo); -extern List *get_actual_clauses(List *clauseinfo_list); -extern void get_relattvals(List *clauseinfo_list, List **attnos, - List **values, List **flags); -extern void get_joinvars(Oid relid, List *clauseinfo_list, - List **attnos, List **values, List **flags); -extern List *get_opnos(List *clauseinfo_list); +extern bool valid_or_clause(CInfo * clauseinfo); +extern List *get_actual_clauses(List * clauseinfo_list); +extern void +get_relattvals(List * clauseinfo_list, List ** attnos, + List ** values, List ** flags); +extern void +get_joinvars(Oid relid, List * clauseinfo_list, + List ** attnos, List ** values, List ** flags); +extern List *get_opnos(List * clauseinfo_list); -#endif /* CLAUSEINFO_H */ +#endif /* CLAUSEINFO_H */ diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h index c9a880b030b..bb8d09a4da4 100644 --- a/src/include/optimizer/clauses.h +++ b/src/include/optimizer/clauses.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * clauses.h-- - * prototypes for clauses.c. + * prototypes for clauses.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: clauses.h,v 1.3 1997/08/19 21:39:01 momjian Exp $ + * $Id: clauses.h,v 1.4 1997/09/07 04:58:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,37 +15,39 @@ #include <nodes/primnodes.h> -extern Expr *make_clause(int type, Node *oper, List *args); -extern bool is_opclause(Node *clause); -extern Expr *make_opclause(Oper *op, Var *leftop, Var *rightop); -extern Var *get_leftop(Expr *clause); -extern Var *get_rightop(Expr *clause); - -extern bool is_funcclause(Node *clause); -extern Expr *make_funcclause(Func *func, List *funcargs); - -extern bool or_clause(Node *clause); -extern Expr *make_orclause(List *orclauses); - -extern bool not_clause(Node *clause); -extern Expr *make_notclause(Expr *notclause); -extern Expr *get_notclausearg(Expr *notclause); - -extern bool and_clause(Node *clause); -extern Expr *make_andclause(List *andclauses); - -extern List *pull_constant_clauses(List *quals, List **constantQual); -extern void clause_relids_vars(Node *clause, List **relids, List **vars); -extern int NumRelids(Node *clause); -extern bool contains_not(Node *clause); -extern bool join_clause_p(Node *clause); -extern bool qual_clause_p(Node *clause); -extern void fix_opid(Node *clause); -extern List *fix_opids(List *clauses); -extern void get_relattval(Node *clause, int *relid, - AttrNumber *attno, Datum *constval, int *flag); -extern void get_rels_atts(Node *clause, int *relid1, - AttrNumber *attno1, int *relid2, AttrNumber *attno2); -extern void CommuteClause(Node *clause); - -#endif /* CLAUSES_H */ +extern Expr *make_clause(int type, Node * oper, List * args); +extern bool is_opclause(Node * clause); +extern Expr *make_opclause(Oper * op, Var * leftop, Var * rightop); +extern Var *get_leftop(Expr * clause); +extern Var *get_rightop(Expr * clause); + +extern bool is_funcclause(Node * clause); +extern Expr *make_funcclause(Func * func, List * funcargs); + +extern bool or_clause(Node * clause); +extern Expr *make_orclause(List * orclauses); + +extern bool not_clause(Node * clause); +extern Expr *make_notclause(Expr * notclause); +extern Expr *get_notclausearg(Expr * notclause); + +extern bool and_clause(Node * clause); +extern Expr *make_andclause(List * andclauses); + +extern List *pull_constant_clauses(List * quals, List ** constantQual); +extern void clause_relids_vars(Node * clause, List ** relids, List ** vars); +extern int NumRelids(Node * clause); +extern bool contains_not(Node * clause); +extern bool join_clause_p(Node * clause); +extern bool qual_clause_p(Node * clause); +extern void fix_opid(Node * clause); +extern List *fix_opids(List * clauses); +extern void +get_relattval(Node * clause, int *relid, + AttrNumber * attno, Datum * constval, int *flag); +extern void +get_rels_atts(Node * clause, int *relid1, + AttrNumber * attno1, int *relid2, AttrNumber * attno2); +extern void CommuteClause(Node * clause); + +#endif /* CLAUSES_H */ diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index f045e47b0bf..bb50d92948c 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * cost.h-- - * prototypes for costsize.c and clausesel.c. + * prototypes for costsize.c and clausesel.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: cost.h,v 1.2 1997/08/19 21:39:18 momjian Exp $ + * $Id: cost.h,v 1.3 1997/09/07 04:58:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,43 +15,48 @@ /* * prototypes for costsize.c-- - * routines to compute costs and sizes - */ -extern bool _enable_seqscan_; -extern bool _enable_indexscan_; -extern bool _enable_sort_; -extern bool _enable_hash_; -extern bool _enable_nestloop_; -extern bool _enable_mergesort_; -extern bool _enable_hashjoin_; + * routines to compute costs and sizes + */ +extern bool _enable_seqscan_; +extern bool _enable_indexscan_; +extern bool _enable_sort_; +extern bool _enable_hash_; +extern bool _enable_nestloop_; +extern bool _enable_mergesort_; +extern bool _enable_hashjoin_; -extern Cost cost_seqscan(int relid, int relpages, int reltuples); -extern Cost cost_index(Oid indexid, int expected_indexpages, Cost selec, - int relpages, int reltuples, int indexpages, - int indextuples, bool is_injoin); -extern Cost cost_sort(List *keys, int tuples, int width, bool noread); -extern Cost cost_nestloop(Cost outercost, Cost innercost, int outertuples, - int innertuples, int outerpages, bool is_indexjoin); -extern Cost cost_mergesort(Cost outercost, Cost innercost, - List *outersortkeys, List *innersortkeys, - int outersize, int innersize, int outerwidth, int innerwidth); -extern Cost cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys, - List *innerkeys, int outersize, int innersize, - int outerwidth, int innerwidth); -extern int compute_rel_size(Rel *rel); -extern int compute_rel_width(Rel *rel); -extern int compute_joinrel_size(JoinPath *joinpath); -extern int page_size(int tuples, int width); +extern Cost cost_seqscan(int relid, int relpages, int reltuples); +extern Cost +cost_index(Oid indexid, int expected_indexpages, Cost selec, + int relpages, int reltuples, int indexpages, + int indextuples, bool is_injoin); +extern Cost cost_sort(List * keys, int tuples, int width, bool noread); +extern Cost +cost_nestloop(Cost outercost, Cost innercost, int outertuples, + int innertuples, int outerpages, bool is_indexjoin); +extern Cost +cost_mergesort(Cost outercost, Cost innercost, + List * outersortkeys, List * innersortkeys, + int outersize, int innersize, int outerwidth, int innerwidth); +extern Cost +cost_hashjoin(Cost outercost, Cost innercost, List * outerkeys, + List * innerkeys, int outersize, int innersize, + int outerwidth, int innerwidth); +extern int compute_rel_size(Rel * rel); +extern int compute_rel_width(Rel * rel); +extern int compute_joinrel_size(JoinPath * joinpath); +extern int page_size(int tuples, int width); /* * prototypes for fuctions in clausesel.h-- - * routines to compute clause selectivities + * routines to compute clause selectivities */ -extern void set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity); -extern Cost product_selec(List *clauseinfo_list); -extern void set_rest_relselec(Query *root, List *rel_list); -extern void set_rest_selec(Query *root,List *clauseinfo_list); -extern Cost compute_clause_selec(Query *root, - Node *clause, List *or_selectivities); +extern void set_clause_selectivities(List * clauseinfo_list, Cost new_selectivity); +extern Cost product_selec(List * clauseinfo_list); +extern void set_rest_relselec(Query * root, List * rel_list); +extern void set_rest_selec(Query * root, List * clauseinfo_list); +extern Cost +compute_clause_selec(Query * root, + Node * clause, List * or_selectivities); -#endif /* COST_H */ +#endif /* COST_H */ diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h index 3a566522f7a..28f2dd086f7 100644 --- a/src/include/optimizer/geqo.h +++ b/src/include/optimizer/geqo.h @@ -1,25 +1,25 @@ /*------------------------------------------------------------------------- * * geqo.h-- - * prototypes for various files in optimizer/geqo + * prototypes for various files in optimizer/geqo * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo.h,v 1.3 1997/06/02 11:19:31 vadim Exp $ + * $Id: geqo.h,v 1.4 1997/09/07 04:58:57 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ -#ifndef GEQO_H -#define GEQO_H +#ifndef GEQO_H +#define GEQO_H /* GEQO debug flag */ @@ -40,38 +40,39 @@ /* genetic algorithm parameters */ -#define GEQO_FILE "pg_geqo" /* Name of the ga config file */ +#define GEQO_FILE "pg_geqo" /* Name of the ga config file */ -#define MIN_POOL 128 /* minimum number of individuals */ -#define MAX_POOL 1024 /* maximum number of individuals */ +#define MIN_POOL 128 /* minimum number of individuals */ +#define MAX_POOL 1024 /* maximum number of individuals */ -#define LOW_EFFORT 1 /* optimization effort values */ -#define MEDIUM_EFFORT 40 /* are multipliers for computed */ -#define HIGH_EFFORT 80 /* number of generations */ +#define LOW_EFFORT 1 /* optimization effort values */ +#define MEDIUM_EFFORT 40 /* are multipliers for computed */ +#define HIGH_EFFORT 80 /* number of generations */ -#define SELECTION_BIAS 2.0 /* selective pressure within population */ - /* should be 1.5 <= SELECTION_BIAS <= 2.0 */ +#define SELECTION_BIAS 2.0 /* selective pressure within population */ + /* should be 1.5 <= SELECTION_BIAS <= 2.0 */ - int PoolSize; - int Generations; +int PoolSize; +int Generations; - long RandomSeed; /* defaults to (long) time(NULL) in geqo_params.c */ - double SelectionBias; +long RandomSeed; /* defaults to (long) time(NULL) in + * geqo_params.c */ +double SelectionBias; /* logarithmic base for rel->size decrease in case of long queries that cause an integer overflow; used in geqo_eval.c */ -#define GEQO_LOG_BASE 1.5 /* should be 1.0 < GEQO_LOG_BASE <= 2.0 */ - /* ^^^ */ +#define GEQO_LOG_BASE 1.5 /* should be 1.0 < GEQO_LOG_BASE <= 2.0 */ + /* ^^^ */ /* geqo prototypes */ -extern Rel *geqo(Query *root); +extern Rel *geqo(Query * root); -extern void geqo_params(int string_length); +extern void geqo_params(int string_length); -extern Cost geqo_eval (Query *root, Gene *tour, int num_gene); -double geqo_log(double x, double b); -extern Rel *gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, Rel *outer_rel); +extern Cost geqo_eval(Query * root, Gene * tour, int num_gene); +double geqo_log(double x, double b); +extern Rel *gimme_tree(Query * root, Gene * tour, int rel_count, int num_gene, Rel * outer_rel); -#endif /* GEQO_H */ +#endif /* GEQO_H */ diff --git a/src/include/optimizer/geqo_copy.h b/src/include/optimizer/geqo_copy.h index fcc61791689..5e1d2f931e1 100644 --- a/src/include/optimizer/geqo_copy.h +++ b/src/include/optimizer/geqo_copy.h @@ -1,27 +1,27 @@ /*------------------------------------------------------------------------- * * geqo_copy.h-- - * prototypes for copy functions in optimizer/geqo + * prototypes for copy functions in optimizer/geqo * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_copy.h,v 1.1 1997/02/19 12:58:32 scrappy Exp $ + * $Id: geqo_copy.h,v 1.2 1997/09/07 04:58:58 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ -#ifndef GEQO_COPY_H -#define GEQO_COPY_H +#ifndef GEQO_COPY_H +#define GEQO_COPY_H -extern void geqo_copy (Chromosome *chromo1, Chromosome *chromo2, int string_length); +extern void geqo_copy(Chromosome * chromo1, Chromosome * chromo2, int string_length); -#endif /* GEQO_COPY_H */ +#endif /* GEQO_COPY_H */ diff --git a/src/include/optimizer/geqo_gene.h b/src/include/optimizer/geqo_gene.h index 3d38bd26f8a..b3a685e0d77 100644 --- a/src/include/optimizer/geqo_gene.h +++ b/src/include/optimizer/geqo_gene.h @@ -1,42 +1,44 @@ /*------------------------------------------------------------------------- * * geqo_gene.h-- - * genome representation in optimizer/geqo + * genome representation in optimizer/geqo * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_gene.h,v 1.1 1997/02/19 12:58:37 scrappy Exp $ + * $Id: geqo_gene.h,v 1.2 1997/09/07 04:58:59 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ -#ifndef GEQO_GENE_H -#define GEQO_GENE_H +#ifndef GEQO_GENE_H +#define GEQO_GENE_H /* we presume that int instead of Relid is o.k. for Gene; so don't change it! */ typedef -int Gene; - -typedef struct Chromosome { - Gene *string; - Cost worth; -} Chromosome; - -typedef struct Pool { - Chromosome *data; - int size; - int string_length; -} Pool; - -#endif /* GEQO_GENE_H */ +int Gene; + +typedef struct Chromosome +{ + Gene *string; + Cost worth; +} Chromosome; + +typedef struct Pool +{ + Chromosome *data; + int size; + int string_length; +} Pool; + +#endif /* GEQO_GENE_H */ diff --git a/src/include/optimizer/geqo_misc.h b/src/include/optimizer/geqo_misc.h index 904b85123e3..d3b72cb3028 100644 --- a/src/include/optimizer/geqo_misc.h +++ b/src/include/optimizer/geqo_misc.h @@ -1,34 +1,34 @@ /*------------------------------------------------------------------------- * * geqo_misc.h-- - * prototypes for printout routines in optimizer/geqo + * prototypes for printout routines in optimizer/geqo * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_misc.h,v 1.1 1997/02/19 12:58:41 scrappy Exp $ + * $Id: geqo_misc.h,v 1.2 1997/09/07 04:59:00 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ -#ifndef GEQO_MISC_H -#define GEQO_MISC_H +#ifndef GEQO_MISC_H +#define GEQO_MISC_H #include <stdio.h> -extern void print_pool (FILE *fp, Pool *pool, int start, int stop); -extern void print_gen(FILE *fp, Pool *pool, int generation); -extern void print_edge_table (FILE *fp, Edge *edge_table, int num_gene); +extern void print_pool(FILE * fp, Pool * pool, int start, int stop); +extern void print_gen(FILE * fp, Pool * pool, int generation); +extern void print_edge_table(FILE * fp, Edge * edge_table, int num_gene); -extern void geqo_print_rel(Query *root, Rel *rel); -extern void geqo_print_path(Query *root, Path *path, int indent); -extern void geqo_print_joinclauses(Query *root, List *clauses); +extern void geqo_print_rel(Query * root, Rel * rel); +extern void geqo_print_path(Query * root, Path * path, int indent); +extern void geqo_print_joinclauses(Query * root, List * clauses); -#endif /* GEQO_MISC_H */ +#endif /* GEQO_MISC_H */ diff --git a/src/include/optimizer/geqo_mutation.h b/src/include/optimizer/geqo_mutation.h index 91e4b4b5386..cc3f613c780 100644 --- a/src/include/optimizer/geqo_mutation.h +++ b/src/include/optimizer/geqo_mutation.h @@ -1,27 +1,27 @@ /*------------------------------------------------------------------------- * * geqo_mutation.h-- - * prototypes for mutation functions in optimizer/geqo + * prototypes for mutation functions in optimizer/geqo * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_mutation.h,v 1.1 1997/02/19 12:58:49 scrappy Exp $ + * $Id: geqo_mutation.h,v 1.2 1997/09/07 04:59:01 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ -#ifndef GEQO_MUTATION_H -#define GEQO_MUTATION_H +#ifndef GEQO_MUTATION_H +#define GEQO_MUTATION_H -extern void geqo_mutation (Gene *tour, int num_gene); +extern void geqo_mutation(Gene * tour, int num_gene); -#endif /* GEQO_MUTATION_H */ +#endif /* GEQO_MUTATION_H */ diff --git a/src/include/optimizer/geqo_paths.h b/src/include/optimizer/geqo_paths.h index c4b890a3dbd..123367ad7e7 100644 --- a/src/include/optimizer/geqo_paths.h +++ b/src/include/optimizer/geqo_paths.h @@ -1,28 +1,28 @@ /*------------------------------------------------------------------------- * * geqo_paths.h-- - * prototypes for various subroutines in geqo_path.c + * prototypes for various subroutines in geqo_path.c * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_paths.h,v 1.1 1997/02/19 12:58:55 scrappy Exp $ + * $Id: geqo_paths.h,v 1.2 1997/09/07 04:59:02 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ -#ifndef GEQO_PATHS_H -#define GEQO_PATHS_H +#ifndef GEQO_PATHS_H +#define GEQO_PATHS_H -extern List *geqo_prune_rels(List *rel_list); -extern void geqo_rel_paths(Rel *rel); +extern List *geqo_prune_rels(List * rel_list); +extern void geqo_rel_paths(Rel * rel); -#endif /* GEQO_PATHS_H */ +#endif /* GEQO_PATHS_H */ diff --git a/src/include/optimizer/geqo_pool.h b/src/include/optimizer/geqo_pool.h index ba7cb529726..ffcdc0c50bc 100644 --- a/src/include/optimizer/geqo_pool.h +++ b/src/include/optimizer/geqo_pool.h @@ -1,37 +1,37 @@ /*------------------------------------------------------------------------- * * geqo_pool.h-- - * pool representation in optimizer/geqo + * pool representation in optimizer/geqo * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_pool.h,v 1.1 1997/02/19 12:58:59 scrappy Exp $ + * $Id: geqo_pool.h,v 1.2 1997/09/07 04:59:03 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ -#ifndef GEQO_POOL_H -#define GEQO_POOL_H +#ifndef GEQO_POOL_H +#define GEQO_POOL_H -extern Pool *alloc_pool(int pool_size, int string_length); -extern void free_pool(Pool *pool); +extern Pool *alloc_pool(int pool_size, int string_length); +extern void free_pool(Pool * pool); -extern void random_init_pool(Query *root, Pool *pool, int strt, int stop); +extern void random_init_pool(Query * root, Pool * pool, int strt, int stop); extern Chromosome *alloc_chromo(int string_length); -extern void free_chromo(Chromosome *chromo); +extern void free_chromo(Chromosome * chromo); -extern void spread_chromo(Chromosome *chromo, Pool *pool); +extern void spread_chromo(Chromosome * chromo, Pool * pool); -extern void sort_pool (Pool *pool); +extern void sort_pool(Pool * pool); -#endif /* GEQO_POOL_H */ +#endif /* GEQO_POOL_H */ diff --git a/src/include/optimizer/geqo_random.h b/src/include/optimizer/geqo_random.h index 9bb3affe725..73a9d37e53b 100644 --- a/src/include/optimizer/geqo_random.h +++ b/src/include/optimizer/geqo_random.h @@ -1,27 +1,27 @@ /*------------------------------------------------------------------------- * * geqo_random.h-- - * random number generator + * random number generator * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_random.h,v 1.1 1997/02/19 12:59:02 scrappy Exp $ + * $Id: geqo_random.h,v 1.2 1997/09/07 04:59:03 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ /* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */ -#ifndef GEQO_RANDOM_H -#define GEQO_RANDOM_H +#ifndef GEQO_RANDOM_H +#define GEQO_RANDOM_H #include <math.h> @@ -32,6 +32,6 @@ /* geqo_randint returns integer value between lower and upper inclusive */ -#define geqo_randint(upper,lower) ( (int) floor( geqo_rand()*((upper-lower)+0.999999) ) + lower ) +#define geqo_randint(upper,lower) ( (int) floor( geqo_rand()*((upper-lower)+0.999999) ) + lower ) -#endif /* GEQO_RANDOM_H */ +#endif /* GEQO_RANDOM_H */ diff --git a/src/include/optimizer/geqo_recombination.h b/src/include/optimizer/geqo_recombination.h index baa7fc24fa4..adcd9343f79 100644 --- a/src/include/optimizer/geqo_recombination.h +++ b/src/include/optimizer/geqo_recombination.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * geqo_recombination.h-- - * prototypes for recombination in the genetic query optimizer + * prototypes for recombination in the genetic query optimizer * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_recombination.h,v 1.1 1997/02/19 12:59:04 scrappy Exp $ + * $Id: geqo_recombination.h,v 1.2 1997/09/07 04:59:04 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ @@ -24,54 +24,56 @@ #define GEQO_RECOMBINATION_H -extern void init_tour(Gene *tour, int num_gene); +extern void init_tour(Gene * tour, int num_gene); /* edge recombination crossover [ERX] */ -typedef struct Edge { - Gene edge_list[4]; /* list of edges */ - int total_edges; - int unused_edges; -} Edge; +typedef struct Edge +{ + Gene edge_list[4]; /* list of edges */ + int total_edges; + int unused_edges; +} Edge; -extern Edge *alloc_edge_table(int num_gene); -extern void free_edge_table(Edge *edge_table); +extern Edge *alloc_edge_table(int num_gene); +extern void free_edge_table(Edge * edge_table); -extern float gimme_edge_table (Gene *tour1, Gene *tour2, int num_gene, Edge *edge_table); +extern float gimme_edge_table(Gene * tour1, Gene * tour2, int num_gene, Edge * edge_table); -extern int gimme_tour(Edge *edge_table, Gene *new_gene, int num_gene); +extern int gimme_tour(Edge * edge_table, Gene * new_gene, int num_gene); /* partially matched crossover [PMX] */ -#define DAD 1 /* indicator for gene from dad */ -#define MOM 0 /* indicator for gene from mom */ - -extern void pmx(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene); +#define DAD 1 /* indicator for gene from dad */ +#define MOM 0 /* indicator for gene from mom */ +extern void pmx(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene); -typedef struct City { - int tour2_position; - int tour1_position; - int used; - int select_list; -} City; -extern City *alloc_city_table(int num_gene); -extern void free_city_table(City *city_table); +typedef struct City +{ + int tour2_position; + int tour1_position; + int used; + int select_list; +} City; + +extern City *alloc_city_table(int num_gene); +extern void free_city_table(City * city_table); /* cycle crossover [CX] */ -extern int cx(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table); +extern int cx(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene, City * city_table); /* position crossover [PX] */ -extern void px(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table); +extern void px(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene, City * city_table); /* order crossover [OX1] according to Davis */ -extern void ox1(Gene *mom, Gene *dad, Gene *offspring, int num_gene, City *city_table); +extern void ox1(Gene * mom, Gene * dad, Gene * offspring, int num_gene, City * city_table); /* order crossover [OX2] according to Syswerda */ -extern void ox2(Gene *mom, Gene *dad, Gene *offspring, int num_gene, City *city_table); +extern void ox2(Gene * mom, Gene * dad, Gene * offspring, int num_gene, City * city_table); -#endif /* GEQO_RECOMBINATION_H */ +#endif /* GEQO_RECOMBINATION_H */ diff --git a/src/include/optimizer/geqo_selection.h b/src/include/optimizer/geqo_selection.h index 8f3c22170f1..289fb73083f 100644 --- a/src/include/optimizer/geqo_selection.h +++ b/src/include/optimizer/geqo_selection.h @@ -1,28 +1,28 @@ /*------------------------------------------------------------------------- * * geqo_selection.h-- - * prototypes for selection routines in optimizer/geqo + * prototypes for selection routines in optimizer/geqo * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_selection.h,v 1.1 1997/02/19 12:59:07 scrappy Exp $ + * $Id: geqo_selection.h,v 1.2 1997/09/07 04:59:05 momjian Exp $ * *------------------------------------------------------------------------- */ /* contributed by: =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= - * Martin Utesch * Institute of Automatic Control * - = = University of Mining and Technology = - * [email protected] * Freiberg, Germany * + * Martin Utesch * Institute of Automatic Control * + = = University of Mining and Technology = + * [email protected] * Freiberg, Germany * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= */ -#ifndef GEQO_SELECTION_H -#define GEQO_SELECTION_H +#ifndef GEQO_SELECTION_H +#define GEQO_SELECTION_H -extern void geqo_selection (Chromosome *momma, Chromosome *daddy, Pool *pool, double bias); +extern void geqo_selection(Chromosome * momma, Chromosome * daddy, Pool * pool, double bias); -#endif /* GEQO_SELECTION_H */ +#endif /* GEQO_SELECTION_H */ diff --git a/src/include/optimizer/internal.h b/src/include/optimizer/internal.h index 68d1f7d71d1..3180f2e3a89 100644 --- a/src/include/optimizer/internal.h +++ b/src/include/optimizer/internal.h @@ -1,72 +1,74 @@ /*------------------------------------------------------------------------- * * internal.h-- - * Definitions required throughout the query optimizer. + * Definitions required throughout the query optimizer. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: internal.h,v 1.7 1997/06/03 03:15:50 vadim Exp $ + * $Id: internal.h,v 1.8 1997/09/07 04:59:06 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef INTERNAL_H #define INTERNAL_H -/* - * ---------- SHARED MACROS - * - * Macros common to modules for creating, accessing, and modifying - * query tree and query plan components. - * Shared with the executor. - * +/* + * ---------- SHARED MACROS + * + * Macros common to modules for creating, accessing, and modifying + * query tree and query plan components. + * Shared with the executor. + * */ /* - * System-dependent tuning constants - * + * System-dependent tuning constants + * */ -#define _CPU_PAGE_WEIGHT_ 0.033 /* CPU-heap-to-page cost weighting factor */ -#define _CPU_INDEX_PAGE_WEIGHT_ 0.017 /* CPU-index-to-page cost weighting factor */ -#define _MAX_KEYS_ INDEX_MAX_KEYS /* maximum number of keys in an index */ -#define _TID_SIZE_ 6 /* sizeof(itemid) (from ../h/itemid.h) */ - -/* - * Size estimates - * +#define _CPU_PAGE_WEIGHT_ 0.033/* CPU-heap-to-page cost weighting factor */ +#define _CPU_INDEX_PAGE_WEIGHT_ 0.017 /* CPU-index-to-page cost + * weighting factor */ +#define _MAX_KEYS_ INDEX_MAX_KEYS /* maximum number of keys in an + * index */ +#define _TID_SIZE_ 6 /* sizeof(itemid) (from ../h/itemid.h) */ + +/* + * Size estimates + * */ -/* The cost of sequentially scanning a materialized temporary relation +/* The cost of sequentially scanning a materialized temporary relation */ -#define _TEMP_SCAN_COST_ 10 +#define _TEMP_SCAN_COST_ 10 -/* The number of pages and tuples in a materialized relation +/* The number of pages and tuples in a materialized relation */ -#define _TEMP_RELATION_PAGES_ 1 -#define _TEMP_RELATION_TUPLES_ 10 +#define _TEMP_RELATION_PAGES_ 1 +#define _TEMP_RELATION_TUPLES_ 10 -/* The length of a variable-length field in bytes +/* The length of a variable-length field in bytes */ #define _DEFAULT_ATTRIBUTE_WIDTH_ (2 * _TID_SIZE_) -/* - * Flags and identifiers - * +/* + * Flags and identifiers + * */ -/* Identifier for (sort) temp relations */ +/* Identifier for (sort) temp relations */ /* used to be -1 */ -#define _TEMP_RELATION_ID_ InvalidOid +#define _TEMP_RELATION_ID_ InvalidOid -/* Identifier for invalid relation OIDs and attribute numbers for use by - * selectivity functions +/* Identifier for invalid relation OIDs and attribute numbers for use by + * selectivity functions */ -#define _SELEC_VALUE_UNKNOWN_ -1 +#define _SELEC_VALUE_UNKNOWN_ -1 -/* Flag indicating that a clause constant is really a parameter (or other - * non-constant?), a non-parameter, or a constant on the right side - * of the clause. +/* Flag indicating that a clause constant is really a parameter (or other + * non-constant?), a non-parameter, or a constant on the right side + * of the clause. */ #define _SELEC_NOT_CONSTANT_ 0 #define _SELEC_IS_CONSTANT_ 1 @@ -78,11 +80,12 @@ #define FLOAT_EQUAL(X,Y) ((X) - (Y) < TOLERANCE) #define FLOAT_IS_ZERO(X) (FLOAT_EQUAL(X,0.0)) -extern int BushyPlanFlag; -/* #define deactivate_joininfo(joininfo) joininfo->inactive=true*/ +extern int BushyPlanFlag; + +/* #define deactivate_joininfo(joininfo) joininfo->inactive=true*/ /*#define joininfo_inactive(joininfo) joininfo->inactive */ /* GEQO switch according to number of relations in a query */ #define GEQO_RELS 6 -#endif /* INTERNAL_H */ +#endif /* INTERNAL_H */ diff --git a/src/include/optimizer/joininfo.h b/src/include/optimizer/joininfo.h index 5c3a7ee2910..8294e6cb648 100644 --- a/src/include/optimizer/joininfo.h +++ b/src/include/optimizer/joininfo.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * joininfo.h-- - * prototypes for joininfo.c. + * prototypes for joininfo.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: joininfo.h,v 1.1 1996/08/28 07:23:14 scrappy Exp $ + * $Id: joininfo.h,v 1.2 1997/09/07 04:59:07 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef JOININFO_H #define JOININFO_H -extern JInfo *joininfo_member(List *join_relids, List *joininfo_list); -extern JInfo *find_joininfo_node(Rel *this_rel, List *join_relids); -extern Var *other_join_clause_var(Var *var, Expr *clause); +extern JInfo *joininfo_member(List * join_relids, List * joininfo_list); +extern JInfo *find_joininfo_node(Rel * this_rel, List * join_relids); +extern Var *other_join_clause_var(Var * var, Expr * clause); -#endif /* JOININFO_H */ +#endif /* JOININFO_H */ diff --git a/src/include/optimizer/keys.h b/src/include/optimizer/keys.h index 29c16d5cbb0..e267777c210 100644 --- a/src/include/optimizer/keys.h +++ b/src/include/optimizer/keys.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * keys.h-- - * prototypes for keys.c. + * prototypes for keys.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: keys.h,v 1.2 1997/08/19 21:39:25 momjian Exp $ + * $Id: keys.h,v 1.3 1997/09/07 04:59:08 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef KEYS_H #define KEYS_H -extern bool match_indexkey_operand(int indexkey, Var *operand, Rel *rel); -extern Var *extract_subkey(JoinKey *jk, int which_subkey); -extern bool samekeys(List *keys1, List *keys2); -extern List *collect_index_pathkeys(int *index_keys, List *tlist); +extern bool match_indexkey_operand(int indexkey, Var * operand, Rel * rel); +extern Var *extract_subkey(JoinKey * jk, int which_subkey); +extern bool samekeys(List * keys1, List * keys2); +extern List *collect_index_pathkeys(int *index_keys, List * tlist); -#endif /* KEYS_H */ +#endif /* KEYS_H */ diff --git a/src/include/optimizer/ordering.h b/src/include/optimizer/ordering.h index 098691a2d18..7ed360098b7 100644 --- a/src/include/optimizer/ordering.h +++ b/src/include/optimizer/ordering.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * ordering.h-- - * prototypes for ordering.c. + * prototypes for ordering.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: ordering.h,v 1.3 1997/08/19 21:39:29 momjian Exp $ + * $Id: ordering.h,v 1.4 1997/09/07 04:59:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,10 +15,14 @@ #include <nodes/relation.h> -extern bool equal_path_path_ordering(PathOrder *path_ordering1, - PathOrder *path_ordering2); -extern bool equal_path_merge_ordering(Oid *path_ordering, - MergeOrder *merge_ordering); -extern bool equal_merge_merge_ordering(MergeOrder *merge_ordering1, - MergeOrder *merge_ordering2); -#endif /* ORDERING_H */ +extern bool +equal_path_path_ordering(PathOrder * path_ordering1, + PathOrder * path_ordering2); +extern bool +equal_path_merge_ordering(Oid * path_ordering, + MergeOrder * merge_ordering); +extern bool +equal_merge_merge_ordering(MergeOrder * merge_ordering1, + MergeOrder * merge_ordering2); + +#endif /* ORDERING_H */ diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h index b1353cc971c..9474e1ea8d9 100644 --- a/src/include/optimizer/pathnode.h +++ b/src/include/optimizer/pathnode.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * pathnode.h-- - * prototypes for pathnode.c, indexnode.c, relnode.c. + * prototypes for pathnode.c, indexnode.c, relnode.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pathnode.h,v 1.1 1996/08/28 07:23:18 scrappy Exp $ + * $Id: pathnode.h,v 1.2 1997/09/07 04:59:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,35 +16,40 @@ /* * prototypes for pathnode.c */ -extern bool path_is_cheaper(Path *path1, Path *path2); -extern Path *set_cheapest(Rel *parent_rel, List *pathlist); -extern List *add_pathlist(Rel *parent_rel, List *unique_paths, - List *new_paths); -extern Path *create_seqscan_path(Rel *rel); -extern IndexPath *create_index_path(Query *root, Rel *rel, Rel *index, - List *restriction_clauses, bool is_join_scan); -extern JoinPath *create_nestloop_path(Rel *joinrel, Rel *outer_rel, - Path *outer_path, Path *inner_path, List *keys); -extern MergePath *create_mergesort_path(Rel *joinrel, int outersize, - int innersize, int outerwidth, int innerwidth, Path *outer_path, - Path *inner_path, List *keys, MergeOrder *order, - List *mergeclauses, List *outersortkeys, List *innersortkeys); +extern bool path_is_cheaper(Path * path1, Path * path2); +extern Path *set_cheapest(Rel * parent_rel, List * pathlist); +extern List * +add_pathlist(Rel * parent_rel, List * unique_paths, + List * new_paths); +extern Path *create_seqscan_path(Rel * rel); +extern IndexPath * +create_index_path(Query * root, Rel * rel, Rel * index, + List * restriction_clauses, bool is_join_scan); +extern JoinPath * +create_nestloop_path(Rel * joinrel, Rel * outer_rel, + Path * outer_path, Path * inner_path, List * keys); +extern MergePath * +create_mergesort_path(Rel * joinrel, int outersize, + int innersize, int outerwidth, int innerwidth, Path * outer_path, + Path * inner_path, List * keys, MergeOrder * order, + List * mergeclauses, List * outersortkeys, List * innersortkeys); -extern HashPath *create_hashjoin_path(Rel *joinrel, int outersize, - int innersize, int outerwidth, int innerwidth, Path *outer_path, - Path *inner_path, List *keys, Oid operator, List *hashclauses, - List *outerkeys, List *innerkeys); +extern HashPath * +create_hashjoin_path(Rel * joinrel, int outersize, + int innersize, int outerwidth, int innerwidth, Path * outer_path, + Path * inner_path, List * keys, Oid operator, List * hashclauses, + List * outerkeys, List * innerkeys); /* * prototypes for rel.c */ -extern Rel *rel_member(List *relid, List *rels); -extern Rel *get_base_rel(Query* root, int relid); -extern Rel *get_join_rel(Query* root, List *relid); +extern Rel *rel_member(List * relid, List * rels); +extern Rel *get_base_rel(Query * root, int relid); +extern Rel *get_join_rel(Query * root, List * relid); /* * prototypes for indexnode.h */ -extern List *find_relation_indices(Query *root,Rel *rel); +extern List *find_relation_indices(Query * root, Rel * rel); -#endif /* PATHNODE_H */ +#endif /* PATHNODE_H */ diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index 9f76e65ce51..841c4983311 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -1,89 +1,97 @@ /*------------------------------------------------------------------------- * * paths.h-- - * prototypes for various files in optimizer/paths (were separate - * header files + * prototypes for various files in optimizer/paths (were separate + * header files * * * Copyright (c) 1994, Regents of the University of California * - * $Id: paths.h,v 1.1 1996/08/28 07:23:19 scrappy Exp $ + * $Id: paths.h,v 1.2 1997/09/07 04:59:13 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PATHS_H -#define PATHS_H +#ifndef PATHS_H +#define PATHS_H /* * allpaths.h */ -extern List *find_paths(Query *root, List *rels); +extern List *find_paths(Query * root, List * rels); /* * indxpath.h - * routines to generate index paths + * routines to generate index paths */ -extern List *find_index_paths(Query *root, Rel *rel, List *indices, - List *clauseinfo_list, - List *joininfo_list); +extern List * +find_index_paths(Query * root, Rel * rel, List * indices, + List * clauseinfo_list, + List * joininfo_list); /* * joinpath.h - * routines to create join paths + * routines to create join paths */ -extern void find_all_join_paths(Query *root, List *joinrels); - +extern void find_all_join_paths(Query * root, List * joinrels); + /* * orindxpath.h */ -extern List *create_or_index_paths(Query *root, Rel *rel, List *clauses); +extern List *create_or_index_paths(Query * root, Rel * rel, List * clauses); /* * hashutils.h - * routines to deal with hash keys and clauses + * routines to deal with hash keys and clauses */ -extern List *group_clauses_by_hashop(List *clauseinfo_list, - int inner_relid); +extern List * +group_clauses_by_hashop(List * clauseinfo_list, + int inner_relid); /* * joinutils.h - * generic join method key/clause routines + * generic join method key/clause routines */ -extern List *match_pathkeys_joinkeys(List *pathkeys, - List *joinkeys, List *joinclauses, int which_subkey, - List **matchedJoinClausesPtr); -extern List *extract_path_keys(List *joinkeys, List *tlist, - int which_subkey); -extern Path *match_paths_joinkeys(List *joinkeys, PathOrder *ordering, - List *paths, int which_subkey); -extern List *new_join_pathkeys(List *outer_pathkeys, - List *join_rel_tlist, List *joinclauses); +extern List * +match_pathkeys_joinkeys(List * pathkeys, + List * joinkeys, List * joinclauses, int which_subkey, + List ** matchedJoinClausesPtr); +extern List * +extract_path_keys(List * joinkeys, List * tlist, + int which_subkey); +extern Path * +match_paths_joinkeys(List * joinkeys, PathOrder * ordering, + List * paths, int which_subkey); +extern List * +new_join_pathkeys(List * outer_pathkeys, + List * join_rel_tlist, List * joinclauses); /* * mergeutils.h - * routines to deal with merge keys and clauses + * routines to deal with merge keys and clauses */ -extern List *group_clauses_by_order(List *clauseinfo_list, - int inner_relid); -extern MInfo *match_order_mergeinfo(PathOrder *ordering, - List *mergeinfo_list); +extern List * +group_clauses_by_order(List * clauseinfo_list, + int inner_relid); +extern MInfo * +match_order_mergeinfo(PathOrder * ordering, + List * mergeinfo_list); /* * joinrels.h - * routines to determine which relations to join + * routines to determine which relations to join */ -extern List *find_join_rels(Query *root, List *outer_rels); -extern void add_new_joininfos(Query *root, List *joinrels, List *outerrels); -extern List *final_join_rels(List *join_rel_list); +extern List *find_join_rels(Query * root, List * outer_rels); +extern void add_new_joininfos(Query * root, List * joinrels, List * outerrels); +extern List *final_join_rels(List * join_rel_list); /* * prototypes for path/prune.c */ -extern List *prune_joinrels(List *rel_list); -extern void prune_rel_paths(List *rel_list); -extern Path *prune_rel_path(Rel *rel, Path *unorderedpath); -extern List *merge_joinrels(List *rel_list1, List *rel_list2); -extern List *prune_oldrels(List *old_rels); +extern List *prune_joinrels(List * rel_list); +extern void prune_rel_paths(List * rel_list); +extern Path *prune_rel_path(Rel * rel, Path * unorderedpath); +extern List *merge_joinrels(List * rel_list1, List * rel_list2); +extern List *prune_oldrels(List * old_rels); -#endif /* PATHS_H */ +#endif /* PATHS_H */ diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h index ce752b57366..1b57c575e15 100644 --- a/src/include/optimizer/plancat.h +++ b/src/include/optimizer/plancat.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * plancat.h-- - * prototypes for plancat.c. + * prototypes for plancat.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: plancat.h,v 1.3 1996/11/06 09:24:57 scrappy Exp $ + * $Id: plancat.h,v 1.4 1997/09/07 04:59:15 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,47 +19,50 @@ * transient data structure to hold return value of index_info. Note that * indexkeys, orderOprs and classlist is "null-terminated". */ -typedef struct IdxInfoRetval { - Oid relid; /* OID of the index relation (not the OID - * of the relation being indexed) - */ - Oid relam; /* OID of the pg_am of this index */ - int pages; /* number of pages in the index relation */ - int tuples; /* number of tuples in the index relation */ - int *indexkeys; /* keys over which we're indexing */ - Oid *orderOprs; /* operators used for ordering purposes */ - Oid *classlist; /* classes of AM operators */ - Oid indproc; - Node *indpred; -} IdxInfoRetval; +typedef struct IdxInfoRetval +{ + Oid relid; /* OID of the index relation (not the OID + * of the relation being indexed) */ + Oid relam; /* OID of the pg_am of this index */ + int pages; /* number of pages in the index relation */ + int tuples; /* number of tuples in the index relation */ + int *indexkeys; /* keys over which we're indexing */ + Oid *orderOprs; /* operators used for ordering purposes */ + Oid *classlist; /* classes of AM operators */ + Oid indproc; + Node *indpred; +} IdxInfoRetval; -extern void relation_info(Query *root, - Oid relid, - bool *hashindex, int *pages, +extern void +relation_info(Query * root, + Oid relid, + bool * hashindex, int *pages, int *tuples); -extern bool index_info(Query *root, - bool first, int relid, IdxInfoRetval *info); +extern bool +index_info(Query * root, + bool first, int relid, IdxInfoRetval * info); -extern Cost +extern Cost restriction_selectivity(Oid functionObjectId, - Oid operatorObjectId, - Oid relationObjectId, - AttrNumber attributeNumber, - char *constValue, - int32 constFlag); + Oid operatorObjectId, + Oid relationObjectId, + AttrNumber attributeNumber, + char *constValue, + int32 constFlag); extern void -index_selectivity(Oid indid, Oid *classes, List *opnos, - Oid relid, List *attnos, List *values, List *flags, - int32 nkeys, float *idxPages, float *idxSelec); +index_selectivity(Oid indid, Oid * classes, List * opnos, + Oid relid, List * attnos, List * values, List * flags, + int32 nkeys, float *idxPages, float *idxSelec); -extern Cost join_selectivity(Oid functionObjectId, Oid operatorObjectId, - Oid relationObjectId1, AttrNumber attributeNumber1, - Oid relationObjectId2, AttrNumber attributeNumber2); +extern Cost +join_selectivity(Oid functionObjectId, Oid operatorObjectId, + Oid relationObjectId1, AttrNumber attributeNumber1, + Oid relationObjectId2, AttrNumber attributeNumber2); -extern List *find_inheritance_children(Oid inhparent); -extern List *VersionGetParents(Oid verrelid); +extern List *find_inheritance_children(Oid inhparent); +extern List *VersionGetParents(Oid verrelid); -#endif /* PLANCAT_H */ +#endif /* PLANCAT_H */ diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h index e0aec7ec635..9c8abc450d2 100644 --- a/src/include/optimizer/planmain.h +++ b/src/include/optimizer/planmain.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * planmain.h-- - * prototypes for various files in optimizer/plan + * prototypes for various files in optimizer/plan * * * Copyright (c) 1994, Regents of the University of California * - * $Id: planmain.h,v 1.1 1996/08/28 07:23:23 scrappy Exp $ + * $Id: planmain.h,v 1.2 1997/09/07 04:59:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,44 +17,50 @@ /* * prototypes for plan/planmain.c */ -extern Plan *query_planner(Query *root, - int command_type, List *tlist, List *qual); +extern Plan * +query_planner(Query * root, + int command_type, List * tlist, List * qual); /* * prototypes for plan/createplan.c */ -extern Plan *create_plan(Path *best_path); -extern SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid, - Plan *lefttree); -extern Sort *make_sort(List *tlist, Oid tempid, Plan *lefttree, - int keycount); -extern Agg *make_agg(List *tlist, int nagg, Aggreg **aggs); -extern Group *make_group(List *tlist, bool tuplePerGroup, int ngrp, - AttrNumber *grpColIdx, Sort *lefttree); -extern Unique *make_unique(List *tlist, Plan *lefttree, char *uniqueAttr); -extern List *generate_fjoin(List *tlist); +extern Plan *create_plan(Path * best_path); +extern SeqScan * +make_seqscan(List * qptlist, List * qpqual, Index scanrelid, + Plan * lefttree); +extern Sort * +make_sort(List * tlist, Oid tempid, Plan * lefttree, + int keycount); +extern Agg *make_agg(List * tlist, int nagg, Aggreg ** aggs); +extern Group * +make_group(List * tlist, bool tuplePerGroup, int ngrp, + AttrNumber * grpColIdx, Sort * lefttree); +extern Unique *make_unique(List * tlist, Plan * lefttree, char *uniqueAttr); +extern List *generate_fjoin(List * tlist); /* * prototypes for plan/initsplan.c */ -extern void initialize_base_rels_list(Query *root, List *tlist); -extern void initialize_base_rels_jinfo(Query *root, List *clauses); -extern void initialize_join_clause_info(List *rel_list); -extern void add_missing_vars_to_base_rels(Query *root, List *tlist); +extern void initialize_base_rels_list(Query * root, List * tlist); +extern void initialize_base_rels_jinfo(Query * root, List * clauses); +extern void initialize_join_clause_info(List * rel_list); +extern void add_missing_vars_to_base_rels(Query * root, List * tlist); /* * prototypes for plan/setrefs.c */ -extern void set_tlist_references(Plan *plan); -extern List *join_references(List *clauses, List *outer_tlist, - List *inner_tlist); -extern List *index_outerjoin_references(List *inner_indxqual, - List *outer_tlist, Index inner_relid); -extern void set_result_tlist_references(Result *resultNode); -extern void set_agg_tlist_references(Agg *aggNode); -extern void set_agg_agglist_references(Agg *aggNode); +extern void set_tlist_references(Plan * plan); +extern List * +join_references(List * clauses, List * outer_tlist, + List * inner_tlist); +extern List * +index_outerjoin_references(List * inner_indxqual, + List * outer_tlist, Index inner_relid); +extern void set_result_tlist_references(Result * resultNode); +extern void set_agg_tlist_references(Agg * aggNode); +extern void set_agg_agglist_references(Agg * aggNode); -#endif /* PLANMAIN_H */ +#endif /* PLANMAIN_H */ diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h index 649974cb5ff..d8f7be50e6f 100644 --- a/src/include/optimizer/planner.h +++ b/src/include/optimizer/planner.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * planner.h-- - * prototypes for planner.c. + * prototypes for planner.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: planner.h,v 1.2 1996/11/06 10:30:20 scrappy Exp $ + * $Id: planner.h,v 1.3 1997/09/07 04:59:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ /* */ -extern Plan *planner(Query *parse); -extern void pg_checkretval(Oid rettype, QueryTreeList *querytree_list); +extern Plan *planner(Query * parse); +extern void pg_checkretval(Oid rettype, QueryTreeList * querytree_list); -#endif /* PLANNER_H */ +#endif /* PLANNER_H */ diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h index b6c6ae549fd..6e408a84173 100644 --- a/src/include/optimizer/prep.h +++ b/src/include/optimizer/prep.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * prep.h-- - * prototypes for files in prep.c + * prototypes for files in prep.c * * * Copyright (c) 1994, Regents of the University of California * - * $Id: prep.h,v 1.2 1996/11/06 09:17:31 scrappy Exp $ + * $Id: prep.h,v 1.3 1997/09/07 04:59:18 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef PREP_H -#define PREP_H +#define PREP_H #include <nodes/plannodes.h> #include <nodes/parsenodes.h> @@ -19,33 +19,38 @@ /* * prototypes for archive.h */ -extern void plan_archive(List *rt); -extern List *find_archive_rels(Oid relid); +extern void plan_archive(List * rt); +extern List *find_archive_rels(Oid relid); /* * prototypes for prepqual.h */ -extern List *preprocess_qualification(Expr *qual, List *tlist, - List **existentialQualPtr); -extern List *cnfify(Expr *qual, bool removeAndFlag); +extern List * +preprocess_qualification(Expr * qual, List * tlist, + List ** existentialQualPtr); +extern List *cnfify(Expr * qual, bool removeAndFlag); /* * prototypes for preptlist.h */ -extern List *preprocess_targetlist(List *tlist, int command_type, - Index result_relation, List *range_table); +extern List * +preprocess_targetlist(List * tlist, int command_type, + Index result_relation, List * range_table); /* * prototypes for prepunion.h */ -typedef enum UnionFlag { - INHERITS_FLAG, ARCHIVE_FLAG, VERSION_FLAG -} UnionFlag; +typedef enum UnionFlag +{ + INHERITS_FLAG, ARCHIVE_FLAG, VERSION_FLAG +} UnionFlag; -extern List *find_all_inheritors(List *unexamined_relids, - List *examined_relids); -extern int first_matching_rt_entry(List *rangetable, UnionFlag flag); -extern Append *plan_union_queries(Index rt_index, Query *parse, - UnionFlag flag); +extern List * +find_all_inheritors(List * unexamined_relids, + List * examined_relids); +extern int first_matching_rt_entry(List * rangetable, UnionFlag flag); +extern Append * +plan_union_queries(Index rt_index, Query * parse, + UnionFlag flag); -#endif /* PREP_H */ +#endif /* PREP_H */ diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h index efffa8b444e..e83c1d10677 100644 --- a/src/include/optimizer/tlist.h +++ b/src/include/optimizer/tlist.h @@ -1,34 +1,36 @@ /*------------------------------------------------------------------------- * * tlist.h-- - * prototypes for tlist.c. + * prototypes for tlist.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: tlist.h,v 1.2 1997/08/19 21:39:31 momjian Exp $ + * $Id: tlist.h,v 1.3 1997/09/07 04:59:19 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef TLIST_H #define TLIST_H -extern int exec_tlist_length(List *targelist); -extern TargetEntry *tlistentry_member(Var *var, List *targetlist); -extern Expr *matching_tlvar(Var *var, List *targetlist); -extern void add_tl_element(Rel *rel, Var *var); -extern TargetEntry *create_tl_element(Var *var, int resdomno); -extern List *get_actual_tlist(List *tlist); -extern Resdom *tlist_member(Var *var, List *tlist); -extern Resdom *tlist_resdom(List *tlist, Resdom *resnode); +extern int exec_tlist_length(List * targelist); +extern TargetEntry *tlistentry_member(Var * var, List * targetlist); +extern Expr *matching_tlvar(Var * var, List * targetlist); +extern void add_tl_element(Rel * rel, Var * var); +extern TargetEntry *create_tl_element(Var * var, int resdomno); +extern List *get_actual_tlist(List * tlist); +extern Resdom *tlist_member(Var * var, List * tlist); +extern Resdom *tlist_resdom(List * tlist, Resdom * resnode); -extern TargetEntry *MakeTLE(Resdom *resdom, Node *expr); -extern Var *get_expr(TargetEntry *tle); +extern TargetEntry *MakeTLE(Resdom * resdom, Node * expr); +extern Var *get_expr(TargetEntry * tle); -extern TargetEntry *match_varid(Var *test_var, List *tlist); -extern List *new_unsorted_tlist(List *targetlist); -extern List *copy_vars(List *target, List *source); -extern List *flatten_tlist(List *tlist); -extern List *flatten_tlist_vars(List *full_tlist, - List *flat_tlist); -#endif /* TLIST_H */ +extern TargetEntry *match_varid(Var * test_var, List * tlist); +extern List *new_unsorted_tlist(List * targetlist); +extern List *copy_vars(List * target, List * source); +extern List *flatten_tlist(List * tlist); +extern List * +flatten_tlist_vars(List * full_tlist, + List * flat_tlist); + +#endif /* TLIST_H */ diff --git a/src/include/optimizer/var.h b/src/include/optimizer/var.h index 2df81e086d7..519b6957249 100644 --- a/src/include/optimizer/var.h +++ b/src/include/optimizer/var.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * var.h-- - * prototypes for var.c. + * prototypes for var.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: var.h,v 1.1 1996/08/28 07:23:29 scrappy Exp $ + * $Id: var.h,v 1.2 1997/09/07 04:59:23 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef VAR_H #define VAR_H -extern List *pull_varnos(Node *me); -extern bool contain_var_clause(Node *clause); -extern List *pull_var_clause(Node *clause); -extern bool var_equal(Var *var1, Var *var2); +extern List *pull_varnos(Node * me); +extern bool contain_var_clause(Node * clause); +extern List *pull_var_clause(Node * clause); +extern bool var_equal(Var * var1, Var * var2); -#endif /* VAR_H */ +#endif /* VAR_H */ diff --git a/src/include/optimizer/xfunc.h b/src/include/optimizer/xfunc.h index a1715bb544c..a608771effb 100644 --- a/src/include/optimizer/xfunc.h +++ b/src/include/optimizer/xfunc.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * xfunc.h-- - * prototypes for xfunc.c and predmig.c. + * prototypes for xfunc.c and predmig.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: xfunc.h,v 1.2 1996/11/06 07:44:13 scrappy Exp $ + * $Id: xfunc.h,v 1.3 1997/09/07 04:59:26 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,19 +17,21 @@ #include <nodes/relation.h> /* command line arg flags */ -#define XFUNC_OFF -1 /* do no optimization of expensive preds */ -#define XFUNC_NOR 2 /* do no optimization of OR clauses */ -#define XFUNC_NOPULL 4 /* never pull restrictions above joins */ -#define XFUNC_NOPM 8 /* don't do predicate migration */ -#define XFUNC_WAIT 16 /* don't do pullup until predicate migration */ -#define XFUNC_PULLALL 32 /* pull all expensive restrictions up, always */ +#define XFUNC_OFF -1 /* do no optimization of expensive preds */ +#define XFUNC_NOR 2 /* do no optimization of OR clauses */ +#define XFUNC_NOPULL 4 /* never pull restrictions above joins */ +#define XFUNC_NOPM 8 /* don't do predicate migration */ +#define XFUNC_WAIT 16 /* don't do pullup until predicate + * migration */ +#define XFUNC_PULLALL 32 /* pull all expensive restrictions up, + * always */ /* constants for local and join predicates */ #define XFUNC_LOCPRD 1 #define XFUNC_JOINPRD 2 #define XFUNC_UNKNOWN 0 -extern int XfuncMode; /* defined in tcop/postgres.c */ +extern int XfuncMode; /* defined in tcop/postgres.c */ /* defaults for function attributes used for expensive function calculations */ #define BYTE_PCT 100 @@ -47,39 +49,42 @@ extern int XfuncMode; /* defined in tcop/postgres.c */ #define is_join(pathnode) (length(get_relids(get_parent(pathnode))) > 1 ? 1 : 0) /* function prototypes from planner/path/xfunc.c */ -extern void xfunc_trypullup(Rel *rel); -extern int xfunc_shouldpull(Path *childpath, JoinPath *parentpath, - int whichchild, CInfo *maxcinfopt); -extern CInfo *xfunc_pullup(Path *childpath, JoinPath *parentpath, CInfo *cinfo, - int whichchild, int clausetype); -extern Cost xfunc_rank(Expr *clause); -extern Cost xfunc_expense(Query* queryInfo, Expr *clause); -extern Cost xfunc_join_expense(JoinPath *path, int whichchild); -extern Cost xfunc_local_expense(Expr *clause); -extern Cost xfunc_func_expense(Expr *node, List *args); -extern int xfunc_width(Expr *clause); +extern void xfunc_trypullup(Rel * rel); +extern int +xfunc_shouldpull(Path * childpath, JoinPath * parentpath, + int whichchild, CInfo * maxcinfopt); +extern CInfo * +xfunc_pullup(Path * childpath, JoinPath * parentpath, CInfo * cinfo, + int whichchild, int clausetype); +extern Cost xfunc_rank(Expr * clause); +extern Cost xfunc_expense(Query * queryInfo, Expr * clause); +extern Cost xfunc_join_expense(JoinPath * path, int whichchild); +extern Cost xfunc_local_expense(Expr * clause); +extern Cost xfunc_func_expense(Expr * node, List * args); +extern int xfunc_width(Expr * clause); + /* static, moved to xfunc.c */ /* extern int xfunc_card_unreferenced(Expr *clause, Relid referenced); */ -extern int xfunc_card_product(Relid relids); -extern List *xfunc_find_references(List *clause); -extern List *xfunc_primary_join(JoinPath *pathnode); -extern Cost xfunc_get_path_cost(Path *pathnode); -extern Cost xfunc_total_path_cost(JoinPath *pathnode); -extern Cost xfunc_expense_per_tuple(JoinPath *joinnode, int whichchild); -extern void xfunc_fixvars(Expr *clause, Rel *rel, int varno); -extern int xfunc_cinfo_compare(void *arg1, void *arg2); -extern int xfunc_clause_compare(void *arg1, void *arg2); -extern void xfunc_disjunct_sort(List *clause_list); -extern int xfunc_disjunct_compare(void *arg1, void *arg2); -extern int xfunc_func_width(RegProcedure funcid, List *args); -extern int xfunc_tuple_width(Relation rd); -extern int xfunc_num_join_clauses(JoinPath *path); -extern List *xfunc_LispRemove(List *foo, List *bar); -extern bool xfunc_copyrel(Rel *from, Rel **to); +extern int xfunc_card_product(Relid relids); +extern List *xfunc_find_references(List * clause); +extern List *xfunc_primary_join(JoinPath * pathnode); +extern Cost xfunc_get_path_cost(Path * pathnode); +extern Cost xfunc_total_path_cost(JoinPath * pathnode); +extern Cost xfunc_expense_per_tuple(JoinPath * joinnode, int whichchild); +extern void xfunc_fixvars(Expr * clause, Rel * rel, int varno); +extern int xfunc_cinfo_compare(void *arg1, void *arg2); +extern int xfunc_clause_compare(void *arg1, void *arg2); +extern void xfunc_disjunct_sort(List * clause_list); +extern int xfunc_disjunct_compare(void *arg1, void *arg2); +extern int xfunc_func_width(RegProcedure funcid, List * args); +extern int xfunc_tuple_width(Relation rd); +extern int xfunc_num_join_clauses(JoinPath * path); +extern List *xfunc_LispRemove(List * foo, List * bar); +extern bool xfunc_copyrel(Rel * from, Rel ** to); /* * function prototypes for path/predmig.c */ -extern bool xfunc_do_predmig(Path root); +extern bool xfunc_do_predmig(Path root); -#endif /* XFUNC_H */ +#endif /* XFUNC_H */ diff --git a/src/include/parser/catalog_utils.h b/src/include/parser/catalog_utils.h index dc4a7f90fa5..dd2241e19e0 100644 --- a/src/include/parser/catalog_utils.h +++ b/src/include/parser/catalog_utils.h @@ -1,53 +1,54 @@ /*------------------------------------------------------------------------- * * catalog_utils.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: catalog_utils.h,v 1.10 1997/08/19 21:39:33 momjian Exp $ + * $Id: catalog_utils.h,v 1.11 1997/09/07 04:59:27 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef CATALOG_UTILS_H -#define CATALOG_UTILS_H +#ifndef CATALOG_UTILS_H +#define CATALOG_UTILS_H #include <catalog/pg_type.h> #include <access/htup.h> - -typedef HeapTuple Type; -typedef HeapTuple Operator; -extern Type get_id_type(Oid id); -extern char *get_id_typname(Oid id); -extern Type type(char *); -extern Oid att_typeid(Relation rd, int attid); -extern int att_attnelems(Relation rd, int attid); -extern Oid typeid(Type tp); -extern int16 tlen(Type t); -extern bool tbyval(Type t); -extern char *tname(Type t); -extern int tbyvalue(Type t); -extern Oid oprid(Operator op); +typedef HeapTuple Type; +typedef HeapTuple Operator; + +extern Type get_id_type(Oid id); +extern char *get_id_typname(Oid id); +extern Type type(char *); +extern Oid att_typeid(Relation rd, int attid); +extern int att_attnelems(Relation rd, int attid); +extern Oid typeid(Type tp); +extern int16 tlen(Type t); +extern bool tbyval(Type t); +extern char *tname(Type t); +extern int tbyvalue(Type t); +extern Oid oprid(Operator op); extern Operator oper(char *op, Oid arg1, Oid arg2, bool noWarnings); extern Operator right_oper(char *op, Oid arg); extern Operator left_oper(char *op, Oid arg); -extern int varattno(Relation rd, char *a); -extern bool varisset(Relation rd, char *name); -extern int nf_varattno(Relation rd, char *a); -extern char *getAttrName(Relation rd, int attrno); -extern char *instr2(Type tp, char *string, int typlen); -extern Oid GetArrayElementType(Oid typearray); -extern Oid funcid_get_rettype(Oid funcid); -extern bool func_get_detail(char *funcname, int nargs, Oid *oid_array, - Oid *funcid, Oid *rettype, bool *retset, Oid **true_typeids); -extern Oid typeid_get_retinfunc(Oid type_id); -extern Oid typeid_get_retoutfunc(Oid type_id); -extern Oid typeid_get_relid(Oid type_id); -extern Oid get_typrelid(Type typ); -extern Oid get_typelem(Oid type_id); -extern void func_error(char *caller, char *funcname, int nargs, Oid *argtypes); -extern void agg_error(char *caller, char *aggname, Oid basetypeID); +extern int varattno(Relation rd, char *a); +extern bool varisset(Relation rd, char *name); +extern int nf_varattno(Relation rd, char *a); +extern char *getAttrName(Relation rd, int attrno); +extern char *instr2(Type tp, char *string, int typlen); +extern Oid GetArrayElementType(Oid typearray); +extern Oid funcid_get_rettype(Oid funcid); +extern bool +func_get_detail(char *funcname, int nargs, Oid * oid_array, + Oid * funcid, Oid * rettype, bool * retset, Oid ** true_typeids); +extern Oid typeid_get_retinfunc(Oid type_id); +extern Oid typeid_get_retoutfunc(Oid type_id); +extern Oid typeid_get_relid(Oid type_id); +extern Oid get_typrelid(Type typ); +extern Oid get_typelem(Oid type_id); +extern void func_error(char *caller, char *funcname, int nargs, Oid * argtypes); +extern void agg_error(char *caller, char *aggname, Oid basetypeID); -#endif /* CATALOG_UTILS_H */ +#endif /* CATALOG_UTILS_H */ diff --git a/src/include/parser/dbcommands.h b/src/include/parser/dbcommands.h index 86a0b47fd6b..4a7f32225ca 100644 --- a/src/include/parser/dbcommands.h +++ b/src/include/parser/dbcommands.h @@ -1,27 +1,26 @@ /*------------------------------------------------------------------------- * * dbcommands.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: dbcommands.h,v 1.2 1997/08/19 21:39:35 momjian Exp $ + * $Id: dbcommands.h,v 1.3 1997/09/07 04:59:29 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef DBCOMMANDS_H -#define DBCOMMANDS_H +#ifndef DBCOMMANDS_H +#define DBCOMMANDS_H /* * Originally from tmp/daemon.h. The functions declared in daemon.h does not - * exist; hence removed. -- AY 7/29/94 + * exist; hence removed. -- AY 7/29/94 */ -#define SIGKILLDAEMON1 SIGINT -#define SIGKILLDAEMON2 SIGTERM - -extern void createdb(char *dbname); -extern void destroydb(char *dbname); +#define SIGKILLDAEMON1 SIGINT +#define SIGKILLDAEMON2 SIGTERM -#endif /* DBCOMMANDS_H */ +extern void createdb(char *dbname); +extern void destroydb(char *dbname); +#endif /* DBCOMMANDS_H */ diff --git a/src/include/parser/gramparse.h b/src/include/parser/gramparse.h index 11cfa97019d..67ed5940f27 100644 --- a/src/include/parser/gramparse.h +++ b/src/include/parser/gramparse.h @@ -1,24 +1,24 @@ /*------------------------------------------------------------------------- * * gramparse.h-- - * scanner support routines. used by both the bootstrap lexer + * scanner support routines. used by both the bootstrap lexer * as well as the normal lexer * * Copyright (c) 1994, Regents of the University of California * - * $Id: gramparse.h,v 1.2 1996/11/10 03:05:41 momjian Exp $ + * $Id: gramparse.h,v 1.3 1997/09/07 04:59:31 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef GRAMPARSE_H -#define GRAMPARSE_H /* include once only */ +#define GRAMPARSE_H /* include once only */ /* from scan.l */ -extern void init_io(void); +extern void init_io(void); /* from gram.y */ -extern void parser_init(Oid *typev, int nargs); -extern int yyparse(void); +extern void parser_init(Oid * typev, int nargs); +extern int yyparse(void); -#endif /* GRAMPARSE_H */ +#endif /* GRAMPARSE_H */ diff --git a/src/include/parser/keywords.h b/src/include/parser/keywords.h index 66e113496a2..1453d60e1a4 100644 --- a/src/include/parser/keywords.h +++ b/src/include/parser/keywords.h @@ -1,25 +1,26 @@ /*------------------------------------------------------------------------- * * keywords.h-- - * string,atom lookup thingy, reduces strcmp traffic greatly - * in the bowels of the system. Look for actual defs in lib/C/atoms.c + * string,atom lookup thingy, reduces strcmp traffic greatly + * in the bowels of the system. Look for actual defs in lib/C/atoms.c * * * Copyright (c) 1994, Regents of the University of California * - * $Id: keywords.h,v 1.1 1996/08/28 07:23:55 scrappy Exp $ + * $Id: keywords.h,v 1.2 1997/09/07 04:59:34 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef KEYWORDS_H -#define KEYWORDS_H +#ifndef KEYWORDS_H +#define KEYWORDS_H -typedef struct ScanKeyword { - char *name; - int value; -} ScanKeyword; +typedef struct ScanKeyword +{ + char *name; + int value; +} ScanKeyword; extern ScanKeyword *ScanKeywordLookup(char *text); -extern char* AtomValueGetString(int atomval); +extern char *AtomValueGetString(int atomval); -#endif /* KEYWORDS_H */ +#endif /* KEYWORDS_H */ diff --git a/src/include/parser/parse_query.h b/src/include/parser/parse_query.h index dc6f16dbc47..decf425ca92 100644 --- a/src/include/parser/parse_query.h +++ b/src/include/parser/parse_query.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * parse_query.h-- - * prototypes for parse_query.c. + * prototypes for parse_query.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_query.h,v 1.9 1997/08/20 14:54:26 momjian Exp $ + * $Id: parse_query.h,v 1.10 1997/09/07 04:59:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,55 +17,62 @@ #include <parser/parse_state.h> #include <nodes/parsenodes.h> -typedef struct QueryTreeList { - int len; /* number of queries */ - Query** qtrees; -} QueryTreeList; +typedef struct QueryTreeList +{ + int len; /* number of queries */ + Query **qtrees; +} QueryTreeList; -extern RangeTblEntry *refnameRangeTableEntry(List *rtable, char *refname); -extern RangeTblEntry *colnameRangeTableEntry(ParseState *pstate, char *colname); -extern int refnameRangeTablePosn(List *rtable, char *refname); -extern RangeTblEntry *addRangeTableEntry(ParseState *pstate, - char *relname, char *refname, - bool inh, bool inFromCl, - TimeRange *timeRange); -extern List *expandAll(ParseState *pstate, char *relname, char *refname, - int *this_resno); -extern TimeQual makeTimeRange(char *datestring1, char *datestring2, - int timecode); -extern Expr *make_op(char *opname, Node *ltree, Node *rtree); +extern RangeTblEntry *refnameRangeTableEntry(List * rtable, char *refname); +extern RangeTblEntry *colnameRangeTableEntry(ParseState * pstate, char *colname); +extern int refnameRangeTablePosn(List * rtable, char *refname); +extern RangeTblEntry * +addRangeTableEntry(ParseState * pstate, + char *relname, char *refname, + bool inh, bool inFromCl, + TimeRange * timeRange); +extern List * +expandAll(ParseState * pstate, char *relname, char *refname, + int *this_resno); +extern TimeQual +makeTimeRange(char *datestring1, char *datestring2, + int timecode); +extern Expr *make_op(char *opname, Node * ltree, Node * rtree); -extern Oid find_atttype(Oid relid, char *attrname); -extern Var *make_var(ParseState *pstate, - char *relname, char *attrname, Oid *type_id); -extern ArrayRef *make_array_ref(Node *array, List *indirection); -extern ArrayRef *make_array_set(Expr *target_expr, List *upperIndexpr, - List *lowerIndexpr, Expr *expr); -extern Const *make_const(Value *value); +extern Oid find_atttype(Oid relid, char *attrname); +extern Var * +make_var(ParseState * pstate, + char *relname, char *attrname, Oid * type_id); +extern ArrayRef *make_array_ref(Node * array, List * indirection); +extern ArrayRef * +make_array_set(Expr * target_expr, List * upperIndexpr, + List * lowerIndexpr, Expr * expr); +extern Const *make_const(Value * value); -extern void param_type_init(Oid* typev, int nargs); -extern Oid param_type(int t); +extern void param_type_init(Oid * typev, int nargs); +extern Oid param_type(int t); /* parser.c (was ylib.c) */ -extern QueryTreeList *parser(char *str, Oid *typev, int nargs); -extern Node *parser_typecast(Value *expr, TypeName *typename, int typlen); -extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen); -extern Aggreg *ParseAgg(char *aggname, Oid basetype, Node *target); -extern void handleTargetColname(ParseState *pstate, char **resname, +extern QueryTreeList *parser(char *str, Oid * typev, int nargs); +extern Node *parser_typecast(Value * expr, TypeName * typename, int typlen); +extern Node *parser_typecast2(Node * expr, Oid exprType, Type tp, int typlen); +extern Aggreg *ParseAgg(char *aggname, Oid basetype, Node * target); +extern void +handleTargetColname(ParseState * pstate, char **resname, char *refname, char *colname); /* * analyze.c */ -Oid exprType(Node *expr); -QueryTreeList *parse_analyze(List *querytree_list); +Oid exprType(Node * expr); +QueryTreeList *parse_analyze(List * querytree_list); /* define in parse_query.c, used in gram.y */ -extern Oid *param_type_info; -extern int pfunc_num_args; +extern Oid *param_type_info; +extern int pfunc_num_args; /* useful macros */ #define ISCOMPLEX(type) (typeid_get_relid(type) ? true : false) -#endif /* PARSE_QUERY_H */ +#endif /* PARSE_QUERY_H */ diff --git a/src/include/parser/parse_state.h b/src/include/parser/parse_state.h index c2f900e81f3..05f860290fb 100644 --- a/src/include/parser/parse_state.h +++ b/src/include/parser/parse_state.h @@ -4,7 +4,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_state.h,v 1.5 1996/11/04 12:12:52 scrappy Exp $ + * $Id: parse_state.h,v 1.6 1997/09/07 04:59:37 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -12,22 +12,23 @@ #ifndef PARSE_STATE_H #define PARSE_STATE_H -#include <nodes/parsenodes.h> +#include <nodes/parsenodes.h> #include <utils/rel.h> /* state information used during parse analysis */ -typedef struct ParseState { - int p_last_resno; - List *p_rtable; - int p_numAgg; - List *p_aggs; - bool p_is_insert; - List *p_insert_columns; - bool p_is_update; - bool p_is_rule; - Relation p_target_relation; - RangeTblEntry *p_target_rangetblentry; -} ParseState; +typedef struct ParseState +{ + int p_last_resno; + List *p_rtable; + int p_numAgg; + List *p_aggs; + bool p_is_insert; + List *p_insert_columns; + bool p_is_update; + bool p_is_rule; + Relation p_target_relation; + RangeTblEntry *p_target_rangetblentry; +} ParseState; -#endif /*PARSE_QUERY_H*/ +#endif /* PARSE_QUERY_H */ diff --git a/src/include/parser/parsetree.h b/src/include/parser/parsetree.h index b51cc0f3057..a5662cd9d79 100644 --- a/src/include/parser/parsetree.h +++ b/src/include/parser/parsetree.h @@ -1,78 +1,77 @@ /*------------------------------------------------------------------------- * * parsetree.h-- - * Routines to access various components and subcomponents of - * parse trees. + * Routines to access various components and subcomponents of + * parse trees. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: parsetree.h,v 1.2 1996/11/06 10:30:39 scrappy Exp $ + * $Id: parsetree.h,v 1.3 1997/09/07 04:59:38 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef PARSETREE_H -#define PARSETREE_H /* include once only */ +#define PARSETREE_H /* include once only */ /* ---------------- - * need pg_list.h for definitions of CAR(), etc. macros + * need pg_list.h for definitions of CAR(), etc. macros * ---------------- */ /* ---------------- - * range table macros + * range table macros * - * parse tree: - * (root targetlist qual) - * ^^^^ - * parse root: - * (numlevels cmdtype resrel rangetable priority ruleinfo nestdotinfo) - * ^^^^^^^^^^ - * range table: - * (rtentry ...) + * parse tree: + * (root targetlist qual) + * ^^^^ + * parse root: + * (numlevels cmdtype resrel rangetable priority ruleinfo nestdotinfo) + * ^^^^^^^^^^ + * range table: + * (rtentry ...) * - * rtentry: - * note: this might be wrong, I don't understand how - * rt_time / rt_archive_time work together. anyways it - * looks something like: + * rtentry: + * note: this might be wrong, I don't understand how + * rt_time / rt_archive_time work together. anyways it + * looks something like: * - * (relname ? relid timestuff flags rulelocks) - * or (new/cur relname relid timestuff flags rulelocks) + * (relname ? relid timestuff flags rulelocks) + * or (new/cur relname relid timestuff flags rulelocks) * - * someone who knows more should correct this -cim 6/9/91 + * someone who knows more should correct this -cim 6/9/91 * ---------------- */ #define rt_relname(rt_entry) \ - ((!strcmp(((rt_entry)->refname),"*CURRENT*") ||\ - !strcmp(((rt_entry)->refname),"*NEW*")) ? ((rt_entry)->refname) : \ - ((char *)(rt_entry)->relname)) + ((!strcmp(((rt_entry)->refname),"*CURRENT*") ||\ + !strcmp(((rt_entry)->refname),"*NEW*")) ? ((rt_entry)->refname) : \ + ((char *)(rt_entry)->relname)) /* - * rt_fetch - * rt_store + * rt_fetch + * rt_store * - * Access and (destructively) replace rangetable entries. + * Access and (destructively) replace rangetable entries. * */ #define rt_fetch(rangetable_index, rangetable) \ - ((RangeTblEntry*)nth((rangetable_index)-1, rangetable)) + ((RangeTblEntry*)nth((rangetable_index)-1, rangetable)) #define rt_store(rangetable_index, rangetable, rt) \ - set_nth(rangetable, (rangetable_index)-1, rt) + set_nth(rangetable, (rangetable_index)-1, rt) /* - * getrelid - * getrelname + * getrelid + * getrelname * - * Given the range index of a relation, return the corresponding - * relation id or relation name. + * Given the range index of a relation, return the corresponding + * relation id or relation name. */ #define getrelid(rangeindex,rangetable) \ - ((RangeTblEntry*)nth((rangeindex)-1, rangetable))->relid + ((RangeTblEntry*)nth((rangeindex)-1, rangetable))->relid #define getrelname(rangeindex, rangetable) \ - rt_relname((RangeTblEntry*)nth((rangeindex)-1, rangetable)) + rt_relname((RangeTblEntry*)nth((rangeindex)-1, rangetable)) -#endif /* PARSETREE_H */ - +#endif /* PARSETREE_H */ diff --git a/src/include/parser/scansup.h b/src/include/parser/scansup.h index 4c955bc43e1..e3dd13a6064 100644 --- a/src/include/parser/scansup.h +++ b/src/include/parser/scansup.h @@ -1,17 +1,14 @@ /*------------------------------------------------------------------------- * * scansup.h-- - * scanner support routines. used by both the bootstrap lexer + * scanner support routines. used by both the bootstrap lexer * as well as the normal lexer * * Copyright (c) 1994, Regents of the University of California * - * $Id: scansup.h,v 1.1 1996/08/28 07:23:58 scrappy Exp $ + * $Id: scansup.h,v 1.2 1997/09/07 04:59:39 momjian Exp $ * *------------------------------------------------------------------------- */ -extern char* scanstr(char *s); - - - +extern char *scanstr(char *s); diff --git a/src/include/parser/sysfunc.h b/src/include/parser/sysfunc.h index b0761d4c351..2a1f87d8590 100644 --- a/src/include/parser/sysfunc.h +++ b/src/include/parser/sysfunc.h @@ -1,10 +1,9 @@ /*------------------------------------------------------------------------- - * + * * sysfunc.h-- - * support for system functions - * + * support for system functions + * * ------------------------------------------------------------------------- */ -extern char *SystemFunctionHandler(char *funct); - +extern char *SystemFunctionHandler(char *funct); diff --git a/src/include/port/BSD44_derived.h b/src/include/port/BSD44_derived.h index e89c0094170..867246f3b86 100644 --- a/src/include/port/BSD44_derived.h +++ b/src/include/port/BSD44_derived.h @@ -1,15 +1,15 @@ -# define USE_POSIX_TIME -# if defined(i386) -# define NEED_I386_TAS_ASM -# endif -# if defined(sparc) -# define NEED_SPARC_TAS_ASM -# endif -# if defined(ns32k) -# define NEED_NS32k_TAS_ASM -# endif -# define HAS_TEST_AND_SET -# if defined(__mips__) -/* # undef HAS_TEST_AND_SET */ -# endif - typedef unsigned char slock_t; +#define USE_POSIX_TIME +#if defined(i386) +#define NEED_I386_TAS_ASM +#endif +#if defined(sparc) +#define NEED_SPARC_TAS_ASM +#endif +#if defined(ns32k) +#define NEED_NS32k_TAS_ASM +#endif +#define HAS_TEST_AND_SET +#if defined(__mips__) +/* # undef HAS_TEST_AND_SET */ +#endif +typedef unsigned char slock_t; diff --git a/src/include/port/aix.h b/src/include/port/aix.h index 25d33eb87b8..a329e967f43 100644 --- a/src/include/port/aix.h +++ b/src/include/port/aix.h @@ -1,8 +1,10 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define CLASS_CONFLICT -# define DISABLE_XOPEN_NLS -# define HAVE_ANSI_CPP -# define HAS_TEST_AND_SET - typedef unsigned int slock_t; -#include <sys/machine.h> /* ENDIAN definitions for network communication */ +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define CLASS_CONFLICT +#define DISABLE_XOPEN_NLS +#define HAVE_ANSI_CPP +#define HAS_TEST_AND_SET +typedef unsigned int slock_t; + +#include <sys/machine.h> /* ENDIAN definitions for network + * communication */ diff --git a/src/include/port/alpha.h b/src/include/port/alpha.h index 5ac7ba167a0..40dfbfa9496 100644 --- a/src/include/port/alpha.h +++ b/src/include/port/alpha.h @@ -1,7 +1,7 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define DISABLE_XOPEN_NLS -# define HAS_LONG_LONG -# define HAS_TEST_AND_SET -# include <sys/mman.h> /* for msemaphore */ - typedef msemaphore slock_t; +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define DISABLE_XOPEN_NLS +#define HAS_LONG_LONG +#define HAS_TEST_AND_SET +#include <sys/mman.h> /* for msemaphore */ +typedef msemaphore slock_t; diff --git a/src/include/port/bsdi.h b/src/include/port/bsdi.h index 022c41dbd6a..617ef6768ae 100644 --- a/src/include/port/bsdi.h +++ b/src/include/port/bsdi.h @@ -1,9 +1,9 @@ -# if defined(i386) -# define NEED_I386_TAS_ASM -# endif -# if defined(sparc) -# define NEED_SPARC_TAS_ASM -# endif -# define USE_POSIX_TIME -# define HAS_TEST_AND_SET - typedef unsigned char slock_t; +#if defined(i386) +#define NEED_I386_TAS_ASM +#endif +#if defined(sparc) +#define NEED_SPARC_TAS_ASM +#endif +#define USE_POSIX_TIME +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; diff --git a/src/include/port/dgux.h b/src/include/port/dgux.h index 4d95ea3160f..447d16f77df 100644 --- a/src/include/port/dgux.h +++ b/src/include/port/dgux.h @@ -2,16 +2,15 @@ #define USE_POSIX_SIGNALS #define USE_POSIX_TIME -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN #endif - diff --git a/src/include/port/hpux.h b/src/include/port/hpux.h index 0315f79d629..ec0859e521c 100644 --- a/src/include/port/hpux.h +++ b/src/include/port/hpux.h @@ -1,18 +1,20 @@ -# define JMP_BUF -# define USE_POSIX_TIME -# define HAS_TEST_AND_SET - typedef struct { int sem[4]; } slock_t; +#define JMP_BUF +#define USE_POSIX_TIME +#define HAS_TEST_AND_SET +typedef struct +{ + int sem[4]; +} slock_t; -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN #endif - diff --git a/src/include/port/i386_solaris.h b/src/include/port/i386_solaris.h index 92d276985d0..b2df1ba5e2c 100644 --- a/src/include/port/i386_solaris.h +++ b/src/include/port/i386_solaris.h @@ -1,42 +1,42 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NO_EMPTY_STMTS -# define SYSV_DIRENT -# define HAS_TEST_AND_SET - typedef unsigned char slock_t; +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NO_EMPTY_STMTS +#define SYSV_DIRENT +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; #include <sys/isa_defs.h> -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN #endif -#ifndef NAN +#ifndef NAN -#ifndef __nan_bytes -#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } -#endif /* __nan_bytes */ +#ifndef __nan_bytes +#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } +#endif /* __nan_bytes */ -#ifdef __GNUC__ +#ifdef __GNUC__ #define NAN \ - (__extension__ ((union { unsigned char __c[8]; \ - double __d; }) \ - { __nan_bytes }).__d) + (__extension__ ((union { unsigned char __c[8]; \ + double __d; }) \ + { __nan_bytes }).__d) -#else /* Not GCC. */ -#define NAN (*(__const double *) __nan) -#endif /* GCC. */ -#endif /* NAN */ +#else /* Not GCC. */ +#define NAN (*(__const double *) __nan) +#endif /* GCC. */ +#endif /* NAN */ -#ifndef index +#ifndef index #define index strchr #endif diff --git a/src/include/port/irix5.h b/src/include/port/irix5.h index c995eb671fb..83c7837584f 100644 --- a/src/include/port/irix5.h +++ b/src/include/port/irix5.h @@ -1,7 +1,7 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NO_EMPTY_STMTS -# define SYSV_DIRENT -# define HAS_TEST_AND_SET -# include <abi_mutex.h> - typedef abilock_t slock_t; +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NO_EMPTY_STMTS +#define SYSV_DIRENT +#define HAS_TEST_AND_SET +#include <abi_mutex.h> +typedef abilock_t slock_t; diff --git a/src/include/port/linux.h b/src/include/port/linux.h index 99d8eb65aef..b04e45bebab 100644 --- a/src/include/port/linux.h +++ b/src/include/port/linux.h @@ -4,31 +4,34 @@ __USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to be used. */ -# define JMP_BUF -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NEED_I386_TAS_ASM -# define HAS_TEST_AND_SET - -# if defined(PPC) - typedef unsigned int slock_t; -# endif - -# if defined(PPC) -# undef NEED_I386_TAS_ASM -# undef HAVE_INT_TIMEZONE -# endif - -# if defined(sparc) -# undef NEED_I386_TAS_ASM -# endif - - -# if defined(__alpha__) -# undef NEED_I386_TAS_ASM -# endif -# if defined(__alpha__) - typedef long int slock_t; -# else - typedef unsigned char slock_t; -# endif +#define JMP_BUF +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NEED_I386_TAS_ASM +#define HAS_TEST_AND_SET + +#if defined(PPC) +typedef unsigned int slock_t; + +#endif + +#if defined(PPC) +#undef NEED_I386_TAS_ASM +#undef HAVE_INT_TIMEZONE +#endif + +#if defined(sparc) +#undef NEED_I386_TAS_ASM +#endif + + +#if defined(__alpha__) +#undef NEED_I386_TAS_ASM +#endif +#if defined(__alpha__) +typedef long int slock_t; + +#else +typedef unsigned char slock_t; + +#endif diff --git a/src/include/port/nextstep.h b/src/include/port/nextstep.h index ca078ab10d4..f893b48b03c 100644 --- a/src/include/port/nextstep.h +++ b/src/include/port/nextstep.h @@ -1,18 +1,20 @@ -# include <libc.h> -# include <sys/ioctl.h> -# if defined(__STRICT_ANSI__) -# define isascii(c) ((unsigned)(c)<=0177) -# endif - extern char* strdup (const char* string); -# ifndef _POSIX_SOURCE - typedef unsigned short mode_t; - typedef int sigset_t; -# define SIG_BLOCK 00 -# define SIG_UNBLOCK 01 -# define SIG_SETMASK 02 -# define NEED_SIG_JMP -# endif +#include <libc.h> +#include <sys/ioctl.h> +#if defined(__STRICT_ANSI__) +#define isascii(c) ((unsigned)(c)<=0177) +#endif +extern char *strdup(const char *string); -# define JMP_BUF -# define NO_WAITPID - typedef struct mutex slock_t; +#ifndef _POSIX_SOURCE +typedef unsigned short mode_t; +typedef int sigset_t; + +#define SIG_BLOCK 00 +#define SIG_UNBLOCK 01 +#define SIG_SETMASK 02 +#define NEED_SIG_JMP +#endif + +#define JMP_BUF +#define NO_WAITPID +typedef struct mutex slock_t; diff --git a/src/include/port/sco.h b/src/include/port/sco.h index 0792d7d4e27..5bc74f7279c 100644 --- a/src/include/port/sco.h +++ b/src/include/port/sco.h @@ -1,6 +1,6 @@ -#include <limits.h> /* For _POSIX_PATH_MAX */ +#include <limits.h> /* For _POSIX_PATH_MAX */ -#define MAXPATHLEN _POSIX_PATH_MAX -#define SIGURG SIGUSR1 +#define MAXPATHLEN _POSIX_PATH_MAX +#define SIGURG SIGUSR1 -#define NOFILE NOFILES_MIN +#define NOFILE NOFILES_MIN diff --git a/src/include/port/sparc_solaris.h b/src/include/port/sparc_solaris.h index 9e7a6b7775c..8383215b708 100644 --- a/src/include/port/sparc_solaris.h +++ b/src/include/port/sparc_solaris.h @@ -1,19 +1,19 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NO_EMPTY_STMTS -# define SYSV_DIRENT -# define HAS_TEST_AND_SET - typedef unsigned char slock_t; +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NO_EMPTY_STMTS +#define SYSV_DIRENT +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN #endif diff --git a/src/include/port/sunos4.h b/src/include/port/sunos4.h index d395cbdbe12..f08580cfafc 100644 --- a/src/include/port/sunos4.h +++ b/src/include/port/sunos4.h @@ -1,14 +1,14 @@ #define USE_POSIX_TIME -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN #endif diff --git a/src/include/port/svr4.h b/src/include/port/svr4.h index 0910fe2d298..56e7dbd9e2d 100644 --- a/src/include/port/svr4.h +++ b/src/include/port/svr4.h @@ -1,10 +1,10 @@ -# define USE_POSIX_TIME -# define USE_POSIX_SIGNALS -# define NO_EMPTY_STMTS -# define SYSV_DIRENT +#define USE_POSIX_TIME +#define USE_POSIX_SIGNALS +#define NO_EMPTY_STMTS +#define SYSV_DIRENT -#ifndef BYTE_ORDER -#ifdef MIPSEB -#define BYTE_ORDER BIG_ENDIAN +#ifndef BYTE_ORDER +#ifdef MIPSEB +#define BYTE_ORDER BIG_ENDIAN +#endif #endif -#endif diff --git a/src/include/port/ultrix4.h b/src/include/port/ultrix4.h index 38cce4d257f..87678df9ba2 100644 --- a/src/include/port/ultrix4.h +++ b/src/include/port/ultrix4.h @@ -1,17 +1,17 @@ -# define USE_POSIX_TIME -# define NEED_STRDUP +#define USE_POSIX_TIME +#define NEED_STRDUP -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN #endif /* @@ -23,50 +23,51 @@ * warning-free compilation. */ -#include <sys/types.h> /* Declare various types, e.g. size_t, fd_set */ +#include <sys/types.h> /* Declare various types, e.g. size_t, + * fd_set */ -extern int strcasecmp(const char *, const char *); -extern void bzero(void *, size_t); +extern int strcasecmp(const char *, const char *); +extern void bzero(void *, size_t); -extern int fp_class_d(double); -extern long random(void); +extern int fp_class_d(double); +extern long random(void); struct rusage; -extern int getrusage(int, struct rusage *); +extern int getrusage(int, struct rusage *); -extern int ioctl(int, unsigned long, ...); +extern int ioctl(int, unsigned long,...); -extern int socket(int, int, int); +extern int socket(int, int, int); struct sockaddr; -extern int connect(int, const struct sockaddr *, int); -typedef int ssize_t; -extern ssize_t send(int, const void *, size_t, int); -extern ssize_t recv(int, void*, size_t, int); -extern int setsockopt(int, int, int, const void *, int); -extern int bind(int, const struct sockaddr *, int); -extern int listen(int, int); -extern int accept(int, struct sockaddr *, int *); -extern int getsockname(int, struct sockaddr *, int *); -extern ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, int *); -extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, int); +extern int connect(int, const struct sockaddr *, int); +typedef int ssize_t; +extern ssize_t send(int, const void *, size_t, int); +extern ssize_t recv(int, void *, size_t, int); +extern int setsockopt(int, int, int, const void *, int); +extern int bind(int, const struct sockaddr *, int); +extern int listen(int, int); +extern int accept(int, struct sockaddr *, int *); +extern int getsockname(int, struct sockaddr *, int *); +extern ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, int *); +extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, int); struct timeval; -extern int select(int, fd_set*, fd_set*, fd_set*, struct timeval *); +extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -extern int gethostname(char *, int); +extern int gethostname(char *, int); -extern int getopt(int, char * const *, const char *); -extern int putenv(const char *); +extern int getopt(int, char *const *, const char *); +extern int putenv(const char *); -extern pid_t vfork(void); +extern pid_t vfork(void); struct itimerval; -extern int setitimer(int, const struct itimerval*, struct itimerval *); +extern int setitimer(int, const struct itimerval *, struct itimerval *); struct timezone; -extern int gettimeofday(struct timeval *, struct timezone *); +extern int gettimeofday(struct timeval *, struct timezone *); -extern int fsync(int); -extern int ftruncate(int, off_t); +extern int fsync(int); +extern int ftruncate(int, off_t); -extern char *crypt(char *, char *); +extern char *crypt(char *, char *); /* End of ultrix4.h */ diff --git a/src/include/port/univel.h b/src/include/port/univel.h index 9ce1fef1ccd..c0bc9821867 100644 --- a/src/include/port/univel.h +++ b/src/include/port/univel.h @@ -1,28 +1,28 @@ -# define USE_POSIX_TIME -# define NO_EMPTY_STMTS -# define USE_POSIX_SIGNALS -# define SYSV_DIRENT +#define USE_POSIX_TIME +#define NO_EMPTY_STMTS +#define USE_POSIX_SIGNALS +#define SYSV_DIRENT #if 0 -# define HAS_TEST_AND_SET - typedef unsigned char slock_t; +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; + #endif -extern long random(void); -extern void srandom(int seed); -extern int strcasecmp(char *s1,char *s2); -extern int gethostname(char *name,int namelen); +extern long random(void); +extern void srandom(int seed); +extern int strcasecmp(char *s1, char *s2); +extern int gethostname(char *name, int namelen); -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 #endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 #endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 #endif -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN #endif - diff --git a/src/include/port/win32.h b/src/include/port/win32.h index 7f4c97c582e..d343f606924 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -1,8 +1,8 @@ -# define JMP_BUF -# define NEED_SIG_JMP -# define NO_UNISTD_H -# define USES_WINSOCK -# define NOFILE 100 -# ifndef MAXPATHLEN -# define MAXPATHLEN 250 -# endif +#define JMP_BUF +#define NEED_SIG_JMP +#define NO_UNISTD_H +#define USES_WINSOCK +#define NOFILE 100 +#ifndef MAXPATHLEN +#define MAXPATHLEN 250 +#endif diff --git a/src/include/postgres.h b/src/include/postgres.h index 541da6413b1..2e37eb95fd7 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -1,35 +1,35 @@ /*------------------------------------------------------------------------- * * postgres.h-- - * definition of (and support for) postgres system types. + * definition of (and support for) postgres system types. * this file is included by almost every .c in the system * * Copyright (c) 1995, Regents of the University of California * - * $Id: postgres.h,v 1.6 1997/07/11 14:09:00 thomas Exp $ + * $Id: postgres.h,v 1.7 1997/09/07 04:55:39 momjian Exp $ * *------------------------------------------------------------------------- */ /* - * NOTES - * this file will eventually contain the definitions for the - * following (and perhaps other) system types: + * NOTES + * this file will eventually contain the definitions for the + * following (and perhaps other) system types: * - * int2 int4 float4 float8 - * Oid regproc RegProcedure - * aclitem - * struct varlena - * char8 char16 int28 oid8 - * bytea text - * NameData Name - * oidint4 oidint2 oidname + * int2 int4 float4 float8 + * Oid regproc RegProcedure + * aclitem + * struct varlena + * char8 char16 int28 oid8 + * bytea text + * NameData Name + * oidint4 oidint2 oidname * - * TABLE OF CONTENTS - * 1) simple type definitions - * 2) varlena and array types - * 3) TransactionId and CommandId - * 4) genbki macros used by catalog/pg_xxx.h files - * 5) random CSIGNBIT, MAXPGPATH, STATUS macros + * TABLE OF CONTENTS + * 1) simple type definitions + * 2) varlena and array types + * 3) TransactionId and CommandId + * 4) genbki macros used by catalog/pg_xxx.h files + * 5) random CSIGNBIT, MAXPGPATH, STATUS macros * * ---------------------------------------------------------------- */ @@ -43,128 +43,137 @@ #include "utils/palloc.h" /* ---------------------------------------------------------------- - * Section 1: simple type definitions + * Section 1: simple type definitions * ---------------------------------------------------------------- */ -typedef int16 int2; +typedef int16 int2; typedef int32 int4; typedef float float4; typedef double float8; typedef int4 aclitem; -#define InvalidOid 0 +#define InvalidOid 0 #define OidIsValid(objectId) ((bool) (objectId != InvalidOid)) /* unfortunately, both regproc and RegProcedure are used */ -typedef Oid regproc; -typedef Oid RegProcedure; +typedef Oid regproc; +typedef Oid RegProcedure; /* ptr to func returning (char *) */ -typedef char * ((*func_ptr)()); +typedef char *((*func_ptr) ()); -#define RegProcedureIsValid(p) OidIsValid(p) +#define RegProcedureIsValid(p) OidIsValid(p) /* ---------------------------------------------------------------- - * Section 2: variable length and array types + * Section 2: variable length and array types * ---------------------------------------------------------------- */ /* ---------------- - * struct varlena + * struct varlena * ---------------- */ -struct varlena { - int32 vl_len; - char vl_dat[1]; +struct varlena +{ + int32 vl_len; + char vl_dat[1]; }; -#define VARSIZE(PTR) (((struct varlena *)(PTR))->vl_len) -#define VARDATA(PTR) (((struct varlena *)(PTR))->vl_dat) -#define VARHDRSZ sizeof(int32) +#define VARSIZE(PTR) (((struct varlena *)(PTR))->vl_len) +#define VARDATA(PTR) (((struct varlena *)(PTR))->vl_dat) +#define VARHDRSZ sizeof(int32) typedef struct varlena bytea; typedef struct varlena text; -typedef struct char8 { - char data[8]; -} char8; +typedef struct char8 +{ + char data[8]; +} char8; /* ---------------- - * char16 + * char16 * ---------------- */ -typedef struct char16 { - char data[16]; -} char16; +typedef struct char16 +{ + char data[16]; +} char16; -typedef char16 *Char16; +typedef char16 *Char16; -typedef int2 int28[8]; -typedef Oid oid8[8]; +typedef int2 int28[8]; +typedef Oid oid8[8]; -typedef struct nameData { - char data[NAMEDATALEN]; -} NameData; -typedef NameData *Name; +typedef struct nameData +{ + char data[NAMEDATALEN]; +} NameData; +typedef NameData *Name; /* ---------------- - * oidint4 + * oidint4 * - * this is a new system type used by the file interface. + * this is a new system type used by the file interface. * ---------------- */ -typedef struct OidInt4Data { - Oid oi_oid; - int32 oi_int4; -} OidInt4Data; +typedef struct OidInt4Data +{ + Oid oi_oid; + int32 oi_int4; +} OidInt4Data; -typedef struct OidInt4Data *OidInt4; +typedef struct OidInt4Data *OidInt4; /* ---------------- - * oidint2 + * oidint2 * - * this is a new system type used to define indices on two attrs. + * this is a new system type used to define indices on two attrs. * ---------------- */ -typedef struct OidInt2Data { - Oid oi_oid; - int16 oi_int2; -} OidInt2Data; +typedef struct OidInt2Data +{ + Oid oi_oid; + int16 oi_int2; +} OidInt2Data; -typedef struct OidInt2Data *OidInt2; +typedef struct OidInt2Data *OidInt2; /* ---------------- - * oidname + * oidname * - * this is a new system type used to define indices on two attrs. + * this is a new system type used to define indices on two attrs. * ---------------- */ -typedef struct OidNameData { - Oid id; - NameData name; -} OidNameData; +typedef struct OidNameData +{ + Oid id; + NameData name; +} OidNameData; -typedef struct OidNameData *OidName; +typedef struct OidNameData *OidName; /* ---------------------------------------------------------------- - * Section 3: TransactionId and CommandId + * Section 3: TransactionId and CommandId * ---------------------------------------------------------------- */ -typedef uint32 TransactionId; +typedef uint32 TransactionId; + #define InvalidTransactionId 0 -typedef uint16 CommandId; +typedef uint16 CommandId; + #define FirstCommandId 0 /* ---------------------------------------------------------------- - * Section 4: genbki macros used by the - * catalog/pg_xxx.h files + * Section 4: genbki macros used by the + * catalog/pg_xxx.h files * ---------------------------------------------------------------- */ #define CATALOG(x) \ - typedef struct CppConcat(FormData_,x) + typedef struct CppConcat(FormData_,x) #define DATA(x) extern int errno #define DECLARE_INDEX(x) extern int errno @@ -176,32 +185,32 @@ typedef uint16 CommandId; #define BKI_END /* ---------------------------------------------------------------- - * Section 5: random stuff - * CSIGNBIT, MAXPGPATH, STATUS... + * Section 5: random stuff + * CSIGNBIT, MAXPGPATH, STATUS... * ---------------------------------------------------------------- */ /* msb for int/unsigned */ -#define ISIGNBIT (0x80000000) -#define WSIGNBIT (0x8000) +#define ISIGNBIT (0x80000000) +#define WSIGNBIT (0x8000) /* msb for char */ -#define CSIGNBIT (0x80) +#define CSIGNBIT (0x80) /* ---------------- - * global variables which should probably go someplace else. + * global variables which should probably go someplace else. * ---------------- */ -#define MAXPGPATH 128 - -#define STATUS_OK (0) -#define STATUS_ERROR (-1) -#define STATUS_NOT_FOUND (-2) -#define STATUS_INVALID (-3) -#define STATUS_UNCATALOGUED (-4) -#define STATUS_REPLACED (-5) -#define STATUS_NOT_DONE (-6) -#define STATUS_BAD_PACKET (-7) -#define STATUS_FOUND (1) - -#endif /* POSTGRES_H */ +#define MAXPGPATH 128 + +#define STATUS_OK (0) +#define STATUS_ERROR (-1) +#define STATUS_NOT_FOUND (-2) +#define STATUS_INVALID (-3) +#define STATUS_UNCATALOGUED (-4) +#define STATUS_REPLACED (-5) +#define STATUS_NOT_DONE (-6) +#define STATUS_BAD_PACKET (-7) +#define STATUS_FOUND (1) + +#endif /* POSTGRES_H */ diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h index b79b11fe1f3..3a4554aee0f 100644 --- a/src/include/postgres_ext.h +++ b/src/include/postgres_ext.h @@ -1,22 +1,22 @@ /*------------------------------------------------------------------------- * * postgres_ext.h-- - * - * This file contains declarations of things that are visible - * external to Postgres. For example, the Oid type is part of a - * structure that is passed to the front end via libpq, and is - * accordingly referenced in libpq-fe.h. * - * Declarations which are specific to a particular interface should - * go in the header file for that interface (such as libpq-fe.h). This - * file is only for fundamental Postgres declarations. + * This file contains declarations of things that are visible + * external to Postgres. For example, the Oid type is part of a + * structure that is passed to the front end via libpq, and is + * accordingly referenced in libpq-fe.h. * - * User-written C functions don't count as "external to Postgres." - * Those function much as local modifications to the backend itself, and - * use header files that are otherwise internal to Postgres to interface - * with the backend. + * Declarations which are specific to a particular interface should + * go in the header file for that interface (such as libpq-fe.h). This + * file is only for fundamental Postgres declarations. * - * $Id: postgres_ext.h,v 1.1 1996/12/10 07:03:43 bryanh Exp $ + * User-written C functions don't count as "external to Postgres." + * Those function much as local modifications to the backend itself, and + * use header files that are otherwise internal to Postgres to interface + * with the backend. + * + * $Id: postgres_ext.h,v 1.2 1997/09/07 04:55:41 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -30,10 +30,10 @@ typedef unsigned int Oid; * attribute names, function names, etc.) * * NOTE that databases with different NAMEDATALEN's cannot interoperate! - */ + */ #define NAMEDATALEN 32 /* OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid) */ -#define OIDNAMELEN 36 +#define OIDNAMELEN 36 #endif diff --git a/src/include/regex/cclass.h b/src/include/regex/cclass.h index cabe7faf223..271d1e418e6 100644 --- a/src/include/regex/cclass.h +++ b/src/include/regex/cclass.h @@ -1,7 +1,7 @@ /*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer. @@ -10,22 +10,22 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -34,37 +34,66 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)cclass.h 8.3 (Berkeley) 3/20/94 + * @(#)cclass.h 8.3 (Berkeley) 3/20/94 */ /* character-class table */ -static struct cclass { - char *name; - char *chars; - char *multis; -} cclasses[] = { - {"alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ -0123456789", ""}, - {"alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", - ""}, - {"blank", " \t", ""}, - {"cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\ -\25\26\27\30\31\32\33\34\35\36\37\177", ""}, - {"digit", "0123456789", ""}, - {"graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ +static struct cclass +{ + char *name; + char *chars; + char *multis; +} cclasses[] = + +{ + { + "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ +0123456789", "" + }, + { + "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", + "" + }, + { + "blank", " \t", "" + }, + { + "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\ +\25\26\27\30\31\32\33\34\35\36\37\177", "" + }, + { + "digit", "0123456789", "" + }, + { + "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", - ""}, - {"lower", "abcdefghijklmnopqrstuvwxyz", - ""}, - {"print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ + "" + }, + { + "lower", "abcdefghijklmnopqrstuvwxyz", + "" + }, + { + "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ", - ""}, - {"punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", - ""}, - {"space", "\t\n\v\f\r ", ""}, - {"upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - ""}, - {"xdigit", "0123456789ABCDEFabcdef", - ""}, - {NULL, 0, ""} + "" + }, + { + "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", + "" + }, + { + "space", "\t\n\v\f\r ", "" + }, + { + "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "" + }, + { + "xdigit", "0123456789ABCDEFabcdef", + "" + }, + { + NULL, 0, "" + } }; diff --git a/src/include/regex/cdefs.h b/src/include/regex/cdefs.h index 3a548f3ea15..8493c2563c7 100644 --- a/src/include/regex/cdefs.h +++ b/src/include/regex/cdefs.h @@ -2,28 +2,28 @@ * ++Copyright++ 1991, 1993 * - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * + * The Regents of the University of California. All rights reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -33,17 +33,17 @@ * SUCH DAMAGE. * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * + * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. - * + * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS @@ -54,19 +54,19 @@ */ /* - * @(#)cdefs.h 8.1 (Berkeley) 6/2/93 - * $Id: cdefs.h,v 1.2 1996/09/21 06:31:13 scrappy Exp $ + * @(#)cdefs.h 8.1 (Berkeley) 6/2/93 + * $Id: cdefs.h,v 1.3 1997/09/07 05:00:14 momjian Exp $ */ -#ifndef _CDEFS_H_ -#define _CDEFS_H_ +#ifndef _CDEFS_H_ +#define _CDEFS_H_ #if defined(__cplusplus) -#define __BEGIN_DECLS extern "C" { -#define __END_DECLS }; +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS }; #else -#define __BEGIN_DECLS -#define __END_DECLS +#define __BEGIN_DECLS +#define __END_DECLS #endif /* @@ -77,38 +77,38 @@ * strings produced by the __STRING macro, but this only works with ANSI C. */ #if defined(__STDC__) || defined(__cplusplus) -/* +/* * Some headers in the Linux C library define __P the same as here, * but with different argument variable name. This causes a compiler * warning! So we avoid the redefinition. */ #if !defined(__P) -#define __P(protos) protos /* full-blown ANSI C */ +#define __P(protos) protos /* full-blown ANSI C */ #endif -#define __CONCAT(x,y) x ## y -#define __STRING(x) #x +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x -#define __const const /* define reserved names to standard */ -#define __signed signed -#define __volatile volatile +#define __const const /* define reserved names to standard */ +#define __signed signed +#define __volatile volatile #if defined(__cplusplus) -#define __inline inline /* convert to C++ keyword */ +#define __inline inline /* convert to C++ keyword */ #else #ifndef __GNUC__ -#define __inline /* delete GCC keyword */ -#endif /* !__GNUC__ */ -#endif /* !__cplusplus */ +#define __inline /* delete GCC keyword */ +#endif /* !__GNUC__ */ +#endif /* !__cplusplus */ -#else /* !(__STDC__ || __cplusplus) */ -#define __P(protos) () /* traditional C preprocessor */ -#define __CONCAT(x,y) x/**/y -#define __STRING(x) "x" +#else /* !(__STDC__ || __cplusplus) */ +#define __P(protos) () /* traditional C preprocessor */ +#define __CONCAT(x,y) x/**/y +#define __STRING(x) "x" #ifndef __GNUC__ -#define __const /* delete pseudo-ANSI C keywords */ -#define __inline -#define __signed -#define __volatile +#define __const /* delete pseudo-ANSI C keywords */ +#define __inline +#define __signed +#define __volatile /* * In non-ANSI C environments, new programs will want ANSI-only C keywords * deleted from the program and old programs will want them left alone. @@ -117,35 +117,35 @@ * When using "gcc -traditional", we assume that this is the intent; if * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. */ -#ifndef NO_ANSI_KEYWORDS -#define const /* delete ANSI C keywords */ -#define inline -#define signed -#define volatile +#ifndef NO_ANSI_KEYWORDS +#define const /* delete ANSI C keywords */ +#define inline +#define signed +#define volatile #endif -#endif /* !__GNUC__ */ -#endif /* !(__STDC__ || __cplusplus) */ +#endif /* !__GNUC__ */ +#endif /* !(__STDC__ || __cplusplus) */ /* * GCC1 and some versions of GCC2 declare dead (non-returning) and * pure (no side effects) functions using "volatile" and "const"; * unfortunately, these then cause warnings under "-ansi -pedantic". - * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of + * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of * these work for GNU C++ (modulo a slight glitch in the C++ grammar * in the distribution version of 2.5.5). */ #if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5 -#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */ +#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define __dead __volatile -#define __pure __const +#define __dead __volatile +#define __pure __const #endif #endif /* Delete pseudo-keywords wherever they are not available or needed. */ #ifndef __dead -#define __dead -#define __pure +#define __dead +#define __pure #endif -#endif /* !_CDEFS_H_ */ +#endif /* !_CDEFS_H_ */ diff --git a/src/include/regex/cname.h b/src/include/regex/cname.h index c6ba15bdc36..8cf78f7cbe5 100644 --- a/src/include/regex/cname.h +++ b/src/include/regex/cname.h @@ -1,7 +1,7 @@ /*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer. @@ -10,22 +10,22 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -34,108 +34,303 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)cname.h 8.3 (Berkeley) 3/20/94 + * @(#)cname.h 8.3 (Berkeley) 3/20/94 */ /* character-name table */ -static struct cname { - char *name; - char code; -} cnames[] = { - {"NUL", '\0'}, - {"SOH", '\001'}, - {"STX", '\002'}, - {"ETX", '\003'}, - {"EOT", '\004'}, - {"ENQ", '\005'}, - {"ACK", '\006'}, - {"BEL", '\007'}, - {"alert", '\007'}, - {"BS", '\010'}, - {"backspace", '\b'}, - {"HT", '\011'}, - {"tab", '\t'}, - {"LF", '\012'}, - {"newline", '\n'}, - {"VT", '\013'}, - {"vertical-tab", '\v'}, - {"FF", '\014'}, - {"form-feed", '\f'}, - {"CR", '\015'}, - {"carriage-return", '\r'}, - {"SO", '\016'}, - {"SI", '\017'}, - {"DLE", '\020'}, - {"DC1", '\021'}, - {"DC2", '\022'}, - {"DC3", '\023'}, - {"DC4", '\024'}, - {"NAK", '\025'}, - {"SYN", '\026'}, - {"ETB", '\027'}, - {"CAN", '\030'}, - {"EM", '\031'}, - {"SUB", '\032'}, - {"ESC", '\033'}, - {"IS4", '\034'}, - {"FS", '\034'}, - {"IS3", '\035'}, - {"GS", '\035'}, - {"IS2", '\036'}, - {"RS", '\036'}, - {"IS1", '\037'}, - {"US", '\037'}, - {"space", ' '}, - {"exclamation-mark", '!'}, - {"quotation-mark", '"'}, - {"number-sign", '#'}, - {"dollar-sign", '$'}, - {"percent-sign", '%'}, - {"ampersand", '&'}, - {"apostrophe", '\''}, - {"left-parenthesis", '('}, - {"right-parenthesis", ')'}, - {"asterisk", '*'}, - {"plus-sign", '+'}, - {"comma", ','}, - {"hyphen", '-'}, - {"hyphen-minus", '-'}, - {"period", '.'}, - {"full-stop", '.'}, - {"slash", '/'}, - {"solidus", '/'}, - {"zero", '0'}, - {"one", '1'}, - {"two", '2'}, - {"three", '3'}, - {"four", '4'}, - {"five", '5'}, - {"six", '6'}, - {"seven", '7'}, - {"eight", '8'}, - {"nine", '9'}, - {"colon", ':'}, - {"semicolon", ';'}, - {"less-than-sign", '<'}, - {"equals-sign", '='}, - {"greater-than-sign", '>'}, - {"question-mark", '?'}, - {"commercial-at", '@'}, - {"left-square-bracket", '['}, - {"backslash", '\\'}, - {"reverse-solidus", '\\'}, - {"right-square-bracket", ']'}, - {"circumflex", '^'}, - {"circumflex-accent", '^'}, - {"underscore", '_'}, - {"low-line", '_'}, - {"grave-accent", '`'}, - {"left-brace", '{'}, - {"left-curly-bracket", '{'}, - {"vertical-line", '|'}, - {"right-brace", '}'}, - {"right-curly-bracket", '}'}, - {"tilde", '~'}, - {"DEL", '\177'}, - {NULL, 0} +static struct cname +{ + char *name; + char code; +} cnames[] = + +{ + { + "NUL", '\0' + }, + { + "SOH", '\001' + }, + { + "STX", '\002' + }, + { + "ETX", '\003' + }, + { + "EOT", '\004' + }, + { + "ENQ", '\005' + }, + { + "ACK", '\006' + }, + { + "BEL", '\007' + }, + { + "alert", '\007' + }, + { + "BS", '\010' + }, + { + "backspace", '\b' + }, + { + "HT", '\011' + }, + { + "tab", '\t' + }, + { + "LF", '\012' + }, + { + "newline", '\n' + }, + { + "VT", '\013' + }, + { + "vertical-tab", '\v' + }, + { + "FF", '\014' + }, + { + "form-feed", '\f' + }, + { + "CR", '\015' + }, + { + "carriage-return", '\r' + }, + { + "SO", '\016' + }, + { + "SI", '\017' + }, + { + "DLE", '\020' + }, + { + "DC1", '\021' + }, + { + "DC2", '\022' + }, + { + "DC3", '\023' + }, + { + "DC4", '\024' + }, + { + "NAK", '\025' + }, + { + "SYN", '\026' + }, + { + "ETB", '\027' + }, + { + "CAN", '\030' + }, + { + "EM", '\031' + }, + { + "SUB", '\032' + }, + { + "ESC", '\033' + }, + { + "IS4", '\034' + }, + { + "FS", '\034' + }, + { + "IS3", '\035' + }, + { + "GS", '\035' + }, + { + "IS2", '\036' + }, + { + "RS", '\036' + }, + { + "IS1", '\037' + }, + { + "US", '\037' + }, + { + "space", ' ' + }, + { + "exclamation-mark", '!' + }, + { + "quotation-mark", '"' + }, + { + "number-sign", '#' + }, + { + "dollar-sign", '$' + }, + { + "percent-sign", '%' + }, + { + "ampersand", '&' + }, + { + "apostrophe", '\'' + }, + { + "left-parenthesis", '(' + }, + { + "right-parenthesis", ')' + }, + { + "asterisk", '*' + }, + { + "plus-sign", '+' + }, + { + "comma", ',' + }, + { + "hyphen", '-' + }, + { + "hyphen-minus", '-' + }, + { + "period", '.' + }, + { + "full-stop", '.' + }, + { + "slash", '/' + }, + { + "solidus", '/' + }, + { + "zero", '0' + }, + { + "one", '1' + }, + { + "two", '2' + }, + { + "three", '3' + }, + { + "four", '4' + }, + { + "five", '5' + }, + { + "six", '6' + }, + { + "seven", '7' + }, + { + "eight", '8' + }, + { + "nine", '9' + }, + { + "colon", ':' + }, + { + "semicolon", ';' + }, + { + "less-than-sign", '<' + }, + { + "equals-sign", '=' + }, + { + "greater-than-sign", '>' + }, + { + "question-mark", '?' + }, + { + "commercial-at", '@' + }, + { + "left-square-bracket", '[' + }, + { + "backslash", '\\' + }, + { + "reverse-solidus", '\\' + }, + { + "right-square-bracket", ']' + }, + { + "circumflex", '^' + }, + { + "circumflex-accent", '^' + }, + { + "underscore", '_' + }, + { + "low-line", '_' + }, + { + "grave-accent", '`' + }, + { + "left-brace", '{' + }, + { + "left-curly-bracket", '{' + }, + { + "vertical-line", '|' + }, + { + "right-brace", '}' + }, + { + "right-curly-bracket", '}' + }, + { + "tilde", '~' + }, + { + "DEL", '\177' + }, + { + NULL, 0 + } }; diff --git a/src/include/regex/regex.h b/src/include/regex/regex.h index 08f561d4132..18b39768849 100644 --- a/src/include/regex/regex.h +++ b/src/include/regex/regex.h @@ -1,7 +1,7 @@ /*- * Copyright (c) 1992 Henry Spencer. * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. @@ -10,22 +10,22 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)regex.h 8.2 (Berkeley) 1/3/94 + * @(#)regex.h 8.2 (Berkeley) 1/3/94 */ #ifndef _REGEX_H_ @@ -43,62 +43,65 @@ #include <sys/types.h> /* types */ -typedef off_t regoff_t; +typedef off_t regoff_t; -typedef struct { - int re_magic; - size_t re_nsub; /* number of parenthesized subexpressions */ - const char *re_endp; /* end pointer for REG_PEND */ - struct re_guts *re_g; /* none of your business :-) */ -} regex_t; +typedef struct +{ + int re_magic; + size_t re_nsub; /* number of parenthesized subexpressions */ + const char *re_endp; /* end pointer for REG_PEND */ + struct re_guts *re_g; /* none of your business :-) */ +} regex_t; -typedef struct { - regoff_t rm_so; /* start of match */ - regoff_t rm_eo; /* end of match */ -} regmatch_t; +typedef struct +{ + regoff_t rm_so; /* start of match */ + regoff_t rm_eo; /* end of match */ +} regmatch_t; /* regcomp() flags */ -#define REG_BASIC 0000 -#define REG_EXTENDED 0001 -#define REG_ICASE 0002 -#define REG_NOSUB 0004 -#define REG_NEWLINE 0010 -#define REG_NOSPEC 0020 -#define REG_PEND 0040 -#define REG_DUMP 0200 +#define REG_BASIC 0000 +#define REG_EXTENDED 0001 +#define REG_ICASE 0002 +#define REG_NOSUB 0004 +#define REG_NEWLINE 0010 +#define REG_NOSPEC 0020 +#define REG_PEND 0040 +#define REG_DUMP 0200 /* regerror() flags */ -#define REG_NOMATCH 1 -#define REG_BADPAT 2 -#define REG_ECOLLATE 3 -#define REG_ECTYPE 4 -#define REG_EESCAPE 5 -#define REG_ESUBREG 6 -#define REG_EBRACK 7 -#define REG_EPAREN 8 -#define REG_EBRACE 9 -#define REG_BADBR 10 -#define REG_ERANGE 11 -#define REG_ESPACE 12 -#define REG_BADRPT 13 -#define REG_EMPTY 14 -#define REG_ASSERT 15 -#define REG_INVARG 16 -#define REG_ATOI 255 /* convert name to number (!) */ -#define REG_ITOA 0400 /* convert number to name (!) */ +#define REG_NOMATCH 1 +#define REG_BADPAT 2 +#define REG_ECOLLATE 3 +#define REG_ECTYPE 4 +#define REG_EESCAPE 5 +#define REG_ESUBREG 6 +#define REG_EBRACK 7 +#define REG_EPAREN 8 +#define REG_EBRACE 9 +#define REG_BADBR 10 +#define REG_ERANGE 11 +#define REG_ESPACE 12 +#define REG_BADRPT 13 +#define REG_EMPTY 14 +#define REG_ASSERT 15 +#define REG_INVARG 16 +#define REG_ATOI 255 /* convert name to number (!) */ +#define REG_ITOA 0400 /* convert number to name (!) */ /* regexec() flags */ -#define REG_NOTBOL 00001 -#define REG_NOTEOL 00002 -#define REG_STARTEND 00004 -#define REG_TRACE 00400 /* tracing of execution */ -#define REG_LARGE 01000 /* force large representation */ -#define REG_BACKR 02000 /* force use of backref code */ +#define REG_NOTBOL 00001 +#define REG_NOTEOL 00002 +#define REG_STARTEND 00004 +#define REG_TRACE 00400 /* tracing of execution */ +#define REG_LARGE 01000 /* force large representation */ +#define REG_BACKR 02000 /* force use of backref code */ -int pg95_regcomp(regex_t *, const char *, int); -size_t pg95_regerror(int, const regex_t *, char *, size_t); -int pg95_regexec (const regex_t *, - const char *, size_t, regmatch_t [], int); -void pg95_regfree (regex_t *); +int pg95_regcomp(regex_t *, const char *, int); +size_t pg95_regerror(int, const regex_t *, char *, size_t); +int +pg95_regexec(const regex_t *, + const char *, size_t, regmatch_t[], int); +void pg95_regfree(regex_t *); -#endif /* !_REGEX_H_ */ +#endif /* !_REGEX_H_ */ diff --git a/src/include/regex/regex2.h b/src/include/regex/regex2.h index 34d3f63663d..960a6d1dfce 100644 --- a/src/include/regex/regex2.h +++ b/src/include/regex/regex2.h @@ -1,7 +1,7 @@ /*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer. @@ -10,22 +10,22 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)regex2.h 8.4 (Berkeley) 3/20/94 + * @(#)regex2.h 8.4 (Berkeley) 3/20/94 */ /* @@ -43,70 +43,73 @@ /* typedef off_t regoff_t; typedef struct { - int re_magic; - size_t re_nsub; // number of parenthesized subexpressions - const char *re_endp; // end pointer for REG_PEND - struct re_guts *re_g; // none of your business :-) + int re_magic; + size_t re_nsub; // number of parenthesized subexpressions + const char *re_endp; // end pointer for REG_PEND + struct re_guts *re_g; // none of your business :-) } regex_t; typedef struct { - regoff_t rm_so; // start of match - regoff_t rm_eo; // end of match + regoff_t rm_so; // start of match + regoff_t rm_eo; // end of match } regmatch_t; */ /* * internals of regex_t */ -#define MAGIC1 ((('r'^0200)<<8) | 'e') +#define MAGIC1 ((('r'^0200)<<8) | 'e') /* * The internal representation is a *strip*, a sequence of - * operators ending with an endmarker. (Some terminology etc. is a + * operators ending with an endmarker. (Some terminology etc. is a * historical relic of earlier versions which used multiple strips.) * Certain oddities in the representation are there to permit running * the machinery backwards; in particular, any deviation from sequential - * flow must be marked at both its source and its destination. Some + * flow must be marked at both its source and its destination. Some * fine points: * * - OPLUS_ and O_PLUS are *inside* the loop they create. * - OQUEST_ and O_QUEST are *outside* the bypass they create. * - OCH_ and O_CH are *outside* the multi-way branch they create, while - * OOR1 and OOR2 are respectively the end and the beginning of one of - * the branches. Note that there is an implicit OOR2 following OCH_ - * and an implicit OOR1 preceding O_CH. + * OOR1 and OOR2 are respectively the end and the beginning of one of + * the branches. Note that there is an implicit OOR2 following OCH_ + * and an implicit OOR1 preceding O_CH. * * In state representations, an operator's bit is on to signify a state * immediately *preceding* "execution" of that operator. */ -typedef unsigned long sop; /* strip operator */ -typedef long sopno; -#define OPRMASK 0xf8000000 -#define OPDMASK 0x07ffffff -#define OPSHIFT ((unsigned)27) -#define OP(n) ((n)&OPRMASK) -#define OPND(n) ((n)&OPDMASK) -#define SOP(op, opnd) ((op)|(opnd)) -/* operators meaning operand */ -/* (back, fwd are offsets) */ -#define OEND ((size_t)1<<OPSHIFT) /* endmarker - */ -#define OCHAR ((size_t)2<<OPSHIFT) /* character unsigned char */ -#define OBOL ((size_t)3<<OPSHIFT) /* left anchor - */ -#define OEOL ((size_t)4<<OPSHIFT) /* right anchor - */ -#define OANY ((size_t)5<<OPSHIFT) /* . - */ -#define OANYOF ((size_t)6<<OPSHIFT) /* [...] set number */ -#define OBACK_ ((size_t)7<<OPSHIFT) /* begin \d paren number */ -#define O_BACK ((size_t)8<<OPSHIFT) /* end \d paren number */ -#define OPLUS_ ((size_t)9<<OPSHIFT) /* + prefix fwd to suffix */ -#define O_PLUS ((size_t)10<<OPSHIFT) /* + suffix back to prefix */ -#define OQUEST_ ((size_t)11<<OPSHIFT) /* ? prefix fwd to suffix */ -#define O_QUEST ((size_t)12<<OPSHIFT) /* ? suffix back to prefix */ -#define OLPAREN ((size_t)13<<OPSHIFT) /* ( fwd to ) */ -#define ORPAREN ((size_t)14<<OPSHIFT) /* ) back to ( */ -#define OCH_ ((size_t)15<<OPSHIFT) /* begin choice fwd to OOR2 */ -#define OOR1 ((size_t)16<<OPSHIFT) /* | pt. 1 back to OOR1 or OCH_ */ -#define OOR2 ((size_t)17<<OPSHIFT) /* | pt. 2 fwd to OOR2 or O_CH */ -#define O_CH ((size_t)18<<OPSHIFT) /* end choice back to OOR1 */ -#define OBOW ((size_t)19<<OPSHIFT) /* begin word - */ -#define OEOW ((size_t)20<<OPSHIFT) /* end word - */ +typedef unsigned long sop; /* strip operator */ +typedef long sopno; + +#define OPRMASK 0xf8000000 +#define OPDMASK 0x07ffffff +#define OPSHIFT ((unsigned)27) +#define OP(n) ((n)&OPRMASK) +#define OPND(n) ((n)&OPDMASK) +#define SOP(op, opnd) ((op)|(opnd)) +/* operators meaning operand */ +/* (back, fwd are offsets) */ +#define OEND ((size_t)1<<OPSHIFT) /* endmarker - */ +#define OCHAR ((size_t)2<<OPSHIFT) /* character unsigned char */ +#define OBOL ((size_t)3<<OPSHIFT) /* left anchor - */ +#define OEOL ((size_t)4<<OPSHIFT) /* right anchor - */ +#define OANY ((size_t)5<<OPSHIFT) /* . - */ +#define OANYOF ((size_t)6<<OPSHIFT) /* [...] set number */ +#define OBACK_ ((size_t)7<<OPSHIFT) /* begin \d paren number */ +#define O_BACK ((size_t)8<<OPSHIFT) /* end \d paren number */ +#define OPLUS_ ((size_t)9<<OPSHIFT) /* + prefix fwd to suffix */ +#define O_PLUS ((size_t)10<<OPSHIFT) /* + suffix back to prefix */ +#define OQUEST_ ((size_t)11<<OPSHIFT) /* ? prefix fwd to suffix */ +#define O_QUEST ((size_t)12<<OPSHIFT) /* ? suffix back to prefix */ +#define OLPAREN ((size_t)13<<OPSHIFT) /* ( fwd to ) */ +#define ORPAREN ((size_t)14<<OPSHIFT) /* ) back to ( */ +#define OCH_ ((size_t)15<<OPSHIFT) /* begin choice fwd to OOR2 */ +#define OOR1 ((size_t)16<<OPSHIFT) /* | pt. 1 back to OOR1 or + * OCH_ */ +#define OOR2 ((size_t)17<<OPSHIFT) /* | pt. 2 fwd to OOR2 or + * O_CH */ +#define O_CH ((size_t)18<<OPSHIFT) /* end choice back to OOR1 */ +#define OBOW ((size_t)19<<OPSHIFT) /* begin word - */ +#define OEOW ((size_t)20<<OPSHIFT) /* end word - */ /* * Structure for [] character-set representation. Character sets are @@ -120,20 +123,23 @@ typedef long sopno; * a string of multi-character elements, and decide the size of the * vectors at run time. */ -typedef struct { - uch *ptr; /* -> uch [csetsize] */ - uch mask; /* bit within array */ - uch hash; /* hash code */ - size_t smultis; - char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */ -} cset; +typedef struct +{ + uch *ptr; /* -> uch [csetsize] */ + uch mask; /* bit within array */ + uch hash; /* hash code */ + size_t smultis; + char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */ +} cset; + /* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */ -#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c)) -#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c)) -#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask) -#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */ -#define MCsub(p, cs, cp) mcsub(p, cs, cp) -#define MCin(p, cs, cp) mcin(p, cs, cp) +#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c)) +#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c)) +#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask) +#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal + * fns */ +#define MCsub(p, cs, cp) mcsub(p, cs, cp) +#define MCin(p, cs, cp) mcin(p, cs, cp) /* stuff for character categories */ typedef unsigned char cat_t; @@ -141,35 +147,36 @@ typedef unsigned char cat_t; /* * main compiled-expression structure */ -struct re_guts { - int magic; -# define MAGIC2 ((('R'^0200)<<8)|'E') - sop *strip; /* malloced area for strip */ - int csetsize; /* number of bits in a cset vector */ - int ncsets; /* number of csets in use */ - cset *sets; /* -> cset [ncsets] */ - uch *setbits; /* -> uch[csetsize][ncsets/CHAR_BIT] */ - int cflags; /* copy of regcomp() cflags argument */ - sopno nstates; /* = number of sops */ - sopno firststate; /* the initial OEND (normally 0) */ - sopno laststate; /* the final OEND */ - int iflags; /* internal flags */ -# define USEBOL 01 /* used ^ */ -# define USEEOL 02 /* used $ */ -# define BAD 04 /* something wrong */ - int nbol; /* number of ^ used */ - int neol; /* number of $ used */ - int ncategories; /* how many character categories */ - cat_t *categories; /* ->catspace[-CHAR_MIN] */ - char *must; /* match must contain this string */ - int mlen; /* length of must */ - size_t nsub; /* copy of re_nsub */ - int backrefs; /* does it use back references? */ - sopno nplus; /* how deep does it nest +s? */ +struct re_guts +{ + int magic; +#define MAGIC2 ((('R'^0200)<<8)|'E') + sop *strip; /* malloced area for strip */ + int csetsize; /* number of bits in a cset vector */ + int ncsets; /* number of csets in use */ + cset *sets; /* -> cset [ncsets] */ + uch *setbits; /* -> uch[csetsize][ncsets/CHAR_BIT] */ + int cflags; /* copy of regcomp() cflags argument */ + sopno nstates; /* = number of sops */ + sopno firststate; /* the initial OEND (normally 0) */ + sopno laststate; /* the final OEND */ + int iflags; /* internal flags */ +#define USEBOL 01 /* used ^ */ +#define USEEOL 02 /* used $ */ +#define BAD 04 /* something wrong */ + int nbol; /* number of ^ used */ + int neol; /* number of $ used */ + int ncategories;/* how many character categories */ + cat_t *categories; /* ->catspace[-CHAR_MIN] */ + char *must; /* match must contain this string */ + int mlen; /* length of must */ + size_t nsub; /* copy of re_nsub */ + int backrefs; /* does it use back references? */ + sopno nplus; /* how deep does it nest +s? */ /* catspace must be last */ - cat_t catspace[1]; /* actually [NC] */ + cat_t catspace[1];/* actually [NC] */ }; /* misc utilities */ -#define OUT (CHAR_MAX+1) /* a non-character value */ -#define ISWORD(c) (isalnum(c) || (c) == '_') +#define OUT (CHAR_MAX+1) /* a non-character value */ +#define ISWORD(c) (isalnum(c) || (c) == '_') diff --git a/src/include/regex/regexp.h b/src/include/regex/regexp.h index 25438e3f37d..cbbb26367df 100644 --- a/src/include/regex/regexp.h +++ b/src/include/regex/regexp.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1986 by University of Toronto. * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley * by Henry Spencer. @@ -10,22 +10,22 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -34,36 +34,38 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)regexp.h 8.1 (Berkeley) 6/2/93 + * @(#)regexp.h 8.1 (Berkeley) 6/2/93 */ -#ifndef _REGEXP_H_ -#define _REGEXP_H_ +#ifndef _REGEXP_H_ +#define _REGEXP_H_ /* * Definitions etc. for regexp(3) routines. * - * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], + * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], * not the System V one. */ #define NSUBEXP 10 -typedef struct regexp { - char *startp[NSUBEXP]; - char *endp[NSUBEXP]; - char regstart; /* Internal use only. */ - char reganch; /* Internal use only. */ - char *regmust; /* Internal use only. */ - int regmlen; /* Internal use only. */ - char program[1]; /* Unwarranted chumminess with compiler. */ -} regexp; +typedef struct regexp +{ + char *startp[NSUBEXP]; + char *endp[NSUBEXP]; + char regstart; /* Internal use only. */ + char reganch; /* Internal use only. */ + char *regmust; /* Internal use only. */ + int regmlen; /* Internal use only. */ + char program[1]; /* Unwarranted chumminess with compiler. */ +} regexp; /* since not all systems have cdefs.h, we'll use our own here - jolly */ __BEGIN_DECLS -regexp *pg95_regcomp __P((const char *)); -int pg95_regexec __P((const regexp *, const char *)); -void pg95_regsub __P((const regexp *, const char *, char *)); +regexp * pg95_regcomp __P((const char *)); +int pg95_regexec __P((const regexp *, const char *)); +void pg95_regsub __P((const regexp *, const char *, char *)); void pg95_regerror __P((const char *)); + __END_DECLS -#endif /* !_REGEXP_H_ */ +#endif /* !_REGEXP_H_ */ diff --git a/src/include/regex/utils.h b/src/include/regex/utils.h index 98857d0977c..a7cae06919c 100644 --- a/src/include/regex/utils.h +++ b/src/include/regex/utils.h @@ -1,7 +1,7 @@ /*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer. @@ -10,22 +10,22 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -34,25 +34,25 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)utils.h 8.3 (Berkeley) 3/20/94 + * @(#)utils.h 8.3 (Berkeley) 3/20/94 */ -#include "config.h" /* HAVE_MEMMOVE */ +#include "config.h" /* HAVE_MEMMOVE */ /* utility definitions */ -#define DUPMAX 100000000 /* xxx is this right? */ -#define INFINITY (DUPMAX + 1) -#define NC (CHAR_MAX - CHAR_MIN + 1) +#define DUPMAX 100000000 /* xxx is this right? */ +#define INFINITY (DUPMAX + 1) +#define NC (CHAR_MAX - CHAR_MIN + 1) typedef unsigned char uch; /* switch off assertions (if not already off) if no REDEBUG */ #ifndef REDEBUG #ifndef NDEBUG -#define NDEBUG /* no assertions please */ +#define NDEBUG /* no assertions please */ #endif #endif /* for old systems with bcopy() but no memmove() */ #if !defined(HAVE_MEMMOVE) -#define memmove(d, s, c) bcopy(s, d, c) +#define memmove(d, s, c) bcopy(s, d, c) #endif diff --git a/src/include/rewrite/locks.h b/src/include/rewrite/locks.h index 04c5f5db10f..f01f5a713b2 100644 --- a/src/include/rewrite/locks.h +++ b/src/include/rewrite/locks.h @@ -1,23 +1,24 @@ /*------------------------------------------------------------------------- * * locks.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: locks.h,v 1.3 1996/11/08 06:02:00 momjian Exp $ + * $Id: locks.h,v 1.4 1997/09/07 05:00:28 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef LOCKS_H -#define LOCKS_H +#ifndef LOCKS_H +#define LOCKS_H #include "nodes/nodes.h" #include "nodes/parsenodes.h" #include "rewrite/prs2lock.h" -extern List *matchLocks(CmdType event, RuleLock *rulelocks, int varno, - Query *parsetree); +extern List * +matchLocks(CmdType event, RuleLock * rulelocks, int varno, + Query * parsetree); -#endif /* LOCKS_H */ +#endif /* LOCKS_H */ diff --git a/src/include/rewrite/prs2lock.h b/src/include/rewrite/prs2lock.h index d7be60641ae..0bf8a258867 100644 --- a/src/include/rewrite/prs2lock.h +++ b/src/include/rewrite/prs2lock.h @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------- * * prs2lock.h-- - * data structures for POSTGRES Rule System II (rewrite rules only) + * data structures for POSTGRES Rule System II (rewrite rules only) * * Copyright (c) 1994, Regents of the University of California * - * $Id: prs2lock.h,v 1.4 1996/11/04 07:45:46 scrappy Exp $ + * $Id: prs2lock.h,v 1.5 1997/09/07 05:00:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,27 +17,29 @@ /* * RewriteRule - - * holds a info for a rewrite rule + * holds a info for a rewrite rule * */ -typedef struct RewriteRule { - Oid ruleId; - CmdType event; - AttrNumber attrno; - Node *qual; - List *actions; - bool isInstead; -} RewriteRule; +typedef struct RewriteRule +{ + Oid ruleId; + CmdType event; + AttrNumber attrno; + Node *qual; + List *actions; + bool isInstead; +} RewriteRule; /* * RuleLock - - * all rules that apply to a particular relation. Even though we only - * have the rewrite rule system left and these are not really "locks", - * the name is kept for historical reasons. + * all rules that apply to a particular relation. Even though we only + * have the rewrite rule system left and these are not really "locks", + * the name is kept for historical reasons. */ -typedef struct RuleLock { - int numLocks; - RewriteRule **rules; -} RuleLock; +typedef struct RuleLock +{ + int numLocks; + RewriteRule **rules; +} RuleLock; -#endif /* REWRITE_H */ +#endif /* REWRITE_H */ diff --git a/src/include/rewrite/rewriteDefine.h b/src/include/rewrite/rewriteDefine.h index f661fff8527..214daa85f56 100644 --- a/src/include/rewrite/rewriteDefine.h +++ b/src/include/rewrite/rewriteDefine.h @@ -1,18 +1,18 @@ /*------------------------------------------------------------------------- * * rewriteDefine.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteDefine.h,v 1.1 1996/08/28 07:24:06 scrappy Exp $ + * $Id: rewriteDefine.h,v 1.2 1997/09/07 05:00:33 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef REWRITEDEFINE_H -#define REWRITEDEFINE_H +#ifndef REWRITEDEFINE_H +#define REWRITEDEFINE_H -extern void DefineQueryRewrite(RuleStmt *args); +extern void DefineQueryRewrite(RuleStmt * args); -#endif /* REWRITEDEFINE_H */ +#endif /* REWRITEDEFINE_H */ diff --git a/src/include/rewrite/rewriteHandler.h b/src/include/rewrite/rewriteHandler.h index 43291e07b5c..3d03f29ba17 100644 --- a/src/include/rewrite/rewriteHandler.h +++ b/src/include/rewrite/rewriteHandler.h @@ -1,35 +1,36 @@ /*------------------------------------------------------------------------- * * rewriteHandler.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteHandler.h,v 1.1 1996/08/28 07:24:07 scrappy Exp $ + * $Id: rewriteHandler.h,v 1.2 1997/09/07 05:00:34 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef REWRITEHANDLER_H -#define REWRITEHANDLER_H +#ifndef REWRITEHANDLER_H +#define REWRITEHANDLER_H -struct _rewrite_meta_knowledge { - List *rt; - int rt_index; - bool instead_flag; - int event; - CmdType action; - int current_varno; - int new_varno; - Query *rule_action; - Node *rule_qual; - bool nothing; +struct _rewrite_meta_knowledge +{ + List *rt; + int rt_index; + bool instead_flag; + int event; + CmdType action; + int current_varno; + int new_varno; + Query *rule_action; + Node *rule_qual; + bool nothing; }; typedef struct _rewrite_meta_knowledge RewriteInfo; -extern List *QueryRewrite(Query *parsetree); +extern List *QueryRewrite(Query * parsetree); -#endif /*REWRITEHANDLER_H */ +#endif /* REWRITEHANDLER_H */ diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h index 0b9135c1c79..4c8b09e9889 100644 --- a/src/include/rewrite/rewriteManip.h +++ b/src/include/rewrite/rewriteManip.h @@ -1,31 +1,32 @@ /*------------------------------------------------------------------------- * * rewriteManip.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteManip.h,v 1.1 1996/08/28 07:24:08 scrappy Exp $ + * $Id: rewriteManip.h,v 1.2 1997/09/07 05:00:35 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef REWRITEMANIP_H -#define REWRITEMANIP_H +#ifndef REWRITEMANIP_H +#define REWRITEMANIP_H /* RewriteManip.c */ -void OffsetVarNodes(Node *node, int offset); -void ChangeVarNodes(Node *node, int old_varno, int new_varno); -void AddQual(Query *parsetree, Node *qual); -void AddNotQual(Query *parsetree, Node *qual); -void FixResdomTypes(List *user_tlist); -void FixNew(RewriteInfo *info, Query *parsetree); - -void HandleRIRAttributeRule(Query *parsetree, List *rtable, List *targetlist, - int rt_index, int attr_num, int *modified, - int *badpostquel); -void HandleViewRule(Query *parsetree, List *rtable, List *targetlist, - int rt_index, int *modified); +void OffsetVarNodes(Node * node, int offset); +void ChangeVarNodes(Node * node, int old_varno, int new_varno); +void AddQual(Query * parsetree, Node * qual); +void AddNotQual(Query * parsetree, Node * qual); +void FixResdomTypes(List * user_tlist); +void FixNew(RewriteInfo * info, Query * parsetree); -#endif /* REWRITEMANIP_H */ +void +HandleRIRAttributeRule(Query * parsetree, List * rtable, List * targetlist, + int rt_index, int attr_num, int *modified, + int *badpostquel); +void +HandleViewRule(Query * parsetree, List * rtable, List * targetlist, + int rt_index, int *modified); +#endif /* REWRITEMANIP_H */ diff --git a/src/include/rewrite/rewriteRemove.h b/src/include/rewrite/rewriteRemove.h index 11d97c96d64..947a5815eae 100644 --- a/src/include/rewrite/rewriteRemove.h +++ b/src/include/rewrite/rewriteRemove.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * rewriteRemove.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteRemove.h,v 1.1 1996/08/28 07:24:12 scrappy Exp $ + * $Id: rewriteRemove.h,v 1.2 1997/09/07 05:00:37 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef REWRITEREMOVE_H -#define REWRITEREMOVE_H +#ifndef REWRITEREMOVE_H +#define REWRITEREMOVE_H -extern char *RewriteGetRuleEventRel(char *rulename); -extern void RemoveRewriteRule(char *ruleName); -extern void RelationRemoveRules(Oid relid); +extern char *RewriteGetRuleEventRel(char *rulename); +extern void RemoveRewriteRule(char *ruleName); +extern void RelationRemoveRules(Oid relid); -#endif /* REWRITEREMOVE_H */ +#endif /* REWRITEREMOVE_H */ diff --git a/src/include/rewrite/rewriteSupport.h b/src/include/rewrite/rewriteSupport.h index 36d03f6a61b..7f517ae4ccd 100644 --- a/src/include/rewrite/rewriteSupport.h +++ b/src/include/rewrite/rewriteSupport.h @@ -1,26 +1,26 @@ /*------------------------------------------------------------------------- * * rewriteSupport.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteSupport.h,v 1.2 1996/11/06 10:31:02 scrappy Exp $ + * $Id: rewriteSupport.h,v 1.3 1997/09/07 05:00:38 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef REWRITESUPPORT_H -#define REWRITESUPPORT_H - +#ifndef REWRITESUPPORT_H +#define REWRITESUPPORT_H -extern int IsDefinedRewriteRule(char *ruleName); -extern void prs2_addToRelation(Oid relid, Oid ruleId, CmdType event_type, - AttrNumber attno, bool isInstead, Node *qual, - List *actions); -extern void prs2_deleteFromRelation(Oid relid, Oid ruleId); +extern int IsDefinedRewriteRule(char *ruleName); +extern void +prs2_addToRelation(Oid relid, Oid ruleId, CmdType event_type, + AttrNumber attno, bool isInstead, Node * qual, + List * actions); +extern void prs2_deleteFromRelation(Oid relid, Oid ruleId); -#endif /* REWRITESUPPORT_H */ +#endif /* REWRITESUPPORT_H */ diff --git a/src/include/storage/backendid.h b/src/include/storage/backendid.h index c631d9c38ce..5abdd770e8c 100644 --- a/src/include/storage/backendid.h +++ b/src/include/storage/backendid.h @@ -1,31 +1,32 @@ /*------------------------------------------------------------------------- * * backendid.h-- - * POSTGRES backend id communication definitions + * POSTGRES backend id communication definitions * * * Copyright (c) 1994, Regents of the University of California * - * $Id: backendid.h,v 1.2 1996/11/05 06:10:52 scrappy Exp $ + * $Id: backendid.h,v 1.3 1997/09/07 05:00:40 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef BACKENDID_H +#ifndef BACKENDID_H #define BACKENDID_H /* ---------------- - * -cim 8/17/90 + * -cim 8/17/90 * ---------------- */ -typedef int16 BackendId; /* unique currently active backend identifier */ +typedef int16 BackendId; /* unique currently active backend + * identifier */ -#define InvalidBackendId (-1) +#define InvalidBackendId (-1) -typedef int32 BackendTag; /* unique backend identifier */ +typedef int32 BackendTag; /* unique backend identifier */ -#define InvalidBackendTag (-1) +#define InvalidBackendTag (-1) -extern BackendId MyBackendId; /* backend id of this backend */ -extern BackendTag MyBackendTag; /* backend tag of this backend */ +extern BackendId MyBackendId; /* backend id of this backend */ +extern BackendTag MyBackendTag; /* backend tag of this backend */ -#endif /* BACKENDID_H */ +#endif /* BACKENDID_H */ diff --git a/src/include/storage/block.h b/src/include/storage/block.h index 993d7f8257e..9702b53e2eb 100644 --- a/src/include/storage/block.h +++ b/src/include/storage/block.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * block.h-- - * POSTGRES disk block definitions. + * POSTGRES disk block definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: block.h,v 1.2 1996/10/31 09:49:40 scrappy Exp $ + * $Id: block.h,v 1.3 1997/09/07 05:00:42 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef BLOCK_H +#ifndef BLOCK_H #define BLOCK_H /* @@ -29,12 +29,12 @@ */ typedef uint32 BlockNumber; -#define InvalidBlockNumber ((BlockNumber) 0xFFFFFFFF) +#define InvalidBlockNumber ((BlockNumber) 0xFFFFFFFF) /* * BlockId: * - * this is a storage type for BlockNumber. in other words, this type + * this is a storage type for BlockNumber. in other words, this type * is used for on-disk structures (e.g., in HeapTupleData) whereas * BlockNumber is the type on which calculations are performed (e.g., * in access method code). @@ -47,66 +47,67 @@ typedef uint32 BlockNumber; * page and the header of each heap or index tuple, so it doesn't seem * wise to change this without good reason. */ -typedef struct BlockIdData { - uint16 bi_hi; - uint16 bi_lo; -} BlockIdData; +typedef struct BlockIdData +{ + uint16 bi_hi; + uint16 bi_lo; +} BlockIdData; -typedef BlockIdData *BlockId; /* block identifier */ +typedef BlockIdData *BlockId; /* block identifier */ /* ---------------- - * support macros + * support macros * ---------------- */ /* * BlockNumberIsValid -- - * True iff blockNumber is valid. + * True iff blockNumber is valid. */ #define BlockNumberIsValid(blockNumber) \ - ((bool) ((int32) (blockNumber) != InvalidBlockNumber)) + ((bool) ((int32) (blockNumber) != InvalidBlockNumber)) /* * BlockIdIsValid -- - * True iff the block identifier is valid. + * True iff the block identifier is valid. */ #define BlockIdIsValid(blockId) \ - ((bool) PointerIsValid(blockId)) + ((bool) PointerIsValid(blockId)) /* * BlockIdSet -- - * Sets a block identifier to the specified value. + * Sets a block identifier to the specified value. */ #define BlockIdSet(blockId, blockNumber) \ - Assert(PointerIsValid(blockId)); \ - (blockId)->bi_hi = (blockNumber) >> 16; \ - (blockId)->bi_lo = (blockNumber) & 0xffff + Assert(PointerIsValid(blockId)); \ + (blockId)->bi_hi = (blockNumber) >> 16; \ + (blockId)->bi_lo = (blockNumber) & 0xffff /* * BlockIdCopy -- - * Copy a block identifier. + * Copy a block identifier. */ #define BlockIdCopy(toBlockId, fromBlockId) \ - Assert(PointerIsValid(toBlockId)); \ - Assert(PointerIsValid(fromBlockId)); \ - (toBlockId)->bi_hi = (fromBlockId)->bi_hi; \ - (toBlockId)->bi_lo = (fromBlockId)->bi_lo + Assert(PointerIsValid(toBlockId)); \ + Assert(PointerIsValid(fromBlockId)); \ + (toBlockId)->bi_hi = (fromBlockId)->bi_hi; \ + (toBlockId)->bi_lo = (fromBlockId)->bi_lo /* * BlockIdEquals -- - * Check for block number equality. + * Check for block number equality. */ #define BlockIdEquals(blockId1, blockId2) \ - ((blockId1)->bi_hi == (blockId2)->bi_hi && \ - (blockId1)->bi_lo == (blockId2)->bi_lo) + ((blockId1)->bi_hi == (blockId2)->bi_hi && \ + (blockId1)->bi_lo == (blockId2)->bi_lo) /* * BlockIdGetBlockNumber -- - * Retrieve the block number from a block identifier. + * Retrieve the block number from a block identifier. */ #define BlockIdGetBlockNumber(blockId) \ - (AssertMacro(BlockIdIsValid(blockId)) ? \ - (BlockNumber) (((blockId)->bi_hi << 16) | ((uint16) (blockId)->bi_lo)) : \ - (BlockNumber) InvalidBlockNumber) + (AssertMacro(BlockIdIsValid(blockId)) ? \ + (BlockNumber) (((blockId)->bi_hi << 16) | ((uint16) (blockId)->bi_lo)) : \ + (BlockNumber) InvalidBlockNumber) -#endif /* BLOCK_H */ +#endif /* BLOCK_H */ diff --git a/src/include/storage/buf.h b/src/include/storage/buf.h index 439cb58ec9b..481033c4a73 100644 --- a/src/include/storage/buf.h +++ b/src/include/storage/buf.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * buf.h-- - * Basic buffer manager data types. + * Basic buffer manager data types. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: buf.h,v 1.1 1996/08/28 01:57:57 scrappy Exp $ + * $Id: buf.h,v 1.2 1997/09/07 05:00:45 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef BUF_H +#ifndef BUF_H #define BUF_H #define InvalidBuffer (0) @@ -20,28 +20,28 @@ typedef long Buffer; /* * BufferIsInvalid -- - * True iff the buffer is invalid. + * True iff the buffer is invalid. */ -#define BufferIsInvalid(buffer) ((buffer) == InvalidBuffer) +#define BufferIsInvalid(buffer) ((buffer) == InvalidBuffer) /* * BufferIsUnknown -- - * True iff the buffer is unknown. + * True iff the buffer is unknown. */ -#define BufferIsUnknown(buffer) ((buffer) == UnknownBuffer) +#define BufferIsUnknown(buffer) ((buffer) == UnknownBuffer) /* * BufferIsLocal -- - * True iff the buffer is local (not visible to other servers). + * True iff the buffer is local (not visible to other servers). */ #define BufferIsLocal(buffer) ((buffer) < 0) /* * If NO_BUFFERISVALID is defined, all error checking using BufferIsValid() - * are suppressed. Decision-making using BufferIsValid is not affected. + * are suppressed. Decision-making using BufferIsValid is not affected. * This should be set only if one is sure there will be no errors. * - plai 9/10/90 */ #undef NO_BUFFERISVALID -#endif /* BUF_H */ +#endif /* BUF_H */ diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index 24d22bd9c9a..aea48e15cb1 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -1,20 +1,20 @@ /*------------------------------------------------------------------------- * * buf_internals.h-- - * Internal definitions. + * Internal definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: buf_internals.h,v 1.14 1997/08/19 21:39:41 momjian Exp $ + * $Id: buf_internals.h,v 1.15 1997/09/07 05:00:52 momjian Exp $ * * NOTE - * If BUFFERPAGE0 is defined, then 0 will be used as a - * valid buffer page number. + * If BUFFERPAGE0 is defined, then 0 will be used as a + * valid buffer page number. * *------------------------------------------------------------------------- */ -#ifndef BUFMGR_INTERNALS_H +#ifndef BUFMGR_INTERNALS_H #define BUFMGR_INTERNALS_H #include <storage/lmgr.h> @@ -22,35 +22,37 @@ /* Buf Mgr constants */ /* in bufmgr.c */ -extern int NBuffers; -extern int Data_Descriptors; -extern int Free_List_Descriptor; -extern int Lookup_List_Descriptor; -extern int Num_Descriptors; +extern int NBuffers; +extern int Data_Descriptors; +extern int Free_List_Descriptor; +extern int Lookup_List_Descriptor; +extern int Num_Descriptors; /* * Flags for buffer descriptors */ -#define BM_DIRTY (1 << 0) -#define BM_PRIVATE (1 << 1) -#define BM_VALID (1 << 2) -#define BM_DELETED (1 << 3) -#define BM_FREE (1 << 4) -#define BM_IO_IN_PROGRESS (1 << 5) -#define BM_IO_ERROR (1 << 6) -#define BM_JUST_DIRTIED (1 << 7) +#define BM_DIRTY (1 << 0) +#define BM_PRIVATE (1 << 1) +#define BM_VALID (1 << 2) +#define BM_DELETED (1 << 3) +#define BM_FREE (1 << 4) +#define BM_IO_IN_PROGRESS (1 << 5) +#define BM_IO_ERROR (1 << 6) +#define BM_JUST_DIRTIED (1 << 7) -typedef bits16 BufFlags; +typedef bits16 BufFlags; typedef struct sbufdesc BufferDesc; typedef struct sbufdesc BufferHdr; typedef struct buftag BufferTag; + /* long * so alignment will be correct */ -typedef long **BufferBlock; +typedef long **BufferBlock; -struct buftag{ - LRelId relId; - BlockNumber blockNum; /* blknum relative to begin of reln */ +struct buftag +{ + LRelId relId; + BlockNumber blockNum; /* blknum relative to begin of reln */ }; #define CLEAR_BUFFERTAG(a)\ @@ -79,154 +81,162 @@ struct buftag{ #define INVALID_DESCRIPTOR (-3) /* - * bletch hack -- anyplace that we declare space for relation or - * database names, we just use '16', not a symbolic constant, to - * specify their lengths. BM_NAMESIZE is the length of these names, - * and is used in the buffer manager code. somebody with lots of - * spare time should do this for all the other modules, too. + * bletch hack -- anyplace that we declare space for relation or + * database names, we just use '16', not a symbolic constant, to + * specify their lengths. BM_NAMESIZE is the length of these names, + * and is used in the buffer manager code. somebody with lots of + * spare time should do this for all the other modules, too. */ -#define BM_NAMESIZE 16 +#define BM_NAMESIZE 16 /* - * struct sbufdesc -- shared buffer cache metadata for a single - * shared buffer descriptor. + * struct sbufdesc -- shared buffer cache metadata for a single + * shared buffer descriptor. * - * We keep the name of the database and relation in which this - * buffer appears in order to avoid a catalog lookup on cache - * flush if we don't have the reldesc in the cache. It is also - * possible that the relation to which this buffer belongs is - * not visible to all backends at the time that it gets flushed. - * Dbname, relname, dbid, and relid are enough to determine where - * to put the buffer, for all storage managers. + * We keep the name of the database and relation in which this + * buffer appears in order to avoid a catalog lookup on cache + * flush if we don't have the reldesc in the cache. It is also + * possible that the relation to which this buffer belongs is + * not visible to all backends at the time that it gets flushed. + * Dbname, relname, dbid, and relid are enough to determine where + * to put the buffer, for all storage managers. */ -#define PADDED_SBUFDESC_SIZE 128 +#define PADDED_SBUFDESC_SIZE 128 /* DO NOT CHANGE THIS NEXT STRUCTURE: It is used only to get padding information for the real sbufdesc structure It should match the sbufdesc structure exactly except for a missing sb_pad */ -struct sbufdesc_unpadded { - Buffer freeNext; - Buffer freePrev; - SHMEM_OFFSET data; - BufferTag tag; - int buf_id; - BufFlags flags; - int16 bufsmgr; - unsigned refcount; +struct sbufdesc_unpadded +{ + Buffer freeNext; + Buffer freePrev; + SHMEM_OFFSET data; + BufferTag tag; + int buf_id; + BufFlags flags; + int16 bufsmgr; + unsigned refcount; #ifdef HAS_TEST_AND_SET - slock_t io_in_progress_lock; -#endif /* HAS_TEST_AND_SET */ - char sb_dbname[NAMEDATALEN]; + slock_t io_in_progress_lock; +#endif /* HAS_TEST_AND_SET */ + char sb_dbname[NAMEDATALEN]; - /* NOTE NO PADDING OF THE MEMBER HERE */ - char sb_relname[NAMEDATALEN]; + /* NOTE NO PADDING OF THE MEMBER HERE */ + char sb_relname[NAMEDATALEN]; }; /* THE REAL STRUCTURE - the structure above must match it, minus sb_pad */ -struct sbufdesc { - Buffer freeNext; /* link for freelist chain */ - Buffer freePrev; - SHMEM_OFFSET data; /* pointer to data in buf pool */ +struct sbufdesc +{ + Buffer freeNext; /* link for freelist chain */ + Buffer freePrev; + SHMEM_OFFSET data; /* pointer to data in buf pool */ - /* tag and id must be together for table lookup to work */ - BufferTag tag; /* file/block identifier */ - int buf_id; /* maps global desc to local desc */ + /* tag and id must be together for table lookup to work */ + BufferTag tag; /* file/block identifier */ + int buf_id; /* maps global desc to local desc */ - BufFlags flags; /* described below */ - int16 bufsmgr; /* storage manager id for buffer */ - unsigned refcount; /* # of times buffer is pinned */ + BufFlags flags; /* described below */ + int16 bufsmgr; /* storage manager id for buffer */ + unsigned refcount; /* # of times buffer is pinned */ #ifdef HAS_TEST_AND_SET - /* can afford a dedicated lock if test-and-set locks are available */ - slock_t io_in_progress_lock; -#endif /* HAS_TEST_AND_SET */ - - char sb_dbname[NAMEDATALEN]; /* name of db in which buf belongs */ - - /* - * I padded this structure to a power of 2 (PADDED_SBUFDESC_SIZE) because - * BufferDescriptorGetBuffer is called a billion times and it does an - * C pointer subtraction (i.e., "x - y" -> array index of x relative - * to y, which is calculated using division by struct size). Integer - * ".div" hits you for 35 cycles, as opposed to a 1-cycle "sra" ... - * this hack cut 10% off of the time to create the Wisconsin database! - * It eats up more shared memory, of course, but we're (allegedly) - * going to make some of these types bigger soon anyway... -pma 1/2/93 - */ - - /* please, don't take the sizeof() this member and use it for - something important */ - - char sb_relname[NAMEDATALEN+ /* name of reln */ - PADDED_SBUFDESC_SIZE-sizeof(struct sbufdesc_unpadded)]; + /* can afford a dedicated lock if test-and-set locks are available */ + slock_t io_in_progress_lock; +#endif /* HAS_TEST_AND_SET */ + + char sb_dbname[NAMEDATALEN]; /* name of db in which buf + * belongs */ + + /* + * I padded this structure to a power of 2 (PADDED_SBUFDESC_SIZE) + * because BufferDescriptorGetBuffer is called a billion times and it + * does an C pointer subtraction (i.e., "x - y" -> array index of x + * relative to y, which is calculated using division by struct size). + * Integer ".div" hits you for 35 cycles, as opposed to a 1-cycle + * "sra" ... this hack cut 10% off of the time to create the Wisconsin + * database! It eats up more shared memory, of course, but we're + * (allegedly) going to make some of these types bigger soon anyway... + * -pma 1/2/93 + */ + + /* + * please, don't take the sizeof() this member and use it for + * something important + */ + + char sb_relname[NAMEDATALEN + /* name of reln */ + PADDED_SBUFDESC_SIZE - sizeof(struct sbufdesc_unpadded)]; }; /* - * mao tracing buffer allocation + * mao tracing buffer allocation */ /*#define BMTRACE*/ #ifdef BMTRACE -typedef struct _bmtrace { - int bmt_pid; - long bmt_buf; - long bmt_dbid; - long bmt_relid; - int bmt_blkno; - int bmt_op; +typedef struct _bmtrace +{ + int bmt_pid; + long bmt_buf; + long bmt_dbid; + long bmt_relid; + int bmt_blkno; + int bmt_op; -#define BMT_NOTUSED 0 +#define BMT_NOTUSED 0 #define BMT_ALLOCFND 1 -#define BMT_ALLOCNOTFND 2 -#define BMT_DEALLOC 3 +#define BMT_ALLOCNOTFND 2 +#define BMT_DEALLOC 3 -} bmtrace; +} bmtrace; -#endif /* BMTRACE */ +#endif /* BMTRACE */ -/* +/* * Bufmgr Interface: */ /* Internal routines: only called by buf.c */ /*freelist.c*/ -extern void AddBufferToFreelist(BufferDesc *bf); -extern void PinBuffer(BufferDesc *buf); -extern void PinBuffer_Debug(char *file, int line, BufferDesc *buf); -extern void UnpinBuffer(BufferDesc *buf); +extern void AddBufferToFreelist(BufferDesc * bf); +extern void PinBuffer(BufferDesc * buf); +extern void PinBuffer_Debug(char *file, int line, BufferDesc * buf); +extern void UnpinBuffer(BufferDesc * buf); extern BufferDesc *GetFreeBuffer(void); -extern void InitFreeList(bool init); +extern void InitFreeList(bool init); /* buf_table.c */ -extern void InitBufTable(void); -extern BufferDesc *BufTableLookup(BufferTag *tagPtr); -extern bool BufTableDelete(BufferDesc *buf); -extern bool BufTableInsert(BufferDesc *buf); +extern void InitBufTable(void); +extern BufferDesc *BufTableLookup(BufferTag * tagPtr); +extern bool BufTableDelete(BufferDesc * buf); +extern bool BufTableInsert(BufferDesc * buf); /* bufmgr.c */ -extern BufferDesc *BufferDescriptors; -extern BufferBlock BufferBlocks; -extern long *PrivateRefCount; -extern long *LastRefCount; -extern long *CommitInfoNeedsSave; -extern SPINLOCK BufMgrLock; +extern BufferDesc *BufferDescriptors; +extern BufferBlock BufferBlocks; +extern long *PrivateRefCount; +extern long *LastRefCount; +extern long *CommitInfoNeedsSave; +extern SPINLOCK BufMgrLock; /* localbuf.c */ -extern long *LocalRefCount; +extern long *LocalRefCount; extern BufferDesc *LocalBufferDescriptors; -extern int NLocBuffer; - -extern BufferDesc *LocalBufferAlloc(Relation reln, BlockNumber blockNum, - bool *foundPtr); -extern int WriteLocalBuffer(Buffer buffer, bool release); -extern int FlushLocalBuffer(Buffer buffer, bool release); -extern void InitLocalBuffer(void); -extern void LocalBufferSync(void); -extern void ResetLocalBufferPool(void); - -#endif /* BUFMGR_INTERNALS_H */ +extern int NLocBuffer; + +extern BufferDesc * +LocalBufferAlloc(Relation reln, BlockNumber blockNum, + bool * foundPtr); +extern int WriteLocalBuffer(Buffer buffer, bool release); +extern int FlushLocalBuffer(Buffer buffer, bool release); +extern void InitLocalBuffer(void); +extern void LocalBufferSync(void); +extern void ResetLocalBufferPool(void); + +#endif /* BUFMGR_INTERNALS_H */ diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index c0ec42ddb83..d432506c7cb 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * bufmgr.h-- - * POSTGRES buffer manager definitions. + * POSTGRES buffer manager definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: bufmgr.h,v 1.11 1997/08/19 21:39:45 momjian Exp $ + * $Id: bufmgr.h,v 1.12 1997/09/07 05:01:06 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef BUFMGR_H +#ifndef BUFMGR_H #define BUFMGR_H #include <stdio.h> @@ -27,13 +27,13 @@ * limited to 2^13 bytes because we have limited ItemIdData.lp_off and * ItemIdData.lp_len to 13 bits (see itemid.h). */ -#define MAXBLCKSZ 8192 +#define MAXBLCKSZ 8192 -typedef void *Block; +typedef void *Block; /* special pageno for bget */ -#define P_NEW InvalidBlockNumber /* grow the file to get a new page */ +#define P_NEW InvalidBlockNumber /* grow the file to get a new page */ typedef bits16 BufferLock; @@ -51,57 +51,58 @@ typedef bits16 BufferLock; /* * BufferIsPinned -- - * True iff the buffer is pinned (and therefore valid) + * True iff the buffer is pinned (and therefore valid) * * Note: - * Smenatics are identical to BufferIsValid - * XXX - need to remove either one eventually. + * Smenatics are identical to BufferIsValid + * XXX - need to remove either one eventually. */ #define BufferIsPinned BufferIsValid -extern int ShowPinTrace; +extern int ShowPinTrace; /* * BufferWriteModes (settable via SetBufferWriteMode) */ -#define BUFFER_FLUSH_WRITE 0 /* immediate write */ -#define BUFFER_LATE_WRITE 1 /* delayed write: mark as DIRTY */ +#define BUFFER_FLUSH_WRITE 0 /* immediate write */ +#define BUFFER_LATE_WRITE 1 /* delayed write: mark as DIRTY */ /* - * prototypes for functions in bufmgr.c + * prototypes for functions in bufmgr.c */ -extern Buffer RelationGetBufferWithBuffer(Relation relation, - BlockNumber blockNumber, Buffer buffer); -extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum); -extern int WriteBuffer(Buffer buffer); -extern int WriteNoReleaseBuffer(Buffer buffer); -extern Buffer ReleaseAndReadBuffer(Buffer buffer, Relation relation, - BlockNumber blockNum); - -extern void InitBufferPool(IPCKey key); -extern void PrintBufferUsage(FILE *statfp); -extern void ResetBufferUsage(void); -extern void ResetBufferPool(void); -extern int BufferPoolCheckLeak(void); -extern void FlushBufferPool(int StableMainMemoryFlag); -extern bool BufferIsValid(Buffer bufnum); +extern Buffer +RelationGetBufferWithBuffer(Relation relation, + BlockNumber blockNumber, Buffer buffer); +extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum); +extern int WriteBuffer(Buffer buffer); +extern int WriteNoReleaseBuffer(Buffer buffer); +extern Buffer +ReleaseAndReadBuffer(Buffer buffer, Relation relation, + BlockNumber blockNum); + +extern void InitBufferPool(IPCKey key); +extern void PrintBufferUsage(FILE * statfp); +extern void ResetBufferUsage(void); +extern void ResetBufferPool(void); +extern int BufferPoolCheckLeak(void); +extern void FlushBufferPool(int StableMainMemoryFlag); +extern bool BufferIsValid(Buffer bufnum); extern BlockNumber BufferGetBlockNumber(Buffer buffer); extern Relation BufferGetRelation(Buffer buffer); extern BlockNumber RelationGetNumberOfBlocks(Relation relation); -extern Block BufferGetBlock(Buffer buffer); -extern void ReleaseRelationBuffers(Relation rdesc); -extern void DropBuffers(Oid dbid); -extern void PrintBufferDescs(void); -extern void PrintPinnedBufs(void); -extern int BufferShmemSize(void); -extern void IncrBufferRefCount(Buffer buffer); -extern int ReleaseBuffer(Buffer buffer); - -extern void BufferRefCountReset(int *refcountsave); -extern void BufferRefCountRestore(int *refcountsave); -extern int SetBufferWriteMode (int mode); -extern void SetBufferCommitInfoNeedsSave(Buffer buffer); - -#endif /* !defined(BufMgrIncluded) */ - +extern Block BufferGetBlock(Buffer buffer); +extern void ReleaseRelationBuffers(Relation rdesc); +extern void DropBuffers(Oid dbid); +extern void PrintBufferDescs(void); +extern void PrintPinnedBufs(void); +extern int BufferShmemSize(void); +extern void IncrBufferRefCount(Buffer buffer); +extern int ReleaseBuffer(Buffer buffer); + +extern void BufferRefCountReset(int *refcountsave); +extern void BufferRefCountRestore(int *refcountsave); +extern int SetBufferWriteMode(int mode); +extern void SetBufferCommitInfoNeedsSave(Buffer buffer); + +#endif /* !defined(BufMgrIncluded) */ diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index 3607e4e25e2..a252ccc3e44 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * bufpage.h-- - * Standard POSTGRES buffer page definitions. + * Standard POSTGRES buffer page definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: bufpage.h,v 1.10 1997/08/26 23:31:58 momjian Exp $ + * $Id: bufpage.h,v 1.11 1997/09/07 05:01:10 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef BUFPAGE_H +#ifndef BUFPAGE_H #define BUFPAGE_H #include <storage/off.h> @@ -27,19 +27,19 @@ * disk page is always a slotted page of the form: * * +----------------+---------------------------------+ - * | PageHeaderData | linp0 linp1 linp2 ... | + * | PageHeaderData | linp0 linp1 linp2 ... | * +-----------+----+---------------------------------+ - * | ... linpN | | + * | ... linpN | | * +-----------+--------------------------------------+ - * | ^ pd_lower | - * | | - * | v pd_upper | + * | ^ pd_lower | + * | | + * | v pd_upper | * +-------------+------------------------------------+ - * | | tupleN ... | + * | | tupleN ... | * +-------------+------------------+-----------------+ - * | ... tuple2 tuple1 tuple0 | "special space" | + * | ... tuple2 tuple1 tuple0 | "special space" | * +--------------------------------+-----------------+ - * ^ pd_special + * ^ pd_special * * a page is full when nothing can be added between pd_lower and * pd_upper. @@ -66,19 +66,19 @@ * whenever the need arises. * * AM-generic per-page information is kept in the pd_opaque field of - * the PageHeaderData. (this is currently only the page size.) + * the PageHeaderData. (this is currently only the page size.) * AM-specific per-page data is kept in the area marked "special * space"; each AM has an "opaque" structure defined somewhere that is - * stored as the page trailer. an access method should always + * stored as the page trailer. an access method should always * initialize its pages with PageInit and then set its own opaque * fields. */ /* * PageIsValid -- - * True iff page is valid. + * True iff page is valid. */ -#define PageIsValid(page) PointerIsValid(page) +#define PageIsValid(page) PointerIsValid(page) /* @@ -93,39 +93,42 @@ typedef uint16 LocationIndex; /* * space management information generic to any page * - * od_pagesize - size in bytes. - * in reality, we need at least 64B to fit the - * page header, opaque space and a minimal tuple; - * on the high end, we can only support pages up - * to 8KB because lp_off/lp_len are 13 bits. + * od_pagesize - size in bytes. + * in reality, we need at least 64B to fit the + * page header, opaque space and a minimal tuple; + * on the high end, we can only support pages up + * to 8KB because lp_off/lp_len are 13 bits. */ -typedef struct OpaqueData { - uint16 od_pagesize; -} OpaqueData; - -typedef OpaqueData *Opaque; +typedef struct OpaqueData +{ + uint16 od_pagesize; +} OpaqueData; + +typedef OpaqueData *Opaque; /* * disk page organization */ -typedef struct PageHeaderData { - LocationIndex pd_lower; /* offset to start of free space */ - LocationIndex pd_upper; /* offset to end of free space */ - LocationIndex pd_special; /* offset to start of special space */ - OpaqueData pd_opaque; /* AM-generic information */ - ItemIdData pd_linp[1]; /* line pointers */ -} PageHeaderData; - -typedef PageHeaderData *PageHeader; - -typedef enum { - ShufflePageManagerMode, - OverwritePageManagerMode -} PageManagerMode; +typedef struct PageHeaderData +{ + LocationIndex pd_lower; /* offset to start of free space */ + LocationIndex pd_upper; /* offset to end of free space */ + LocationIndex pd_special; /* offset to start of special space */ + OpaqueData pd_opaque; /* AM-generic information */ + ItemIdData pd_linp[1]; /* line pointers */ +} PageHeaderData; + +typedef PageHeaderData *PageHeader; + +typedef enum +{ + ShufflePageManagerMode, + OverwritePageManagerMode +} PageManagerMode; /* ---------------- - * misc support macros + * misc support macros * ---------------- */ @@ -134,10 +137,10 @@ typedef enum { * AM-specific opaque space at the end of the page (as in btrees), ... * however, it at least serves as an upper bound for heap pages. */ -#define MAXTUPLEN (BLCKSZ - sizeof (PageHeaderData)) +#define MAXTUPLEN (BLCKSZ - sizeof (PageHeaderData)) /* ---------------------------------------------------------------- - * page support macros + * page support macros * ---------------------------------------------------------------- */ /* @@ -146,146 +149,147 @@ typedef enum { /* * PageIsUsed -- - * True iff the page size is used. + * True iff the page size is used. * * Note: - * Assumes page is valid. + * Assumes page is valid. */ #define PageIsUsed(page) \ - (AssertMacro(PageIsValid(page)) ? \ - ((bool) (((PageHeader) (page))->pd_lower != 0)) : false) + (AssertMacro(PageIsValid(page)) ? \ + ((bool) (((PageHeader) (page))->pd_lower != 0)) : false) /* * PageIsEmpty -- - * returns true iff no itemid has been allocated on the page + * returns true iff no itemid has been allocated on the page */ #define PageIsEmpty(page) \ - (((PageHeader) (page))->pd_lower == \ - (sizeof(PageHeaderData) - sizeof(ItemIdData)) ? true : false) + (((PageHeader) (page))->pd_lower == \ + (sizeof(PageHeaderData) - sizeof(ItemIdData)) ? true : false) /* - * PageIsNew -- - * returns true iff page is not initialized (by PageInit) + * PageIsNew -- + * returns true iff page is not initialized (by PageInit) */ -#define PageIsNew(page) (((PageHeader) (page))->pd_upper == 0) +#define PageIsNew(page) (((PageHeader) (page))->pd_upper == 0) /* * PageGetItemId -- - * Returns an item identifier of a page. + * Returns an item identifier of a page. */ #define PageGetItemId(page, offsetNumber) \ - ((ItemId) (&((PageHeader) (page))->pd_linp[(-1) + (offsetNumber)])) + ((ItemId) (&((PageHeader) (page))->pd_linp[(-1) + (offsetNumber)])) /* ---------------- - * macros to access opaque space + * macros to access opaque space * ---------------- */ /* * PageSizeIsValid -- - * True iff the page size is valid. + * True iff the page size is valid. * * XXX currently all page sizes are "valid" but we only actually - * use BLCKSZ. + * use BLCKSZ. */ #define PageSizeIsValid(pageSize) 1 /* * PageGetPageSize -- - * Returns the page size of a page. + * Returns the page size of a page. * * this can only be called on a formatted page (unlike * BufferGetPageSize, which can be called on an unformatted page). * however, it can be called on a page for which there is no buffer. */ #define PageGetPageSize(page) \ - ((Size) ((PageHeader) (page))->pd_opaque.od_pagesize) + ((Size) ((PageHeader) (page))->pd_opaque.od_pagesize) /* * PageSetPageSize -- - * Sets the page size of a page. + * Sets the page size of a page. */ #define PageSetPageSize(page, size) \ - ((PageHeader) (page))->pd_opaque.od_pagesize = (size) + ((PageHeader) (page))->pd_opaque.od_pagesize = (size) /* ---------------- - * page special data macros + * page special data macros * ---------------- */ /* * PageGetSpecialSize -- - * Returns size of special space on a page. + * Returns size of special space on a page. * * Note: - * Assumes page is locked. + * Assumes page is locked. */ #define PageGetSpecialSize(page) \ - ((uint16) (PageGetPageSize(page) - ((PageHeader)(page))->pd_special)) + ((uint16) (PageGetPageSize(page) - ((PageHeader)(page))->pd_special)) /* * PageGetSpecialPointer -- - * Returns pointer to special space on a page. + * Returns pointer to special space on a page. * * Note: - * Assumes page is locked. + * Assumes page is locked. */ #define PageGetSpecialPointer(page) \ - (AssertMacro(PageIsValid(page)) ? \ - (char *) ((char *) (page) + ((PageHeader) (page))->pd_special) \ - : (char *)0 ) + (AssertMacro(PageIsValid(page)) ? \ + (char *) ((char *) (page) + ((PageHeader) (page))->pd_special) \ + : (char *)0 ) /* * PageGetItem -- - * Retrieves an item on the given page. + * Retrieves an item on the given page. * * Note: - * This does change the status of any of the resources passed. - * The semantics may change in the future. + * This does change the status of any of the resources passed. + * The semantics may change in the future. */ #define PageGetItem(page, itemId) \ - (AssertMacro(PageIsValid(page)) ? \ - AssertMacro((itemId)->lp_flags & LP_USED) ? \ - (Item)(((char *)(page)) + (itemId)->lp_off) : false : false) + (AssertMacro(PageIsValid(page)) ? \ + AssertMacro((itemId)->lp_flags & LP_USED) ? \ + (Item)(((char *)(page)) + (itemId)->lp_off) : false : false) /* * BufferGetPageSize -- - * Returns the page size within a buffer. + * Returns the page size within a buffer. * * Notes: - * Assumes buffer is valid. + * Assumes buffer is valid. * - * The buffer can be a raw disk block and need not contain a valid - * (formatted) disk page. + * The buffer can be a raw disk block and need not contain a valid + * (formatted) disk page. */ /* XXX dig out of buffer descriptor */ #define BufferGetPageSize(buffer) \ - (AssertMacro(BufferIsValid(buffer)) ? \ - AssertMacro(PageSizeIsValid(pageSize)) ? \ - ((Size)BLCKSZ) : false : false) + (AssertMacro(BufferIsValid(buffer)) ? \ + AssertMacro(PageSizeIsValid(pageSize)) ? \ + ((Size)BLCKSZ) : false : false) /* * BufferGetPage -- - * Returns the page associated with a buffer. + * Returns the page associated with a buffer. */ #define BufferGetPage(buffer) ((Page)BufferGetBlock(buffer)) - + /* ---------------------------------------------------------------- - * extern declarations + * extern declarations * ---------------------------------------------------------------- */ -extern void PageInit(Page page, Size pageSize, Size specialSize); -extern OffsetNumber PageAddItem(Page page, Item item, Size size, - OffsetNumber offsetNumber, ItemIdFlags flags); -extern Page PageGetTempPage(Page page, Size specialSize); -extern void PageRestoreTempPage(Page tempPage, Page oldPage); +extern void PageInit(Page page, Size pageSize, Size specialSize); +extern OffsetNumber +PageAddItem(Page page, Item item, Size size, + OffsetNumber offsetNumber, ItemIdFlags flags); +extern Page PageGetTempPage(Page page, Size specialSize); +extern void PageRestoreTempPage(Page tempPage, Page oldPage); extern OffsetNumber PageGetMaxOffsetNumber(Page page); -extern void PageRepairFragmentation(Page page); -extern Size PageGetFreeSpace(Page page); -extern void PageManagerModeSet(PageManagerMode mode); -extern void PageIndexTupleDelete(Page page, OffsetNumber offset); +extern void PageRepairFragmentation(Page page); +extern Size PageGetFreeSpace(Page page); +extern void PageManagerModeSet(PageManagerMode mode); +extern void PageIndexTupleDelete(Page page, OffsetNumber offset); -#endif /* BUFPAGE_H */ +#endif /* BUFPAGE_H */ diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index bd76109ac0e..9fbe004d4a3 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -1,37 +1,37 @@ /*------------------------------------------------------------------------- * * fd.h-- - * Virtual file descriptor definitions. + * Virtual file descriptor definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: fd.h,v 1.8 1997/08/19 21:39:48 momjian Exp $ + * $Id: fd.h,v 1.9 1997/09/07 05:01:12 momjian Exp $ * *------------------------------------------------------------------------- */ /* * calls: - * - * File {Close, Read, Write, Seek, Tell, Sync} - * {File Name Open, Allocate, Free} File + * + * File {Close, Read, Write, Seek, Tell, Sync} + * {File Name Open, Allocate, Free} File * * These are NOT JUST RENAMINGS OF THE UNIX ROUTINES. * use them for all file activity... * - * fd = FilePathOpenFile("foo", O_RDONLY); - * File fd; + * fd = FilePathOpenFile("foo", O_RDONLY); + * File fd; * * use AllocateFile if you need a file descriptor in some other context. * it will make sure that there is a file descriptor free * - * use FreeFile to let the virtual file descriptor package know that + * use FreeFile to let the virtual file descriptor package know that * there is now a free fd (when you are done with it) * - * AllocateFile(); - * FreeFile(); + * AllocateFile(); + * FreeFile(); */ -#ifndef FD_H +#ifndef FD_H #define FD_H #include <stdio.h> @@ -42,37 +42,39 @@ typedef char *FileName; -typedef int File; +typedef int File; /* originally in libpq-fs.h */ -struct pgstat { /* just the fields we need from stat structure */ - int st_ino; - int st_mode; - unsigned int st_size; - unsigned int st_sizehigh; /* high order bits */ +struct pgstat +{ /* just the fields we need from stat + * structure */ + int st_ino; + int st_mode; + unsigned int st_size; + unsigned int st_sizehigh;/* high order bits */ /* 2^64 == 1.8 x 10^20 bytes */ - int st_uid; - int st_atime_s; /* just the seconds */ - int st_mtime_s; /* since SysV and the new BSD both have */ - int st_ctime_s; /* usec fields.. */ + int st_uid; + int st_atime_s; /* just the seconds */ + int st_mtime_s; /* since SysV and the new BSD both have */ + int st_ctime_s; /* usec fields.. */ }; /* * prototypes for functions in fd.c */ -extern File FileNameOpenFile(FileName fileName, int fileFlags, int fileMode); -extern File PathNameOpenFile(FileName fileName, int fileFlags, int fileMode); -extern void FileClose(File file); -extern void FileUnlink(File file); -extern int FileRead(File file, char *buffer, int amount); -extern int FileWrite(File file, char *buffer, int amount); -extern long FileSeek(File file, long offset, int whence); -extern int FileTruncate(File file, int offset); -extern int FileSync(File file); -extern int FileNameUnlink(char *filename); -extern FILE *AllocateFile(char *name, char *mode); -extern void FreeFile(FILE *); -extern void closeAllVfds(void); -extern int pg_fsync(int fd); +extern File FileNameOpenFile(FileName fileName, int fileFlags, int fileMode); +extern File PathNameOpenFile(FileName fileName, int fileFlags, int fileMode); +extern void FileClose(File file); +extern void FileUnlink(File file); +extern int FileRead(File file, char *buffer, int amount); +extern int FileWrite(File file, char *buffer, int amount); +extern long FileSeek(File file, long offset, int whence); +extern int FileTruncate(File file, int offset); +extern int FileSync(File file); +extern int FileNameUnlink(char *filename); +extern FILE *AllocateFile(char *name, char *mode); +extern void FreeFile(FILE *); +extern void closeAllVfds(void); +extern int pg_fsync(int fd); -#endif /* FD_H */ +#endif /* FD_H */ diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h index 69f8b2ba862..9e08d6b94ee 100644 --- a/src/include/storage/ipc.h +++ b/src/include/storage/ipc.h @@ -1,171 +1,181 @@ /*------------------------------------------------------------------------- * * ipc.h-- - * POSTGRES inter-process communication definitions. + * POSTGRES inter-process communication definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: ipc.h,v 1.17 1997/08/19 21:39:50 momjian Exp $ + * $Id: ipc.h,v 1.18 1997/09/07 05:01:14 momjian Exp $ * * NOTES - * This file is very architecture-specific. This stuff should actually - * be factored into the port/ directories. + * This file is very architecture-specific. This stuff should actually + * be factored into the port/ directories. * - * Some files that would normally need to include only sys/ipc.h must + * Some files that would normally need to include only sys/ipc.h must * instead included this file because on Ultrix, sys/ipc.h is not designed * to be included multiple times. This file (by virtue of the ifndef IPC_H) * is. *------------------------------------------------------------------------- */ -#ifndef IPC_H +#ifndef IPC_H #define IPC_H #include <sys/types.h> -#include <sys/ipc.h> /* For IPC_PRIVATE */ +#include <sys/ipc.h> /* For IPC_PRIVATE */ #include <config.h> #if defined(HAS_TEST_AND_SET) -extern void S_LOCK(slock_t *lock); -extern void S_UNLOCK(slock_t *lock); -extern void S_INIT_LOCK(slock_t *lock); +extern void S_LOCK(slock_t * lock); +extern void S_UNLOCK(slock_t * lock); +extern void S_INIT_LOCK(slock_t * lock); #if (defined(alpha) && !defined(linuxalpha)) || \ - defined(hpux) || \ - defined(irix5) || \ - defined(nextstep) -extern int S_LOCK_FREE(slock_t *lock); + defined(hpux) || \ + defined(irix5) || \ + defined(nextstep) +extern int S_LOCK_FREE(slock_t * lock); + #else -#define S_LOCK_FREE(lock) ((*lock) == 0) +#define S_LOCK_FREE(lock) ((*lock) == 0) #endif -#endif /* HAS_TEST_AND_SET */ +#endif /* HAS_TEST_AND_SET */ #ifndef HAVE_UNION_SEMUN -union semun { - int val; - struct semid_ds *buf; - unsigned short *array; +union semun +{ + int val; + struct semid_ds *buf; + unsigned short *array; }; + #endif typedef uint16 SystemPortAddress; /* semaphore definitions */ -#define IPCProtection (0600) /* access/modify by user only */ +#define IPCProtection (0600) /* access/modify by user only */ -#define IPC_NMAXSEM 25 /* maximum number of semaphores */ +#define IPC_NMAXSEM 25 /* maximum number of semaphores */ #define IpcSemaphoreDefaultStartValue 255 -#define IpcSharedLock (-1) -#define IpcExclusiveLock (-255) +#define IpcSharedLock (-1) +#define IpcExclusiveLock (-255) -#define IpcUnknownStatus (-1) -#define IpcInvalidArgument (-2) -#define IpcSemIdExist (-3) -#define IpcSemIdNotExist (-4) +#define IpcUnknownStatus (-1) +#define IpcInvalidArgument (-2) +#define IpcSemIdExist (-3) +#define IpcSemIdNotExist (-4) -typedef uint32 IpcSemaphoreKey; /* semaphore key */ -typedef int IpcSemaphoreId; +typedef uint32 IpcSemaphoreKey;/* semaphore key */ +typedef int IpcSemaphoreId; -/* shared memory definitions */ +/* shared memory definitions */ #define IpcMemCreationFailed (-1) -#define IpcMemIdGetFailed (-2) -#define IpcMemAttachFailed 0 +#define IpcMemIdGetFailed (-2) +#define IpcMemAttachFailed 0 typedef uint32 IPCKey; + #define PrivateIPCKey IPC_PRIVATE #define DefaultIPCKey 17317 -typedef uint32 IpcMemoryKey; /* shared memory key */ -typedef int IpcMemoryId; +typedef uint32 IpcMemoryKey; /* shared memory key */ +typedef int IpcMemoryId; /* ipc.c */ -extern void exitpg(int code); -extern void quasi_exitpg(void); -extern int on_exitpg(void (*function)(), caddr_t arg); - -extern IpcSemaphoreId IpcSemaphoreCreate(IpcSemaphoreKey semKey, - int semNum, int permission, int semStartValue, - int removeOnExit, int *status); -extern void IpcSemaphoreKill(IpcSemaphoreKey key); -extern void IpcSemaphoreLock(IpcSemaphoreId semId, int sem, int lock); -extern void IpcSemaphoreUnlock(IpcSemaphoreId semId, int sem, int lock); -extern int IpcSemaphoreGetCount(IpcSemaphoreId semId, int sem); -extern int IpcSemaphoreGetValue(IpcSemaphoreId semId, int sem); -extern IpcMemoryId IpcMemoryCreate(IpcMemoryKey memKey, uint32 size, - int permission); +extern void exitpg(int code); +extern void quasi_exitpg(void); +extern int on_exitpg(void (*function) (), caddr_t arg); + +extern IpcSemaphoreId +IpcSemaphoreCreate(IpcSemaphoreKey semKey, + int semNum, int permission, int semStartValue, + int removeOnExit, int *status); +extern void IpcSemaphoreKill(IpcSemaphoreKey key); +extern void IpcSemaphoreLock(IpcSemaphoreId semId, int sem, int lock); +extern void IpcSemaphoreUnlock(IpcSemaphoreId semId, int sem, int lock); +extern int IpcSemaphoreGetCount(IpcSemaphoreId semId, int sem); +extern int IpcSemaphoreGetValue(IpcSemaphoreId semId, int sem); +extern IpcMemoryId +IpcMemoryCreate(IpcMemoryKey memKey, uint32 size, + int permission); extern IpcMemoryId IpcMemoryIdGet(IpcMemoryKey memKey, uint32 size); -extern char *IpcMemoryAttach(IpcMemoryId memId); -extern void IpcMemoryKill(IpcMemoryKey memKey); -extern void CreateAndInitSLockMemory(IPCKey key); -extern void AttachSLockMemory(IPCKey key); +extern char *IpcMemoryAttach(IpcMemoryId memId); +extern void IpcMemoryKill(IpcMemoryKey memKey); +extern void CreateAndInitSLockMemory(IPCKey key); +extern void AttachSLockMemory(IPCKey key); #ifdef HAS_TEST_AND_SET -#define NSLOCKS 2048 -#define NOLOCK 0 -#define SHAREDLOCK 1 +#define NSLOCKS 2048 +#define NOLOCK 0 +#define SHAREDLOCK 1 #define EXCLUSIVELOCK 2 -typedef enum _LockId_ { - BUFMGRLOCKID, - LOCKLOCKID, - OIDGENLOCKID, - SHMEMLOCKID, - BINDINGLOCKID, - LOCKMGRLOCKID, - SINVALLOCKID, +typedef enum _LockId_ +{ + BUFMGRLOCKID, + LOCKLOCKID, + OIDGENLOCKID, + SHMEMLOCKID, + BINDINGLOCKID, + LOCKMGRLOCKID, + SINVALLOCKID, #ifdef MAIN_MEMORY - MMCACHELOCKID, -#endif /* MAIN_MEMORY */ - - PROCSTRUCTLOCKID, - FIRSTFREELOCKID -} _LockId_; - -#define MAX_SPINS FIRSTFREELOCKID - -typedef struct slock { - slock_t locklock; - unsigned char flag; - short nshlocks; - slock_t shlock; - slock_t exlock; - slock_t comlock; - struct slock *next; -} SLock; - -extern void ExclusiveLock(int lockid); -extern void ExclusiveUnlock(int lockid); -extern bool LockIsFree(int lockid); -#else /* HAS_TEST_AND_SET */ - -typedef enum _LockId_ { - SHMEMLOCKID, - BINDINGLOCKID, - BUFMGRLOCKID, - LOCKMGRLOCKID, - SINVALLOCKID, + MMCACHELOCKID, +#endif /* MAIN_MEMORY */ + + PROCSTRUCTLOCKID, + FIRSTFREELOCKID +} _LockId_; + +#define MAX_SPINS FIRSTFREELOCKID + +typedef struct slock +{ + slock_t locklock; + unsigned char flag; + short nshlocks; + slock_t shlock; + slock_t exlock; + slock_t comlock; + struct slock *next; +} SLock; + +extern void ExclusiveLock(int lockid); +extern void ExclusiveUnlock(int lockid); +extern bool LockIsFree(int lockid); + +#else /* HAS_TEST_AND_SET */ + +typedef enum _LockId_ +{ + SHMEMLOCKID, + BINDINGLOCKID, + BUFMGRLOCKID, + LOCKMGRLOCKID, + SINVALLOCKID, #ifdef MAIN_MEMORY - MMCACHELOCKID, -#endif /* MAIN_MEMORY */ + MMCACHELOCKID, +#endif /* MAIN_MEMORY */ - PROCSTRUCTLOCKID, - OIDGENLOCKID, - FIRSTFREELOCKID -} _LockId_; + PROCSTRUCTLOCKID, + OIDGENLOCKID, + FIRSTFREELOCKID +} _LockId_; -#define MAX_SPINS FIRSTFREELOCKID +#define MAX_SPINS FIRSTFREELOCKID -#endif /* HAS_TEST_AND_SET */ +#endif /* HAS_TEST_AND_SET */ /* * the following are originally in ipci.h but the prototypes have circular @@ -176,42 +186,42 @@ typedef enum _LockId_ { /* * Note: - * These must not hash to DefaultIPCKey or PrivateIPCKey. + * These must not hash to DefaultIPCKey or PrivateIPCKey. */ #define SystemPortAddressGetIPCKey(address) \ - (28597 * (address) + 17491) + (28597 * (address) + 17491) /* * these keys are originally numbered from 1 to 12 consecutively but not - * all are used. The unused ones are removed. - ay 4/95. + * all are used. The unused ones are removed. - ay 4/95. */ #define IPCKeyGetBufferMemoryKey(key) \ - ((key == PrivateIPCKey) ? key : 1 + (key)) + ((key == PrivateIPCKey) ? key : 1 + (key)) #define IPCKeyGetSIBufferMemoryBlock(key) \ - ((key == PrivateIPCKey) ? key : 7 + (key)) + ((key == PrivateIPCKey) ? key : 7 + (key)) #define IPCKeyGetSLockSharedMemoryKey(key) \ - ((key == PrivateIPCKey) ? key : 10 + (key)) + ((key == PrivateIPCKey) ? key : 10 + (key)) #define IPCKeyGetSpinLockSemaphoreKey(key) \ - ((key == PrivateIPCKey) ? key : 11 + (key)) + ((key == PrivateIPCKey) ? key : 11 + (key)) #define IPCKeyGetWaitIOSemaphoreKey(key) \ - ((key == PrivateIPCKey) ? key : 12 + (key)) + ((key == PrivateIPCKey) ? key : 12 + (key)) /* -------------------------- * NOTE: This macro must always give the highest numbered key as every backend * process forked off by the postmaster will be trying to acquire a semaphore - * with a unique key value starting at key+14 and incrementing up. Each + * with a unique key value starting at key+14 and incrementing up. Each * backend uses the current key value then increments it by one. * -------------------------- */ #define IPCGetProcessSemaphoreInitKey(key) \ - ((key == PrivateIPCKey) ? key : 14 + (key)) + ((key == PrivateIPCKey) ? key : 14 + (key)) /* ipci.c */ -extern IPCKey SystemPortAddressCreateIPCKey(SystemPortAddress address); -extern void CreateSharedMemoryAndSemaphores(IPCKey key); -extern void AttachSharedMemoryAndSemaphores(IPCKey key); +extern IPCKey SystemPortAddressCreateIPCKey(SystemPortAddress address); +extern void CreateSharedMemoryAndSemaphores(IPCKey key); +extern void AttachSharedMemoryAndSemaphores(IPCKey key); -#endif /* IPC_H */ +#endif /* IPC_H */ diff --git a/src/include/storage/item.h b/src/include/storage/item.h index c943fc33f00..6541a717f9f 100644 --- a/src/include/storage/item.h +++ b/src/include/storage/item.h @@ -1,18 +1,18 @@ /*------------------------------------------------------------------------- * * item.h-- - * POSTGRES disk item definitions. + * POSTGRES disk item definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: item.h,v 1.2 1996/10/31 09:49:49 scrappy Exp $ + * $Id: item.h,v 1.3 1997/09/07 05:01:16 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef ITEM_H +#ifndef ITEM_H #define ITEM_H -typedef Pointer Item; +typedef Pointer Item; -#endif /* ITEM_H */ +#endif /* ITEM_H */ diff --git a/src/include/storage/itemid.h b/src/include/storage/itemid.h index 7e4fc5e28d6..9e5e6f94d4a 100644 --- a/src/include/storage/itemid.h +++ b/src/include/storage/itemid.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * itemid.h-- - * Standard POSTGRES buffer page item identifier definitions. + * Standard POSTGRES buffer page item identifier definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: itemid.h,v 1.1 1996/08/28 01:58:08 scrappy Exp $ + * $Id: itemid.h,v 1.2 1997/09/07 05:01:17 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef ITEMID_H +#ifndef ITEMID_H #define ITEMID_H typedef uint16 ItemOffset; @@ -20,56 +20,57 @@ typedef bits16 ItemIdFlags; -typedef struct ItemIdData { /* line pointers */ - unsigned lp_off:13, /* offset to find tup */ - /* can be reduced by 2 if necc. */ - lp_flags:6, /* flags on tuple */ - lp_len:13; /* length of tuple */ -} ItemIdData; +typedef struct ItemIdData +{ /* line pointers */ + unsigned lp_off:13, /* offset to find tup */ + /* can be reduced by 2 if necc. */ + lp_flags:6, /* flags on tuple */ + lp_len:13; /* length of tuple */ +} ItemIdData; -typedef struct ItemIdData *ItemId; +typedef struct ItemIdData *ItemId; -#ifndef LP_USED -#define LP_USED 0x01 /* this line pointer is being used */ +#ifndef LP_USED +#define LP_USED 0x01 /* this line pointer is being used */ #endif /* ---------------- - * support macros + * support macros * ---------------- */ -/* - * ItemIdGetLength +/* + * ItemIdGetLength */ #define ItemIdGetLength(itemId) \ ((itemId)->lp_len) -/* - * ItemIdGetOffset +/* + * ItemIdGetOffset */ #define ItemIdGetOffset(itemId) \ ((itemId)->lp_off) -/* - * ItemIdGetFlags +/* + * ItemIdGetFlags */ #define ItemIdGetFlags(itemId) \ ((itemId)->lp_flags) /* * ItemIdIsValid -- - * True iff disk item identifier is valid. + * True iff disk item identifier is valid. */ -#define ItemIdIsValid(itemId) PointerIsValid(itemId) +#define ItemIdIsValid(itemId) PointerIsValid(itemId) /* * ItemIdIsUsed -- - * True iff disk item identifier is in use. + * True iff disk item identifier is in use. * * Note: - * Assumes disk item identifier is valid. + * Assumes disk item identifier is valid. */ #define ItemIdIsUsed(itemId) \ - (AssertMacro(ItemIdIsValid(itemId)) ? \ - (bool) (((itemId)->lp_flags & LP_USED) != 0) : false) + (AssertMacro(ItemIdIsValid(itemId)) ? \ + (bool) (((itemId)->lp_flags & LP_USED) != 0) : false) -#endif /* ITEMID_H */ +#endif /* ITEMID_H */ diff --git a/src/include/storage/itempos.h b/src/include/storage/itempos.h index fc847df4ec9..bea9cd64746 100644 --- a/src/include/storage/itempos.h +++ b/src/include/storage/itempos.h @@ -1,43 +1,44 @@ /*------------------------------------------------------------------------- * * itempos.h-- - * Standard POSTGRES buffer page long item subposition definitions. + * Standard POSTGRES buffer page long item subposition definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: itempos.h,v 1.3 1996/11/05 06:10:58 scrappy Exp $ + * $Id: itempos.h,v 1.4 1997/09/07 05:01:20 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef ITEMPOS_H +#ifndef ITEMPOS_H #define ITEMPOS_H #include <storage/itemid.h> #include <storage/buf.h> -typedef struct ItemSubpositionData { - Buffer op_db; - ItemId op_lpp; - char *op_cp; /* XXX */ - uint32 op_len; -} ItemSubpositionData; +typedef struct ItemSubpositionData +{ + Buffer op_db; + ItemId op_lpp; + char *op_cp; /* XXX */ + uint32 op_len; +} ItemSubpositionData; -typedef ItemSubpositionData *ItemSubposition; +typedef ItemSubpositionData *ItemSubposition; /* - * PNOBREAK(OBJP, LEN) - * struct objpos *OBJP; - * unsigned LEN; + * PNOBREAK(OBJP, LEN) + * struct objpos *OBJP; + * unsigned LEN; */ -#define PNOBREAK(OBJP, LEN) ((OBJP)->op_len >= LEN) +#define PNOBREAK(OBJP, LEN) ((OBJP)->op_len >= LEN) /* - * PSKIP(OBJP, LEN) - * struct objpos *OBJP; - * unsigned LEN; + * PSKIP(OBJP, LEN) + * struct objpos *OBJP; + * unsigned LEN; */ #define PSKIP(OBJP, LEN)\ - { (OBJP)->op_cp += (LEN); (OBJP)->op_len -= (LEN); } + { (OBJP)->op_cp += (LEN); (OBJP)->op_len -= (LEN); } -#endif /* ITEMPOS_H */ +#endif /* ITEMPOS_H */ diff --git a/src/include/storage/itemptr.h b/src/include/storage/itemptr.h index f794141a6e0..3460cd19f9e 100644 --- a/src/include/storage/itemptr.h +++ b/src/include/storage/itemptr.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * itemptr.h-- - * POSTGRES disk item pointer definitions. + * POSTGRES disk item pointer definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: itemptr.h,v 1.4 1996/11/04 07:18:29 scrappy Exp $ + * $Id: itemptr.h,v 1.5 1997/09/07 05:01:22 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef ITEMPTR_H +#ifndef ITEMPTR_H #define ITEMPTR_H #include <storage/off.h> @@ -23,91 +23,91 @@ * blkid tells us which block, posid tells us which entry in the linp * (ItemIdData) array we want. */ -typedef struct ItemPointerData { - BlockIdData ip_blkid; - OffsetNumber ip_posid; -} ItemPointerData; +typedef struct ItemPointerData +{ + BlockIdData ip_blkid; + OffsetNumber ip_posid; +} ItemPointerData; -typedef ItemPointerData *ItemPointer; +typedef ItemPointerData *ItemPointer; /* ---------------- - * support macros + * support macros * ---------------- */ /* * ItemPointerIsValid -- - * True iff the disk item pointer is not NULL. + * True iff the disk item pointer is not NULL. */ #define ItemPointerIsValid(pointer) \ - ((bool) (PointerIsValid(pointer) && ((pointer)->ip_posid != 0))) + ((bool) (PointerIsValid(pointer) && ((pointer)->ip_posid != 0))) /* * ItemPointerGetBlockNumber -- - * Returns the block number of a disk item pointer. + * Returns the block number of a disk item pointer. */ #define ItemPointerGetBlockNumber(pointer) \ - (AssertMacro(ItemPointerIsValid(pointer)) ? \ - BlockIdGetBlockNumber(&(pointer)->ip_blkid) : (BlockNumber) 0) + (AssertMacro(ItemPointerIsValid(pointer)) ? \ + BlockIdGetBlockNumber(&(pointer)->ip_blkid) : (BlockNumber) 0) /* * ItemPointerGetOffsetNumber -- - * Returns the offset number of a disk item pointer. + * Returns the offset number of a disk item pointer. */ #define ItemPointerGetOffsetNumber(pointer) \ - (AssertMacro(ItemPointerIsValid(pointer)) ? \ - (pointer)->ip_posid : \ - InvalidOffsetNumber) + (AssertMacro(ItemPointerIsValid(pointer)) ? \ + (pointer)->ip_posid : \ + InvalidOffsetNumber) /* * ItemPointerSet -- - * Sets a disk item pointer to the specified block and offset. + * Sets a disk item pointer to the specified block and offset. */ #define ItemPointerSet(pointer, blockNumber, offNum) \ - Assert(PointerIsValid(pointer)); \ - BlockIdSet(&((pointer)->ip_blkid), blockNumber); \ - (pointer)->ip_posid = offNum + Assert(PointerIsValid(pointer)); \ + BlockIdSet(&((pointer)->ip_blkid), blockNumber); \ + (pointer)->ip_posid = offNum /* * ItemPointerSetBlockNumber -- - * Sets a disk item pointer to the specified block. + * Sets a disk item pointer to the specified block. */ #define ItemPointerSetBlockNumber(pointer, blockNumber) \ - Assert(PointerIsValid(pointer)); \ - BlockIdSet(&((pointer)->ip_blkid), blockNumber) + Assert(PointerIsValid(pointer)); \ + BlockIdSet(&((pointer)->ip_blkid), blockNumber) /* * ItemPointerSetOffsetNumber -- - * Sets a disk item pointer to the specified offset. + * Sets a disk item pointer to the specified offset. */ #define ItemPointerSetOffsetNumber(pointer, offsetNumber) \ - AssertMacro(PointerIsValid(pointer)); \ - (pointer)->ip_posid = (offsetNumber) + AssertMacro(PointerIsValid(pointer)); \ + (pointer)->ip_posid = (offsetNumber) /* * ItemPointerCopy -- - * Copies the contents of one disk item pointer to another. + * Copies the contents of one disk item pointer to another. */ #define ItemPointerCopy(fromPointer, toPointer) \ - Assert(PointerIsValid(toPointer)); \ - Assert(PointerIsValid(fromPointer)); \ - *(toPointer) = *(fromPointer) + Assert(PointerIsValid(toPointer)); \ + Assert(PointerIsValid(fromPointer)); \ + *(toPointer) = *(fromPointer) /* * ItemPointerSetInvalid -- - * Sets a disk item pointer to be invalid. + * Sets a disk item pointer to be invalid. */ #define ItemPointerSetInvalid(pointer) \ - Assert(PointerIsValid(pointer)); \ - BlockIdSet(&((pointer)->ip_blkid), InvalidBlockNumber); \ - (pointer)->ip_posid = InvalidOffsetNumber + Assert(PointerIsValid(pointer)); \ + BlockIdSet(&((pointer)->ip_blkid), InvalidBlockNumber); \ + (pointer)->ip_posid = InvalidOffsetNumber /* ---------------- - * externs + * externs * ---------------- */ -extern bool ItemPointerEquals(ItemPointer pointer1, ItemPointer pointer2); - -#endif /* ITEMPTR_H */ +extern bool ItemPointerEquals(ItemPointer pointer1, ItemPointer pointer2); +#endif /* ITEMPTR_H */ diff --git a/src/include/storage/large_object.h b/src/include/storage/large_object.h index b5ee9cc068a..1144d1ca02d 100644 --- a/src/include/storage/large_object.h +++ b/src/include/storage/large_object.h @@ -1,18 +1,18 @@ /*------------------------------------------------------------------------- * * large_object.h-- - * file of info for Postgres large objects. POSTGRES 4.2 supports - * zillions of large objects (internal, external, jaquith, inversion). - * Now we only support inversion. + * file of info for Postgres large objects. POSTGRES 4.2 supports + * zillions of large objects (internal, external, jaquith, inversion). + * Now we only support inversion. * * Copyright (c) 1994, Regents of the University of California * - * $Id: large_object.h,v 1.4 1997/08/19 21:39:52 momjian Exp $ + * $Id: large_object.h,v 1.5 1997/09/07 05:01:24 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef LARGE_OBJECT_H -#define LARGE_OBJECT_H +#ifndef LARGE_OBJECT_H +#define LARGE_OBJECT_H #include <sys/types.h> @@ -23,22 +23,22 @@ */ typedef struct LargeObjectDesc { - Relation heap_r; /* heap relation */ - Relation index_r; /* index relation on seqno attribute */ - IndexScanDesc iscan; /* index scan we're using */ - TupleDesc hdesc; /* heap relation tuple desc */ - TupleDesc idesc; /* index relation tuple desc */ - uint32 lowbyte; /* low byte on the current page */ - uint32 highbyte; /* high byte on the current page */ - uint32 offset; /* current seek pointer */ - ItemPointerData htid; /* tid of current heap tuple */ - -#define IFS_RDLOCK (1 << 0) -#define IFS_WRLOCK (1 << 1) -#define IFS_ATEOF (1 << 2) - - u_long flags; /* locking info, etc */ -} LargeObjectDesc; + Relation heap_r; /* heap relation */ + Relation index_r; /* index relation on seqno attribute */ + IndexScanDesc iscan; /* index scan we're using */ + TupleDesc hdesc; /* heap relation tuple desc */ + TupleDesc idesc; /* index relation tuple desc */ + uint32 lowbyte; /* low byte on the current page */ + uint32 highbyte; /* high byte on the current page */ + uint32 offset; /* current seek pointer */ + ItemPointerData htid; /* tid of current heap tuple */ + +#define IFS_RDLOCK (1 << 0) +#define IFS_WRLOCK (1 << 1) +#define IFS_ATEOF (1 << 2) + + u_long flags; /* locking info, etc */ +} LargeObjectDesc; /* * Function definitions... @@ -47,11 +47,11 @@ typedef struct LargeObjectDesc /* inversion stuff in inv_api.c */ extern LargeObjectDesc *inv_create(int flags); extern LargeObjectDesc *inv_open(Oid lobjId, int flags); -extern void inv_close(LargeObjectDesc *obj_desc); -extern int inv_destroy(Oid lobjId); -extern int inv_seek(LargeObjectDesc *obj_desc, int offset, int whence); -extern int inv_tell(LargeObjectDesc *obj_desc); -extern int inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes); -extern int inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes); - -#endif /* LARGE_OBJECT_H */ +extern void inv_close(LargeObjectDesc * obj_desc); +extern int inv_destroy(Oid lobjId); +extern int inv_seek(LargeObjectDesc * obj_desc, int offset, int whence); +extern int inv_tell(LargeObjectDesc * obj_desc); +extern int inv_read(LargeObjectDesc * obj_desc, char *buf, int nbytes); +extern int inv_write(LargeObjectDesc * obj_desc, char *buf, int nbytes); + +#endif /* LARGE_OBJECT_H */ diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index 0d65b29ba0b..debe950c7c5 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -1,75 +1,83 @@ /*------------------------------------------------------------------------- * * lmgr.h-- - * POSTGRES lock manager definitions. + * POSTGRES lock manager definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: lmgr.h,v 1.5 1997/08/19 21:39:54 momjian Exp $ + * $Id: lmgr.h,v 1.6 1997/09/07 05:01:25 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef LMGR_H +#ifndef LMGR_H #define LMGR_H #include <storage/lock.h> #include <utils/rel.h> -/* +/* * This was moved from pladt.h for the new lock manager. Want to obsolete * all of the old code. */ -typedef struct LRelId { - Oid relId; /* a relation identifier */ - Oid dbId; /* a database identifier */ -} LRelId; +typedef struct LRelId +{ + Oid relId; /* a relation identifier */ + Oid dbId; /* a database identifier */ +} LRelId; -typedef struct LockInfoData { - bool initialized; - LRelId lRelId; - TransactionId transactionIdData; - uint16 flags; -} LockInfoData; -typedef LockInfoData *LockInfo; +typedef struct LockInfoData +{ + bool initialized; + LRelId lRelId; + TransactionId transactionIdData; + uint16 flags; +} LockInfoData; +typedef LockInfoData *LockInfo; #define LockInfoIsValid(linfo) \ - ((PointerIsValid(linfo)) && ((LockInfo) linfo)->initialized) + ((PointerIsValid(linfo)) && ((LockInfo) linfo)->initialized) -extern LRelId RelationGetLRelId(Relation relation); -extern Oid LRelIdGetRelationId(LRelId lRelId); -extern void RelationInitLockInfo(Relation relation); -extern void RelationSetLockForDescriptorOpen(Relation relation); -extern void RelationSetLockForRead(Relation relation); -extern void RelationUnsetLockForRead(Relation relation); -extern void RelationSetLockForWrite(Relation relation); -extern void RelationUnsetLockForWrite(Relation relation); +extern LRelId RelationGetLRelId(Relation relation); +extern Oid LRelIdGetRelationId(LRelId lRelId); +extern void RelationInitLockInfo(Relation relation); +extern void RelationSetLockForDescriptorOpen(Relation relation); +extern void RelationSetLockForRead(Relation relation); +extern void RelationUnsetLockForRead(Relation relation); +extern void RelationSetLockForWrite(Relation relation); +extern void RelationUnsetLockForWrite(Relation relation); /* used in vaccum.c */ -extern void RelationSetLockForWritePage(Relation relation, - ItemPointer itemPointer); +extern void +RelationSetLockForWritePage(Relation relation, + ItemPointer itemPointer); /* used in nbtpage.c, hashpage.c */ -extern void RelationSetSingleWLockPage(Relation relation, - ItemPointer itemPointer); -extern void RelationUnsetSingleWLockPage(Relation relation, - ItemPointer itemPointer); -extern void RelationSetSingleRLockPage(Relation relation, - ItemPointer itemPointer); -extern void RelationUnsetSingleRLockPage(Relation relation, - ItemPointer itemPointer); -extern void RelationSetRIntentLock(Relation relation); -extern void RelationUnsetRIntentLock(Relation relation); -extern void RelationSetWIntentLock(Relation relation); -extern void RelationUnsetWIntentLock(Relation relation); +extern void +RelationSetSingleWLockPage(Relation relation, + ItemPointer itemPointer); +extern void +RelationUnsetSingleWLockPage(Relation relation, + ItemPointer itemPointer); +extern void +RelationSetSingleRLockPage(Relation relation, + ItemPointer itemPointer); +extern void +RelationUnsetSingleRLockPage(Relation relation, + ItemPointer itemPointer); +extern void RelationSetRIntentLock(Relation relation); +extern void RelationUnsetRIntentLock(Relation relation); +extern void RelationSetWIntentLock(Relation relation); +extern void RelationUnsetWIntentLock(Relation relation); /* single.c */ -extern bool SingleLockReln(LockInfo linfo, LOCKT lockt, int action); -extern bool SingleLockPage(LockInfo linfo, ItemPointer tidPtr, +extern bool SingleLockReln(LockInfo linfo, LOCKT lockt, int action); +extern bool +SingleLockPage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt, int action); /* proc.c */ -extern void InitProcGlobal(IPCKey key); +extern void InitProcGlobal(IPCKey key); -#endif /* LMGR_H */ +#endif /* LMGR_H */ diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 25b851dac3d..2b0f76649b4 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * lock.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: lock.h,v 1.5 1997/08/19 21:39:55 momjian Exp $ + * $Id: lock.h,v 1.6 1997/09/07 05:01:26 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,16 +17,16 @@ #include <storage/itemptr.h> extern SPINLOCK LockMgrLock; -typedef int MASK; +typedef int MASK; -#define INIT_TABLE_SIZE 100 -#define MAX_TABLE_SIZE 1000 +#define INIT_TABLE_SIZE 100 +#define MAX_TABLE_SIZE 1000 /* ---------------------- * The following defines are used to estimate how much shared - * memory the lock manager is going to require. - * + * memory the lock manager is going to require. + * * NBACKENDS - The number of concurrently running backends * NLOCKS_PER_XACT - The number of unique locks acquired in a transaction * NLOCKENTS - The maximum number of lock entries in the lock table. @@ -36,9 +36,9 @@ typedef int MASK; #define NLOCKS_PER_XACT 40 #define NLOCKENTS NLOCKS_PER_XACT*NBACKENDS -typedef int LOCK_TYPE; -typedef int LOCKT; -typedef int LockTableId; +typedef int LOCK_TYPE; +typedef int LOCKT; +typedef int LockTableId; /* MAX_LOCKTYPES cannot be larger than the bits in MASK */ #define MAX_LOCKTYPES 6 @@ -55,53 +55,56 @@ typedef int LockTableId; /*typedef struct LOCK LOCK; */ -typedef struct ltag { - Oid relId; - Oid dbId; - ItemPointerData tupleId; -} LOCKTAG; +typedef struct ltag +{ + Oid relId; + Oid dbId; + ItemPointerData tupleId; +} LOCKTAG; #define TAGSIZE (sizeof(LOCKTAG)) -/* This is the control structure for a lock table. It +/* This is the control structure for a lock table. It * lives in shared memory: * * tableID -- the handle used by the lock table's clients to - * refer to the table. + * refer to the table. * * nLockTypes -- number of lock types (READ,WRITE,etc) that - * are defined on this lock table + * are defined on this lock table * * conflictTab -- this is an array of bitmasks showing lock - * type conflicts. conflictTab[i] is a mask with the j-th bit - * turned on if lock types i and j conflict. + * type conflicts. conflictTab[i] is a mask with the j-th bit + * turned on if lock types i and j conflict. * * prio -- each locktype has a priority, so, for example, waiting - * writers can be given priority over readers (to avoid - * starvation). + * writers can be given priority over readers (to avoid + * starvation). * * masterlock -- synchronizes access to the table * */ -typedef struct lockctl { - LockTableId tableId; - int nLockTypes; - int conflictTab[MAX_LOCKTYPES]; - int prio[MAX_LOCKTYPES]; - SPINLOCK masterLock; -} LOCKCTL; +typedef struct lockctl +{ + LockTableId tableId; + int nLockTypes; + int conflictTab[MAX_LOCKTYPES]; + int prio[MAX_LOCKTYPES]; + SPINLOCK masterLock; +} LOCKCTL; /* * lockHash -- hash table on lock Ids, * xidHash -- hash on xid and lockId in case - * multiple processes are holding the lock + * multiple processes are holding the lock * ctl - control structure described above. */ -typedef struct ltable { - HTAB *lockHash; - HTAB *xidHash; - LOCKCTL *ctl; -} LOCKTAB; +typedef struct ltable +{ + HTAB *lockHash; + HTAB *xidHash; + LOCKCTL *ctl; +} LOCKTAB; /* ----------------------- * A transaction never conflicts with its own locks. Hence, if @@ -132,29 +135,32 @@ typedef struct ltable { * ----------------------- */ -typedef struct XIDTAG { - SHMEM_OFFSET lock; - int pid; - TransactionId xid; -} XIDTAG; +typedef struct XIDTAG +{ + SHMEM_OFFSET lock; + int pid; + TransactionId xid; +} XIDTAG; -typedef struct XIDLookupEnt { - /* tag */ - XIDTAG tag; +typedef struct XIDLookupEnt +{ + /* tag */ + XIDTAG tag; - /* data */ - int holders[MAX_LOCKTYPES]; - int nHolding; - SHM_QUEUE queue; -} XIDLookupEnt; + /* data */ + int holders[MAX_LOCKTYPES]; + int nHolding; + SHM_QUEUE queue; +} XIDLookupEnt; #define XID_TAGSIZE (sizeof(XIDTAG)) /* originally in procq.h */ -typedef struct procQueue { - SHM_QUEUE links; - int size; -} PROC_QUEUE; +typedef struct procQueue +{ + SHM_QUEUE links; + int size; +} PROC_QUEUE; /* @@ -162,24 +168,25 @@ typedef struct procQueue { * * tag -- uniquely identifies the object being locked * mask -- union of the conflict masks of all lock types - * currently held on this object. + * currently held on this object. * waitProcs -- queue of processes waiting for this lock * holders -- count of each lock type currently held on the - * lock. + * lock. * nHolding -- total locks of all types. */ -typedef struct Lock { - /* hash key */ - LOCKTAG tag; - - /* data */ - int mask; - PROC_QUEUE waitProcs; - int holders[MAX_LOCKTYPES]; - int nHolding; - int activeHolders[MAX_LOCKTYPES]; - int nActive; -} LOCK; +typedef struct Lock +{ + /* hash key */ + LOCKTAG tag; + + /* data */ + int mask; + PROC_QUEUE waitProcs; + int holders[MAX_LOCKTYPES]; + int nHolding; + int activeHolders[MAX_LOCKTYPES]; + int nActive; +} LOCK; #define LockGetLock_nHolders(l) l->nHolders @@ -195,21 +202,24 @@ extern SPINLOCK LockMgrLock; /* * function prototypes */ -extern void InitLocks(void); -extern void LockDisable(int status); -extern LockTableId LockTabInit(char *tabName, MASK *conflictsP, int *prioP, - int ntypes); -extern bool LockAcquire(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt); -extern int LockResolveConflicts(LOCKTAB *ltable, LOCK *lock, LOCKT lockt, - TransactionId xid); -extern bool LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt); -extern void GrantLock(LOCK *lock, LOCKT lockt); -extern bool LockReleaseAll(LockTableId tableId, SHM_QUEUE *lockQueue); -extern int LockShmemSize(void); -extern bool LockingDisabled(void); +extern void InitLocks(void); +extern void LockDisable(int status); +extern LockTableId +LockTabInit(char *tabName, MASK * conflictsP, int *prioP, + int ntypes); +extern bool LockAcquire(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt); +extern int +LockResolveConflicts(LOCKTAB * ltable, LOCK * lock, LOCKT lockt, + TransactionId xid); +extern bool LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt); +extern void GrantLock(LOCK * lock, LOCKT lockt); +extern bool LockReleaseAll(LockTableId tableId, SHM_QUEUE * lockQueue); +extern int LockShmemSize(void); +extern bool LockingDisabled(void); #ifdef DEADLOCK_DEBUG -extern void DumpLocks(void); +extern void DumpLocks(void); + #endif -#endif /* LOCK_H */ +#endif /* LOCK_H */ diff --git a/src/include/storage/multilev.h b/src/include/storage/multilev.h index d077455d872..befc6227ae9 100644 --- a/src/include/storage/multilev.h +++ b/src/include/storage/multilev.h @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * * multilev.h-- - * multi level lock table consts/defs for single.c and multi.c and their - * clients + * multi level lock table consts/defs for single.c and multi.c and their + * clients * * * Copyright (c) 1994, Regents of the University of California * - * $Id: multilev.h,v 1.3 1997/08/19 21:39:56 momjian Exp $ + * $Id: multilev.h,v 1.4 1997/09/07 05:01:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,30 +16,30 @@ #include <storage/lmgr.h> -#define READ_LOCK 2 -#define WRITE_LOCK 1 +#define READ_LOCK 2 +#define WRITE_LOCK 1 -/* any time a small granularity READ/WRITE lock is set. +/* any time a small granularity READ/WRITE lock is set. * Higher granularity READ_INTENT/WRITE_INTENT locks must * also be set. A read intent lock is has value READ+INTENT. * in this implementation. */ -#define NO_LOCK 0 -#define INTENT 2 -#define READ_INTENT (READ_LOCK+INTENT) +#define NO_LOCK 0 +#define INTENT 2 +#define READ_INTENT (READ_LOCK+INTENT) #define WRITE_INTENT (WRITE_LOCK+INTENT) -#define EXTEND_LOCK 5 +#define EXTEND_LOCK 5 -#define SHORT_TERM 1 -#define LONG_TERM 2 -#define UNLOCK 0 +#define SHORT_TERM 1 +#define LONG_TERM 2 +#define UNLOCK 0 #define N_LEVELS 3 #define RELN_LEVEL 0 #define PAGE_LEVEL 1 #define TUPLE_LEVEL 2 -typedef int LOCK_LEVEL; +typedef int LOCK_LEVEL; /* multi.c */ @@ -50,9 +50,9 @@ extern LockTableId ShortTermTableId; * function prototypes */ extern LockTableId InitMultiLevelLockm(void); -extern bool MultiLockReln(LockInfo linfo, LOCKT lockt); -extern bool MultiLockTuple(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt); -extern bool MultiLockPage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt); -extern bool MultiReleaseReln(LockInfo linfo, LOCKT lockt); +extern bool MultiLockReln(LockInfo linfo, LOCKT lockt); +extern bool MultiLockTuple(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt); +extern bool MultiLockPage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt); +extern bool MultiReleaseReln(LockInfo linfo, LOCKT lockt); -#endif /* MULTILEV_H */ +#endif /* MULTILEV_H */ diff --git a/src/include/storage/off.h b/src/include/storage/off.h index 759b30278a3..3eadb842a78 100644 --- a/src/include/storage/off.h +++ b/src/include/storage/off.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * off.h-- - * POSTGRES disk "offset" definitions. + * POSTGRES disk "offset" definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: off.h,v 1.2 1996/10/31 09:49:58 scrappy Exp $ + * $Id: off.h,v 1.3 1997/09/07 05:01:29 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef OFF_H +#ifndef OFF_H #define OFF_H /* @@ -19,38 +19,38 @@ * this is a 1-based index into the linp (ItemIdData) array in the * header of each disk page. */ -typedef uint16 OffsetNumber; +typedef uint16 OffsetNumber; -#define InvalidOffsetNumber ((OffsetNumber) 0) -#define FirstOffsetNumber ((OffsetNumber) 1) -#define MaxOffsetNumber ((OffsetNumber) (BLCKSZ / sizeof(ItemIdData))) -#define OffsetNumberMask (0xffff) /* valid uint16 bits */ +#define InvalidOffsetNumber ((OffsetNumber) 0) +#define FirstOffsetNumber ((OffsetNumber) 1) +#define MaxOffsetNumber ((OffsetNumber) (BLCKSZ / sizeof(ItemIdData))) +#define OffsetNumberMask (0xffff) /* valid uint16 bits */ /* ---------------- - * support macros + * support macros * ---------------- */ /* * OffsetNumberIsValid -- - * True iff the offset number is valid. + * True iff the offset number is valid. */ #define OffsetNumberIsValid(offsetNumber) \ - ((bool) ((offsetNumber != InvalidOffsetNumber) && \ - (offsetNumber <= MaxOffsetNumber))) + ((bool) ((offsetNumber != InvalidOffsetNumber) && \ + (offsetNumber <= MaxOffsetNumber))) /* * OffsetNumberNext -- * OffsetNumberPrev -- - * Increments/decrements the argument. These macros look pointless - * but they help us disambiguate the different manipulations on - * OffsetNumbers (e.g., sometimes we substract one from an - * OffsetNumber to move back, and sometimes we do so to form a - * real C array index). + * Increments/decrements the argument. These macros look pointless + * but they help us disambiguate the different manipulations on + * OffsetNumbers (e.g., sometimes we substract one from an + * OffsetNumber to move back, and sometimes we do so to form a + * real C array index). */ #define OffsetNumberNext(offsetNumber) \ - ((OffsetNumber) (1 + (offsetNumber))) + ((OffsetNumber) (1 + (offsetNumber))) #define OffsetNumberPrev(offsetNumber) \ - ((OffsetNumber) (-1 + (offsetNumber))) + ((OffsetNumber) (-1 + (offsetNumber))) -#endif /* OFF_H */ +#endif /* OFF_H */ diff --git a/src/include/storage/page.h b/src/include/storage/page.h index f2f6c1fcba5..17d29746c9c 100644 --- a/src/include/storage/page.h +++ b/src/include/storage/page.h @@ -1,24 +1,24 @@ /*------------------------------------------------------------------------- * * page.h-- - * POSTGRES buffer page abstraction definitions. + * POSTGRES buffer page abstraction definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: page.h,v 1.2 1996/10/31 09:49:59 scrappy Exp $ + * $Id: page.h,v 1.3 1997/09/07 05:01:30 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PAGE_H +#ifndef PAGE_H #define PAGE_H -typedef Pointer Page; +typedef Pointer Page; /* * PageIsValid -- - * True iff page is valid. + * True iff page is valid. */ -#define PageIsValid(page) PointerIsValid(page) +#define PageIsValid(page) PointerIsValid(page) -#endif /* PAGE_H */ +#endif /* PAGE_H */ diff --git a/src/include/storage/pagenum.h b/src/include/storage/pagenum.h index 1e4ff7b2120..edd0dc116be 100644 --- a/src/include/storage/pagenum.h +++ b/src/include/storage/pagenum.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * pagenum.h-- - * POSTGRES page number definitions. + * POSTGRES page number definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pagenum.h,v 1.3 1996/11/05 06:11:02 scrappy Exp $ + * $Id: pagenum.h,v 1.4 1997/09/07 05:01:32 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PAGENUM_H +#ifndef PAGENUM_H #define PAGENUM_H @@ -18,14 +18,14 @@ typedef uint16 PageNumber; typedef uint32 LogicalPageNumber; -#define InvalidLogicalPageNumber 0 +#define InvalidLogicalPageNumber 0 /* * LogicalPageNumberIsValid -- - * True iff the logical page number is valid. + * True iff the logical page number is valid. */ #define LogicalPageNumberIsValid(pageNumber) \ - ((bool)((pageNumber) != InvalidLogicalPageNumber)) + ((bool)((pageNumber) != InvalidLogicalPageNumber)) -#endif /* PAGENUM_H */ +#endif /* PAGENUM_H */ diff --git a/src/include/storage/pos.h b/src/include/storage/pos.h index b08faa481fd..c5611ba0c12 100644 --- a/src/include/storage/pos.h +++ b/src/include/storage/pos.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * pos.h-- - * POSTGRES "position" definitions. + * POSTGRES "position" definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pos.h,v 1.2 1996/10/31 09:50:04 scrappy Exp $ + * $Id: pos.h,v 1.3 1997/09/07 05:01:33 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef POS_H +#ifndef POS_H #define POS_H /* @@ -18,45 +18,45 @@ * been changed to just <offset> as the notion of having multiple pages * within a block has been removed. * - * the 'offset' abstraction is somewhat confusing. it is NOT a byte + * the 'offset' abstraction is somewhat confusing. it is NOT a byte * offset within the page; instead, it is an offset into the line * pointer array contained on every page that store (heap or index) * tuples. */ -typedef bits16 PositionIdData; -typedef PositionIdData *PositionId; +typedef bits16 PositionIdData; +typedef PositionIdData *PositionId; /* ---------------- - * support macros + * support macros * ---------------- */ /* * PositionIdIsValid -- - * True iff the position identifier is valid. + * True iff the position identifier is valid. */ #define PositionIdIsValid(positionId) \ - PointerIsValid(positionId) + PointerIsValid(positionId) /* * PositionIdSetInvalid -- - * Make an invalid position. + * Make an invalid position. */ #define PositionIdSetInvalid(positionId) \ - *(positionId) = (bits16) 0 + *(positionId) = (bits16) 0 /* * PositionIdSet -- - * Sets a position identifier to the specified value. + * Sets a position identifier to the specified value. */ #define PositionIdSet(positionId, offsetNumber) \ - *(positionId) = (offsetNumber) + *(positionId) = (offsetNumber) /* * PositionIdGetOffsetNumber -- - * Retrieve the offset number from a position identifier. + * Retrieve the offset number from a position identifier. */ #define PositionIdGetOffsetNumber(positionId) \ - ((OffsetNumber) *(positionId)) + ((OffsetNumber) *(positionId)) -#endif /* POS_H */ +#endif /* POS_H */ diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 4e0b9b27806..92829732714 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * proc.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: proc.h,v 1.5 1997/08/19 21:39:58 momjian Exp $ + * $Id: proc.h,v 1.6 1997/09/07 05:01:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,46 +15,46 @@ #include <storage/lock.h> -typedef struct { - int sleeplock; - int semNum; - IpcSemaphoreId semId; - IpcSemaphoreKey semKey; -} SEMA; +typedef struct +{ + int sleeplock; + int semNum; + IpcSemaphoreId semId; + IpcSemaphoreKey semKey; +} SEMA; /* * Each backend has: */ -typedef struct proc { +typedef struct proc +{ - /* proc->links MUST BE THE FIRST ELEMENT OF STRUCT (see ProcWakeup()) */ + /* proc->links MUST BE THE FIRST ELEMENT OF STRUCT (see ProcWakeup()) */ - SHM_QUEUE links; /* proc can be waiting for one event(lock) */ - SEMA sem; /* ONE semaphore to sleep on */ - int errType; /* error code tells why we woke up */ + SHM_QUEUE links; /* proc can be waiting for one event(lock) */ + SEMA sem; /* ONE semaphore to sleep on */ + int errType; /* error code tells why we woke up */ - int procId; /* unique number for this structure - * NOT unique per backend, these things - * are reused after the backend dies. - */ + int procId; /* unique number for this structure NOT + * unique per backend, these things are + * reused after the backend dies. */ - int critSects; /* If critSects > 0, we are in sensitive - * routines that cannot be recovered when - * the process fails. - */ + int critSects; /* If critSects > 0, we are in sensitive + * routines that cannot be recovered when + * the process fails. */ - int prio; /* priority for sleep queue */ + int prio; /* priority for sleep queue */ - TransactionId xid; /* transaction currently being executed - * by this proc - */ + TransactionId xid; /* transaction currently being executed by + * this proc */ - LOCK * waitLock; /* Lock we're sleeping on */ - int token; /* info for proc wakeup routines */ - int pid; /* This procs process id */ - short sLocks[MAX_SPINS]; /* Spin lock stats */ - SHM_QUEUE lockQueue; /* locks associated with current transaction */ -} PROC; + LOCK *waitLock; /* Lock we're sleeping on */ + int token; /* info for proc wakeup routines */ + int pid; /* This procs process id */ + short sLocks[MAX_SPINS]; /* Spin lock stats */ + SHM_QUEUE lockQueue; /* locks associated with current + * transaction */ +} PROC; /* @@ -63,17 +63,18 @@ typedef struct proc { * of semaphores in each (sys-V) semaphore set allocated. (Be careful not * to set it to greater 32. Otherwise, the bitmap will overflow.) */ -#define MAX_PROC_SEMS 128 -#define PROC_NSEMS_PER_SET 16 +#define MAX_PROC_SEMS 128 +#define PROC_NSEMS_PER_SET 16 -typedef struct procglobal { - SHMEM_OFFSET freeProcs; - int numProcs; - IPCKey currKey; - int32 freeSemMap[MAX_PROC_SEMS/PROC_NSEMS_PER_SET]; -} PROC_HDR; +typedef struct procglobal +{ + SHMEM_OFFSET freeProcs; + int numProcs; + IPCKey currKey; + int32 freeSemMap[MAX_PROC_SEMS / PROC_NSEMS_PER_SET]; +} PROC_HDR; -extern PROC *MyProc; +extern PROC *MyProc; #define PROC_INCR_SLOCK(lock) if (MyProc) (MyProc->sLocks[(lock)])++ #define PROC_DECR_SLOCK(lock) if (MyProc) (MyProc->sLocks[(lock)])-- @@ -81,30 +82,32 @@ extern PROC *MyProc; /* * flags explaining why process woke up */ -#define NO_ERROR 0 -#define ERR_TIMEOUT 1 +#define NO_ERROR 0 +#define ERR_TIMEOUT 1 #define ERR_BUFFER_IO 2 -#define MAX_PRIO 50 -#define MIN_PRIO (-1) +#define MAX_PRIO 50 +#define MIN_PRIO (-1) extern SPINLOCK ProcStructLock; /* * Function Prototypes */ -extern void InitProcess(IPCKey key); -extern void ProcReleaseLocks(void); -extern bool ProcRemove(int pid); +extern void InitProcess(IPCKey key); +extern void ProcReleaseLocks(void); +extern bool ProcRemove(int pid); + /* extern bool ProcKill(int exitStatus, int pid); */ /* make static in storage/lmgr/proc.c -- jolly */ -extern void ProcQueueInit(PROC_QUEUE *queue); -extern int ProcSleep(PROC_QUEUE *queue, SPINLOCK spinlock, int token, - int prio, LOCK *lock); -extern int ProcLockWakeup(PROC_QUEUE *queue, char * ltable, char * lock); -extern void ProcAddLock(SHM_QUEUE *elem); -extern void ProcReleaseSpins(PROC *proc); -extern void ProcFreeAllSemaphores(void); +extern void ProcQueueInit(PROC_QUEUE * queue); +extern int +ProcSleep(PROC_QUEUE * queue, SPINLOCK spinlock, int token, + int prio, LOCK * lock); +extern int ProcLockWakeup(PROC_QUEUE * queue, char *ltable, char *lock); +extern void ProcAddLock(SHM_QUEUE * elem); +extern void ProcReleaseSpins(PROC * proc); +extern void ProcFreeAllSemaphores(void); -#endif /* PROC_H */ +#endif /* PROC_H */ diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h index fb52742d362..5812a718717 100644 --- a/src/include/storage/shmem.h +++ b/src/include/storage/shmem.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * shmem.h-- - * shared memory management structures + * shared memory management structures * * * Copyright (c) 1994, Regents of the University of California * - * $Id: shmem.h,v 1.5 1997/08/19 21:40:01 momjian Exp $ + * $Id: shmem.h,v 1.6 1997/09/07 05:01:35 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef SHMEM_H +#ifndef SHMEM_H #define SHMEM_H #include <utils/hsearch.h> @@ -22,11 +22,12 @@ * offsets relative to the start of the shared memory region(s). */ typedef unsigned long SHMEM_OFFSET; + #define INVALID_OFFSET (-1) #define BAD_LOCATION (-1) /* start of the lowest shared memory region. For now, assume that - * there is only one shared memory region + * there is only one shared memory region */ extern SHMEM_OFFSET ShmemBase; @@ -51,54 +52,57 @@ extern SPINLOCK ShmemLock; extern SPINLOCK BindingLock; /* shmemqueue.c */ -typedef struct SHM_QUEUE { - SHMEM_OFFSET prev; - SHMEM_OFFSET next; -} SHM_QUEUE; +typedef struct SHM_QUEUE +{ + SHMEM_OFFSET prev; + SHMEM_OFFSET next; +} SHM_QUEUE; /* shmem.c */ -extern void ShmemBindingTabReset(void); -extern void ShmemCreate(unsigned int key, unsigned int size); -extern int InitShmem(unsigned int key, unsigned int size); -extern long *ShmemAlloc(unsigned long size); -extern int ShmemIsValid(unsigned long addr); -extern HTAB *ShmemInitHash(char *name, long init_size, long max_size, - HASHCTL *infoP, int hash_flags); -extern bool ShmemPIDLookup(int pid, SHMEM_OFFSET* locationPtr); +extern void ShmemBindingTabReset(void); +extern void ShmemCreate(unsigned int key, unsigned int size); +extern int InitShmem(unsigned int key, unsigned int size); +extern long *ShmemAlloc(unsigned long size); +extern int ShmemIsValid(unsigned long addr); +extern HTAB * +ShmemInitHash(char *name, long init_size, long max_size, + HASHCTL * infoP, int hash_flags); +extern bool ShmemPIDLookup(int pid, SHMEM_OFFSET * locationPtr); extern SHMEM_OFFSET ShmemPIDDestroy(int pid); -extern long *ShmemInitStruct(char *name, unsigned long size, - bool *foundPtr); -extern bool TransactionIdIsInProgress (TransactionId xid); +extern long * +ShmemInitStruct(char *name, unsigned long size, + bool * foundPtr); +extern bool TransactionIdIsInProgress(TransactionId xid); -typedef int TableID; +typedef int TableID; /* size constants for the binding table */ - /* max size of data structure string name */ -#define BTABLE_KEYSIZE (50) - /* data in binding table hash bucket */ + /* max size of data structure string name */ +#define BTABLE_KEYSIZE (50) + /* data in binding table hash bucket */ #define BTABLE_DATASIZE (sizeof(BindingEnt) - BTABLE_KEYSIZE) - /* maximum size of the binding table */ -#define BTABLE_SIZE (100) + /* maximum size of the binding table */ +#define BTABLE_SIZE (100) /* this is a hash bucket in the binding table */ -typedef struct { - char key[BTABLE_KEYSIZE]; /* string name */ - unsigned long location; /* location in shared mem */ - unsigned long size; /* numbytes allocated for the - * structure - */ -} BindingEnt; +typedef struct +{ + char key[BTABLE_KEYSIZE]; /* string name */ + unsigned long location; /* location in shared mem */ + unsigned long size; /* numbytes allocated for the structure */ +} BindingEnt; /* * prototypes for functions in shmqueue.c */ -extern void SHMQueueInit(SHM_QUEUE *queue); -extern void SHMQueueElemInit(SHM_QUEUE *queue); -extern void SHMQueueDelete(SHM_QUEUE *queue); -extern void SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem); -extern void SHMQueueFirst(SHM_QUEUE *queue, Pointer *nextPtrPtr, - SHM_QUEUE *nextQueue); -extern bool SHMQueueEmpty(SHM_QUEUE *queue); - -#endif /* SHMEM_H */ +extern void SHMQueueInit(SHM_QUEUE * queue); +extern void SHMQueueElemInit(SHM_QUEUE * queue); +extern void SHMQueueDelete(SHM_QUEUE * queue); +extern void SHMQueueInsertTL(SHM_QUEUE * queue, SHM_QUEUE * elem); +extern void +SHMQueueFirst(SHM_QUEUE * queue, Pointer * nextPtrPtr, + SHM_QUEUE * nextQueue); +extern bool SHMQueueEmpty(SHM_QUEUE * queue); + +#endif /* SHMEM_H */ diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h index 87f8e00ba6e..fd9025e875f 100644 --- a/src/include/storage/sinval.h +++ b/src/include/storage/sinval.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * sinval.h-- - * POSTGRES shared cache invalidation communication definitions. + * POSTGRES shared cache invalidation communication definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: sinval.h,v 1.4 1996/11/10 03:06:00 momjian Exp $ + * $Id: sinval.h,v 1.5 1997/09/07 05:01:36 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef SINVAL_H +#ifndef SINVAL_H #define SINVAL_H #include <storage/itemptr.h> @@ -18,13 +18,14 @@ extern SPINLOCK SInvalLock; -extern void CreateSharedInvalidationState(IPCKey key); -extern void AttachSharedInvalidationState(IPCKey key); -extern void InitSharedInvalidationState(void); -extern void RegisterSharedInvalid(int cacheId, Index hashIndex, - ItemPointer pointer); -extern void InvalidateSharedInvalid(void (*invalFunction)(), - void (*resetFunction)()); +extern void CreateSharedInvalidationState(IPCKey key); +extern void AttachSharedInvalidationState(IPCKey key); +extern void InitSharedInvalidationState(void); +extern void +RegisterSharedInvalid(int cacheId, Index hashIndex, + ItemPointer pointer); +extern void InvalidateSharedInvalid(void (*invalFunction) (), + void (*resetFunction) ()); -#endif /* SINVAL_H */ +#endif /* SINVAL_H */ diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h index 9735cb476b1..12efeb2c8b8 100644 --- a/src/include/storage/sinvaladt.h +++ b/src/include/storage/sinvaladt.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * sinvaladt.h-- - * POSTGRES shared cache invalidation segment definitions. + * POSTGRES shared cache invalidation segment definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: sinvaladt.h,v 1.3 1996/11/05 06:11:06 scrappy Exp $ + * $Id: sinvaladt.h,v 1.4 1997/09/07 05:01:37 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,109 +15,119 @@ #include <storage/itemptr.h> #include <storage/ipc.h> - + /* * The structure of the shared cache invaidation segment * */ /* A------------- Header info -------------- - criticalSectionSemaphoreId - generalSemaphoreId - startEntrySection (offset a) - endEntrySection (offset a + b) - startFreeSpace (offset relative to B) - startEntryChain (offset relatiev to B) - endEntryChain (offset relative to B) - numEntries - maxNumEntries - procState[MaxBackendId] --> limit - resetState (bool) -a tag (POSTID) + criticalSectionSemaphoreId + generalSemaphoreId + startEntrySection (offset a) + endEntrySection (offset a + b) + startFreeSpace (offset relative to B) + startEntryChain (offset relatiev to B) + endEntryChain (offset relative to B) + numEntries + maxNumEntries + procState[MaxBackendId] --> limit + resetState (bool) +a tag (POSTID) B------------- Start entry section ------- - SISegEntry --> entryData --> ... (see SharedInvalidData!) - isfree (bool) - next (offset to next entry in chain ) -b .... (dynamically growing down) -C----------------End shared segment ------- + SISegEntry --> entryData --> ... (see SharedInvalidData!) + isfree (bool) + next (offset to next entry in chain ) +b .... (dynamically growing down) +C----------------End shared segment ------- */ /* Parameters (configurable) *******************************************/ -#define MaxBackendId 32 /* maximum number of backends */ -#define MAXNUMMESSAGES 1000 /* maximum number of messages in seg*/ - - -#define InvalidOffset 1000000000 /* a invalid offset (End of chain) */ - -typedef struct ProcState { - int limit; /* the number of read messages */ - bool resetState; /* true, if backend has to reset its state */ - int tag; /* special tag, recieved from the postmaster */ -} ProcState; - - -typedef struct SISeg { - IpcSemaphoreId criticalSectionSemaphoreId; /* semaphore id */ - IpcSemaphoreId generalSemaphoreId; /* semaphore id */ - Offset startEntrySection; /* (offset a) */ - Offset endEntrySection; /* (offset a + b) */ - Offset startFreeSpace; /* (offset relative to B) */ - Offset startEntryChain; /* (offset relative to B) */ - Offset endEntryChain; /* (offset relative to B) */ - int numEntries; - int maxNumEntries; - ProcState procState[MaxBackendId]; /* reflects the invalidation state */ - /* here starts the entry section, controlled by offsets */ -} SISeg; -#define SizeSISeg sizeof(SISeg) - -typedef struct SharedInvalidData { - int cacheId; /* XXX */ - Index hashIndex; - ItemPointerData pointerData; -} SharedInvalidData; - -typedef SharedInvalidData *SharedInvalid; - - -typedef struct SISegEntry { - SharedInvalidData entryData; /* the message data */ - bool isfree; /* entry free? */ - Offset next; /* offset to next entry*/ -} SISegEntry; +#define MaxBackendId 32 /* maximum number of backends */ +#define MAXNUMMESSAGES 1000 /* maximum number of messages in seg */ + + +#define InvalidOffset 1000000000 /* a invalid offset (End of + * chain) */ + +typedef struct ProcState +{ + int limit; /* the number of read messages */ + bool resetState; /* true, if backend has to reset its state */ + int tag; /* special tag, recieved from the + * postmaster */ +} ProcState; + + +typedef struct SISeg +{ + IpcSemaphoreId criticalSectionSemaphoreId; /* semaphore id */ + IpcSemaphoreId generalSemaphoreId; /* semaphore id */ + Offset startEntrySection; /* (offset a) */ + Offset endEntrySection; /* (offset a + b) */ + Offset startFreeSpace; /* (offset relative to B) */ + Offset startEntryChain; /* (offset relative to B) */ + Offset endEntryChain; /* (offset relative to B) */ + int numEntries; + int maxNumEntries; + ProcState procState[MaxBackendId]; /* reflects the + * invalidation state */ + /* here starts the entry section, controlled by offsets */ +} SISeg; + +#define SizeSISeg sizeof(SISeg) + +typedef struct SharedInvalidData +{ + int cacheId; /* XXX */ + Index hashIndex; + ItemPointerData pointerData; +} SharedInvalidData; + +typedef SharedInvalidData *SharedInvalid; + + +typedef struct SISegEntry +{ + SharedInvalidData entryData;/* the message data */ + bool isfree; /* entry free? */ + Offset next; /* offset to next entry */ +} SISegEntry; #define SizeOfOneSISegEntry sizeof(SISegEntry) - -typedef struct SISegOffsets { - Offset startSegment; /* always 0 (for now) */ - Offset offsetToFirstEntry; /* A + a = B */ - Offset offsetToEndOfSegemnt; /* A + a + b */ -} SISegOffsets; + +typedef struct SISegOffsets +{ + Offset startSegment; /* always 0 (for now) */ + Offset offsetToFirstEntry; /* A + a = B */ + Offset offsetToEndOfSegemnt; /* A + a + b */ +} SISegOffsets; /****************************************************************************/ -/* synchronization of the shared buffer access */ -/* access to the buffer is synchronized by the lock manager !! */ +/* synchronization of the shared buffer access */ +/* access to the buffer is synchronized by the lock manager !! */ /****************************************************************************/ #define SI_LockStartValue 255 -#define SI_SharedLock (-1) +#define SI_SharedLock (-1) #define SI_ExclusiveLock (-255) -extern SISeg *shmInvalBuffer; +extern SISeg *shmInvalBuffer; /* * prototypes for functions in sinvaladt.c */ -extern int SIBackendInit(SISeg *segInOutP); -extern int SISegmentInit(bool killExistingSegment, IPCKey key); - -extern bool SISetDataEntry(SISeg *segP, SharedInvalidData *data); -extern void SISetProcStateInvalid(SISeg *segP); -extern bool SIDelDataEntry(SISeg *segP); -extern void SIReadEntryData(SISeg *segP, int backendId, - void (*invalFunction)(), void (*resetFunction)()); -extern void SIDelExpiredDataEntries(SISeg *segP); - -#endif /* SINVALADT_H */ +extern int SIBackendInit(SISeg * segInOutP); +extern int SISegmentInit(bool killExistingSegment, IPCKey key); + +extern bool SISetDataEntry(SISeg * segP, SharedInvalidData * data); +extern void SISetProcStateInvalid(SISeg * segP); +extern bool SIDelDataEntry(SISeg * segP); +extern void +SIReadEntryData(SISeg * segP, int backendId, + void (*invalFunction) (), void (*resetFunction) ()); +extern void SIDelExpiredDataEntries(SISeg * segP); + +#endif /* SINVALADT_H */ diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h index 32f4be36357..38c2164f891 100644 --- a/src/include/storage/smgr.h +++ b/src/include/storage/smgr.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * smgr.h-- - * storage manager switch public interface declarations. + * storage manager switch public interface declarations. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: smgr.h,v 1.7 1997/08/19 21:40:03 momjian Exp $ + * $Id: smgr.h,v 1.8 1997/09/07 05:01:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,75 +17,81 @@ #include <storage/block.h> #include <utils/rel.h> -#define SM_FAIL 0 -#define SM_SUCCESS 1 +#define SM_FAIL 0 +#define SM_SUCCESS 1 -#define DEFAULT_SMGR 0 +#define DEFAULT_SMGR 0 -extern int smgrinit(void); -extern int smgrcreate(int16 which, Relation reln); -extern int smgrunlink(int16 which, Relation reln); -extern int smgrextend(int16 which, Relation reln, char *buffer); -extern int smgropen(int16 which, Relation reln); -extern int smgrclose(int16 which, Relation reln); -extern int smgrread(int16 which, Relation reln, BlockNumber blocknum, - char *buffer); -extern int smgrwrite(int16 which, Relation reln, BlockNumber blocknum, - char *buffer); -extern int smgrflush(int16 which, Relation reln, BlockNumber blocknum, - char *buffer); -extern int smgrblindwrt(int16 which, char *dbname, char *relname, Oid dbid, - Oid relid, BlockNumber blkno, char *buffer); -extern int smgrnblocks(int16 which, Relation reln); -extern int smgrtruncate(int16 which, Relation reln, int nblocks); -extern int smgrcommit(void); -extern bool smgriswo(int16 smgrno); +extern int smgrinit(void); +extern int smgrcreate(int16 which, Relation reln); +extern int smgrunlink(int16 which, Relation reln); +extern int smgrextend(int16 which, Relation reln, char *buffer); +extern int smgropen(int16 which, Relation reln); +extern int smgrclose(int16 which, Relation reln); +extern int +smgrread(int16 which, Relation reln, BlockNumber blocknum, + char *buffer); +extern int +smgrwrite(int16 which, Relation reln, BlockNumber blocknum, + char *buffer); +extern int +smgrflush(int16 which, Relation reln, BlockNumber blocknum, + char *buffer); +extern int +smgrblindwrt(int16 which, char *dbname, char *relname, Oid dbid, + Oid relid, BlockNumber blkno, char *buffer); +extern int smgrnblocks(int16 which, Relation reln); +extern int smgrtruncate(int16 which, Relation reln, int nblocks); +extern int smgrcommit(void); +extern bool smgriswo(int16 smgrno); /* internals: move me elsewhere -- ay 7/94 */ /* in md.c */ -extern int mdinit(void); -extern int mdcreate(Relation reln); -extern int mdunlink(Relation reln); -extern int mdextend(Relation reln, char *buffer); -extern int mdopen(Relation reln); -extern int mdclose(Relation reln); -extern int mdread(Relation reln, BlockNumber blocknum, char *buffer); -extern int mdwrite(Relation reln, BlockNumber blocknum, char *buffer); -extern int mdflush(Relation reln, BlockNumber blocknum, char *buffer); -extern int mdblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid, - BlockNumber blkno, char *buffer); -extern int mdnblocks(Relation reln); -extern int mdtruncate(Relation reln, int nblocks); -extern int mdcommit(void); -extern int mdabort(void); +extern int mdinit(void); +extern int mdcreate(Relation reln); +extern int mdunlink(Relation reln); +extern int mdextend(Relation reln, char *buffer); +extern int mdopen(Relation reln); +extern int mdclose(Relation reln); +extern int mdread(Relation reln, BlockNumber blocknum, char *buffer); +extern int mdwrite(Relation reln, BlockNumber blocknum, char *buffer); +extern int mdflush(Relation reln, BlockNumber blocknum, char *buffer); +extern int +mdblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid, + BlockNumber blkno, char *buffer); +extern int mdnblocks(Relation reln); +extern int mdtruncate(Relation reln, int nblocks); +extern int mdcommit(void); +extern int mdabort(void); /* mm.c */ extern SPINLOCK MMCacheLock; -extern int mminit(void); -extern int mmshutdown(void); -extern int mmcreate(Relation reln); -extern int mmunlink(Relation reln); -extern int mmextend(Relation reln, char *buffer); -extern int mmopen(Relation reln); -extern int mmclose(Relation reln); -extern int mmread(Relation reln, BlockNumber blocknum, char *buffer); -extern int mmwrite(Relation reln, BlockNumber blocknum, char *buffer); -extern int mmflush(Relation reln, BlockNumber blocknum, char *buffer); -extern int mmblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid, - BlockNumber blkno, char *buffer); -extern int mmnblocks(Relation reln); -extern int mmcommit(void); -extern int mmabort(void); -extern int MMShmemSize(void); +extern int mminit(void); +extern int mmshutdown(void); +extern int mmcreate(Relation reln); +extern int mmunlink(Relation reln); +extern int mmextend(Relation reln, char *buffer); +extern int mmopen(Relation reln); +extern int mmclose(Relation reln); +extern int mmread(Relation reln, BlockNumber blocknum, char *buffer); +extern int mmwrite(Relation reln, BlockNumber blocknum, char *buffer); +extern int mmflush(Relation reln, BlockNumber blocknum, char *buffer); +extern int +mmblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid, + BlockNumber blkno, char *buffer); +extern int mmnblocks(Relation reln); +extern int mmcommit(void); +extern int mmabort(void); +extern int MMShmemSize(void); /* smgrtype.c */ -extern char *smgrout(int2 i); -extern int2 smgrin(char *s); -extern bool smgreq(int2 a, int2 b); -extern bool smgrne(int2 a, int2 b); +extern char *smgrout(int2 i); +extern int2 smgrin(char *s); +extern bool smgreq(int2 a, int2 b); +extern bool smgrne(int2 a, int2 b); -#endif /* SMGR_H */ +#endif /* SMGR_H */ diff --git a/src/include/storage/spin.h b/src/include/storage/spin.h index 0000af883b1..0ee24b5ab4b 100644 --- a/src/include/storage/spin.h +++ b/src/include/storage/spin.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * spin.h-- - * synchronization routines + * synchronization routines * * * Copyright (c) 1994, Regents of the University of California * - * $Id: spin.h,v 1.3 1997/08/19 21:40:03 momjian Exp $ + * $Id: spin.h,v 1.4 1997/09/07 05:01:39 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef SPIN_H +#ifndef SPIN_H #define SPIN_H #include <storage/ipc.h> -/* +/* * two implementations of spin locks * * sequent, sparc, sun3: real spin locks. uses a TAS instruction; see @@ -25,11 +25,11 @@ * */ -typedef int SPINLOCK; +typedef int SPINLOCK; -extern bool CreateSpinlocks(IPCKey key); -extern bool InitSpinLocks(int init, IPCKey key); -extern void SpinAcquire(SPINLOCK lock); -extern void SpinRelease(SPINLOCK lock); +extern bool CreateSpinlocks(IPCKey key); +extern bool InitSpinLocks(int init, IPCKey key); +extern void SpinAcquire(SPINLOCK lock); +extern void SpinRelease(SPINLOCK lock); -#endif /* SPIN_H */ +#endif /* SPIN_H */ diff --git a/src/include/strdup.h b/src/include/strdup.h index 9e07a0f18b8..038446494c7 100644 --- a/src/include/strdup.h +++ b/src/include/strdup.h @@ -5,4 +5,4 @@ The Postgres strdup() is in src/utils/strdup.c. */ -extern char* strdup(char const*); +extern char *strdup(char const *); diff --git a/src/include/tcop/dest.h b/src/include/tcop/dest.h index 7878ed9d41e..aa74fafbfe7 100644 --- a/src/include/tcop/dest.h +++ b/src/include/tcop/dest.h @@ -1,32 +1,32 @@ /*------------------------------------------------------------------------- * * dest.h-- - * Whenever the backend is submitted a query, the results - * have to go someplace - either to the standard output, - * to a local portal buffer or to a remote portal buffer. + * Whenever the backend is submitted a query, the results + * have to go someplace - either to the standard output, + * to a local portal buffer or to a remote portal buffer. * - * - stdout is the destination only when we are running a - * backend without a postmaster and are returning results - * back to the user. + * - stdout is the destination only when we are running a + * backend without a postmaster and are returning results + * back to the user. * - * - a local portal buffer is the destination when a backend - * executes a user-defined function which calls PQexec() or - * PQfn(). In this case, the results are collected into a - * PortalBuffer which the user's function may diddle with. + * - a local portal buffer is the destination when a backend + * executes a user-defined function which calls PQexec() or + * PQfn(). In this case, the results are collected into a + * PortalBuffer which the user's function may diddle with. * - * - a remote portal buffer is the destination when we are - * running a backend with a frontend and the frontend executes - * PQexec() or PQfn(). In this case, the results are sent - * to the frontend via the pq_ functions. + * - a remote portal buffer is the destination when we are + * running a backend with a frontend and the frontend executes + * PQexec() or PQfn(). In this case, the results are sent + * to the frontend via the pq_ functions. + * + * - None is the destination when the system executes + * a query internally. This is not used now but it may be + * useful for the parallel optimiser/executor. * - * - None is the destination when the system executes - * a query internally. This is not used now but it may be - * useful for the parallel optimiser/executor. - * * * Copyright (c) 1994, Regents of the University of California * - * $Id: dest.h,v 1.8 1997/08/29 09:06:27 vadim Exp $ + * $Id: dest.h,v 1.9 1997/09/07 05:01:42 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -36,40 +36,44 @@ #include <access/tupdesc.h> /* ---------------- - * CommandDest is used to allow the results of calling - * pg_eval() to go to the right place. + * CommandDest is used to allow the results of calling + * pg_eval() to go to the right place. * ---------------- */ -typedef enum { - None, /* results are discarded */ - Debug, /* results go to debugging output */ - Local, /* results go in local portal buffer */ - Remote, /* results sent to frontend process */ - CopyBegin, /* results sent to frontend process but are strings */ - CopyEnd, /* results sent to frontend process but are strings */ - RemoteInternal, /* results sent to frontend process in internal - (binary) form */ - SPI /* results sent to SPI manager */ -} CommandDest; +typedef enum +{ + None, /* results are discarded */ + Debug, /* results go to debugging output */ + Local, /* results go in local portal buffer */ + Remote, /* results sent to frontend process */ + CopyBegin, /* results sent to frontend process but + * are strings */ + CopyEnd, /* results sent to frontend process but + * are strings */ + RemoteInternal, /* results sent to frontend process in + * internal (binary) form */ + SPI /* results sent to SPI manager */ +} CommandDest; /* AttrInfo* replaced with TupleDesc, now that TupleDesc also has within it the number of attributes typedef struct AttrInfo { - int numAttr; - AttributeTupleForm *attrs; + int numAttr; + AttributeTupleForm *attrs; } AttrInfo; */ -extern void (*DestToFunction(CommandDest dest))(); -extern void EndCommand(char *commandTag, CommandDest dest); -extern void SendCopyBegin(void); -extern void ReceiveCopyBegin(void); -extern void NullCommand(CommandDest dest); -extern void BeginCommand(char *pname, int operation, TupleDesc attinfo, +extern void (*DestToFunction(CommandDest dest)) (); +extern void EndCommand(char *commandTag, CommandDest dest); +extern void SendCopyBegin(void); +extern void ReceiveCopyBegin(void); +extern void NullCommand(CommandDest dest); +extern void +BeginCommand(char *pname, int operation, TupleDesc attinfo, bool isIntoRel, bool isIntoPortal, char *tag, CommandDest dest); -extern void UpdateCommandInfo (int operation, Oid lastoid, uint32 tuples); +extern void UpdateCommandInfo(int operation, Oid lastoid, uint32 tuples); -#endif /* DEST_H */ +#endif /* DEST_H */ diff --git a/src/include/tcop/fastpath.h b/src/include/tcop/fastpath.h index a46d6f2d6f1..96b5f598eac 100644 --- a/src/include/tcop/fastpath.h +++ b/src/include/tcop/fastpath.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * fastpath.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: fastpath.h,v 1.1 1996/08/28 07:27:50 scrappy Exp $ + * $Id: fastpath.h,v 1.2 1997/09/07 05:01:46 momjian Exp $ * * NOTES - * This information pulled out of tcop/fastpath.c and put - * here so that the PQfn() in be-pqexec.c could access it. - * -cim 2/26/91 + * This information pulled out of tcop/fastpath.c and put + * here so that the PQfn() in be-pqexec.c could access it. + * -cim 2/26/91 * *------------------------------------------------------------------------- */ @@ -19,13 +19,13 @@ #define FASTPATH_H /* ---------------- - * fastpath #defines + * fastpath #defines * ---------------- */ -#define VAR_LENGTH_RESULT (-1) -#define VAR_LENGTH_ARG (-5) -#define MAX_STRING_LENGTH 256 +#define VAR_LENGTH_RESULT (-1) +#define VAR_LENGTH_ARG (-5) +#define MAX_STRING_LENGTH 256 -extern int HandleFunctionRequest(void); +extern int HandleFunctionRequest(void); -#endif /* FASTPATH_H */ +#endif /* FASTPATH_H */ diff --git a/src/include/tcop/pquery.h b/src/include/tcop/pquery.h index 9f45684c5b5..9d9117315b8 100644 --- a/src/include/tcop/pquery.h +++ b/src/include/tcop/pquery.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * pquery.h-- - * prototypes for pquery.c. + * prototypes for pquery.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: pquery.h,v 1.4 1997/08/19 21:40:09 momjian Exp $ + * $Id: pquery.h,v 1.5 1997/09/07 05:01:49 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,19 +15,21 @@ #include <executor/execdesc.h> -/* moved to execdesc.h +/* moved to execdesc.h extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree, - CommandDest dest); + CommandDest dest); */ -extern EState *CreateExecutorState(void); +extern EState *CreateExecutorState(void); -extern void ProcessPortal(char *portalName, Query *parseTree, - Plan *plan, EState *state, TupleDesc attinfo, +extern void +ProcessPortal(char *portalName, Query * parseTree, + Plan * plan, EState * state, TupleDesc attinfo, CommandDest dest); -extern void ProcessQuery(Query *parsetree, Plan *plan, char *argv[], - Oid *typev, int nargs, CommandDest dest); +extern void +ProcessQuery(Query * parsetree, Plan * plan, char *argv[], + Oid * typev, int nargs, CommandDest dest); -#endif /* pqueryIncluded */ +#endif /* pqueryIncluded */ diff --git a/src/include/tcop/tcopdebug.h b/src/include/tcop/tcopdebug.h index ecec82c652f..a4512f6686c 100644 --- a/src/include/tcop/tcopdebug.h +++ b/src/include/tcop/tcopdebug.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * tcopdebug.h-- - * #defines governing debugging behaviour in the traffic cop + * #defines governing debugging behaviour in the traffic cop * * * Copyright (c) 1994, Regents of the University of California * - * $Id: tcopdebug.h,v 1.1 1996/08/28 07:27:52 scrappy Exp $ + * $Id: tcopdebug.h,v 1.2 1997/09/07 05:01:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -14,30 +14,30 @@ #define TCOPDEBUG_H /* ---------------------------------------------------------------- - * debugging defines. + * debugging defines. * - * If you want certain debugging behaviour, then #define - * the variable to 1, else #undef it. -cim 10/26/89 + * If you want certain debugging behaviour, then #define + * the variable to 1, else #undef it. -cim 10/26/89 * ---------------------------------------------------------------- */ /* ---------------- - * TCOP_SHOWSTATS controls whether or not buffer and - * access method statistics are shown for each query. -cim 2/9/89 + * TCOP_SHOWSTATS controls whether or not buffer and + * access method statistics are shown for each query. -cim 2/9/89 * ---------------- */ #undef TCOP_SHOWSTATS /* ---------------- - * TCOP_DONTUSENEWLINE controls the default setting of - * the UseNewLine variable in postgres.c + * TCOP_DONTUSENEWLINE controls the default setting of + * the UseNewLine variable in postgres.c * ---------------- */ #undef TCOP_DONTUSENEWLINE /* ---------------------------------------------------------------- - * #defines controlled by above definitions + * #defines controlled by above definitions * ---------------------------------------------------------------- */ -#endif /* TCOPDEBUG_H */ +#endif /* TCOPDEBUG_H */ diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index 15af78b84fd..07a3cff98d0 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * tcopprot.h-- - * prototypes for postgres.c. + * prototypes for postgres.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: tcopprot.h,v 1.4 1997/08/19 21:40:10 momjian Exp $ + * $Id: tcopprot.h,v 1.5 1997/09/07 05:01:56 momjian Exp $ * * OLD COMMENTS - * This file was created so that other c files could get the two - * function prototypes without having to include tcop.h which single - * handedly includes the whole f*cking tree -- mer 5 Nov. 1991 + * This file was created so that other c files could get the two + * function prototypes without having to include tcop.h which single + * handedly includes the whole f*cking tree -- mer 5 Nov. 1991 * *------------------------------------------------------------------------- */ @@ -22,17 +22,20 @@ #include <parser/parse_query.h> #ifndef BOOTSTRAP_INCLUDE -extern List *pg_plan(char *query_string, Oid *typev, int nargs, - QueryTreeList **queryListP, CommandDest dest); -extern void pg_eval(char *query_string, char **argv, Oid *typev, int nargs); -extern void pg_eval_dest(char *query_string, char **argv, Oid *typev, +extern List * +pg_plan(char *query_string, Oid * typev, int nargs, + QueryTreeList ** queryListP, CommandDest dest); +extern void pg_eval(char *query_string, char **argv, Oid * typev, int nargs); +extern void +pg_eval_dest(char *query_string, char **argv, Oid * typev, int nargs, CommandDest dest); -#endif /* BOOTSTRAP_HEADER */ -extern void handle_warn(SIGNAL_ARGS); -extern void die(SIGNAL_ARGS); -extern int PostgresMain(int argc, char *argv[]); -extern void ResetUsage(void); -extern void ShowUsage(void); +#endif /* BOOTSTRAP_HEADER */ -#endif /* tcopprotIncluded */ +extern void handle_warn(SIGNAL_ARGS); +extern void die(SIGNAL_ARGS); +extern int PostgresMain(int argc, char *argv[]); +extern void ResetUsage(void); +extern void ShowUsage(void); + +#endif /* tcopprotIncluded */ diff --git a/src/include/tcop/utility.h b/src/include/tcop/utility.h index ec0842dd3a3..f5242ff4738 100644 --- a/src/include/tcop/utility.h +++ b/src/include/tcop/utility.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * utility.h-- - * prototypes for utility.c. + * prototypes for utility.c. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: utility.h,v 1.2 1996/11/04 12:07:05 scrappy Exp $ + * $Id: utility.h,v 1.3 1997/09/07 05:01:58 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,6 +15,6 @@ #include <executor/execdesc.h> -extern void ProcessUtility(Node *parsetree, CommandDest dest); +extern void ProcessUtility(Node * parsetree, CommandDest dest); -#endif /* UTILITY_H */ +#endif /* UTILITY_H */ diff --git a/src/include/tcop/variable.h b/src/include/tcop/variable.h index a0f10801eac..a687d8fed6f 100644 --- a/src/include/tcop/variable.h +++ b/src/include/tcop/variable.h @@ -1,26 +1,29 @@ /* - * Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var' + * Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var' * statements * - * $Id: variable.h,v 1.4 1997/04/23 05:52:32 vadim Exp $ + * $Id: variable.h,v 1.5 1997/09/07 05:02:01 momjian Exp $ * */ -enum DateFormat { Date_Postgres, Date_SQL, Date_ISO }; +enum DateFormat +{ + Date_Postgres, Date_SQL, Date_ISO +}; /*-----------------------------------------------------------------------*/ struct PGVariables - { +{ struct - { - bool euro; + { + bool euro; enum DateFormat format; - } date; - }; + } date; +}; extern struct PGVariables PGVariables; /*-----------------------------------------------------------------------*/ -bool SetPGVariable(const char *, const char *); -bool GetPGVariable(const char *); -bool ResetPGVariable(const char *); +bool SetPGVariable(const char *, const char *); +bool GetPGVariable(const char *); +bool ResetPGVariable(const char *); diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index 5d9451d9689..f6e6a75ab5d 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * acl.h-- - * Definition of (and support for) access control list data structures. + * Definition of (and support for) access control list data structures. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: acl.h,v 1.7 1997/08/19 21:40:18 momjian Exp $ + * $Id: acl.h,v 1.8 1997/09/07 05:02:05 momjian Exp $ * * NOTES - * For backward-compatability purposes we have to allow there - * to be a null ACL in a pg_class tuple. This will be defined as - * meaning "no protection" (i.e., old catalogs get old semantics). + * For backward-compatability purposes we have to allow there + * to be a null ACL in a pg_class tuple. This will be defined as + * meaning "no protection" (i.e., old catalogs get old semantics). * - * The AclItems in an ACL array are currently kept in sorted order. - * Things will break hard if you change that without changing the - * code wherever this is included. + * The AclItems in an ACL array are currently kept in sorted order. + * Things will break hard if you change that without changing the + * code wherever this is included. * *------------------------------------------------------------------------- */ @@ -26,99 +26,106 @@ #include <utils/array.h> /* - * AclId system identifier for the user, group, etc. - * XXX currently UNIX uid for users... + * AclId system identifier for the user, group, etc. + * XXX currently UNIX uid for users... */ -typedef uint32 AclId; -#define ACL_ID_WORLD 0 /* XXX only idtype should be checked */ +typedef uint32 AclId; + +#define ACL_ID_WORLD 0 /* XXX only idtype should be checked */ /* * AclIdType tag that describes if the AclId is a user, group, etc. */ -typedef uint8 AclIdType; -#define ACL_IDTYPE_WORLD 0x00 -#define ACL_IDTYPE_UID 0x01 /* user id - from pg_user */ -#define ACL_IDTYPE_GID 0x02 /* group id - from pg_group */ +typedef uint8 AclIdType; + +#define ACL_IDTYPE_WORLD 0x00 +#define ACL_IDTYPE_UID 0x01 /* user id - from pg_user */ +#define ACL_IDTYPE_GID 0x02 /* group id - from pg_group */ /* - * AclMode the actual permissions - * XXX should probably use bit.h routines. - * XXX should probably also stuff the modechg cruft in the - * high bits, too. + * AclMode the actual permissions + * XXX should probably use bit.h routines. + * XXX should probably also stuff the modechg cruft in the + * high bits, too. */ -typedef uint8 AclMode; -#define ACL_NO 0 /* no permissions */ -#define ACL_AP (1<<0) /* append */ -#define ACL_RD (1<<1) /* read */ -#define ACL_WR (1<<2) /* write (append/delete/replace) */ -#define ACL_RU (1<<3) /* place rules */ -#define N_ACL_MODES 4 - -#define ACL_MODECHG_ADD 1 -#define ACL_MODECHG_DEL 2 -#define ACL_MODECHG_EQL 3 +typedef uint8 AclMode; + +#define ACL_NO 0 /* no permissions */ +#define ACL_AP (1<<0) /* append */ +#define ACL_RD (1<<1) /* read */ +#define ACL_WR (1<<2) /* write (append/delete/replace) */ +#define ACL_RU (1<<3) /* place rules */ +#define N_ACL_MODES 4 + +#define ACL_MODECHG_ADD 1 +#define ACL_MODECHG_DEL 2 +#define ACL_MODECHG_EQL 3 /* change this line if you want to set the default acl permission */ -#define ACL_WORLD_DEFAULT (ACL_RD) -/* #define ACL_WORLD_DEFAULT (ACL_RD|ACL_WR|ACL_AP|ACL_RU) */ -#define ACL_OWNER_DEFAULT (ACL_RD|ACL_WR|ACL_AP|ACL_RU) +#define ACL_WORLD_DEFAULT (ACL_RD) +/* #define ACL_WORLD_DEFAULT (ACL_RD|ACL_WR|ACL_AP|ACL_RU) */ +#define ACL_OWNER_DEFAULT (ACL_RD|ACL_WR|ACL_AP|ACL_RU) /* * AclItem */ -typedef struct AclItem { - AclId ai_id; - AclIdType ai_idtype; - AclMode ai_mode; -} AclItem; -/* Note: if the size of AclItem changes, +typedef struct AclItem +{ + AclId ai_id; + AclIdType ai_idtype; + AclMode ai_mode; +} AclItem; + +/* Note: if the size of AclItem changes, change the aclitem typlen in pg_type.h */ /* - * The value of the first dimension-array element. Since these arrays + * The value of the first dimension-array element. Since these arrays * always have a lower-bound of 0, this is the same as the number of * elements in the array. */ -#define ARR_DIM0(a) (((unsigned *) (((char *) a) + sizeof(ArrayType)))[0]) +#define ARR_DIM0(a) (((unsigned *) (((char *) a) + sizeof(ArrayType)))[0]) /* - * Acl a one-dimensional POSTGRES array of AclItem + * Acl a one-dimensional POSTGRES array of AclItem */ typedef ArrayType Acl; -#define ACL_NUM(ACL) ARR_DIM0(ACL) -#define ACL_DAT(ACL) ((AclItem *) ARR_DATA_PTR(ACL)) -#define ACL_N_SIZE(N) \ - ((unsigned) (ARR_OVERHEAD(1) + ((N) * sizeof(AclItem)))) -#define ACL_SIZE(ACL) ARR_SIZE(ACL) + +#define ACL_NUM(ACL) ARR_DIM0(ACL) +#define ACL_DAT(ACL) ((AclItem *) ARR_DATA_PTR(ACL)) +#define ACL_N_SIZE(N) \ + ((unsigned) (ARR_OVERHEAD(1) + ((N) * sizeof(AclItem)))) +#define ACL_SIZE(ACL) ARR_SIZE(ACL) /* - * IdList a one-dimensional POSTGRES array of AclId + * IdList a one-dimensional POSTGRES array of AclId */ typedef ArrayType IdList; -#define IDLIST_NUM(IDL) ARR_DIM0(IDL) -#define IDLIST_DAT(IDL) ((AclId *) ARR_DATA_PTR(IDL)) -#define IDLIST_N_SIZE(N) \ - ((unsigned) (ARR_OVERHEAD(1) + ((N) * sizeof(AclId)))) -#define IDLIST_SIZE(IDL) ARR_SIZE(IDL) - -#define ACL_MODECHG_STR "+-=" /* list of valid characters */ -#define ACL_MODECHG_ADD_CHR '+' -#define ACL_MODECHG_DEL_CHR '-' -#define ACL_MODECHG_EQL_CHR '=' -#define ACL_MODE_STR "arwR" /* list of valid characters */ -#define ACL_MODE_AP_CHR 'a' -#define ACL_MODE_RD_CHR 'r' -#define ACL_MODE_WR_CHR 'w' -#define ACL_MODE_RU_CHR 'R' + +#define IDLIST_NUM(IDL) ARR_DIM0(IDL) +#define IDLIST_DAT(IDL) ((AclId *) ARR_DATA_PTR(IDL)) +#define IDLIST_N_SIZE(N) \ + ((unsigned) (ARR_OVERHEAD(1) + ((N) * sizeof(AclId)))) +#define IDLIST_SIZE(IDL) ARR_SIZE(IDL) + +#define ACL_MODECHG_STR "+-=" /* list of valid characters */ +#define ACL_MODECHG_ADD_CHR '+' +#define ACL_MODECHG_DEL_CHR '-' +#define ACL_MODECHG_EQL_CHR '=' +#define ACL_MODE_STR "arwR" /* list of valid characters */ +#define ACL_MODE_AP_CHR 'a' +#define ACL_MODE_RD_CHR 'r' +#define ACL_MODE_WR_CHR 'w' +#define ACL_MODE_RU_CHR 'R' /* result codes for pg_aclcheck */ -#define ACLCHECK_OK 0 -#define ACLCHECK_NO_PRIV 1 -#define ACLCHECK_NO_CLASS 2 -#define ACLCHECK_NOT_OWNER 3 +#define ACLCHECK_OK 0 +#define ACLCHECK_NO_PRIV 1 +#define ACLCHECK_NO_CLASS 2 +#define ACLCHECK_NOT_OWNER 3 /* warning messages. set these in aclchk.c. */ -extern char *aclcheck_error_strings[]; +extern char *aclcheck_error_strings[]; /* * Enable ACL execution tracing and table dumps @@ -126,41 +133,43 @@ extern char *aclcheck_error_strings[]; /*#define ACLDEBUG_TRACE*/ /* - * routines used internally (parser, etc.) + * routines used internally (parser, etc.) */ -extern Acl *aclownerdefault(AclId ownerid); -extern Acl *acldefault(void); -extern Acl *aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg); +extern Acl *aclownerdefault(AclId ownerid); +extern Acl *acldefault(void); +extern Acl *aclinsert3(Acl * old_acl, AclItem * mod_aip, unsigned modechg); -extern char* aclmakepriv(char* old_privlist, char new_priv); -extern char* aclmakeuser(char* user_type, char* user); -extern ChangeACLStmt* makeAclStmt(char* privs, List* rel_list, char* grantee, - char grant_or_revoke); +extern char *aclmakepriv(char *old_privlist, char new_priv); +extern char *aclmakeuser(char *user_type, char *user); +extern ChangeACLStmt * +makeAclStmt(char *privs, List * rel_list, char *grantee, + char grant_or_revoke); /* * exported routines (from acl.c) */ -extern Acl *makeacl(int n); +extern Acl *makeacl(int n); extern AclItem *aclitemin(char *s); -extern char *aclitemout(AclItem *aip); -extern Acl *aclinsert(Acl *old_acl, AclItem *mod_aip); -extern Acl *aclremove(Acl *old_acl, AclItem *mod_aip); -extern int32 aclcontains(Acl *acl, AclItem *aip); +extern char *aclitemout(AclItem * aip); +extern Acl *aclinsert(Acl * old_acl, AclItem * mod_aip); +extern Acl *aclremove(Acl * old_acl, AclItem * mod_aip); +extern int32 aclcontains(Acl * acl, AclItem * aip); /* * prototypes for functions in aclchk.c */ -extern void ChangeAcl(char *relname, AclItem *mod_aip, unsigned modechg); -extern AclId get_grosysid(char *groname); -extern char *get_groname(AclId grosysid); +extern void ChangeAcl(char *relname, AclItem * mod_aip, unsigned modechg); +extern AclId get_grosysid(char *groname); +extern char *get_groname(AclId grosysid); /* XXX move these elsewhere -pma */ -extern int32 pg_aclcheck(char *relname, char *usename, AclMode mode); -extern int32 pg_ownercheck(char *usename, char *value, int cacheid); -extern int32 pg_func_ownercheck(char *usename, char *funcname, - int nargs, Oid *arglist); -extern int32 pg_aggr_ownercheck(char *usename, char *aggname, - Oid basetypeID); - -#endif /* ACL_H */ - +extern int32 pg_aclcheck(char *relname, char *usename, AclMode mode); +extern int32 pg_ownercheck(char *usename, char *value, int cacheid); +extern int32 +pg_func_ownercheck(char *usename, char *funcname, + int nargs, Oid * arglist); +extern int32 +pg_aggr_ownercheck(char *usename, char *aggname, + Oid basetypeID); + +#endif /* ACL_H */ diff --git a/src/include/utils/array.h b/src/include/utils/array.h index 2e574323637..e2cd808cbf9 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -1,21 +1,21 @@ /*------------------------------------------------------------------------- * * array.h-- - * Utilities for the new array code. Contain prototypes from the - * following files: - * utils/adt/arrayfuncs.c - * utils/adt/arrayutils.c - * utils/adt/chunk.c + * Utilities for the new array code. Contain prototypes from the + * following files: + * utils/adt/arrayfuncs.c + * utils/adt/arrayutils.c + * utils/adt/chunk.c * * * Copyright (c) 1994, Regents of the University of California * - * $Id: array.h,v 1.4 1997/08/19 21:40:21 momjian Exp $ + * $Id: array.h,v 1.5 1997/09/07 05:02:07 momjian Exp $ * * NOTES - * XXX the data array should be LONGALIGN'd -- notice that the array - * allocation code does not allocate the extra space required for this, - * even though the array-packing code does the LONGALIGNs. + * XXX the data array should be LONGALIGN'd -- notice that the array + * allocation code does not allocate the extra space required for this, + * even though the array-packing code does the LONGALIGNs. * *------------------------------------------------------------------------- */ @@ -24,11 +24,12 @@ #include <stdio.h> -typedef struct { - int size; /* total array size (in bytes) */ - int ndim; /* # of dimensions */ - int flags; /* implementation flags */ -} ArrayType; +typedef struct +{ + int size; /* total array size (in bytes) */ + int ndim; /* # of dimensions */ + int flags; /* implementation flags */ +} ArrayType; /* * bitmask of ArrayType flags field: @@ -36,30 +37,30 @@ typedef struct { * 2nd bit - chunk flag (array is chunked if set) * 3rd,4th,&5th bit - large object type (used only if bit 1 is set) */ -#define ARR_LOB_FLAG (0x1) -#define ARR_CHK_FLAG (0x2) -#define ARR_OBJ_MASK (0x1c) +#define ARR_LOB_FLAG (0x1) +#define ARR_CHK_FLAG (0x2) +#define ARR_OBJ_MASK (0x1c) -#define ARR_FLAGS(a) ((ArrayType *) a)->flags -#define ARR_SIZE(a) (((ArrayType *) a)->size) +#define ARR_FLAGS(a) ((ArrayType *) a)->flags +#define ARR_SIZE(a) (((ArrayType *) a)->size) -#define ARR_NDIM(a) (((ArrayType *) a)->ndim) -#define ARR_NDIM_PTR(a) (&(((ArrayType *) a)->ndim)) +#define ARR_NDIM(a) (((ArrayType *) a)->ndim) +#define ARR_NDIM_PTR(a) (&(((ArrayType *) a)->ndim)) #define ARR_IS_LO(a) \ - (((ArrayType *) a)->flags & ARR_LOB_FLAG) + (((ArrayType *) a)->flags & ARR_LOB_FLAG) #define SET_LO_FLAG(f,a) \ - (((ArrayType *) a)->flags |= ((f) ? ARR_LOB_FLAG : 0x0)) + (((ArrayType *) a)->flags |= ((f) ? ARR_LOB_FLAG : 0x0)) #define ARR_IS_CHUNKED(a) \ - (((ArrayType *) a)->flags & ARR_CHK_FLAG) + (((ArrayType *) a)->flags & ARR_CHK_FLAG) #define SET_CHUNK_FLAG(f,a) \ - (((ArrayType *) a)->flags |= ((f) ? ARR_CHK_FLAG : 0x0)) + (((ArrayType *) a)->flags |= ((f) ? ARR_CHK_FLAG : 0x0)) #define ARR_OBJ_TYPE(a) \ - ((ARR_FLAGS(a) & ARR_OBJ_MASK) >> 2) + ((ARR_FLAGS(a) & ARR_OBJ_MASK) >> 2) #define SET_OBJ_TYPE(f,a) \ - ((ARR_FLAGS(a)&= ~ARR_OBJ_MASK), (ARR_FLAGS(a)|=((f<<2)&ARR_OBJ_MASK))) + ((ARR_FLAGS(a)&= ~ARR_OBJ_MASK), (ARR_FLAGS(a)|=((f<<2)&ARR_OBJ_MASK))) /* * ARR_DIMS returns a pointer to an array of array dimensions (number of @@ -73,23 +74,23 @@ typedef struct { * Unlike C, the default lower bound is 1. */ #define ARR_DIMS(a) \ - ((int *) (((char *) a) + sizeof(ArrayType))) + ((int *) (((char *) a) + sizeof(ArrayType))) #define ARR_LBOUND(a) \ - ((int *) (((char *) a) + sizeof(ArrayType) + \ - (sizeof(int) * (((ArrayType *) a)->ndim)))) + ((int *) (((char *) a) + sizeof(ArrayType) + \ + (sizeof(int) * (((ArrayType *) a)->ndim)))) /* * Returns a pointer to the actual array data. */ #define ARR_DATA_PTR(a) \ - (((char *) a) + \ - DOUBLEALIGN(sizeof(ArrayType) + 2 * (sizeof(int) * (a)->ndim))) + (((char *) a) + \ + DOUBLEALIGN(sizeof(ArrayType) + 2 * (sizeof(int) * (a)->ndim))) /* * The total array header size for an array of dimension n (in bytes). */ -#define ARR_OVERHEAD(n) \ - (DOUBLEALIGN(sizeof(ArrayType) + 2 * (n) * sizeof(int))) +#define ARR_OVERHEAD(n) \ + (DOUBLEALIGN(sizeof(ArrayType) + 2 * (n) * sizeof(int))) /*------------------------------------------------------------------------ * Miscellaneous helper definitions and routines for arrayfuncs.c @@ -98,37 +99,43 @@ typedef struct { /* #if defined(irix5) */ /* #define RETURN_NULL {*isNull = true; return(0); }*/ -/* #else*/ /* irix5 */ + /* #else*//* irix5 */ #define RETURN_NULL {*isNull = true; return(0); } -/* #endif */ /* irix5 */ -#define NAME_LEN 30 + /* #endif *//* irix5 */ +#define NAME_LEN 30 #define MAX_BUFF_SIZE (1 << 13) -typedef struct { - char lo_name[NAME_LEN]; - int C[MAXDIM]; -} CHUNK_INFO; +typedef struct +{ + char lo_name[NAME_LEN]; + int C[MAXDIM]; +} CHUNK_INFO; /* * prototypes for functions defined in arrayfuncs.c */ -extern char *array_in(char *string, Oid element_type); -extern char *array_out(ArrayType *v, Oid element_type); -extern char *array_dims(ArrayType *v, bool *isNull); -extern Datum array_ref(ArrayType *array, int n, int indx[], int reftype, - int elmlen, int arraylen, bool *isNull); -extern Datum array_clip(ArrayType *array, int n, int upperIndx[], - int lowerIndx[], int reftype, int len, bool *isNull); -extern char *array_set(ArrayType *array, int n, int indx[], char *dataPtr, - int reftype, int elmlen, int arraylen, bool *isNull); -extern char *array_assgn(ArrayType *array, int n, int upperIndx[], - int lowerIndx[], ArrayType *newArr, int reftype, - int len, bool *isNull); -extern int array_eq (ArrayType *array1, ArrayType *array2); -extern int _LOtransfer(char **destfd, int size, int nitems, char **srcfd, - int isSrcLO, int isDestLO); - -extern char * _array_newLO(int *fd, int flag); +extern char *array_in(char *string, Oid element_type); +extern char *array_out(ArrayType * v, Oid element_type); +extern char *array_dims(ArrayType * v, bool * isNull); +extern Datum +array_ref(ArrayType * array, int n, int indx[], int reftype, + int elmlen, int arraylen, bool * isNull); +extern Datum +array_clip(ArrayType * array, int n, int upperIndx[], + int lowerIndx[], int reftype, int len, bool * isNull); +extern char * +array_set(ArrayType * array, int n, int indx[], char *dataPtr, + int reftype, int elmlen, int arraylen, bool * isNull); +extern char * +array_assgn(ArrayType * array, int n, int upperIndx[], + int lowerIndx[], ArrayType * newArr, int reftype, + int len, bool * isNull); +extern int array_eq(ArrayType * array1, ArrayType * array2); +extern int +_LOtransfer(char **destfd, int size, int nitems, char **srcfd, + int isSrcLO, int isDestLO); + +extern char *_array_newLO(int *fd, int flag); /* @@ -136,25 +143,28 @@ extern char * _array_newLO(int *fd, int flag); * [these names seem to be too generic. Add prefix for arrays? -- AY] */ -extern int GetOffset(int n, int dim[], int lb[], int indx[]); -extern int getNitems(int n, int a[]); -extern int compute_size(int st[], int endp[], int n, int base); -extern void mda_get_offset_values(int n, int dist[], int PC[], int span[]); -extern void mda_get_range(int n, int span[], int st[], int endp[]); -extern void mda_get_prod(int n, int range[], int P[]); -extern int tuple2linear(int n, int tup[], int scale[]); -extern void array2chunk_coord(int n, int C[], int a_coord[], int c_coord[]); -extern int next_tuple(int n, int curr[], int span[]); +extern int GetOffset(int n, int dim[], int lb[], int indx[]); +extern int getNitems(int n, int a[]); +extern int compute_size(int st[], int endp[], int n, int base); +extern void mda_get_offset_values(int n, int dist[], int PC[], int span[]); +extern void mda_get_range(int n, int span[], int st[], int endp[]); +extern void mda_get_prod(int n, int range[], int P[]); +extern int tuple2linear(int n, int tup[], int scale[]); +extern void array2chunk_coord(int n, int C[], int a_coord[], int c_coord[]); +extern int next_tuple(int n, int curr[], int span[]); /* * prototypes for functions defined in chunk.c */ -extern char * _ChunkArray(int fd, FILE *afd, int ndim, int dim[], int baseSize, - int *nbytes, char *chunkfile); -extern int _ReadChunkArray(int st[], int endp[], int bsize, int fp, - char *destfp, ArrayType *array, int isDestLO, bool *isNull); -extern struct varlena *_ReadChunkArray1El(int st[], int bsize, int fp, - ArrayType *array, bool *isNull); - - -#endif /* ARRAY_H */ +extern char * +_ChunkArray(int fd, FILE * afd, int ndim, int dim[], int baseSize, + int *nbytes, char *chunkfile); +extern int +_ReadChunkArray(int st[], int endp[], int bsize, int fp, + char *destfp, ArrayType * array, int isDestLO, bool * isNull); +extern struct varlena * +_ReadChunkArray1El(int st[], int bsize, int fp, + ArrayType * array, bool * isNull); + + +#endif /* ARRAY_H */ diff --git a/src/include/utils/bit.h b/src/include/utils/bit.h index dc190accc6b..ab68c0d6087 100644 --- a/src/include/utils/bit.h +++ b/src/include/utils/bit.h @@ -1,39 +1,39 @@ /*------------------------------------------------------------------------- * * bit.h-- - * Standard bit array definitions. + * Standard bit array definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: bit.h,v 1.1 1996/08/28 01:58:43 scrappy Exp $ + * $Id: bit.h,v 1.2 1997/09/07 05:02:09 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef BIT_H +#ifndef BIT_H #define BIT_H -typedef bits8 *BitArray; +typedef bits8 *BitArray; typedef uint32 BitIndex; -#define BitsPerByte 8 +#define BitsPerByte 8 /* * BitArraySetBit -- - * Sets (to 1) the value of a bit in a bit array. + * Sets (to 1) the value of a bit in a bit array. */ -extern void BitArraySetBit(BitArray bitArray, BitIndex bitIndex); +extern void BitArraySetBit(BitArray bitArray, BitIndex bitIndex); /* * BitArrayClearBit -- - * Clears (to 0) the value of a bit in a bit array. + * Clears (to 0) the value of a bit in a bit array. */ -extern void BitArrayClearBit(BitArray bitArray, BitIndex bitIndex); +extern void BitArrayClearBit(BitArray bitArray, BitIndex bitIndex); /* * BitArrayBitIsSet -- - * True iff the bit is set (1) in a bit array. + * True iff the bit is set (1) in a bit array. */ -extern bool BitArrayBitIsSet(BitArray bitArray, BitIndex bitIndex); +extern bool BitArrayBitIsSet(BitArray bitArray, BitIndex bitIndex); -#endif /* BIT_H */ +#endif /* BIT_H */ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 9a28e1f3ca6..05252ca01e9 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * builtins.h-- - * Declarations for operations on built-in types. + * Declarations for operations on built-in types. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.21 1997/08/19 21:40:26 momjian Exp $ + * $Id: builtins.h,v 1.22 1997/09/07 05:02:11 momjian Exp $ * * NOTES - * This should normally only be included by fmgr.h. - * Under no circumstances should it ever be included before - * including fmgr.h! + * This should normally only be included by fmgr.h. + * Under no circumstances should it ever be included before + * including fmgr.h! * *------------------------------------------------------------------------- */ @@ -26,161 +26,161 @@ #include <utils/rel.h> /* - * Defined in adt/ + * Defined in adt/ */ /* bool.c */ -extern bool boolin(char *b); -extern char *boolout(long b); -extern bool booleq(int8 arg1, int8 arg2); -extern bool boolne(int8 arg1, int8 arg2); -extern bool boollt(int8 arg1, int8 arg2); -extern bool boolgt(int8 arg1, int8 arg2); +extern bool boolin(char *b); +extern char *boolout(long b); +extern bool booleq(int8 arg1, int8 arg2); +extern bool boolne(int8 arg1, int8 arg2); +extern bool boollt(int8 arg1, int8 arg2); +extern bool boolgt(int8 arg1, int8 arg2); /* char.c */ -extern int32 charin(char *ch); -extern char *charout(int32 ch); -extern int32 cidin(char *s); -extern char *cidout(int32 c); -extern char *char16in(char *s); -extern char *char16out(char *s); -extern bool chareq(int8 arg1, int8 arg2); -extern bool charne(int8 arg1, int8 arg2); -extern bool charlt(int8 arg1, int8 arg2); -extern bool charle(int8 arg1, int8 arg2); -extern bool chargt(int8 arg1, int8 arg2); -extern bool charge(int8 arg1, int8 arg2); -extern int8 charpl(int8 arg1, int8 arg2); -extern int8 charmi(int8 arg1, int8 arg2); -extern int8 charmul(int8 arg1, int8 arg2); -extern int8 chardiv(int8 arg1, int8 arg2); -extern bool cideq(int8 arg1, int8 arg2); -extern bool char16eq(char *arg1, char *arg2); -extern bool char16ne(char *arg1, char *arg2); -extern bool char16lt(char *arg1, char *arg2); -extern bool char16le(char *arg1, char *arg2); -extern bool char16gt(char *arg1, char *arg2); -extern bool char16ge(char *arg1, char *arg2); -extern uint16 char2in(char *s); -extern char *char2out(uint16 s); -extern bool char2eq(uint16 a, uint16 b); -extern bool char2ne(uint16 a, uint16 b); -extern bool char2lt(uint16 a, uint16 b); -extern bool char2le(uint16 a, uint16 b); -extern bool char2gt(uint16 a, uint16 b); -extern bool char2ge(uint16 a, uint16 b); -extern int32 char2cmp(uint16 a, uint16 b); -extern uint32 char4in(char *s); -extern char *char4out(uint32 s); -extern bool char4eq(uint32 a, uint32 b); -extern bool char4ne(uint32 a, uint32 b); -extern bool char4lt(uint32 a, uint32 b); -extern bool char4le(uint32 a, uint32 b); -extern bool char4gt(uint32 a, uint32 b); -extern bool char4ge(uint32 a, uint32 b); -extern int32 char4cmp(uint32 a, uint32 b); -extern char *char8in(char *s); -extern char *char8out(char *s); -extern bool char8eq(char *arg1, char *arg2); -extern bool char8ne(char *arg1, char *arg2); -extern bool char8lt(char *arg1, char *arg2); -extern bool char8le(char *arg1, char *arg2); -extern bool char8gt(char *arg1, char *arg2); -extern bool char8ge(char *arg1, char *arg2); -extern int32 char8cmp(char *arg1, char *arg2); +extern int32 charin(char *ch); +extern char *charout(int32 ch); +extern int32 cidin(char *s); +extern char *cidout(int32 c); +extern char *char16in(char *s); +extern char *char16out(char *s); +extern bool chareq(int8 arg1, int8 arg2); +extern bool charne(int8 arg1, int8 arg2); +extern bool charlt(int8 arg1, int8 arg2); +extern bool charle(int8 arg1, int8 arg2); +extern bool chargt(int8 arg1, int8 arg2); +extern bool charge(int8 arg1, int8 arg2); +extern int8 charpl(int8 arg1, int8 arg2); +extern int8 charmi(int8 arg1, int8 arg2); +extern int8 charmul(int8 arg1, int8 arg2); +extern int8 chardiv(int8 arg1, int8 arg2); +extern bool cideq(int8 arg1, int8 arg2); +extern bool char16eq(char *arg1, char *arg2); +extern bool char16ne(char *arg1, char *arg2); +extern bool char16lt(char *arg1, char *arg2); +extern bool char16le(char *arg1, char *arg2); +extern bool char16gt(char *arg1, char *arg2); +extern bool char16ge(char *arg1, char *arg2); +extern uint16 char2in(char *s); +extern char *char2out(uint16 s); +extern bool char2eq(uint16 a, uint16 b); +extern bool char2ne(uint16 a, uint16 b); +extern bool char2lt(uint16 a, uint16 b); +extern bool char2le(uint16 a, uint16 b); +extern bool char2gt(uint16 a, uint16 b); +extern bool char2ge(uint16 a, uint16 b); +extern int32 char2cmp(uint16 a, uint16 b); +extern uint32 char4in(char *s); +extern char *char4out(uint32 s); +extern bool char4eq(uint32 a, uint32 b); +extern bool char4ne(uint32 a, uint32 b); +extern bool char4lt(uint32 a, uint32 b); +extern bool char4le(uint32 a, uint32 b); +extern bool char4gt(uint32 a, uint32 b); +extern bool char4ge(uint32 a, uint32 b); +extern int32 char4cmp(uint32 a, uint32 b); +extern char *char8in(char *s); +extern char *char8out(char *s); +extern bool char8eq(char *arg1, char *arg2); +extern bool char8ne(char *arg1, char *arg2); +extern bool char8lt(char *arg1, char *arg2); +extern bool char8le(char *arg1, char *arg2); +extern bool char8gt(char *arg1, char *arg2); +extern bool char8ge(char *arg1, char *arg2); +extern int32 char8cmp(char *arg1, char *arg2); /* int.c */ -extern int32 int2in(char *num); -extern char *int2out(int16 sh); -extern int16 *int28in(char *shs); -extern char *int28out(int16 (*shs)[]); -extern int32 *int44in(char *input_string); -extern char *int44out(int32 an_array[]); -extern int32 int4in(char *num); -extern char *int4out(int32 l); -extern int32 i2toi4(int16 arg1); -extern int16 i4toi2(int32 arg1); -extern bool int4eq(int32 arg1, int32 arg2); -extern bool int4ne(int32 arg1, int32 arg2); -extern bool int4lt(int32 arg1, int32 arg2); -extern bool int4le(int32 arg1, int32 arg2); -extern bool int4gt(int32 arg1, int32 arg2); -extern bool int4ge(int32 arg1, int32 arg2); -extern bool int2eq(int16 arg1, int16 arg2); -extern bool int2ne(int16 arg1, int16 arg2); -extern bool int2lt(int16 arg1, int16 arg2); -extern bool int2le(int16 arg1, int16 arg2); -extern bool int2gt(int16 arg1, int16 arg2); -extern bool int2ge(int16 arg1, int16 arg2); -extern bool int24eq(int32 arg1, int32 arg2); -extern bool int24ne(int32 arg1, int32 arg2); -extern bool int24lt(int32 arg1, int32 arg2); -extern bool int24le(int32 arg1, int32 arg2); -extern bool int24gt(int32 arg1, int32 arg2); -extern bool int24ge(int32 arg1, int32 arg2); -extern bool int42eq(int32 arg1, int32 arg2); -extern bool int42ne(int32 arg1, int32 arg2); -extern bool int42lt(int32 arg1, int32 arg2); -extern bool int42le(int32 arg1, int32 arg2); -extern bool int42gt(int32 arg1, int32 arg2); -extern bool int42ge(int32 arg1, int32 arg2); -extern bool keyfirsteq(int16 *arg1, int16 arg2); -extern int32 int4um(int32 arg); -extern int32 int4pl(int32 arg1, int32 arg2); -extern int32 int4mi(int32 arg1, int32 arg2); -extern int32 int4mul(int32 arg1, int32 arg2); -extern int32 int4div(int32 arg1, int32 arg2); -extern int32 int4inc(int32 arg); -extern int16 int2um(int16 arg); -extern int16 int2pl(int16 arg1, int16 arg2); -extern int16 int2mi(int16 arg1, int16 arg2); -extern int16 int2mul(int16 arg1, int16 arg2); -extern int16 int2div(int16 arg1, int16 arg2); -extern int16 int2inc(int16 arg); -extern int32 int24pl(int32 arg1, int32 arg2); -extern int32 int24mi(int32 arg1, int32 arg2); -extern int32 int24mul(int32 arg1, int32 arg2); -extern int32 int24div(int32 arg1, int32 arg2); -extern int32 int42pl(int32 arg1, int32 arg2); -extern int32 int42mi(int32 arg1, int32 arg2); -extern int32 int42mul(int32 arg1, int32 arg2); -extern int32 int42div(int32 arg1, int32 arg2); -extern int32 int4mod(int32 arg1, int32 arg2); -extern int32 int2mod(int16 arg1, int16 arg2); -extern int32 int24mod(int32 arg1, int32 arg2); -extern int32 int42mod(int32 arg1, int32 arg2); -extern int32 int4fac(int32 arg1); -extern int32 int2fac(int16 arg1); -extern int16 int2larger(int16 arg1, int16 arg2); -extern int16 int2smaller(int16 arg1, int16 arg2); -extern int32 int4larger(int32 arg1, int32 arg2); -extern int32 int4smaller(int32 arg1, int32 arg2); +extern int32 int2in(char *num); +extern char *int2out(int16 sh); +extern int16 *int28in(char *shs); +extern char *int28out(int16(*shs)[]); +extern int32 *int44in(char *input_string); +extern char *int44out(int32 an_array[]); +extern int32 int4in(char *num); +extern char *int4out(int32 l); +extern int32 i2toi4(int16 arg1); +extern int16 i4toi2(int32 arg1); +extern bool int4eq(int32 arg1, int32 arg2); +extern bool int4ne(int32 arg1, int32 arg2); +extern bool int4lt(int32 arg1, int32 arg2); +extern bool int4le(int32 arg1, int32 arg2); +extern bool int4gt(int32 arg1, int32 arg2); +extern bool int4ge(int32 arg1, int32 arg2); +extern bool int2eq(int16 arg1, int16 arg2); +extern bool int2ne(int16 arg1, int16 arg2); +extern bool int2lt(int16 arg1, int16 arg2); +extern bool int2le(int16 arg1, int16 arg2); +extern bool int2gt(int16 arg1, int16 arg2); +extern bool int2ge(int16 arg1, int16 arg2); +extern bool int24eq(int32 arg1, int32 arg2); +extern bool int24ne(int32 arg1, int32 arg2); +extern bool int24lt(int32 arg1, int32 arg2); +extern bool int24le(int32 arg1, int32 arg2); +extern bool int24gt(int32 arg1, int32 arg2); +extern bool int24ge(int32 arg1, int32 arg2); +extern bool int42eq(int32 arg1, int32 arg2); +extern bool int42ne(int32 arg1, int32 arg2); +extern bool int42lt(int32 arg1, int32 arg2); +extern bool int42le(int32 arg1, int32 arg2); +extern bool int42gt(int32 arg1, int32 arg2); +extern bool int42ge(int32 arg1, int32 arg2); +extern bool keyfirsteq(int16 * arg1, int16 arg2); +extern int32 int4um(int32 arg); +extern int32 int4pl(int32 arg1, int32 arg2); +extern int32 int4mi(int32 arg1, int32 arg2); +extern int32 int4mul(int32 arg1, int32 arg2); +extern int32 int4div(int32 arg1, int32 arg2); +extern int32 int4inc(int32 arg); +extern int16 int2um(int16 arg); +extern int16 int2pl(int16 arg1, int16 arg2); +extern int16 int2mi(int16 arg1, int16 arg2); +extern int16 int2mul(int16 arg1, int16 arg2); +extern int16 int2div(int16 arg1, int16 arg2); +extern int16 int2inc(int16 arg); +extern int32 int24pl(int32 arg1, int32 arg2); +extern int32 int24mi(int32 arg1, int32 arg2); +extern int32 int24mul(int32 arg1, int32 arg2); +extern int32 int24div(int32 arg1, int32 arg2); +extern int32 int42pl(int32 arg1, int32 arg2); +extern int32 int42mi(int32 arg1, int32 arg2); +extern int32 int42mul(int32 arg1, int32 arg2); +extern int32 int42div(int32 arg1, int32 arg2); +extern int32 int4mod(int32 arg1, int32 arg2); +extern int32 int2mod(int16 arg1, int16 arg2); +extern int32 int24mod(int32 arg1, int32 arg2); +extern int32 int42mod(int32 arg1, int32 arg2); +extern int32 int4fac(int32 arg1); +extern int32 int2fac(int16 arg1); +extern int16 int2larger(int16 arg1, int16 arg2); +extern int16 int2smaller(int16 arg1, int16 arg2); +extern int32 int4larger(int32 arg1, int32 arg2); +extern int32 int4smaller(int32 arg1, int32 arg2); /* name.c */ extern NameData *namein(char *s); -extern char *nameout(NameData *s); -extern bool nameeq(NameData *arg1, NameData *arg2); -extern bool namene(NameData *arg1, NameData *arg2); -extern bool namelt(NameData *arg1, NameData *arg2); -extern bool namele(NameData *arg1, NameData *arg2); -extern bool namegt(NameData *arg1, NameData *arg2); -extern bool namege(NameData *arg1, NameData *arg2); -extern int namecmp(Name n1, Name n2); -extern int namecpy(Name n1, Name n2); -extern int namestrcpy(Name name, char *str); -extern int namestrcmp(Name name, char *str); +extern char *nameout(NameData * s); +extern bool nameeq(NameData * arg1, NameData * arg2); +extern bool namene(NameData * arg1, NameData * arg2); +extern bool namelt(NameData * arg1, NameData * arg2); +extern bool namele(NameData * arg1, NameData * arg2); +extern bool namegt(NameData * arg1, NameData * arg2); +extern bool namege(NameData * arg1, NameData * arg2); +extern int namecmp(Name n1, Name n2); +extern int namecpy(Name n1, Name n2); +extern int namestrcpy(Name name, char *str); +extern int namestrcmp(Name name, char *str); /* numutils.c */ /* XXX hack. HP-UX has a ltoa (with different arguments) already. */ #ifdef hpux #define ltoa pg_ltoa -#endif /* hpux */ -extern int32 pg_atoi(char *s, int size, int c); -extern void itoa(int i, char *a); -extern void ltoa(int32 l, char *a); +#endif /* hpux */ +extern int32 pg_atoi(char *s, int size, int c); +extern void itoa(int i, char *a); +extern void ltoa(int32 l, char *a); /* - * Per-opclass comparison functions for new btrees. These are - * stored in pg_amproc and defined in nbtree/ + * Per-opclass comparison functions for new btrees. These are + * stored in pg_amproc and defined in nbtree/ */ extern int32 btint2cmp(int16 a, int16 b); extern int32 btint4cmp(int32 a, int32 b); @@ -195,343 +195,344 @@ extern int32 btchar2cmp(uint16 a, uint16 b); extern int32 btchar4cmp(uint32 a, uint32 b); extern int32 btchar8cmp(char *a, char *b); extern int32 btchar16cmp(char *a, char *b); -extern int32 btnamecmp(NameData *a, NameData *b); -extern int32 bttextcmp(struct varlena *a, struct varlena *b); +extern int32 btnamecmp(NameData * a, NameData * b); +extern int32 bttextcmp(struct varlena * a, struct varlena * b); /* support routines for the rtree access method, by opclass */ -extern BOX *rt_box_union(BOX *a,BOX *b); -extern BOX *rt_box_inter(BOX *a, BOX *b); -extern void rt_box_size(BOX *a, float *size); -extern void rt_bigbox_size(BOX *a,float *size); -extern void rt_poly_size(POLYGON *a, float *size); -extern POLYGON *rt_poly_union(POLYGON *a, POLYGON *b); -extern POLYGON *rt_poly_inter(POLYGON *a, POLYGON *b); +extern BOX *rt_box_union(BOX * a, BOX * b); +extern BOX *rt_box_inter(BOX * a, BOX * b); +extern void rt_box_size(BOX * a, float *size); +extern void rt_bigbox_size(BOX * a, float *size); +extern void rt_poly_size(POLYGON * a, float *size); +extern POLYGON *rt_poly_union(POLYGON * a, POLYGON * b); +extern POLYGON *rt_poly_inter(POLYGON * a, POLYGON * b); /* projection utilities */ -/* extern char *GetAttributeByName(); +/* extern char *GetAttributeByName(); extern char *GetAttributeByNum(); , in executor/executor.h*/ -extern int32 pqtest(struct varlena *vlena); +extern int32 pqtest(struct varlena * vlena); /* arrayfuncs.c */ /* date.c */ -extern int32 reltimein(char *timestring); -extern char *reltimeout(int32 timevalue); +extern int32 reltimein(char *timestring); +extern char *reltimeout(int32 timevalue); extern TimeInterval tintervalin(char *intervalstr); -extern char *tintervalout(TimeInterval interval); -extern RelativeTime timespan_reltime(TimeSpan *timespan); +extern char *tintervalout(TimeInterval interval); +extern RelativeTime timespan_reltime(TimeSpan * timespan); extern TimeSpan *reltime_timespan(RelativeTime reltime); extern TimeInterval mktinterval(AbsoluteTime t1, AbsoluteTime t2); extern AbsoluteTime timepl(AbsoluteTime t1, RelativeTime t2); extern AbsoluteTime timemi(AbsoluteTime t1, RelativeTime t2); + /* extern RelativeTime abstimemi(AbsoluteTime t1, AbsoluteTime t2); static*/ -extern int ininterval(AbsoluteTime t, TimeInterval interval); +extern int ininterval(AbsoluteTime t, TimeInterval interval); extern RelativeTime intervalrel(TimeInterval interval); extern AbsoluteTime timenow(void); -extern bool reltimeeq(RelativeTime t1, RelativeTime t2); -extern bool reltimene(RelativeTime t1, RelativeTime t2); -extern bool reltimelt(RelativeTime t1, RelativeTime t2); -extern bool reltimegt(RelativeTime t1, RelativeTime t2); -extern bool reltimele(RelativeTime t1, RelativeTime t2); -extern bool reltimege(RelativeTime t1, RelativeTime t2); -extern bool intervaleq(TimeInterval i1, TimeInterval i2); -extern bool intervalleneq(TimeInterval i, RelativeTime t); -extern bool intervallenne(TimeInterval i, RelativeTime t); -extern bool intervallenlt(TimeInterval i, RelativeTime t); -extern bool intervallengt(TimeInterval i, RelativeTime t); -extern bool intervallenle(TimeInterval i, RelativeTime t); -extern bool intervallenge(TimeInterval i, RelativeTime t); -extern bool intervalct(TimeInterval i1, TimeInterval i2); -extern bool intervalov(TimeInterval i1, TimeInterval i2); +extern bool reltimeeq(RelativeTime t1, RelativeTime t2); +extern bool reltimene(RelativeTime t1, RelativeTime t2); +extern bool reltimelt(RelativeTime t1, RelativeTime t2); +extern bool reltimegt(RelativeTime t1, RelativeTime t2); +extern bool reltimele(RelativeTime t1, RelativeTime t2); +extern bool reltimege(RelativeTime t1, RelativeTime t2); +extern bool intervaleq(TimeInterval i1, TimeInterval i2); +extern bool intervalleneq(TimeInterval i, RelativeTime t); +extern bool intervallenne(TimeInterval i, RelativeTime t); +extern bool intervallenlt(TimeInterval i, RelativeTime t); +extern bool intervallengt(TimeInterval i, RelativeTime t); +extern bool intervallenle(TimeInterval i, RelativeTime t); +extern bool intervallenge(TimeInterval i, RelativeTime t); +extern bool intervalct(TimeInterval i1, TimeInterval i2); +extern bool intervalov(TimeInterval i1, TimeInterval i2); extern AbsoluteTime intervalstart(TimeInterval i); extern AbsoluteTime intervalend(TimeInterval i); -extern int isreltime(char *timestring); -extern text *timeofday(void); +extern int isreltime(char *timestring); +extern text *timeofday(void); /* dt.c */ extern DateTime *datetime_in(char *str); -extern char *datetime_out(DateTime *datetime); +extern char *datetime_out(DateTime * datetime); extern TimeSpan *timespan_in(char *str); -extern char *timespan_out(TimeSpan *timespan); -extern int datetime2tm( DateTime dt, int *tzp, struct tm *tm, double *fsec, char **tzn); +extern char *timespan_out(TimeSpan * timespan); +extern int datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn); /* filename.c */ -extern char *filename_in(char *file); -extern char *filename_out(char *s); +extern char *filename_in(char *file); +extern char *filename_out(char *s); /* float.c */ -extern void CheckFloat8Val(double val); /* used by lex */ -extern float32 float4in(char *num); -extern char *float4out(float32 num); -extern float64 float8in(char *num); -extern char *float8out(float64 num); -extern float32 float4abs(float32 arg1); -extern float32 float4um(float32 arg1); -extern float32 float4larger(float32 arg1, float32 arg2); -extern float32 float4smaller(float32 arg1, float32 arg2); -extern float64 float8abs(float64 arg1); -extern float64 float8um(float64 arg1); -extern float64 float8larger(float64 arg1, float64 arg2); -extern float64 float8smaller(float64 arg1, float64 arg2); -extern float32 float4pl(float32 arg1, float32 arg2); -extern float32 float4mi(float32 arg1, float32 arg2); -extern float32 float4mul(float32 arg1, float32 arg2); -extern float32 float4div(float32 arg1, float32 arg2); -extern float32 float4inc(float32 arg1); -extern float64 float8pl(float64 arg1, float64 arg2); -extern float64 float8mi(float64 arg1, float64 arg2); -extern float64 float8mul(float64 arg1, float64 arg2); -extern float64 float8div(float64 arg1, float64 arg2); -extern float64 float8inc(float64 arg1); -extern bool float4eq(float32 arg1, float32 arg2); -extern bool float4ne(float32 arg1, float32 arg2); -extern bool float4lt(float32 arg1, float32 arg2); -extern bool float4le(float32 arg1, float32 arg2); -extern bool float4gt(float32 arg1, float32 arg2); -extern bool float4ge(float32 arg1, float32 arg2); -extern bool float8eq(float64 arg1, float64 arg2); -extern bool float8ne(float64 arg1, float64 arg2); -extern bool float8lt(float64 arg1, float64 arg2); -extern bool float8le(float64 arg1, float64 arg2); -extern bool float8gt(float64 arg1, float64 arg2); -extern bool float8ge(float64 arg1, float64 arg2); -extern float64 ftod(float32 num); -extern float64 i4tod(int32 num); -extern float64 i2tod(int16 num); -extern float32 dtof(float64 num); -extern int32 dtoi4(float64 num); -extern int16 dtoi2(float64 num); -extern float32 i4tof(int32 num); -extern float32 i2tof(int16 num); -extern int32 ftoi4(float32 num); -extern int16 ftoi2(float32 num); -extern float64 dround(float64 arg1); -extern float64 dtrunc(float64 arg1); -extern float64 dsqrt(float64 arg1); -extern float64 dcbrt(float64 arg1); -extern float64 dpow(float64 arg1, float64 arg2); -extern float64 dexp(float64 arg1); -extern float64 dlog1(float64 arg1); -extern float64 float48pl(float32 arg1, float64 arg2); -extern float64 float48mi(float32 arg1, float64 arg2); -extern float64 float48mul(float32 arg1, float64 arg2); -extern float64 float48div(float32 arg1, float64 arg2); -extern float64 float84pl(float64 arg1, float32 arg2); -extern float64 float84mi(float64 arg1, float32 arg2); -extern float64 float84mul(float64 arg1, float32 arg2); -extern float64 float84div(float64 arg1, float32 arg2); -extern bool float48eq(float32 arg1, float64 arg2); -extern bool float48ne(float32 arg1, float64 arg2); -extern bool float48lt(float32 arg1, float64 arg2); -extern bool float48le(float32 arg1, float64 arg2); -extern bool float48gt(float32 arg1, float64 arg2); -extern bool float48ge(float32 arg1, float64 arg2); -extern bool float84eq(float64 arg1, float32 arg2); -extern bool float84ne(float64 arg1, float32 arg2); -extern bool float84lt(float64 arg1, float32 arg2); -extern bool float84le(float64 arg1, float32 arg2); -extern bool float84gt(float64 arg1, float32 arg2); -extern bool float84ge(float64 arg1, float32 arg2); +extern void CheckFloat8Val(double val); /* used by lex */ +extern float32 float4in(char *num); +extern char *float4out(float32 num); +extern float64 float8in(char *num); +extern char *float8out(float64 num); +extern float32 float4abs(float32 arg1); +extern float32 float4um(float32 arg1); +extern float32 float4larger(float32 arg1, float32 arg2); +extern float32 float4smaller(float32 arg1, float32 arg2); +extern float64 float8abs(float64 arg1); +extern float64 float8um(float64 arg1); +extern float64 float8larger(float64 arg1, float64 arg2); +extern float64 float8smaller(float64 arg1, float64 arg2); +extern float32 float4pl(float32 arg1, float32 arg2); +extern float32 float4mi(float32 arg1, float32 arg2); +extern float32 float4mul(float32 arg1, float32 arg2); +extern float32 float4div(float32 arg1, float32 arg2); +extern float32 float4inc(float32 arg1); +extern float64 float8pl(float64 arg1, float64 arg2); +extern float64 float8mi(float64 arg1, float64 arg2); +extern float64 float8mul(float64 arg1, float64 arg2); +extern float64 float8div(float64 arg1, float64 arg2); +extern float64 float8inc(float64 arg1); +extern bool float4eq(float32 arg1, float32 arg2); +extern bool float4ne(float32 arg1, float32 arg2); +extern bool float4lt(float32 arg1, float32 arg2); +extern bool float4le(float32 arg1, float32 arg2); +extern bool float4gt(float32 arg1, float32 arg2); +extern bool float4ge(float32 arg1, float32 arg2); +extern bool float8eq(float64 arg1, float64 arg2); +extern bool float8ne(float64 arg1, float64 arg2); +extern bool float8lt(float64 arg1, float64 arg2); +extern bool float8le(float64 arg1, float64 arg2); +extern bool float8gt(float64 arg1, float64 arg2); +extern bool float8ge(float64 arg1, float64 arg2); +extern float64 ftod(float32 num); +extern float64 i4tod(int32 num); +extern float64 i2tod(int16 num); +extern float32 dtof(float64 num); +extern int32 dtoi4(float64 num); +extern int16 dtoi2(float64 num); +extern float32 i4tof(int32 num); +extern float32 i2tof(int16 num); +extern int32 ftoi4(float32 num); +extern int16 ftoi2(float32 num); +extern float64 dround(float64 arg1); +extern float64 dtrunc(float64 arg1); +extern float64 dsqrt(float64 arg1); +extern float64 dcbrt(float64 arg1); +extern float64 dpow(float64 arg1, float64 arg2); +extern float64 dexp(float64 arg1); +extern float64 dlog1(float64 arg1); +extern float64 float48pl(float32 arg1, float64 arg2); +extern float64 float48mi(float32 arg1, float64 arg2); +extern float64 float48mul(float32 arg1, float64 arg2); +extern float64 float48div(float32 arg1, float64 arg2); +extern float64 float84pl(float64 arg1, float32 arg2); +extern float64 float84mi(float64 arg1, float32 arg2); +extern float64 float84mul(float64 arg1, float32 arg2); +extern float64 float84div(float64 arg1, float32 arg2); +extern bool float48eq(float32 arg1, float64 arg2); +extern bool float48ne(float32 arg1, float64 arg2); +extern bool float48lt(float32 arg1, float64 arg2); +extern bool float48le(float32 arg1, float64 arg2); +extern bool float48gt(float32 arg1, float64 arg2); +extern bool float48ge(float32 arg1, float64 arg2); +extern bool float84eq(float64 arg1, float32 arg2); +extern bool float84ne(float64 arg1, float32 arg2); +extern bool float84lt(float64 arg1, float32 arg2); +extern bool float84le(float64 arg1, float32 arg2); +extern bool float84gt(float64 arg1, float32 arg2); +extern bool float84ge(float64 arg1, float32 arg2); /* geo_ops.c, geo_selfuncs.c */ -extern double *box_area(BOX *box); +extern double *box_area(BOX * box); /* misc.c */ -extern bool nullvalue(Datum value, bool *isNull); -extern bool nonnullvalue(Datum value, bool *isNull); -extern bool oidrand(Oid o, int32 X); -extern bool oidsrand(int32 X); -extern int32 userfntest(int i); +extern bool nullvalue(Datum value, bool * isNull); +extern bool nonnullvalue(Datum value, bool * isNull); +extern bool oidrand(Oid o, int32 X); +extern bool oidsrand(int32 X); +extern int32 userfntest(int i); /* define macros to replace mixed-case function calls - tgl 97/04/27 */ #define NullValue(v,b) nullvalue(v,b) #define NonNullValue(v,b) nonnullvalue(v,b) /* not_in.c */ -extern bool int4notin(int16 not_in_arg, char *relation_and_attr); -extern bool oidnotin(Oid the_oid, char *compare); +extern bool int4notin(int16 not_in_arg, char *relation_and_attr); +extern bool oidnotin(Oid the_oid, char *compare); /* oid.c */ -extern Oid *oid8in(char *oidString); -extern char *oid8out(Oid (*oidArray)[]); -extern Oid oidin(char *s); -extern char *oidout(Oid o); -extern bool oideq(Oid arg1, Oid arg2); -extern bool oidne(Oid arg1, Oid arg2); -extern bool oid8eq(Oid arg1[], Oid arg2[]); -extern bool oideqint4(Oid arg1, int32 arg2); -extern bool int4eqoid(int32 arg1, Oid arg2); +extern Oid *oid8in(char *oidString); +extern char *oid8out(Oid(*oidArray)[]); +extern Oid oidin(char *s); +extern char *oidout(Oid o); +extern bool oideq(Oid arg1, Oid arg2); +extern bool oidne(Oid arg1, Oid arg2); +extern bool oid8eq(Oid arg1[], Oid arg2[]); +extern bool oideqint4(Oid arg1, int32 arg2); +extern bool int4eqoid(int32 arg1, Oid arg2); /* regexp.c */ -extern bool char2regexeq(uint16 arg1, struct varlena *p); -extern bool char2regexne(uint16 arg1, struct varlena *p); -extern bool char4regexeq(uint32 arg1, struct varlena *p); -extern bool char4regexne(uint32 arg1, struct varlena *p); -extern bool char8regexeq(char *s, struct varlena *p); -extern bool char8regexne(char *s, struct varlena *p); -extern bool char16regexeq(char *s, struct varlena *p); -extern bool char16regexne(char *s, struct varlena *p); -extern bool nameregexeq(NameData *n, struct varlena *p); -extern bool nameregexne(NameData *s, struct varlena *p); -extern bool textregexeq(struct varlena *s, struct varlena *p); -extern bool textregexne(struct varlena *s, struct varlena *p); -extern bool char2icregexeq(uint16 arg1, struct varlena *p); -extern bool char2icregexne(uint16 arg1, struct varlena *p); -extern bool char4icregexeq(uint32 arg1, struct varlena *p); -extern bool char4icregexne(uint32 arg1, struct varlena *p); -extern bool char8icregexeq(char *s, struct varlena *p); -extern bool char8icregexne(char *s, struct varlena *p); -extern bool char16icregexeq(char *s, struct varlena *p); -extern bool char16icregexne(char *s, struct varlena *p); -extern bool nameicregexeq(NameData *s, struct varlena *p); -extern bool nameicregexne(NameData *s, struct varlena *p); -extern bool texticregexeq(struct varlena *s, struct varlena *p); -extern bool texticregexne(struct varlena *s, struct varlena *p); +extern bool char2regexeq(uint16 arg1, struct varlena * p); +extern bool char2regexne(uint16 arg1, struct varlena * p); +extern bool char4regexeq(uint32 arg1, struct varlena * p); +extern bool char4regexne(uint32 arg1, struct varlena * p); +extern bool char8regexeq(char *s, struct varlena * p); +extern bool char8regexne(char *s, struct varlena * p); +extern bool char16regexeq(char *s, struct varlena * p); +extern bool char16regexne(char *s, struct varlena * p); +extern bool nameregexeq(NameData * n, struct varlena * p); +extern bool nameregexne(NameData * s, struct varlena * p); +extern bool textregexeq(struct varlena * s, struct varlena * p); +extern bool textregexne(struct varlena * s, struct varlena * p); +extern bool char2icregexeq(uint16 arg1, struct varlena * p); +extern bool char2icregexne(uint16 arg1, struct varlena * p); +extern bool char4icregexeq(uint32 arg1, struct varlena * p); +extern bool char4icregexne(uint32 arg1, struct varlena * p); +extern bool char8icregexeq(char *s, struct varlena * p); +extern bool char8icregexne(char *s, struct varlena * p); +extern bool char16icregexeq(char *s, struct varlena * p); +extern bool char16icregexne(char *s, struct varlena * p); +extern bool nameicregexeq(NameData * s, struct varlena * p); +extern bool nameicregexne(NameData * s, struct varlena * p); +extern bool texticregexeq(struct varlena * s, struct varlena * p); +extern bool texticregexne(struct varlena * s, struct varlena * p); /* regproc.c */ -extern int32 regprocin(char *proname); -extern char *regprocout(RegProcedure proid); -extern Oid regproctooid(RegProcedure rp); +extern int32 regprocin(char *proname); +extern char *regprocout(RegProcedure proid); +extern Oid regproctooid(RegProcedure rp); /* define macro to replace mixed-case function call - tgl 97/04/27 */ #define RegprocToOid(rp) regproctooid(rp) /* selfuncs.c */ -extern float64 eqsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag); -extern float64 neqsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag); -extern float64 intltsel(Oid opid, Oid relid, AttrNumber attno, int32 value, int32 flag); -extern float64 intgtsel(Oid opid, Oid relid, AttrNumber attno, int32 value, int32 flag); -extern float64 eqjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2); -extern float64 neqjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2); -extern float64 intltjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2); -extern float64 intgtjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2); -extern float64 btreesel(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); -extern float64 btreenpage(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); -extern float64 hashsel(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); -extern float64 hashnpage(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); -extern float64 rtsel(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); -extern float64 rtnpage(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); -extern float64 gistsel(Oid operatorObjectId, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); -extern float64 gistnpage(Oid operatorObjectId, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); +extern float64 eqsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag); +extern float64 neqsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag); +extern float64 intltsel(Oid opid, Oid relid, AttrNumber attno, int32 value, int32 flag); +extern float64 intgtsel(Oid opid, Oid relid, AttrNumber attno, int32 value, int32 flag); +extern float64 eqjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2); +extern float64 neqjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2); +extern float64 intltjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2); +extern float64 intgtjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2); +extern float64 btreesel(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); +extern float64 btreenpage(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); +extern float64 hashsel(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); +extern float64 hashnpage(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); +extern float64 rtsel(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); +extern float64 rtnpage(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); +extern float64 gistsel(Oid operatorObjectId, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); +extern float64 gistnpage(Oid operatorObjectId, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid); /* tid.c */ extern ItemPointer tidin(char *str); -extern char *tidout(ItemPointer itemPtr); +extern char *tidout(ItemPointer itemPtr); /* timestamp.c */ -extern time_t timestamp_in(const char *timestamp_str); -extern char *timestamp_out(time_t timestamp); -extern time_t now(void); -bool timestampeq(time_t t1, time_t t2); -bool timestampne(time_t t1, time_t t2); -bool timestamplt(time_t t1, time_t t2); -bool timestampgt(time_t t1, time_t t2); -bool timestample(time_t t1, time_t t2); -bool timestampge(time_t t1, time_t t2); -DateTime *timestamp_datetime(time_t timestamp); +extern time_t timestamp_in(const char *timestamp_str); +extern char *timestamp_out(time_t timestamp); +extern time_t now(void); +bool timestampeq(time_t t1, time_t t2); +bool timestampne(time_t t1, time_t t2); +bool timestamplt(time_t t1, time_t t2); +bool timestampgt(time_t t1, time_t t2); +bool timestample(time_t t1, time_t t2); +bool timestampge(time_t t1, time_t t2); +DateTime *timestamp_datetime(time_t timestamp); /* varchar.c */ -extern char *bpcharin(char *s, int dummy, int typlen); -extern char *bpcharout(char *s); -extern char *varcharin(char *s, int dummy, int typlen); -extern char *varcharout(char *s); -extern bool bpchareq(char *arg1, char *arg2); -extern bool bpcharne(char *arg1, char *arg2); -extern bool bpcharlt(char *arg1, char *arg2); -extern bool bpcharle(char *arg1, char *arg2); -extern bool bpchargt(char *arg1, char *arg2); -extern bool bpcharge(char *arg1, char *arg2); -extern int32 bpcharcmp(char *arg1, char *arg2); -extern bool varchareq(char *arg1, char *arg2); -extern bool varcharne(char *arg1, char *arg2); -extern bool varcharlt(char *arg1, char *arg2); -extern bool varcharle(char *arg1, char *arg2); -extern bool varchargt(char *arg1, char *arg2); -extern bool varcharge(char *arg1, char *arg2); -extern int32 varcharcmp(char *arg1, char *arg2); -extern uint32 hashbpchar(struct varlena *key); -extern uint32 hashvarchar(struct varlena *key); +extern char *bpcharin(char *s, int dummy, int typlen); +extern char *bpcharout(char *s); +extern char *varcharin(char *s, int dummy, int typlen); +extern char *varcharout(char *s); +extern bool bpchareq(char *arg1, char *arg2); +extern bool bpcharne(char *arg1, char *arg2); +extern bool bpcharlt(char *arg1, char *arg2); +extern bool bpcharle(char *arg1, char *arg2); +extern bool bpchargt(char *arg1, char *arg2); +extern bool bpcharge(char *arg1, char *arg2); +extern int32 bpcharcmp(char *arg1, char *arg2); +extern bool varchareq(char *arg1, char *arg2); +extern bool varcharne(char *arg1, char *arg2); +extern bool varcharlt(char *arg1, char *arg2); +extern bool varcharle(char *arg1, char *arg2); +extern bool varchargt(char *arg1, char *arg2); +extern bool varcharge(char *arg1, char *arg2); +extern int32 varcharcmp(char *arg1, char *arg2); +extern uint32 hashbpchar(struct varlena * key); +extern uint32 hashvarchar(struct varlena * key); /* varlena.c */ extern struct varlena *byteain(char *inputText); -extern char *byteaout(struct varlena *vlena); +extern char *byteaout(struct varlena * vlena); extern struct varlena *textin(char *inputText); -extern char *textout(struct varlena *vlena); -extern text *textcat(text* t1, text* t2); -extern bool texteq(struct varlena *arg1, struct varlena *arg2); -extern bool textne(struct varlena *arg1, struct varlena *arg2); -extern bool text_lt(struct varlena *arg1, struct varlena *arg2); -extern bool text_le(struct varlena *arg1, struct varlena *arg2); -extern bool text_gt(struct varlena *arg1, struct varlena *arg2); -extern bool text_ge(struct varlena *arg1, struct varlena *arg2); -extern int32 textpos(text* t1, text* t2); -extern int32 byteaGetSize(struct varlena *v); -extern int32 byteaGetByte(struct varlena *v, int32 n); -extern int32 byteaGetBit(struct varlena *v, int32 n); -extern struct varlena *byteaSetByte(struct varlena *v, int32 n, int32 newByte); -extern struct varlena *byteaSetBit(struct varlena *v, int32 n, int32 newBit); +extern char *textout(struct varlena * vlena); +extern text *textcat(text * t1, text * t2); +extern bool texteq(struct varlena * arg1, struct varlena * arg2); +extern bool textne(struct varlena * arg1, struct varlena * arg2); +extern bool text_lt(struct varlena * arg1, struct varlena * arg2); +extern bool text_le(struct varlena * arg1, struct varlena * arg2); +extern bool text_gt(struct varlena * arg1, struct varlena * arg2); +extern bool text_ge(struct varlena * arg1, struct varlena * arg2); +extern int32 textpos(text * t1, text * t2); +extern int32 byteaGetSize(struct varlena * v); +extern int32 byteaGetByte(struct varlena * v, int32 n); +extern int32 byteaGetBit(struct varlena * v, int32 n); +extern struct varlena *byteaSetByte(struct varlena * v, int32 n, int32 newByte); +extern struct varlena *byteaSetBit(struct varlena * v, int32 n, int32 newBit); /* datetime.c */ -extern DateADT date_in(char *datestr); -extern char *date_out(DateADT dateVal); -extern bool date_eq(DateADT dateVal1, DateADT dateVal2); -extern bool date_ne(DateADT dateVal1, DateADT dateVal2); -extern bool date_lt(DateADT dateVal1, DateADT dateVal2); -extern bool date_le(DateADT dateVal1, DateADT dateVal2); -extern bool date_gt(DateADT dateVal1, DateADT dateVal2); -extern bool date_ge(DateADT dateVal1, DateADT dateVal2); -extern int date_cmp(DateADT dateVal1, DateADT dateVal2); -extern DateADT date_larger(DateADT dateVal1, DateADT dateVal2); -extern DateADT date_smaller(DateADT dateVal1, DateADT dateVal2); -extern int32 date_mi(DateADT dateVal1, DateADT dateVal2); -extern DateADT date_pli(DateADT dateVal, int32 days); -extern DateADT date_mii(DateADT dateVal, int32 days); +extern DateADT date_in(char *datestr); +extern char *date_out(DateADT dateVal); +extern bool date_eq(DateADT dateVal1, DateADT dateVal2); +extern bool date_ne(DateADT dateVal1, DateADT dateVal2); +extern bool date_lt(DateADT dateVal1, DateADT dateVal2); +extern bool date_le(DateADT dateVal1, DateADT dateVal2); +extern bool date_gt(DateADT dateVal1, DateADT dateVal2); +extern bool date_ge(DateADT dateVal1, DateADT dateVal2); +extern int date_cmp(DateADT dateVal1, DateADT dateVal2); +extern DateADT date_larger(DateADT dateVal1, DateADT dateVal2); +extern DateADT date_smaller(DateADT dateVal1, DateADT dateVal2); +extern int32 date_mi(DateADT dateVal1, DateADT dateVal2); +extern DateADT date_pli(DateADT dateVal, int32 days); +extern DateADT date_mii(DateADT dateVal, int32 days); extern DateTime *date_datetime(DateADT date); -extern DateADT datetime_date(DateTime *datetime); -extern DateTime *datetime_datetime(DateADT date, TimeADT *time); -extern DateADT abstime_date(AbsoluteTime abstime); +extern DateADT datetime_date(DateTime * datetime); +extern DateTime *datetime_datetime(DateADT date, TimeADT * time); +extern DateADT abstime_date(AbsoluteTime abstime); extern TimeADT *time_in(char *timestr); -extern char *time_out(TimeADT *time); -extern bool time_eq(TimeADT *time1, TimeADT *time2); -extern bool time_ne(TimeADT *time1, TimeADT *time2); -extern bool time_lt(TimeADT *time1, TimeADT *time2); -extern bool time_le(TimeADT *time1, TimeADT *time2); -extern bool time_gt(TimeADT *time1, TimeADT *time2); -extern bool time_ge(TimeADT *time1, TimeADT *time2); -extern int time_cmp(TimeADT *time1, TimeADT *time2); -extern int32 int42reltime(int32 timevalue); +extern char *time_out(TimeADT * time); +extern bool time_eq(TimeADT * time1, TimeADT * time2); +extern bool time_ne(TimeADT * time1, TimeADT * time2); +extern bool time_lt(TimeADT * time1, TimeADT * time2); +extern bool time_le(TimeADT * time1, TimeADT * time2); +extern bool time_gt(TimeADT * time1, TimeADT * time2); +extern bool time_ge(TimeADT * time1, TimeADT * time2); +extern int time_cmp(TimeADT * time1, TimeADT * time2); +extern int32 int42reltime(int32 timevalue); /* like.c */ -extern bool char2like(uint16 arg1, struct varlena *p); -extern bool char2nlike(uint16 arg1, struct varlena *p); -extern bool char4like(uint32 arg1, struct varlena *p); -extern bool char4nlike(uint32 arg1, struct varlena *p); -extern bool char8like(char *s, struct varlena *p); -extern bool char8nlike(char *s, struct varlena *p); -extern bool char16like(char *s, struct varlena *p); -extern bool char16nlike(char *s, struct varlena *p); -extern bool namelike(NameData *n, struct varlena *p); -extern bool namenlike(NameData *s, struct varlena *p); -extern bool textlike(struct varlena *s, struct varlena *p); -extern bool textnlike(struct varlena *s, struct varlena *p); +extern bool char2like(uint16 arg1, struct varlena * p); +extern bool char2nlike(uint16 arg1, struct varlena * p); +extern bool char4like(uint32 arg1, struct varlena * p); +extern bool char4nlike(uint32 arg1, struct varlena * p); +extern bool char8like(char *s, struct varlena * p); +extern bool char8nlike(char *s, struct varlena * p); +extern bool char16like(char *s, struct varlena * p); +extern bool char16nlike(char *s, struct varlena * p); +extern bool namelike(NameData * n, struct varlena * p); +extern bool namenlike(NameData * s, struct varlena * p); +extern bool textlike(struct varlena * s, struct varlena * p); +extern bool textnlike(struct varlena * s, struct varlena * p); /* oracle_compat.c */ -extern text *lower(text *string); -extern text *upper(text *string); -extern text *initcap(text *string); -extern text *lpad(text *string1, int4 len, text *string2); -extern text *rpad(text *string1, int4 len, text *string2); -extern text *ltrim(text *string, text *set); -extern text *rtrim(text *string, text *set); -extern text *substr(text *string, int4 m, int4 n); -extern text *translate(text *string, char from, char to); +extern text *lower(text * string); +extern text *upper(text * string); +extern text *initcap(text * string); +extern text *lpad(text * string1, int4 len, text * string2); +extern text *rpad(text * string1, int4 len, text * string2); +extern text *ltrim(text * string, text * set); +extern text *rtrim(text * string, text * set); +extern text *substr(text * string, int4 m, int4 n); +extern text *translate(text * string, char from, char to); /* acl.c */ -#endif /* BUILTINS_H */ +#endif /* BUILTINS_H */ diff --git a/src/include/utils/cash.h b/src/include/utils/cash.h index 9307654315a..2e5f82c093b 100644 --- a/src/include/utils/cash.h +++ b/src/include/utils/cash.h @@ -3,7 +3,7 @@ * Written by D'Arcy J.M. Cain * * Functions to allow input and output of money normally but store - * and handle it as int4. + * and handle it as int4. */ #ifndef CASH_H @@ -12,24 +12,24 @@ /* if we store this as 4 bytes, we better make it int, not long, bjm */ typedef signed int Cash; -extern const char *cash_out(Cash *value); -extern Cash *cash_in(const char *str); +extern const char *cash_out(Cash * value); +extern Cash *cash_in(const char *str); -extern bool cash_eq(Cash *c1, Cash *c2); -extern bool cash_ne(Cash *c1, Cash *c2); -extern bool cash_lt(Cash *c1, Cash *c2); -extern bool cash_le(Cash *c1, Cash *c2); -extern bool cash_gt(Cash *c1, Cash *c2); -extern bool cash_ge(Cash *c1, Cash *c2); +extern bool cash_eq(Cash * c1, Cash * c2); +extern bool cash_ne(Cash * c1, Cash * c2); +extern bool cash_lt(Cash * c1, Cash * c2); +extern bool cash_le(Cash * c1, Cash * c2); +extern bool cash_gt(Cash * c1, Cash * c2); +extern bool cash_ge(Cash * c1, Cash * c2); -extern Cash *cash_pl(Cash *c1, Cash *c2); -extern Cash *cash_mi(Cash *c1, Cash *c2); -extern Cash *cash_mul(Cash *c, float8 *f); -extern Cash *cash_div(Cash *c, float8 *f); +extern Cash *cash_pl(Cash * c1, Cash * c2); +extern Cash *cash_mi(Cash * c1, Cash * c2); +extern Cash *cash_mul(Cash * c, float8 * f); +extern Cash *cash_div(Cash * c, float8 * f); -extern Cash *cashlarger(Cash *c1, Cash *c2); -extern Cash *cashsmaller(Cash *c1, Cash *c2); +extern Cash *cashlarger(Cash * c1, Cash * c2); +extern Cash *cashsmaller(Cash * c1, Cash * c2); -extern const char *cash_words_out(Cash *value); +extern const char *cash_words_out(Cash * value); -#endif /* CASH_H */ +#endif /* CASH_H */ diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index 70a40c3e0a5..6b33ef89b11 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -1,19 +1,19 @@ /*------------------------------------------------------------------------- * * catcache.h-- - * Low-level catalog cache definitions. + * Low-level catalog cache definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: catcache.h,v 1.5 1997/08/19 21:40:28 momjian Exp $ + * $Id: catcache.h,v 1.6 1997/09/07 05:02:14 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef CATCACHE_H +#ifndef CATCACHE_H #define CATCACHE_H -/* #define CACHEDEBUG turns DEBUG elogs on */ +/* #define CACHEDEBUG turns DEBUG elogs on */ #include <access/htup.h> #include <lib/dllist.h> @@ -21,54 +21,60 @@ #include <utils/rel.h> /* - * struct catctup: tuples in the cache. - * struct catcache: information for managing a cache. + * struct catctup: tuples in the cache. + * struct catcache: information for managing a cache. */ -typedef struct catctup { - HeapTuple ct_tup; /* A pointer to a tuple */ - Dlelem *ct_node; /* points to LRU list is the CatCTup is in the cache, - else, points to the cache if the CatCTup is in - LRU list */ -} CatCTup; +typedef struct catctup +{ + HeapTuple ct_tup; /* A pointer to a tuple */ + Dlelem *ct_node; /* points to LRU list is the CatCTup is in + * the cache, else, points to the cache if + * the CatCTup is in LRU list */ +} CatCTup; /* voodoo constants */ -#define NCCBUCK 500 /* CatCache buckets*/ -#define MAXTUP 300 /* Maximum # of tuples cached per cache */ +#define NCCBUCK 500 /* CatCache buckets */ +#define MAXTUP 300 /* Maximum # of tuples cached per cache */ -typedef struct catcache { - Oid relationId; - Oid indexId; - char *cc_relname; /* relation name for defered open */ - char *cc_indname; /* index name for defered open */ - HeapTuple (*cc_iscanfunc)(); /* index scanfunction */ - TupleDesc cc_tupdesc; /* tuple descriptor from reldesc */ - int id; /* XXX could be improved -hirohama */ - short cc_ntup; /* # of tuples in this cache */ - short cc_maxtup; /* max # of tuples allowed (LRU)*/ - short cc_nkeys; - short cc_size; - short cc_key[4]; - short cc_klen[4]; - ScanKeyData cc_skey[4]; - struct catcache *cc_next; - Dllist *cc_lrulist; /* LRU list, most recent first */ - Dllist *cc_cache[NCCBUCK+1]; -} CatCache; +typedef struct catcache +{ + Oid relationId; + Oid indexId; + char *cc_relname; /* relation name for defered open */ + char *cc_indname; /* index name for defered open */ + HeapTuple(*cc_iscanfunc) (); /* index scanfunction */ + TupleDesc cc_tupdesc; /* tuple descriptor from reldesc */ + int id; /* XXX could be improved -hirohama */ + short cc_ntup; /* # of tuples in this cache */ + short cc_maxtup; /* max # of tuples allowed (LRU) */ + short cc_nkeys; + short cc_size; + short cc_key[4]; + short cc_klen[4]; + ScanKeyData cc_skey[4]; + struct catcache *cc_next; + Dllist *cc_lrulist; /* LRU list, most recent first */ + Dllist *cc_cache[NCCBUCK + 1]; +} CatCache; -#define InvalidCatalogCacheId (-1) +#define InvalidCatalogCacheId (-1) -extern struct catcache *Caches; -extern GlobalMemory CacheCxt; +extern struct catcache *Caches; +extern GlobalMemory CacheCxt; -extern void CatalogCacheIdInvalidate(int cacheId, Index hashIndex, - ItemPointer pointer); -extern void ResetSystemCache(void); -extern CatCache *InitSysCache(char *relname, char *indname, int id, int nkeys, - int key[], HeapTuple (*iScanfuncP)()); -extern HeapTuple SearchSysCache(struct catcache *cache, Datum v1, Datum v2, - Datum v3, Datum v4); -extern void RelationInvalidateCatalogCacheTuple(Relation relation, - HeapTuple tuple, void (*function)()); +extern void +CatalogCacheIdInvalidate(int cacheId, Index hashIndex, + ItemPointer pointer); +extern void ResetSystemCache(void); +extern CatCache * +InitSysCache(char *relname, char *indname, int id, int nkeys, + int key[], HeapTuple(*iScanfuncP) ()); +extern HeapTuple +SearchSysCache(struct catcache * cache, Datum v1, Datum v2, + Datum v3, Datum v4); +extern void +RelationInvalidateCatalogCacheTuple(Relation relation, + HeapTuple tuple, void (*function) ()); -#endif /* CATCACHE_H */ +#endif /* CATCACHE_H */ diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index fd9546362f3..79e6fb7ff57 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * datetime.h-- - * Definitions for the datetime + * Definitions for the datetime * * * Copyright (c) 1994, Regents of the University of California * - * $Id: datetime.h,v 1.3 1997/06/23 15:03:41 thomas Exp $ + * $Id: datetime.h,v 1.4 1997/09/07 05:02:16 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,4 +19,4 @@ typedef int32 DateADT; typedef float8 TimeADT; -#endif /* DATETIME_H */ +#endif /* DATETIME_H */ diff --git a/src/include/utils/datum.h b/src/include/utils/datum.h index 009141e9cba..5409c8ddfe3 100644 --- a/src/include/utils/datum.h +++ b/src/include/utils/datum.h @@ -1,17 +1,17 @@ /*------------------------------------------------------------------------- * * datum.h-- - * POSTGRES abstract data type datum representation definitions. + * POSTGRES abstract data type datum representation definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: datum.h,v 1.2 1996/10/31 09:51:11 scrappy Exp $ + * $Id: datum.h,v 1.3 1997/09/07 05:02:17 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef DATUM_H -#define DATUM_H +#ifndef DATUM_H +#define DATUM_H /*-------------------------------------------------------- @@ -38,26 +38,27 @@ * datumGetSize * find the "real" length of a datum */ -extern Size datumGetSize(Datum value, Oid type, bool byVal, Size len); +extern Size datumGetSize(Datum value, Oid type, bool byVal, Size len); /*--------------- * datumCopy * make a copy of a datum. */ -extern Datum datumCopy(Datum value, Oid type, bool byVal, Size len); +extern Datum datumCopy(Datum value, Oid type, bool byVal, Size len); /*--------------- * datumFree * free space that *might* have been palloced by "datumCopy" */ -extern void datumFree(Datum value, Oid type, bool byVal, Size len); +extern void datumFree(Datum value, Oid type, bool byVal, Size len); /*--------------- * datumIsEqual * return true if thwo datums are equal, false otherwise. * XXX : See comments in the code for restrictions! */ -extern bool datumIsEqual(Datum value1, Datum value2, Oid type, +extern bool +datumIsEqual(Datum value1, Datum value2, Oid type, bool byVal, Size len); -#endif /* DATUM_H */ +#endif /* DATUM_H */ diff --git a/src/include/utils/dt.h b/src/include/utils/dt.h index 2065e62d05f..b30e3a18627 100644 --- a/src/include/utils/dt.h +++ b/src/include/utils/dt.h @@ -1,14 +1,14 @@ /*------------------------------------------------------------------------- * * dt.h-- - * Definitions for the date/time and other date/time support code. - * The support code is shared with other date data types, - * including abstime, reltime, date, and time. + * Definitions for the date/time and other date/time support code. + * The support code is shared with other date data types, + * including abstime, reltime, date, and time. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: dt.h,v 1.18 1997/09/04 18:44:29 thomas Exp $ + * $Id: dt.h,v 1.19 1997/09/07 05:02:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,23 +21,26 @@ /* * DateTime represents absolute time. * TimeSpan represents delta time. Keep track of months (and years) - * separately since the elapsed time spanned is unknown until instantiated - * relative to an absolute time. + * separately since the elapsed time spanned is unknown until instantiated + * relative to an absolute time. * * Note that Postgres uses "time interval" to mean a bounded interval, - * consisting of a beginning and ending time, not a time span - tgl 97/03/20 + * consisting of a beginning and ending time, not a time span - tgl 97/03/20 */ -typedef double DateTime; +typedef double DateTime; -typedef struct { - double time; /* all time units other than months and years */ - int4 month; /* months and years, after time for alignment */ -} TimeSpan; +typedef struct +{ + double time; /* all time units other than months and + * years */ + int4 month; /* months and years, after time for + * alignment */ +} TimeSpan; /* ---------------------------------------------------------------- - * time types + support macros + * time types + support macros * * String definitions for standard time quantities. * @@ -46,196 +49,202 @@ typedef struct { * ---------------------------------------------------------------- */ -#define DAGO "ago" -#define DCURRENT "current" -#define EPOCH "epoch" -#define INVALID "invalid" -#define EARLY "-infinity" -#define LATE "infinity" -#define NOW "now" -#define TODAY "today" -#define TOMORROW "tomorrow" -#define YESTERDAY "yesterday" -#define ZULU "zulu" - -#define DMICROSEC "usecond" -#define DMILLISEC "msecond" -#define DSECOND "second" -#define DMINUTE "minute" -#define DHOUR "hour" -#define DDAY "day" -#define DWEEK "week" -#define DMONTH "month" -#define DQUARTER "quarter" -#define DYEAR "year" -#define DDECADE "decade" -#define DCENTURY "century" -#define DMILLENIUM "millenium" -#define DA_D "ad" -#define DB_C "bc" -#define DTIMEZONE "timezone" +#define DAGO "ago" +#define DCURRENT "current" +#define EPOCH "epoch" +#define INVALID "invalid" +#define EARLY "-infinity" +#define LATE "infinity" +#define NOW "now" +#define TODAY "today" +#define TOMORROW "tomorrow" +#define YESTERDAY "yesterday" +#define ZULU "zulu" + +#define DMICROSEC "usecond" +#define DMILLISEC "msecond" +#define DSECOND "second" +#define DMINUTE "minute" +#define DHOUR "hour" +#define DDAY "day" +#define DWEEK "week" +#define DMONTH "month" +#define DQUARTER "quarter" +#define DYEAR "year" +#define DDECADE "decade" +#define DCENTURY "century" +#define DMILLENIUM "millenium" +#define DA_D "ad" +#define DB_C "bc" +#define DTIMEZONE "timezone" /* * Fundamental time field definitions for parsing. * - * Meridian: am, pm, or 24-hour style. - * Millenium: ad, bc + * Meridian: am, pm, or 24-hour style. + * Millenium: ad, bc */ -#define AM 0 -#define PM 1 +#define AM 0 +#define PM 1 #define HR24 2 -#define AD 0 -#define BC 1 +#define AD 0 +#define BC 1 /* * Fields for time decoding. * Can't have more of these than there are bits in an unsigned int - * since these are turned into bit masks during parsing and decoding. + * since these are turned into bit masks during parsing and decoding. */ #define RESERV 0 #define MONTH 1 #define YEAR 2 -#define DAY 3 -#define TIMES 4 /* not used - thomas 1997-07-14 */ -#define TZ 5 -#define DTZ 6 +#define DAY 3 +#define TIMES 4 /* not used - thomas 1997-07-14 */ +#define TZ 5 +#define DTZ 6 #define DTZMOD 7 #define IGNORE 8 #define AMPM 9 #define HOUR 10 #define MINUTE 11 #define SECOND 12 -#define DOY 13 -#define DOW 14 +#define DOY 13 +#define DOW 14 #define UNITS 15 #define ADBC 16 /* these are only for relative dates */ -#define AGO 17 -#define ABS_BEFORE 18 -#define ABS_AFTER 19 +#define AGO 17 +#define ABS_BEFORE 18 +#define ABS_AFTER 19 /* * Token field definitions for time parsing and decoding. * These need to fit into the datetkn table type. * At the moment, that means keep them within [-127,127]. * These are also used for bit masks in DecodeDateDelta() - * so actually restrict them to within [0,31] for now. + * so actually restrict them to within [0,31] for now. * - tgl 97/06/19 */ -#define DTK_NUMBER 0 -#define DTK_STRING 1 - -#define DTK_DATE 2 -#define DTK_TIME 3 -#define DTK_TZ 4 -#define DTK_AGO 5 - -#define DTK_SPECIAL 6 -#define DTK_INVALID 7 -#define DTK_CURRENT 8 -#define DTK_EARLY 9 -#define DTK_LATE 10 -#define DTK_EPOCH 11 -#define DTK_NOW 12 +#define DTK_NUMBER 0 +#define DTK_STRING 1 + +#define DTK_DATE 2 +#define DTK_TIME 3 +#define DTK_TZ 4 +#define DTK_AGO 5 + +#define DTK_SPECIAL 6 +#define DTK_INVALID 7 +#define DTK_CURRENT 8 +#define DTK_EARLY 9 +#define DTK_LATE 10 +#define DTK_EPOCH 11 +#define DTK_NOW 12 #define DTK_YESTERDAY 13 -#define DTK_TODAY 14 +#define DTK_TODAY 14 #define DTK_TOMORROW 15 -#define DTK_ZULU 16 - -#define DTK_DELTA 17 -#define DTK_SECOND 18 -#define DTK_MINUTE 19 -#define DTK_HOUR 20 -#define DTK_DAY 21 -#define DTK_WEEK 22 -#define DTK_MONTH 23 -#define DTK_QUARTER 24 -#define DTK_YEAR 25 -#define DTK_DECADE 26 -#define DTK_CENTURY 27 +#define DTK_ZULU 16 + +#define DTK_DELTA 17 +#define DTK_SECOND 18 +#define DTK_MINUTE 19 +#define DTK_HOUR 20 +#define DTK_DAY 21 +#define DTK_WEEK 22 +#define DTK_MONTH 23 +#define DTK_QUARTER 24 +#define DTK_YEAR 25 +#define DTK_DECADE 26 +#define DTK_CENTURY 27 #define DTK_MILLENIUM 28 #define DTK_MILLISEC 29 #define DTK_MICROSEC 30 -#define DTK_DOW 31 +#define DTK_DOW 31 /* * Bit mask definitions for time parsing. */ -#define DTK_M(t) (0x01 << (t)) +#define DTK_M(t) (0x01 << (t)) -#define DTK_DATE_M (DTK_M(YEAR) | DTK_M(MONTH) | DTK_M(DAY)) -#define DTK_TIME_M (DTK_M(HOUR) | DTK_M(MINUTE) | DTK_M(SECOND)) +#define DTK_DATE_M (DTK_M(YEAR) | DTK_M(MONTH) | DTK_M(DAY)) +#define DTK_TIME_M (DTK_M(HOUR) | DTK_M(MINUTE) | DTK_M(SECOND)) -#define MAXDATELEN 47 /* maximum possible length of an input date string */ -#define MAXDATEFIELDS 25 /* maximum possible number of fields in a date string */ -#define TOKMAXLEN 10 /* only this many chars are stored in datetktbl */ +#define MAXDATELEN 47 /* maximum possible length of an input + * date string */ +#define MAXDATEFIELDS 25 /* maximum possible number of fields in a + * date string */ +#define TOKMAXLEN 10 /* only this many chars are stored in + * datetktbl */ /* keep this struct small; it gets used a lot */ -typedef struct { +typedef struct +{ #if defined(aix) - char *token; + char *token; #else - char token[TOKMAXLEN]; -#endif /* aix */ - char type; - char value; /* this may be unsigned, alas */ -} datetkn; + char token[TOKMAXLEN]; +#endif /* aix */ + char type; + char value; /* this may be unsigned, alas */ +} datetkn; #ifdef NAN -#define DT_INVALID (NAN) +#define DT_INVALID (NAN) #else -#define DT_INVALID (DBL_MIN+DBL_MIN) +#define DT_INVALID (DBL_MIN+DBL_MIN) #endif #ifdef HUGE_VAL -#define DT_NOBEGIN (-HUGE_VAL) -#define DT_NOEND (HUGE_VAL) +#define DT_NOBEGIN (-HUGE_VAL) +#define DT_NOEND (HUGE_VAL) #else -#define DT_NOBEGIN (-DBL_MAX) -#define DT_NOEND (DBL_MAX) +#define DT_NOBEGIN (-DBL_MAX) +#define DT_NOEND (DBL_MAX) #endif -#define DT_CURRENT (DBL_MIN) -#define DT_EPOCH (-DBL_MIN) +#define DT_CURRENT (DBL_MIN) +#define DT_EPOCH (-DBL_MIN) -#define DATETIME_INVALID(j) {j = DT_INVALID;} +#define DATETIME_INVALID(j) {j = DT_INVALID;} #ifdef NAN #define DATETIME_IS_INVALID(j) (isnan(j)) #else #define DATETIME_IS_INVALID(j) (j == DT_INVALID) #endif -#define DATETIME_NOBEGIN(j) {j = DT_NOBEGIN;} +#define DATETIME_NOBEGIN(j) {j = DT_NOBEGIN;} #define DATETIME_IS_NOBEGIN(j) (j == DT_NOBEGIN) -#define DATETIME_NOEND(j) {j = DT_NOEND;} +#define DATETIME_NOEND(j) {j = DT_NOEND;} #define DATETIME_IS_NOEND(j) (j == DT_NOEND) -#define DATETIME_CURRENT(j) {j = DT_CURRENT;} +#define DATETIME_CURRENT(j) {j = DT_CURRENT;} #if defined(linux) && defined(PPC) -extern int datetime_is_current(double j); +extern int datetime_is_current(double j); + #define DATETIME_IS_CURRENT(j) datetime_is_current(j) #else #define DATETIME_IS_CURRENT(j) (j == DT_CURRENT) #endif -#define DATETIME_EPOCH(j) {j = DT_EPOCH;} +#define DATETIME_EPOCH(j) {j = DT_EPOCH;} #if defined(linux) && defined(PPC) -extern int datetime_is_epoch(double j); +extern int datetime_is_epoch(double j); + #define DATETIME_IS_EPOCH(j) datetime_is_epoch(j) #else #define DATETIME_IS_EPOCH(j) (j == DT_EPOCH) #endif -#define DATETIME_IS_RELATIVE(j) (DATETIME_IS_CURRENT(j) || DATETIME_IS_EPOCH(j)) +#define DATETIME_IS_RELATIVE(j) (DATETIME_IS_CURRENT(j) || DATETIME_IS_EPOCH(j)) #define DATETIME_NOT_FINITE(j) (DATETIME_IS_INVALID(j) \ - || DATETIME_IS_NOBEGIN(j) || DATETIME_IS_NOEND(j)) + || DATETIME_IS_NOBEGIN(j) || DATETIME_IS_NOEND(j)) #define DATETIME_IS_RESERVED(j) (DATETIME_IS_RELATIVE(j) || DATETIME_NOT_FINITE(j)) -#define TIMESPAN_INVALID(j) {(j).time = DT_INVALID;} +#define TIMESPAN_INVALID(j) {(j).time = DT_INVALID;} #ifdef NAN #define TIMESPAN_IS_INVALID(j) (isnan((j).time)) #else @@ -247,76 +256,80 @@ extern int datetime_is_epoch(double j); #define JROUND(j) (rint(((double) (j))/TIME_PREC)*TIME_PREC) /* - * dt.c prototypes + * dt.c prototypes */ -extern DateTime *datetime_in( char *str); -extern char *datetime_out( DateTime *dt); -extern bool datetime_eq(DateTime *dt1, DateTime *dt2); -extern bool datetime_ne(DateTime *dt1, DateTime *dt2); -extern bool datetime_lt(DateTime *dt1, DateTime *dt2); -extern bool datetime_le(DateTime *dt1, DateTime *dt2); -extern bool datetime_ge(DateTime *dt1, DateTime *dt2); -extern bool datetime_gt(DateTime *dt1, DateTime *dt2); -extern bool datetime_finite(DateTime *datetime); -extern int datetime_cmp(DateTime *dt1, DateTime *dt2); -extern DateTime *datetime_smaller(DateTime *dt1, DateTime *dt2); -extern DateTime *datetime_larger(DateTime *dt1, DateTime *dt2); +extern DateTime *datetime_in(char *str); +extern char *datetime_out(DateTime * dt); +extern bool datetime_eq(DateTime * dt1, DateTime * dt2); +extern bool datetime_ne(DateTime * dt1, DateTime * dt2); +extern bool datetime_lt(DateTime * dt1, DateTime * dt2); +extern bool datetime_le(DateTime * dt1, DateTime * dt2); +extern bool datetime_ge(DateTime * dt1, DateTime * dt2); +extern bool datetime_gt(DateTime * dt1, DateTime * dt2); +extern bool datetime_finite(DateTime * datetime); +extern int datetime_cmp(DateTime * dt1, DateTime * dt2); +extern DateTime *datetime_smaller(DateTime * dt1, DateTime * dt2); +extern DateTime *datetime_larger(DateTime * dt1, DateTime * dt2); extern TimeSpan *timespan_in(char *str); -extern char *timespan_out(TimeSpan *span); -extern bool timespan_eq(TimeSpan *span1, TimeSpan *span2); -extern bool timespan_ne(TimeSpan *span1, TimeSpan *span2); -extern bool timespan_lt(TimeSpan *span1, TimeSpan *span2); -extern bool timespan_le(TimeSpan *span1, TimeSpan *span2); -extern bool timespan_ge(TimeSpan *span1, TimeSpan *span2); -extern bool timespan_gt(TimeSpan *span1, TimeSpan *span2); -extern int timespan_cmp(TimeSpan *span1, TimeSpan *span2); -extern TimeSpan *timespan_smaller(TimeSpan *span1, TimeSpan *span2); -extern TimeSpan *timespan_larger(TimeSpan *span1, TimeSpan *span2); - -extern text *datetime_text(DateTime *datetime); -extern DateTime *text_datetime(text *str); -extern text *timespan_text(TimeSpan *timespan); -extern DateTime *datetime_trunc(text *units, DateTime *datetime); -extern TimeSpan *timespan_trunc(text *units, TimeSpan *timespan); -extern float64 datetime_part(text *units, DateTime *datetime); -extern float64 timespan_part(text *units, TimeSpan *timespan); -extern text *datetime_zone(text *zone, DateTime *datetime); - -extern TimeSpan *timespan_um(TimeSpan *span); -extern TimeSpan *timespan_pl(TimeSpan *span1, TimeSpan *span2); -extern TimeSpan *timespan_mi(TimeSpan *span1, TimeSpan *span2); -extern TimeSpan *timespan_div(TimeSpan *span1, float8 *arg2); - -extern TimeSpan *datetime_mi(DateTime *dt1, DateTime *dt2); -extern DateTime *datetime_pl_span(DateTime *dt, TimeSpan *span); -extern DateTime *datetime_mi_span(DateTime *dt, TimeSpan *span); -extern TimeSpan *datetime_age(DateTime *dt1, DateTime *dt2); - -extern void GetCurrentTime(struct tm *tm); +extern char *timespan_out(TimeSpan * span); +extern bool timespan_eq(TimeSpan * span1, TimeSpan * span2); +extern bool timespan_ne(TimeSpan * span1, TimeSpan * span2); +extern bool timespan_lt(TimeSpan * span1, TimeSpan * span2); +extern bool timespan_le(TimeSpan * span1, TimeSpan * span2); +extern bool timespan_ge(TimeSpan * span1, TimeSpan * span2); +extern bool timespan_gt(TimeSpan * span1, TimeSpan * span2); +extern int timespan_cmp(TimeSpan * span1, TimeSpan * span2); +extern TimeSpan *timespan_smaller(TimeSpan * span1, TimeSpan * span2); +extern TimeSpan *timespan_larger(TimeSpan * span1, TimeSpan * span2); + +extern text *datetime_text(DateTime * datetime); +extern DateTime *text_datetime(text * str); +extern text *timespan_text(TimeSpan * timespan); +extern DateTime *datetime_trunc(text * units, DateTime * datetime); +extern TimeSpan *timespan_trunc(text * units, TimeSpan * timespan); +extern float64 datetime_part(text * units, DateTime * datetime); +extern float64 timespan_part(text * units, TimeSpan * timespan); +extern text *datetime_zone(text * zone, DateTime * datetime); + +extern TimeSpan *timespan_um(TimeSpan * span); +extern TimeSpan *timespan_pl(TimeSpan * span1, TimeSpan * span2); +extern TimeSpan *timespan_mi(TimeSpan * span1, TimeSpan * span2); +extern TimeSpan *timespan_div(TimeSpan * span1, float8 * arg2); + +extern TimeSpan *datetime_mi(DateTime * dt1, DateTime * dt2); +extern DateTime *datetime_pl_span(DateTime * dt, TimeSpan * span); +extern DateTime *datetime_mi_span(DateTime * dt, TimeSpan * span); +extern TimeSpan *datetime_age(DateTime * dt1, DateTime * dt2); + +extern void GetCurrentTime(struct tm * tm); extern DateTime SetDateTime(DateTime datetime); -extern int tm2datetime(struct tm *tm, double fsec, int *tzp, DateTime *dt); +extern int tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime * dt); -extern void j2date( int jd, int *year, int *month, int *day); -extern int date2j( int year, int month, int day); +extern void j2date(int jd, int *year, int *month, int *day); +extern int date2j(int year, int month, int day); -extern double time2t(const int hour, const int min, const double sec); +extern double time2t(const int hour, const int min, const double sec); -extern int ParseDateTime( char *timestr, char *lowstr, - char *field[], int ftype[], int maxfields, int *numfields); -extern int DecodeDateTime( char *field[], int ftype[], - int nf, int *dtype, struct tm *tm, double *fsec, int *tzp); +extern int +ParseDateTime(char *timestr, char *lowstr, + char *field[], int ftype[], int maxfields, int *numfields); +extern int +DecodeDateTime(char *field[], int ftype[], + int nf, int *dtype, struct tm * tm, double *fsec, int *tzp); -extern int DecodeTimeOnly( char *field[], int ftype[], int nf, - int *dtype, struct tm *tm, double *fsec); +extern int +DecodeTimeOnly(char *field[], int ftype[], int nf, + int *dtype, struct tm * tm, double *fsec); -extern int DecodeDateDelta( char *field[], int ftype[], - int nf, int *dtype, struct tm *tm, double *fsec); +extern int +DecodeDateDelta(char *field[], int ftype[], + int nf, int *dtype, struct tm * tm, double *fsec); -extern int EncodeDateOnly(struct tm *tm, int style, char *str); -extern int EncodeTimeOnly(struct tm *tm, double fsec, int style, char *str); -extern int EncodeDateTime(struct tm *tm, double fsec, int *tzp, char **tzn, int style, char *str); -extern int EncodeTimeSpan(struct tm *tm, double fsec, int style, char *str); +extern int EncodeDateOnly(struct tm * tm, int style, char *str); +extern int EncodeTimeOnly(struct tm * tm, double fsec, int style, char *str); +extern int EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, char *str); +extern int EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str); -#endif /* DT_H */ +#endif /* DT_H */ diff --git a/src/include/utils/dynahash.h b/src/include/utils/dynahash.h index fe9a51d3f1b..bf04ef10739 100644 --- a/src/include/utils/dynahash.h +++ b/src/include/utils/dynahash.h @@ -1,19 +1,18 @@ /*------------------------------------------------------------------------- * * dynahash-- - * POSTGRES dynahash.h file definitions + * POSTGRES dynahash.h file definitions * * * Copyright (c) 1994, Regents of the University of California * - * $Id: dynahash.h,v 1.2 1996/11/14 20:06:39 scrappy Exp $ + * $Id: dynahash.h,v 1.3 1997/09/07 05:02:20 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef DYNAHASH_H +#ifndef DYNAHASH_H #define DYNAHASH_H -extern int my_log2(long num); - -#endif /* DYNAHASH_H */ +extern int my_log2(long num); +#endif /* DYNAHASH_H */ diff --git a/src/include/utils/dynamic_loader.h b/src/include/utils/dynamic_loader.h index dd346a85df9..fe8e189ff35 100644 --- a/src/include/utils/dynamic_loader.h +++ b/src/include/utils/dynamic_loader.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * dynamic_loader.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: dynamic_loader.h,v 1.5 1997/02/14 04:18:56 momjian Exp $ + * $Id: dynamic_loader.h,v 1.6 1997/09/07 05:02:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -14,30 +14,31 @@ #define DYNAMIC_LOADER_H #include <sys/types.h> -#include <sys/param.h> /* For MAXPATHLEN */ +#include <sys/param.h> /* For MAXPATHLEN */ #include <postgres.h> #ifdef MIN #undef MIN #undef MAX -#endif /* MIN */ +#endif /* MIN */ /* * List of dynamically loaded files. */ -typedef struct df_files { - char filename[MAXPATHLEN]; /* Full pathname of file */ - dev_t device; /* Device file is on */ - ino_t inode; /* Inode number of file */ - void *handle; /* a handle for pg_dl* functions */ - struct df_files *next; -} DynamicFileList; +typedef struct df_files +{ + char filename[MAXPATHLEN]; /* Full pathname of file */ + dev_t device; /* Device file is on */ + ino_t inode; /* Inode number of file */ + void *handle; /* a handle for pg_dl* functions */ + struct df_files *next; +} DynamicFileList; -extern void *pg_dlopen(char *filename); +extern void *pg_dlopen(char *filename); extern func_ptr pg_dlsym(void *handle, char *funcname); -extern void pg_dlclose(void *handle); -extern char *pg_dlerror(void); +extern void pg_dlclose(void *handle); +extern char *pg_dlerror(void); -#endif /* DYNAMIC_LOADER_H */ +#endif /* DYNAMIC_LOADER_H */ diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index 3673b2bd27f..fc9305d9a0e 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -1,31 +1,31 @@ /*------------------------------------------------------------------------- * * elog.h-- - * POSTGRES error logging definitions. + * POSTGRES error logging definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: elog.h,v 1.3 1996/11/10 03:06:24 momjian Exp $ + * $Id: elog.h,v 1.4 1997/09/07 05:02:27 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef ELOG_H +#ifndef ELOG_H #define ELOG_H -#define NOTICE 0 /* random info - no special action */ -#define WARN -1 /* Warning error - return to known state */ -#define FATAL 1 /* Fatal error - abort process */ -#define DEBUG -2 /* debug message */ -#define NOIND -3 /* debug message, don't indent as far */ +#define NOTICE 0 /* random info - no special action */ +#define WARN -1 /* Warning error - return to known state */ +#define FATAL 1 /* Fatal error - abort process */ +#define DEBUG -2 /* debug message */ +#define NOIND -3 /* debug message, don't indent as far */ -#define PTIME 0x100 /* prepend time to message */ -#define POS 0x200 /* prepend source position to message */ -#define USERMSG 0x400 /* send message to user */ -#define TERM 0x800 /* send message to terminal */ -#define DBLOG 0x1000 /* put message in per db log */ -#define SLOG 0x2000 /* put message in system log */ -#define ABORT 0x4000 /* abort process after logging */ +#define PTIME 0x100 /* prepend time to message */ +#define POS 0x200 /* prepend source position to message */ +#define USERMSG 0x400 /* send message to user */ +#define TERM 0x800 /* send message to terminal */ +#define DBLOG 0x1000 /* put message in per db log */ +#define SLOG 0x2000 /* put message in system log */ +#define ABORT 0x4000 /* abort process after logging */ #define ELOG_MAXLEN 4096 @@ -33,9 +33,11 @@ /* uncomment the following if you want your elog's to be timestamped */ /* #define ELOG_TIMESTAMPS */ -extern void elog(int lev, const char *fmt, ...); +extern void elog(int lev, const char *fmt,...); + #ifndef PG_STANDALONE -int DebugFileOpen(void); +int DebugFileOpen(void); + #endif -#endif /* ELOG_H */ +#endif /* ELOG_H */ diff --git a/src/include/utils/exc.h b/src/include/utils/exc.h index 12bfdfc4c80..5c240eeaa5d 100644 --- a/src/include/utils/exc.h +++ b/src/include/utils/exc.h @@ -1,90 +1,95 @@ /*------------------------------------------------------------------------- * * exc.h-- - * POSTGRES exception handling definitions. + * POSTGRES exception handling definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: exc.h,v 1.7 1997/08/19 21:40:32 momjian Exp $ + * $Id: exc.h,v 1.8 1997/09/07 05:02:28 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef EXC_H +#ifndef EXC_H #define EXC_H #include <setjmp.h> #include "config.h" -extern char *ExcFileName; -extern Index ExcLineNumber; +extern char *ExcFileName; +extern Index ExcLineNumber; /* * ExcMessage and Exception are now defined in c.h */ #if defined(JMP_BUF) -typedef jmp_buf ExcContext; +typedef jmp_buf ExcContext; + #else -typedef sigjmp_buf ExcContext; +typedef sigjmp_buf ExcContext; + #endif -typedef Exception* ExcId; -typedef long ExcDetail; -typedef char* ExcData; - -typedef struct ExcFrame { - struct ExcFrame *link; - ExcContext context; - ExcId id; - ExcDetail detail; - ExcData data; - ExcMessage message; -} ExcFrame; - -extern ExcFrame* ExcCurFrameP; - -#define ExcBegin() \ - { \ - ExcFrame exception; \ - \ - exception.link = ExcCurFrameP; \ - if (sigsetjmp(exception.context, 1) == 0) { \ - ExcCurFrameP = &exception; \ - { -#define ExcExcept() \ - } \ - ExcCurFrameP = exception.link; \ - } else { \ - { -#define ExcEnd() \ - } \ - } \ - } +typedef Exception *ExcId; +typedef long ExcDetail; +typedef char *ExcData; + +typedef struct ExcFrame +{ + struct ExcFrame *link; + ExcContext context; + ExcId id; + ExcDetail detail; + ExcData data; + ExcMessage message; +} ExcFrame; + +extern ExcFrame *ExcCurFrameP; + +#define ExcBegin() \ + { \ + ExcFrame exception; \ + \ + exception.link = ExcCurFrameP; \ + if (sigsetjmp(exception.context, 1) == 0) { \ + ExcCurFrameP = &exception; \ + { +#define ExcExcept() \ + } \ + ExcCurFrameP = exception.link; \ + } else { \ + { +#define ExcEnd() \ + } \ + } \ + } #define raise4(x, t, d, message) \ - ExcRaise(&(x), (ExcDetail)(t), (ExcData)(d), (ExcMessage)(message)) + ExcRaise(&(x), (ExcDetail)(t), (ExcData)(d), (ExcMessage)(message)) -#define reraise() \ - raise4(*exception.id,exception.detail,exception.data,exception.message) +#define reraise() \ + raise4(*exception.id,exception.detail,exception.data,exception.message) -typedef void ExcProc(Exception*, ExcDetail, ExcData, ExcMessage); +typedef void ExcProc(Exception *, ExcDetail, ExcData, ExcMessage); /* * prototypes for functions in exc.c */ -extern void EnableExceptionHandling(bool on); -extern void ExcRaise(Exception *excP, - ExcDetail detail, - ExcData data, - ExcMessage message); +extern void EnableExceptionHandling(bool on); +extern void +ExcRaise(Exception * excP, + ExcDetail detail, + ExcData data, + ExcMessage message); /* * prototypes for functions in excabort.c */ -extern void ExcAbort(const Exception *excP, ExcDetail detail, ExcData data, - ExcMessage message); +extern void +ExcAbort(const Exception * excP, ExcDetail detail, ExcData data, + ExcMessage message); -#endif /* EXC_H */ +#endif /* EXC_H */ diff --git a/src/include/utils/excid.h b/src/include/utils/excid.h index be411334142..69636540746 100644 --- a/src/include/utils/excid.h +++ b/src/include/utils/excid.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * excid.h-- - * POSTGRES known exception identifier definitions. + * POSTGRES known exception identifier definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: excid.h,v 1.3 1996/11/04 11:51:16 scrappy Exp $ + * $Id: excid.h,v 1.4 1997/09/07 05:02:29 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef EXCID_H +#ifndef EXCID_H #define EXCID_H @@ -21,9 +21,9 @@ extern Exception BadAllocSize; extern Exception ExhaustedMemory; extern Exception Unimplemented; -extern Exception CatalogFailure; /* XXX inconsistent naming style */ -extern Exception InternalError; /* XXX inconsistent naming style */ -extern Exception SemanticError; /* XXX inconsistent naming style */ -extern Exception SystemError; /* XXX inconsistent naming style */ +extern Exception CatalogFailure;/* XXX inconsistent naming style */ +extern Exception InternalError; /* XXX inconsistent naming style */ +extern Exception SemanticError; /* XXX inconsistent naming style */ +extern Exception SystemError; /* XXX inconsistent naming style */ -#endif /* EXCID_H */ +#endif /* EXCID_H */ diff --git a/src/include/utils/fcache.h b/src/include/utils/fcache.h index 9ce6e857e9d..27c3269b0e4 100644 --- a/src/include/utils/fcache.h +++ b/src/include/utils/fcache.h @@ -1,54 +1,54 @@ /*------------------------------------------------------------------------- * * fcache.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: fcache.h,v 1.2 1996/11/04 07:18:42 scrappy Exp $ + * $Id: fcache.h,v 1.3 1997/09/07 05:02:30 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef FCACHE_H -#define FCACHE_H +#ifndef FCACHE_H +#define FCACHE_H typedef struct { - int typlen; /* length of the return type */ - int typbyval; /* true if return type is pass by value */ - func_ptr func; /* address of function to call (for c funcs) */ - Oid foid; /* oid of the function in pg_proc */ - Oid language; /* oid of the language in pg_language */ - int nargs; /* number of arguments */ - - /* Might want to make these two arrays of size MAXFUNCARGS */ - - Oid *argOidVect; /* oids of all the arguments */ - bool *nullVect; /* keep track of null arguments */ - - char *src; /* source code of the function */ - char *bin; /* binary object code ?? */ - char *func_state; /* fuction_state struct for execution */ - - bool oneResult; /* true we only want 1 result from the - * function - */ - bool hasSetArg; /* true if func is part of a nested dot expr - * whose argument is func returning a set ugh! - */ - - Pointer funcSlot; /* if one result we need to copy it before we - * end execution of the function and free stuff - */ - - char *setArg; /* current argument for nested dot execution - * Nested dot expressions mean we have funcs - * whose argument is a set of tuples - */ - - bool istrusted; /* trusted fn? */ -} FunctionCache, *FunctionCachePtr; - -#endif /* FCACHE_H */ + int typlen; /* length of the return type */ + int typbyval; /* true if return type is pass by value */ + func_ptr func; /* address of function to call (for c + * funcs) */ + Oid foid; /* oid of the function in pg_proc */ + Oid language; /* oid of the language in pg_language */ + int nargs; /* number of arguments */ + + /* Might want to make these two arrays of size MAXFUNCARGS */ + + Oid *argOidVect; /* oids of all the arguments */ + bool *nullVect; /* keep track of null arguments */ + + char *src; /* source code of the function */ + char *bin; /* binary object code ?? */ + char *func_state; /* fuction_state struct for execution */ + + bool oneResult; /* true we only want 1 result from the + * function */ + bool hasSetArg; /* true if func is part of a nested dot + * expr whose argument is func returning a + * set ugh! */ + + Pointer funcSlot; /* if one result we need to copy it before + * we end execution of the function and + * free stuff */ + + char *setArg; /* current argument for nested dot + * execution Nested dot expressions mean + * we have funcs whose argument is a set + * of tuples */ + + bool istrusted; /* trusted fn? */ +} FunctionCache, *FunctionCachePtr; + +#endif /* FCACHE_H */ diff --git a/src/include/utils/fcache2.h b/src/include/utils/fcache2.h index 7c48406a966..781ff241393 100644 --- a/src/include/utils/fcache2.h +++ b/src/include/utils/fcache2.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * fcache2.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: fcache2.h,v 1.2 1996/11/04 08:53:07 scrappy Exp $ + * $Id: fcache2.h,v 1.3 1997/09/07 05:02:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,6 +16,6 @@ #include <nodes/execnodes.h> extern void -setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext); + setFcache(Node * node, Oid foid, List * argList, ExprContext * econtext); -#endif /* FCACHE2_H */ +#endif /* FCACHE2_H */ diff --git a/src/include/utils/fmgrtab.h b/src/include/utils/fmgrtab.h index eac11a76802..e23f7c79266 100644 --- a/src/include/utils/fmgrtab.h +++ b/src/include/utils/fmgrtab.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * fmgrtab.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: fmgrtab.h,v 1.4 1996/11/10 03:06:27 momjian Exp $ + * $Id: fmgrtab.h,v 1.5 1997/09/07 05:02:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -14,15 +14,16 @@ #define FMGRTAB_H -typedef struct { - Oid proid; - uint16 nargs; - func_ptr func; - char* funcName; -} FmgrCall; +typedef struct +{ + Oid proid; + uint16 nargs; + func_ptr func; + char *funcName; +} FmgrCall; -extern FmgrCall *fmgr_isbuiltin(Oid id); -extern func_ptr fmgr_lookupByName(char* name); -extern void load_file(char *filename); +extern FmgrCall *fmgr_isbuiltin(Oid id); +extern func_ptr fmgr_lookupByName(char *name); +extern void load_file(char *filename); -#endif /* FMGRTAB_H */ +#endif /* FMGRTAB_H */ diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 782d71fed4a..4cbbeca3b82 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -5,19 +5,19 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geo_decls.h,v 1.8 1997/08/21 01:40:30 vadim Exp $ + * $Id: geo_decls.h,v 1.9 1997/09/07 05:02:34 momjian Exp $ * * NOTE - * These routines do *not* use the float types from adt/. + * These routines do *not* use the float types from adt/. * - * XXX These routines were not written by a numerical analyst. - * XXX I have made some attempt to flesh out the operators - * and data types. There are still some more to do. - tgl 97/04/19 + * XXX These routines were not written by a numerical analyst. + * XXX I have made some attempt to flesh out the operators + * and data types. There are still some more to do. - tgl 97/04/19 * *------------------------------------------------------------------------- */ -#ifndef GEO_DECLS_H -#define GEO_DECLS_H +#ifndef GEO_DECLS_H +#define GEO_DECLS_H #include "access/attnum.h" @@ -28,321 +28,334 @@ *-------------------------------------------------------------------*/ -#define EPSILON 1.0E-06 +#define EPSILON 1.0E-06 #ifdef EPSILON -#define FPzero(A) (fabs(A) <= EPSILON) -#define FPeq(A,B) (fabs((A) - (B)) <= EPSILON) -#define FPlt(A,B) ((B) - (A) > EPSILON) -#define FPle(A,B) ((A) - (B) <= EPSILON) -#define FPgt(A,B) ((A) - (B) > EPSILON) -#define FPge(A,B) ((B) - (A) <= EPSILON) +#define FPzero(A) (fabs(A) <= EPSILON) +#define FPeq(A,B) (fabs((A) - (B)) <= EPSILON) +#define FPlt(A,B) ((B) - (A) > EPSILON) +#define FPle(A,B) ((A) - (B) <= EPSILON) +#define FPgt(A,B) ((A) - (B) > EPSILON) +#define FPge(A,B) ((B) - (A) <= EPSILON) #else -#define FPzero(A) (A == 0) -#define FPnzero(A) (A != 0) -#define FPeq(A,B) (A == B) -#define FPne(A,B) (A != B) -#define FPlt(A,B) (A < B) -#define FPle(A,B) (A <= B) -#define FPgt(A,B) (A > B) -#define FPge(A,B) (A >= B) +#define FPzero(A) (A == 0) +#define FPnzero(A) (A != 0) +#define FPeq(A,B) (A == B) +#define FPne(A,B) (A != B) +#define FPlt(A,B) (A < B) +#define FPle(A,B) (A <= B) +#define FPgt(A,B) (A > B) +#define FPge(A,B) (A >= B) #endif -#define HYPOT(A, B) sqrt((A) * (A) + (B) * (B)) +#define HYPOT(A, B) sqrt((A) * (A) + (B) * (B)) /*-------------------------------------------------------------------- * Memory management. *-------------------------------------------------------------------*/ -#define PALLOC(SIZE) palloc(SIZE) -#define PFREE(P) pfree(P) -#define PALLOCTYPE(TYPE) (TYPE *) PALLOC(sizeof(TYPE)) +#define PALLOC(SIZE) palloc(SIZE) +#define PFREE(P) pfree(P) +#define PALLOCTYPE(TYPE) (TYPE *) PALLOC(sizeof(TYPE)) /*#endif !FmgrIncluded */ /*--------------------------------------------------------------------- * Point - (x,y) *-------------------------------------------------------------------*/ -typedef struct { - double x, y; -} Point; +typedef struct +{ + double x, + y; +} Point; /*--------------------------------------------------------------------- - * LSEG - A straight line, specified by endpoints. + * LSEG - A straight line, specified by endpoints. *-------------------------------------------------------------------*/ -typedef struct { - Point p[2]; +typedef struct +{ + Point p[2]; - double m; /* precomputed to save time, not in tuple */ -} LSEG; + double m; /* precomputed to save time, not in tuple */ +} LSEG; /*--------------------------------------------------------------------- - * PATH - Specified by vertex points. + * PATH - Specified by vertex points. *-------------------------------------------------------------------*/ -typedef struct { - int32 size; /* XXX varlena */ - int32 npts; - int32 closed; /* is this a closed polygon? */ - int32 dummy; /* padding to make it double align */ - Point p[1]; /* variable length array of POINTs */ -} PATH; +typedef struct +{ + int32 size; /* XXX varlena */ + int32 npts; + int32 closed; /* is this a closed polygon? */ + int32 dummy; /* padding to make it double align */ + Point p[1]; /* variable length array of POINTs */ +} PATH; /*--------------------------------------------------------------------- - * LINE - Specified by its general equation (Ax+By+C=0). - * If there is a y-intercept, it is C, which - * incidentally gives a freebie point on the line - * (if B=0, then C is the x-intercept). - * Slope m is precalculated to save time; if - * the line is not vertical, m == A. + * LINE - Specified by its general equation (Ax+By+C=0). + * If there is a y-intercept, it is C, which + * incidentally gives a freebie point on the line + * (if B=0, then C is the x-intercept). + * Slope m is precalculated to save time; if + * the line is not vertical, m == A. *-------------------------------------------------------------------*/ -typedef struct { - double A, B, C; +typedef struct +{ + double A, + B, + C; - double m; -} LINE; + double m; +} LINE; /*--------------------------------------------------------------------- * BOX - Specified by two corner points, which are - * sorted to save calculation time later. + * sorted to save calculation time later. *-------------------------------------------------------------------*/ -typedef struct { - Point high, low; /* corner POINTs */ -} BOX; +typedef struct +{ + Point high, + low; /* corner POINTs */ +} BOX; /*--------------------------------------------------------------------- - * POLYGON - Specified by an array of doubles defining the points, - * keeping the number of points and the bounding box for - * speed purposes. + * POLYGON - Specified by an array of doubles defining the points, + * keeping the number of points and the bounding box for + * speed purposes. *-------------------------------------------------------------------*/ -typedef struct { - int32 size; /* XXX varlena */ - int32 npts; - BOX boundbox; - Point p[1]; /* variable length array of POINTs */ -} POLYGON; +typedef struct +{ + int32 size; /* XXX varlena */ + int32 npts; + BOX boundbox; + Point p[1]; /* variable length array of POINTs */ +} POLYGON; /*--------------------------------------------------------------------- * CIRCLE - Specified by a center point and radius. *-------------------------------------------------------------------*/ -typedef struct { - Point center; - double radius; -} CIRCLE; +typedef struct +{ + Point center; + double radius; +} CIRCLE; -/* +/* * in geo_ops.h */ /* public point routines */ -extern Point *point_in(char *str); -extern char *point_out(Point *pt); -extern bool point_left(Point *pt1, Point *pt2); -extern bool point_right(Point *pt1, Point *pt2); -extern bool point_above(Point *pt1, Point *pt2); -extern bool point_below(Point *pt1, Point *pt2); -extern bool point_vert(Point *pt1, Point *pt2); -extern bool point_horiz(Point *pt1, Point *pt2); -extern bool point_eq(Point *pt1, Point *pt2); -extern int32 pointdist(Point *p1, Point *p2); -extern double *point_distance(Point *pt1, Point *pt2); -extern double *point_slope(Point *pt1, Point *pt2); +extern Point *point_in(char *str); +extern char *point_out(Point * pt); +extern bool point_left(Point * pt1, Point * pt2); +extern bool point_right(Point * pt1, Point * pt2); +extern bool point_above(Point * pt1, Point * pt2); +extern bool point_below(Point * pt1, Point * pt2); +extern bool point_vert(Point * pt1, Point * pt2); +extern bool point_horiz(Point * pt1, Point * pt2); +extern bool point_eq(Point * pt1, Point * pt2); +extern int32 pointdist(Point * p1, Point * p2); +extern double *point_distance(Point * pt1, Point * pt2); +extern double *point_slope(Point * pt1, Point * pt2); /* private routines */ -extern double point_dt(Point *pt1, Point *pt2); -extern double point_sl(Point *pt1, Point *pt2); +extern double point_dt(Point * pt1, Point * pt2); +extern double point_sl(Point * pt1, Point * pt2); -extern Point *point(float8 *x, float8 *y); -extern Point *point_add(Point *p1, Point *p2); -extern Point *point_sub(Point *p1, Point *p2); -extern Point *point_mul(Point *p1, Point *p2); -extern Point *point_div(Point *p1, Point *p2); +extern Point *point(float8 * x, float8 * y); +extern Point *point_add(Point * p1, Point * p2); +extern Point *point_sub(Point * p1, Point * p2); +extern Point *point_mul(Point * p1, Point * p2); +extern Point *point_div(Point * p1, Point * p2); /* public lseg routines */ -extern LSEG *lseg_in(char *str); -extern char *lseg_out(LSEG *ls); -extern bool lseg_intersect(LSEG *l1, LSEG *l2); -extern bool lseg_parallel(LSEG *l1, LSEG *l2); -extern bool lseg_perp(LSEG *l1, LSEG *l2); -extern bool lseg_vertical(LSEG *lseg); -extern bool lseg_horizontal(LSEG *lseg); -extern bool lseg_eq(LSEG *l1, LSEG *l2); -extern double *lseg_distance(LSEG *l1, LSEG *l2); -extern Point *lseg_center(LSEG *lseg); -extern Point *lseg_interpt(LSEG *l1, LSEG *l2); -extern double *dist_pl(Point *pt, LINE *line); -extern double *dist_ps(Point *pt, LSEG *lseg); -extern double *dist_ppath(Point *pt, PATH *path); -extern double *dist_pb(Point *pt, BOX *box); -extern double *dist_sl(LSEG *lseg, LINE *line); -extern double *dist_sb(LSEG *lseg, BOX *box); -extern double *dist_lb(LINE *line, BOX *box); -extern Point *close_pl(Point *pt, LINE *line); -extern Point *close_ps(Point *pt, LSEG *lseg); -extern Point *close_pb(Point *pt, BOX *box); -extern Point *close_sl(LSEG *lseg, LINE *line); -extern Point *close_sb(LSEG *lseg, BOX *box); -extern Point *close_lb(LINE *line, BOX *box); -extern bool on_pl(Point *pt, LINE *line); -extern bool on_ps(Point *pt, LSEG *lseg); -extern bool on_pb(Point *pt, BOX *box); -extern bool on_ppath(Point *pt, PATH *path); -extern bool on_sl(LSEG *lseg, LINE *line); -extern bool on_sb(LSEG *lseg, BOX *box); -extern bool inter_sl(LSEG *lseg, LINE *line); -extern bool inter_sb(LSEG *lseg, BOX *box); -extern bool inter_lb(LINE *line, BOX *box); +extern LSEG *lseg_in(char *str); +extern char *lseg_out(LSEG * ls); +extern bool lseg_intersect(LSEG * l1, LSEG * l2); +extern bool lseg_parallel(LSEG * l1, LSEG * l2); +extern bool lseg_perp(LSEG * l1, LSEG * l2); +extern bool lseg_vertical(LSEG * lseg); +extern bool lseg_horizontal(LSEG * lseg); +extern bool lseg_eq(LSEG * l1, LSEG * l2); +extern double *lseg_distance(LSEG * l1, LSEG * l2); +extern Point *lseg_center(LSEG * lseg); +extern Point *lseg_interpt(LSEG * l1, LSEG * l2); +extern double *dist_pl(Point * pt, LINE * line); +extern double *dist_ps(Point * pt, LSEG * lseg); +extern double *dist_ppath(Point * pt, PATH * path); +extern double *dist_pb(Point * pt, BOX * box); +extern double *dist_sl(LSEG * lseg, LINE * line); +extern double *dist_sb(LSEG * lseg, BOX * box); +extern double *dist_lb(LINE * line, BOX * box); +extern Point *close_pl(Point * pt, LINE * line); +extern Point *close_ps(Point * pt, LSEG * lseg); +extern Point *close_pb(Point * pt, BOX * box); +extern Point *close_sl(LSEG * lseg, LINE * line); +extern Point *close_sb(LSEG * lseg, BOX * box); +extern Point *close_lb(LINE * line, BOX * box); +extern bool on_pl(Point * pt, LINE * line); +extern bool on_ps(Point * pt, LSEG * lseg); +extern bool on_pb(Point * pt, BOX * box); +extern bool on_ppath(Point * pt, PATH * path); +extern bool on_sl(LSEG * lseg, LINE * line); +extern bool on_sb(LSEG * lseg, BOX * box); +extern bool inter_sl(LSEG * lseg, LINE * line); +extern bool inter_sb(LSEG * lseg, BOX * box); +extern bool inter_lb(LINE * line, BOX * box); /* private routines */ -extern LSEG *lseg_construct(Point *pt1, Point *pt2); +extern LSEG *lseg_construct(Point * pt1, Point * pt2); /* public box routines */ -extern BOX *box_in(char *str); -extern char *box_out(BOX *box); -extern bool box_same(BOX *box1, BOX *box2); -extern bool box_overlap(BOX *box1, BOX *box2); -extern bool box_overleft(BOX *box1, BOX *box2); -extern bool box_left(BOX *box1, BOX *box2); -extern bool box_right(BOX *box1, BOX *box2); -extern bool box_overright(BOX *box1, BOX *box2); -extern bool box_contained(BOX *box1, BOX *box2); -extern bool box_contain(BOX *box1, BOX *box2); -extern bool box_below(BOX *box1, BOX *box2); -extern bool box_above(BOX *box1, BOX *box2); -extern bool box_lt(BOX *box1, BOX *box2); -extern bool box_gt(BOX *box1, BOX *box2); -extern bool box_eq(BOX *box1, BOX *box2); -extern bool box_le(BOX *box1, BOX *box2); -extern bool box_ge(BOX *box1, BOX *box2); -extern Point *box_center(BOX *box); -extern double *box_area(BOX *box); -extern double *box_width(BOX *box); -extern double *box_height(BOX *box); -extern double *box_distance(BOX *box1, BOX *box2); -extern Point *box_center(BOX *box); -extern BOX *box_intersect(BOX *box1, BOX *box2); -extern LSEG *box_diagonal(BOX *box); +extern BOX *box_in(char *str); +extern char *box_out(BOX * box); +extern bool box_same(BOX * box1, BOX * box2); +extern bool box_overlap(BOX * box1, BOX * box2); +extern bool box_overleft(BOX * box1, BOX * box2); +extern bool box_left(BOX * box1, BOX * box2); +extern bool box_right(BOX * box1, BOX * box2); +extern bool box_overright(BOX * box1, BOX * box2); +extern bool box_contained(BOX * box1, BOX * box2); +extern bool box_contain(BOX * box1, BOX * box2); +extern bool box_below(BOX * box1, BOX * box2); +extern bool box_above(BOX * box1, BOX * box2); +extern bool box_lt(BOX * box1, BOX * box2); +extern bool box_gt(BOX * box1, BOX * box2); +extern bool box_eq(BOX * box1, BOX * box2); +extern bool box_le(BOX * box1, BOX * box2); +extern bool box_ge(BOX * box1, BOX * box2); +extern Point *box_center(BOX * box); +extern double *box_area(BOX * box); +extern double *box_width(BOX * box); +extern double *box_height(BOX * box); +extern double *box_distance(BOX * box1, BOX * box2); +extern Point *box_center(BOX * box); +extern BOX *box_intersect(BOX * box1, BOX * box2); +extern LSEG *box_diagonal(BOX * box); /* private routines */ -extern double box_dt(BOX *box1, BOX *box2); +extern double box_dt(BOX * box1, BOX * box2); -extern BOX *box(Point *p1, Point *p2); -extern BOX *box_add(BOX *box, Point *p); -extern BOX *box_sub(BOX *box, Point *p); -extern BOX *box_mul(BOX *box, Point *p); -extern BOX *box_div(BOX *box, Point *p); +extern BOX *box(Point * p1, Point * p2); +extern BOX *box_add(BOX * box, Point * p); +extern BOX *box_sub(BOX * box, Point * p); +extern BOX *box_mul(BOX * box, Point * p); +extern BOX *box_div(BOX * box, Point * p); /* private line routines */ -extern double *line_distance(LINE *l1, LINE *l2); +extern double *line_distance(LINE * l1, LINE * l2); /* public path routines */ -extern PATH *path_in(char *str); -extern char *path_out(PATH *path); -extern bool path_n_lt(PATH *p1, PATH *p2); -extern bool path_n_gt(PATH *p1, PATH *p2); -extern bool path_n_eq(PATH *p1, PATH *p2); -extern bool path_n_le(PATH *p1, PATH *p2); -extern bool path_n_ge(PATH *p1, PATH *p2); -extern bool path_inter(PATH *p1, PATH *p2); -extern double *path_distance(PATH *p1, PATH *p2); -extern double *path_length(PATH *path); - -extern bool path_isclosed(PATH *path); -extern bool path_isopen(PATH *path); -extern int4 path_npoints(PATH *path); - -extern PATH *path_close(PATH *path); -extern PATH *path_open(PATH *path); -extern PATH *path_add(PATH *p1, PATH *p2); -extern PATH *path_add_pt(PATH *path, Point *point); -extern PATH *path_sub_pt(PATH *path, Point *point); -extern PATH *path_mul_pt(PATH *path, Point *point); -extern PATH *path_div_pt(PATH *path, Point *point); -extern bool path_contain_pt( PATH *path, Point *p); -extern bool pt_contained_path( Point *p, PATH *path); - -extern Point *path_center(PATH *path); -extern POLYGON *path_poly(PATH *path); - -extern PATH *upgradepath(PATH *path); -extern bool isoldpath(PATH *path); +extern PATH *path_in(char *str); +extern char *path_out(PATH * path); +extern bool path_n_lt(PATH * p1, PATH * p2); +extern bool path_n_gt(PATH * p1, PATH * p2); +extern bool path_n_eq(PATH * p1, PATH * p2); +extern bool path_n_le(PATH * p1, PATH * p2); +extern bool path_n_ge(PATH * p1, PATH * p2); +extern bool path_inter(PATH * p1, PATH * p2); +extern double *path_distance(PATH * p1, PATH * p2); +extern double *path_length(PATH * path); + +extern bool path_isclosed(PATH * path); +extern bool path_isopen(PATH * path); +extern int4 path_npoints(PATH * path); + +extern PATH *path_close(PATH * path); +extern PATH *path_open(PATH * path); +extern PATH *path_add(PATH * p1, PATH * p2); +extern PATH *path_add_pt(PATH * path, Point * point); +extern PATH *path_sub_pt(PATH * path, Point * point); +extern PATH *path_mul_pt(PATH * path, Point * point); +extern PATH *path_div_pt(PATH * path, Point * point); +extern bool path_contain_pt(PATH * path, Point * p); +extern bool pt_contained_path(Point * p, PATH * path); + +extern Point *path_center(PATH * path); +extern POLYGON *path_poly(PATH * path); + +extern PATH *upgradepath(PATH * path); +extern bool isoldpath(PATH * path); /* public polygon routines */ extern POLYGON *poly_in(char *s); -extern char *poly_out(POLYGON *poly); -extern bool poly_left(POLYGON *polya, POLYGON *polyb); -extern bool poly_overleft(POLYGON *polya, POLYGON *polyb); -extern bool poly_right(POLYGON *polya, POLYGON *polyb); -extern bool poly_overright(POLYGON *polya, POLYGON *polyb); -extern bool poly_same(POLYGON *polya, POLYGON *polyb); -extern bool poly_overlap(POLYGON *polya, POLYGON *polyb); -extern bool poly_contain(POLYGON *polya, POLYGON *polyb); -extern bool poly_contained(POLYGON *polya, POLYGON *polyb); -extern bool poly_contain_pt( POLYGON *poly, Point *p); -extern bool pt_contained_poly( Point *p, POLYGON *poly); - -extern double *poly_distance(POLYGON *polya, POLYGON *polyb); -extern int4 poly_npoints(POLYGON *poly); -extern Point *poly_center(POLYGON *poly); -extern BOX *poly_box(POLYGON *poly); -extern PATH *poly_path(POLYGON *poly); -extern POLYGON *box_poly(BOX *box); - -extern POLYGON *upgradepoly(POLYGON *poly); -extern POLYGON *revertpoly(POLYGON *poly); +extern char *poly_out(POLYGON * poly); +extern bool poly_left(POLYGON * polya, POLYGON * polyb); +extern bool poly_overleft(POLYGON * polya, POLYGON * polyb); +extern bool poly_right(POLYGON * polya, POLYGON * polyb); +extern bool poly_overright(POLYGON * polya, POLYGON * polyb); +extern bool poly_same(POLYGON * polya, POLYGON * polyb); +extern bool poly_overlap(POLYGON * polya, POLYGON * polyb); +extern bool poly_contain(POLYGON * polya, POLYGON * polyb); +extern bool poly_contained(POLYGON * polya, POLYGON * polyb); +extern bool poly_contain_pt(POLYGON * poly, Point * p); +extern bool pt_contained_poly(Point * p, POLYGON * poly); + +extern double *poly_distance(POLYGON * polya, POLYGON * polyb); +extern int4 poly_npoints(POLYGON * poly); +extern Point *poly_center(POLYGON * poly); +extern BOX *poly_box(POLYGON * poly); +extern PATH *poly_path(POLYGON * poly); +extern POLYGON *box_poly(BOX * box); + +extern POLYGON *upgradepoly(POLYGON * poly); +extern POLYGON *revertpoly(POLYGON * poly); /* private polygon routines */ /* public circle routines */ -extern CIRCLE *circle_in(char *str); -extern char *circle_out(CIRCLE *circle); -extern bool circle_same(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_overlap(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_overleft(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_left(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_right(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_overright(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_contained(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_contain(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_below(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_above(CIRCLE *circle1, CIRCLE *circle2); - -extern bool circle_eq(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_ne(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_lt(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_gt(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_le(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_ge(CIRCLE *circle1, CIRCLE *circle2); -extern bool circle_contain_pt(CIRCLE *circle, Point *point); -extern bool pt_contained_circle(Point *point, CIRCLE *circle); -extern CIRCLE *circle_add_pt(CIRCLE *circle, Point *point); -extern CIRCLE *circle_sub_pt(CIRCLE *circle, Point *point); -extern CIRCLE *circle_mul_pt(CIRCLE *circle, Point *point); -extern CIRCLE *circle_div_pt(CIRCLE *circle, Point *point); -extern double *circle_diameter(CIRCLE *circle); -extern double *circle_radius(CIRCLE *circle); -extern double *circle_distance(CIRCLE *circle1, CIRCLE *circle2); -extern double *dist_pc(Point *point, CIRCLE *circle); -extern double *dist_cpoly(CIRCLE *circle, POLYGON *poly); -extern Point *circle_center(CIRCLE *circle); -extern CIRCLE *circle(Point *center, float8 *radius); -extern CIRCLE *box_circle(BOX *box); -extern BOX *circle_box(CIRCLE *circle); -extern CIRCLE *poly_circle(POLYGON *poly); -extern POLYGON *circle_poly(int npts, CIRCLE *circle); +extern CIRCLE *circle_in(char *str); +extern char *circle_out(CIRCLE * circle); +extern bool circle_same(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_overlap(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_overleft(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_left(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_right(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_overright(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_contained(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_contain(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_below(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_above(CIRCLE * circle1, CIRCLE * circle2); + +extern bool circle_eq(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_ne(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_lt(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_gt(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_le(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_ge(CIRCLE * circle1, CIRCLE * circle2); +extern bool circle_contain_pt(CIRCLE * circle, Point * point); +extern bool pt_contained_circle(Point * point, CIRCLE * circle); +extern CIRCLE *circle_add_pt(CIRCLE * circle, Point * point); +extern CIRCLE *circle_sub_pt(CIRCLE * circle, Point * point); +extern CIRCLE *circle_mul_pt(CIRCLE * circle, Point * point); +extern CIRCLE *circle_div_pt(CIRCLE * circle, Point * point); +extern double *circle_diameter(CIRCLE * circle); +extern double *circle_radius(CIRCLE * circle); +extern double *circle_distance(CIRCLE * circle1, CIRCLE * circle2); +extern double *dist_pc(Point * point, CIRCLE * circle); +extern double *dist_cpoly(CIRCLE * circle, POLYGON * poly); +extern Point *circle_center(CIRCLE * circle); +extern CIRCLE *circle(Point * center, float8 * radius); +extern CIRCLE *box_circle(BOX * box); +extern BOX *circle_box(CIRCLE * circle); +extern CIRCLE *poly_circle(POLYGON * poly); +extern POLYGON *circle_poly(int npts, CIRCLE * circle); /* private routines */ -extern double *circle_area(CIRCLE *circle); -extern double circle_dt(CIRCLE *circle1, CIRCLE *circle2); +extern double *circle_area(CIRCLE * circle); +extern double circle_dt(CIRCLE * circle1, CIRCLE * circle2); /* geo_selfuncs.c */ -extern float64 areasel(Oid opid, Oid relid, AttrNumber attno, - char *value, int32 flag); -extern float64 areajoinsel(Oid opid, Oid relid, AttrNumber attno, - char *value, int32 flag); - -#endif /* GEO_DECLS_H */ +extern float64 +areasel(Oid opid, Oid relid, AttrNumber attno, + char *value, int32 flag); +extern float64 +areajoinsel(Oid opid, Oid relid, AttrNumber attno, + char *value, int32 flag); + +#endif /* GEO_DECLS_H */ diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h index 3f5727fba0f..577e6edfcdc 100644 --- a/src/include/utils/hsearch.h +++ b/src/include/utils/hsearch.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * hsearch.h-- - * for hashing in the new buffer manager + * for hashing in the new buffer manager * * * Copyright (c) 1994, Regents of the University of California * - * $Id: hsearch.h,v 1.3 1997/08/19 21:40:35 momjian Exp $ + * $Id: hsearch.h,v 1.4 1997/09/07 05:02:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,123 +17,131 @@ /* * Constants */ -# define DEF_BUCKET_SIZE 256 -# define DEF_BUCKET_SHIFT 8 /* log2(BUCKET) */ -# define DEF_SEGSIZE 256 -# define DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */ -# define DEF_DIRSIZE 256 -# define PRIME1 37 -# define PRIME2 1048583 -# define DEF_FFACTOR 1 -# define SPLTMAX 8 +#define DEF_BUCKET_SIZE 256 +#define DEF_BUCKET_SHIFT 8/* log2(BUCKET) */ +#define DEF_SEGSIZE 256 +#define DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */ +#define DEF_DIRSIZE 256 +#define PRIME1 37 +#define PRIME2 1048583 +#define DEF_FFACTOR 1 +#define SPLTMAX 8 /* * Hash bucket is actually bigger than this. Key field can have * variable length and a variable length data field follows it. */ -typedef struct element { - unsigned long next; /* secret from user */ - long key; -} ELEMENT; +typedef struct element +{ + unsigned long next; /* secret from user */ + long key; +} ELEMENT; typedef unsigned long BUCKET_INDEX; + /* segment is an array of bucket pointers */ typedef BUCKET_INDEX *SEGMENT; typedef unsigned long SEG_OFFSET; -typedef struct hashhdr { - long bsize; /* Bucket/Page Size */ - long bshift; /* Bucket shift */ - long dsize; /* Directory Size */ - long ssize; /* Segment Size */ - long sshift; /* Segment shift */ - long max_bucket; /* ID of Maximum bucket in use */ - long high_mask; /* Mask to modulo into entire table */ - long low_mask; /* Mask to modulo into lower half of table */ - long ffactor; /* Fill factor */ - long nkeys; /* Number of keys in hash table */ - long nsegs; /* Number of allocated segments */ - long keysize; /* hash key length in bytes */ - long datasize; /* elem data length in bytes */ - long max_dsize; /* 'dsize' limit if directory is fixed size */ - BUCKET_INDEX freeBucketIndex; - /* index of first free bucket */ +typedef struct hashhdr +{ + long bsize; /* Bucket/Page Size */ + long bshift; /* Bucket shift */ + long dsize; /* Directory Size */ + long ssize; /* Segment Size */ + long sshift; /* Segment shift */ + long max_bucket; /* ID of Maximum bucket in use */ + long high_mask; /* Mask to modulo into entire table */ + long low_mask; /* Mask to modulo into lower half of table */ + long ffactor; /* Fill factor */ + long nkeys; /* Number of keys in hash table */ + long nsegs; /* Number of allocated segments */ + long keysize; /* hash key length in bytes */ + long datasize; /* elem data length in bytes */ + long max_dsize; /* 'dsize' limit if directory is fixed + * size */ + BUCKET_INDEX freeBucketIndex; + /* index of first free bucket */ #ifdef HASH_STATISTICS - long accesses; - long collisions; + long accesses; + long collisions; #endif -} HHDR; - -typedef struct htab { - HHDR *hctl; /* shared control information */ - long (*hash)(); /* Hash Function */ - char *segbase; /* segment base address for - * calculating pointer values - */ - SEG_OFFSET *dir; /* 'directory' of segm starts */ - long *(*alloc)(); /* memory allocator - * (long * for alignment reasons) - */ - -} HTAB; - -typedef struct hashctl { - long bsize; /* Bucket Size */ - long ssize; /* Segment Size */ - long dsize; /* Dirsize Size */ - long ffactor; /* Fill factor */ - long (*hash)(); /* Hash Function */ - long keysize; /* hash key length in bytes */ - long datasize; /* elem data length in bytes */ - long max_size; /* limit to dsize if directory size is limited */ - long *segbase; /* base for calculating bucket + seg ptrs */ - long * (*alloc)(); /* memory allocation function */ - long *dir; /* directory if allocated already */ - long *hctl; /* location of header information in shd mem */ -} HASHCTL; +} HHDR; + +typedef struct htab +{ + HHDR *hctl; /* shared control information */ + long (*hash) (); /* Hash Function */ + char *segbase; /* segment base address for calculating + * pointer values */ + SEG_OFFSET *dir; /* 'directory' of segm starts */ + long *(*alloc) ();/* memory allocator (long * for alignment + * reasons) */ + +} HTAB; + +typedef struct hashctl +{ + long bsize; /* Bucket Size */ + long ssize; /* Segment Size */ + long dsize; /* Dirsize Size */ + long ffactor; /* Fill factor */ + long (*hash) (); /* Hash Function */ + long keysize; /* hash key length in bytes */ + long datasize; /* elem data length in bytes */ + long max_size; /* limit to dsize if directory size is + * limited */ + long *segbase; /* base for calculating bucket + seg ptrs */ + long *(*alloc) ();/* memory allocation function */ + long *dir; /* directory if allocated already */ + long *hctl; /* location of header information in shd + * mem */ +} HASHCTL; /* Flags to indicate action for hctl */ -#define HASH_BUCKET 0x001 /* Setting bucket size */ +#define HASH_BUCKET 0x001 /* Setting bucket size */ #define HASH_SEGMENT 0x002 /* Setting segment size */ #define HASH_DIRSIZE 0x004 /* Setting directory size */ #define HASH_FFACTOR 0x008 /* Setting fill factor */ #define HASH_FUNCTION 0x010 /* Set user defined hash function */ -#define HASH_ELEM 0x020 /* Setting key/data size */ -#define HASH_SHARED_MEM 0x040 /* Setting shared mem const */ -#define HASH_ATTACH 0x080 /* Do not initialize hctl */ -#define HASH_ALLOC 0x100 /* Setting memory allocator */ +#define HASH_ELEM 0x020 /* Setting key/data size */ +#define HASH_SHARED_MEM 0x040 /* Setting shared mem const */ +#define HASH_ATTACH 0x080 /* Do not initialize hctl */ +#define HASH_ALLOC 0x100 /* Setting memory allocator */ /* seg_alloc assumes that INVALID_INDEX is 0*/ -#define INVALID_INDEX (0) -#define NO_MAX_DSIZE (-1) +#define INVALID_INDEX (0) +#define NO_MAX_DSIZE (-1) /* number of hash buckets allocated at once */ -#define BUCKET_ALLOC_INCR (30) +#define BUCKET_ALLOC_INCR (30) /* hash_search operations */ -typedef enum { - HASH_FIND, - HASH_ENTER, - HASH_REMOVE, - HASH_FIND_SAVE, - HASH_REMOVE_SAVED -} HASHACTION; - -/* +typedef enum +{ + HASH_FIND, + HASH_ENTER, + HASH_REMOVE, + HASH_FIND_SAVE, + HASH_REMOVE_SAVED +} HASHACTION; + +/* * prototypes from functions in dynahash.c */ -extern HTAB *hash_create(int nelem, HASHCTL *info, int flags); -extern void hash_destroy(HTAB *hashp); -extern void hash_stats(char *where, HTAB *hashp); -extern long *hash_search(HTAB *hashp, char *keyPtr, HASHACTION action, - bool *foundPtr); -extern long *hash_seq(HTAB *hashp); - -/* +extern HTAB *hash_create(int nelem, HASHCTL * info, int flags); +extern void hash_destroy(HTAB * hashp); +extern void hash_stats(char *where, HTAB * hashp); +extern long * +hash_search(HTAB * hashp, char *keyPtr, HASHACTION action, + bool * foundPtr); +extern long *hash_seq(HTAB * hashp); + +/* * prototypes from functions in hashfn.c */ -extern long string_hash(char *key, int keysize); -extern long tag_hash(int *key, int keysize); +extern long string_hash(char *key, int keysize); +extern long tag_hash(int *key, int keysize); -#endif /* HSEARCH_H */ +#endif /* HSEARCH_H */ diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index 0c993f5964b..21ea8eefb6b 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -1,46 +1,47 @@ /*------------------------------------------------------------------------- * * inval.h-- - * POSTGRES cache invalidation dispatcher definitions. + * POSTGRES cache invalidation dispatcher definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: inval.h,v 1.4 1997/08/19 21:40:37 momjian Exp $ + * $Id: inval.h,v 1.5 1997/09/07 05:02:36 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef INVAL_H +#ifndef INVAL_H #define INVAL_H #include <access/htup.h> #include <utils/rel.h> -extern void DiscardInvalid(void); +extern void DiscardInvalid(void); -extern void RegisterInvalid(bool send); +extern void RegisterInvalid(bool send); -extern void SetRefreshWhenInvalidate(bool on); +extern void SetRefreshWhenInvalidate(bool on); -extern void RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple); +extern void RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple); /* * POSTGRES local cache invalidation definitions. (originates from linval.h) */ -typedef struct InvalidationUserData { - struct InvalidationUserData *dataP[1]; /* VARIABLE LENGTH */ -} InvalidationUserData; /* VARIABLE LENGTH STRUCTURE */ +typedef struct InvalidationUserData +{ + struct InvalidationUserData *dataP[1]; /* VARIABLE LENGTH */ +} InvalidationUserData; /* VARIABLE LENGTH STRUCTURE */ -typedef struct InvalidationEntryData { - InvalidationUserData *nextP; - InvalidationUserData userData; /* VARIABLE LENGTH ARRAY */ -} InvalidationEntryData; /* VARIABLE LENGTH STRUCTURE */ +typedef struct InvalidationEntryData +{ + InvalidationUserData *nextP; + InvalidationUserData userData; /* VARIABLE LENGTH ARRAY */ +} InvalidationEntryData; /* VARIABLE LENGTH STRUCTURE */ typedef Pointer InvalidationEntry; -typedef InvalidationEntry LocalInvalid; +typedef InvalidationEntry LocalInvalid; -#define EmptyLocalInvalid NULL - -#endif /* INVAL_H */ +#define EmptyLocalInvalid NULL +#endif /* INVAL_H */ diff --git a/src/include/utils/lselect.h b/src/include/utils/lselect.h index 048ea932e28..d5498df779a 100644 --- a/src/include/utils/lselect.h +++ b/src/include/utils/lselect.h @@ -1,49 +1,55 @@ /*------------------------------------------------------------------------- * * lselect.h-- - * definitions for the replacement selection algorithm. + * definitions for the replacement selection algorithm. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: lselect.h,v 1.4 1997/08/06 03:42:07 momjian Exp $ - * + * $Id: lselect.h,v 1.5 1997/09/07 05:02:38 momjian Exp $ + * *------------------------------------------------------------------------- */ -#ifndef LSELECT_H -#define LSELECT_H +#ifndef LSELECT_H +#define LSELECT_H #include <stdio.h> #include "access/htup.h" -struct leftist { - short lt_dist; /* distance to leaf/empty node */ - short lt_devnum; /* device number of tuple */ - HeapTuple lt_tuple; - struct leftist *lt_left; - struct leftist *lt_right; +struct leftist +{ + short lt_dist; /* distance to leaf/empty node */ + short lt_devnum; /* device number of tuple */ + HeapTuple lt_tuple; + struct leftist *lt_left; + struct leftist *lt_right; }; /* replaces global variables in lselect.c to make it reentrant */ -typedef struct { - TupleDesc tupDesc; - int nKeys; - ScanKey scanKeys; - int sortMem; /* needed for psort */ -} LeftistContextData; +typedef struct +{ + TupleDesc tupDesc; + int nKeys; + ScanKey scanKeys; + int sortMem; /* needed for psort */ +} LeftistContextData; typedef LeftistContextData *LeftistContext; -extern struct leftist *lmerge(struct leftist *pt, struct leftist *qt, - LeftistContext context); -extern HeapTuple gettuple(struct leftist **treep, short *devnum, - LeftistContext context); -extern void puttuple(struct leftist **treep, HeapTuple newtuple, short devnum, - LeftistContext context); -extern int tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context); +extern struct leftist * +lmerge(struct leftist * pt, struct leftist * qt, + LeftistContext context); +extern HeapTuple +gettuple(struct leftist ** treep, short *devnum, + LeftistContext context); +extern void +puttuple(struct leftist ** treep, HeapTuple newtuple, short devnum, + LeftistContext context); +extern int tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context); #ifdef EBUG -extern void checktree(struct leftist *tree, LeftistContext context); -extern int checktreer(struct leftist *tree, int level, LeftistContext context); -#endif /* EBUG */ +extern void checktree(struct leftist * tree, LeftistContext context); +extern int checktreer(struct leftist * tree, int level, LeftistContext context); + +#endif /* EBUG */ -#endif /* LSELECT_H */ +#endif /* LSELECT_H */ diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 82f465814e3..5abc26912cd 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -1,44 +1,44 @@ /*------------------------------------------------------------------------- * * lsyscache.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: lsyscache.h,v 1.3 1997/08/19 21:40:40 momjian Exp $ + * $Id: lsyscache.h,v 1.4 1997/09/07 05:02:39 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef LSYSCACHE_H -#define LSYSCACHE_H +#ifndef LSYSCACHE_H +#define LSYSCACHE_H #include <access/attnum.h> #include <access/htup.h> -extern bool op_class(Oid opid, int32 opclass, Oid amopid); -extern char *get_attname(Oid relid, AttrNumber attnum); +extern bool op_class(Oid opid, int32 opclass, Oid amopid); +extern char *get_attname(Oid relid, AttrNumber attnum); extern AttrNumber get_attnum(Oid relid, char *attname); -extern Oid get_atttype(Oid relid, AttrNumber attnum); -extern bool get_attisset(Oid relid, char *attname); +extern Oid get_atttype(Oid relid, AttrNumber attnum); +extern bool get_attisset(Oid relid, char *attname); extern RegProcedure get_opcode(Oid opid); -extern char *get_opname(Oid opid); -extern bool op_mergesortable(Oid opid, Oid ltype, Oid rtype, - Oid *leftOp, Oid *rightOp); -extern Oid op_hashjoinable(Oid opid, Oid ltype, Oid rtype); -extern Oid get_commutator(Oid opid); +extern char *get_opname(Oid opid); +extern bool +op_mergesortable(Oid opid, Oid ltype, Oid rtype, + Oid * leftOp, Oid * rightOp); +extern Oid op_hashjoinable(Oid opid, Oid ltype, Oid rtype); +extern Oid get_commutator(Oid opid); extern HeapTuple get_operator_tuple(Oid opno); -extern Oid get_negator(Oid opid); +extern Oid get_negator(Oid opid); extern RegProcedure get_oprrest(Oid opid); extern RegProcedure get_oprjoin(Oid opid); -extern int get_relnatts(Oid relid); -extern char *get_rel_name(Oid relid); -extern struct varlena * get_relstub(Oid relid, int no, bool *islast); -extern Oid get_ruleid(char *rulename); -extern Oid get_eventrelid(Oid ruleid); -extern int16 get_typlen(Oid typid); -extern bool get_typbyval(Oid typid); +extern int get_relnatts(Oid relid); +extern char *get_rel_name(Oid relid); +extern struct varlena *get_relstub(Oid relid, int no, bool * islast); +extern Oid get_ruleid(char *rulename); +extern Oid get_eventrelid(Oid ruleid); +extern int16 get_typlen(Oid typid); +extern bool get_typbyval(Oid typid); extern struct varlena *get_typdefault(Oid typid); -#endif /* LSYSCACHE_H */ - +#endif /* LSYSCACHE_H */ diff --git a/src/include/utils/mcxt.h b/src/include/utils/mcxt.h index 9d0b649f40e..b7dfcc7cda6 100644 --- a/src/include/utils/mcxt.h +++ b/src/include/utils/mcxt.h @@ -1,51 +1,52 @@ /*------------------------------------------------------------------------- * * mcxt.h-- - * POSTGRES memory context definitions. + * POSTGRES memory context definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: mcxt.h,v 1.5 1997/08/19 21:40:41 momjian Exp $ + * $Id: mcxt.h,v 1.6 1997/09/07 05:02:40 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef MCXT_H +#ifndef MCXT_H #define MCXT_H #include <nodes/memnodes.h> -extern MemoryContext CurrentMemoryContext; -extern MemoryContext TopMemoryContext; +extern MemoryContext CurrentMemoryContext; +extern MemoryContext TopMemoryContext; /* * MaxAllocSize -- - * Arbitrary limit on size of allocations. + * Arbitrary limit on size of allocations. * * Note: - * There is no guarantee that allocations smaller than MaxAllocSize - * will succeed. Allocation requests larger than MaxAllocSize will - * be summarily denied. + * There is no guarantee that allocations smaller than MaxAllocSize + * will succeed. Allocation requests larger than MaxAllocSize will + * be summarily denied. * - * This value should not be referenced except in one place in the code. + * This value should not be referenced except in one place in the code. * * XXX This should be defined in a file of tunable constants. */ -#define MaxAllocSize (0xfffffff) /* 16G - 1 */ +#define MaxAllocSize (0xfffffff) /* 16G - 1 */ /* * prototypes for functions in mcxt.c */ -extern void EnableMemoryContext(bool on); -extern Pointer MemoryContextAlloc(MemoryContext context, Size size); -extern Pointer MemoryContextRealloc(MemoryContext context, - Pointer pointer, - Size size); -extern void MemoryContextFree(MemoryContext context, Pointer pointer); +extern void EnableMemoryContext(bool on); +extern Pointer MemoryContextAlloc(MemoryContext context, Size size); +extern Pointer +MemoryContextRealloc(MemoryContext context, + Pointer pointer, + Size size); +extern void MemoryContextFree(MemoryContext context, Pointer pointer); extern MemoryContext MemoryContextSwitchTo(MemoryContext context); extern GlobalMemory CreateGlobalMemory(char *name); -extern void GlobalMemoryDestroy(GlobalMemory context); +extern void GlobalMemoryDestroy(GlobalMemory context); -#endif /* MCXT_H */ +#endif /* MCXT_H */ diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index 01dfc067970..b87c331a1d7 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -1,25 +1,25 @@ /*------------------------------------------------------------------------- * * memutils.h-- - * this file contains general memory alignment, allocation - * and manipulation stuff that used to be spread out - * between the following files: + * this file contains general memory alignment, allocation + * and manipulation stuff that used to be spread out + * between the following files: * - * align.h alignment macros - * aset.h memory allocation set stuff - * oset.h (used by aset.h) - * (bit.h bit array type / extern) - * clib.h mem routines - * limit.h max bits/byte, etc. + * align.h alignment macros + * aset.h memory allocation set stuff + * oset.h (used by aset.h) + * (bit.h bit array type / extern) + * clib.h mem routines + * limit.h max bits/byte, etc. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: memutils.h,v 1.8 1997/08/20 14:54:35 momjian Exp $ + * $Id: memutils.h,v 1.9 1997/09/07 05:02:42 momjian Exp $ * * NOTES - * some of the information in this file will be moved to - * other files, (like MaxHeapTupleSize and MaxAttributeSize). + * some of the information in this file will be moved to + * other files, (like MaxHeapTupleSize and MaxAttributeSize). * *------------------------------------------------------------------------- */ @@ -29,238 +29,245 @@ #ifdef NOT_USED /***************************************************************************** - * align.h - alignment macros * + * align.h - alignment macros * **************************************************************************** - [TRH] Let the compiler decide what alignment it uses instead of + [TRH] Let the compiler decide what alignment it uses instead of tending we know better. GCC (at least v2.5.8 and up) has an __alignof__ keyword. However, we cannot use it here since on some architectures it reports just a _recommended_ alignment instead of the actual alignment used in - padding structures (or at least, this is how I understand gcc's + padding structures (or at least, this is how I understand gcc's s...) So define a macro that gives us the _actual_ alignment inside a struct. {{note: assumes that alignment size is always a power of 2.}} */ -#define _ALIGNSIZE(TYPE) offsetof(struct { char __c; TYPE __t;}, __t) +#define _ALIGNSIZE(TYPE) offsetof(struct { char __c; TYPE __t;}, __t) #define _ALIGN(TYPE, LEN) \ - (((long)(LEN) + (_ALIGNSIZE(TYPE) - 1)) & ~(_ALIGNSIZE(TYPE) - 1)) -#define SHORTALIGN(LEN) _ALIGN(short, (LEN)) -#define INTALIGN(LEN) _ALIGN(int, (LEN)) -#define LONGALIGN(LEN) _ALIGN(long, (LEN)) -#define DOUBLEALIGN(LEN) _ALIGN(double, (LEN)) -#define MAXALIGN(LEN) _ALIGN(double, (LEN)) + (((long)(LEN) + (_ALIGNSIZE(TYPE) - 1)) & ~(_ALIGNSIZE(TYPE) - 1)) +#define SHORTALIGN(LEN) _ALIGN(short, (LEN)) +#define INTALIGN(LEN) _ALIGN(int, (LEN)) +#define LONGALIGN(LEN) _ALIGN(long, (LEN)) +#define DOUBLEALIGN(LEN) _ALIGN(double, (LEN)) +#define MAXALIGN(LEN) _ALIGN(double, (LEN)) -#endif /* 0 */ +#endif /* 0 */ /* - * SHORTALIGN(LEN) - length (or address) aligned for shorts + * SHORTALIGN(LEN) - length (or address) aligned for shorts */ -#define SHORTALIGN(LEN)\ - (((long)(LEN) + (sizeof (short) - 1)) & ~(sizeof (short) - 1)) +#define SHORTALIGN(LEN)\ + (((long)(LEN) + (sizeof (short) - 1)) & ~(sizeof (short) - 1)) #define INTALIGN(LEN)\ - (((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1)) + (((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1)) /* - * LONGALIGN(LEN) - length (or address) aligned for longs + * LONGALIGN(LEN) - length (or address) aligned for longs */ #if defined(sun) && ! defined(sparc) -#define LONGALIGN(LEN) SHORTALIGN(LEN) +#define LONGALIGN(LEN) SHORTALIGN(LEN) #elif defined (alpha) || defined(linuxalpha) - /* even though "long alignment" should really be on 8-byte boundaries - * for linuxalpha, we want the strictest alignment to be on 4-byte (int) - * boundaries, because otherwise things break when they try to use the - * FormData_pg_* structures. --djm 12/12/96 - */ -#define LONGALIGN(LEN)\ - (((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1)) + + /* + * even though "long alignment" should really be on 8-byte boundaries for + * linuxalpha, we want the strictest alignment to be on 4-byte (int) + * boundaries, because otherwise things break when they try to use the + * FormData_pg_* structures. --djm 12/12/96 + */ +#define LONGALIGN(LEN)\ + (((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1)) #else -#define LONGALIGN(LEN)\ - (((long)(LEN) + (sizeof (long) - 1)) & ~(sizeof (long) -1)) +#define LONGALIGN(LEN)\ + (((long)(LEN) + (sizeof (long) - 1)) & ~(sizeof (long) -1)) #endif #define DOUBLEALIGN(LEN)\ - (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1)) + (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1)) #define MAXALIGN(LEN)\ - (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1)) + (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1)) /***************************************************************************** - * oset.h -- Fixed format ordered set definitions. * + * oset.h -- Fixed format ordered set definitions. * *****************************************************************************/ /* Note: - * Fixed format ordered sets are <EXPLAIN>. - * XXX This is a preliminary version. Work is needed to explain - * XXX semantics of the external definitions. Otherwise, the - * XXX functional interface should not change. + * Fixed format ordered sets are <EXPLAIN>. + * XXX This is a preliminary version. Work is needed to explain + * XXX semantics of the external definitions. Otherwise, the + * XXX functional interface should not change. * */ typedef struct OrderedElemData OrderedElemData; -typedef OrderedElemData* OrderedElem; +typedef OrderedElemData *OrderedElem; typedef struct OrderedSetData OrderedSetData; -typedef OrderedSetData* OrderedSet; +typedef OrderedSetData *OrderedSet; -struct OrderedElemData { - OrderedElem next; /* Next elem or &this->set->dummy */ - OrderedElem prev; /* Previous elem or &this->set->head */ - OrderedSet set; /* Parent set */ +struct OrderedElemData +{ + OrderedElem next; /* Next elem or &this->set->dummy */ + OrderedElem prev; /* Previous elem or &this->set->head */ + OrderedSet set; /* Parent set */ }; -struct OrderedSetData { - OrderedElem head; /* First elem or &this->dummy */ - OrderedElem dummy; /* (hack) Terminator == NULL */ - OrderedElem tail; /* Last elem or &this->head */ - Offset offset; /* Offset from struct base to elem */ - /* this could be signed short int! */ +struct OrderedSetData +{ + OrderedElem head; /* First elem or &this->dummy */ + OrderedElem dummy; /* (hack) Terminator == NULL */ + OrderedElem tail; /* Last elem or &this->head */ + Offset offset; /* Offset from struct base to elem */ + /* this could be signed short int! */ }; -extern void OrderedSetInit(OrderedSet set, Offset offset); -extern bool OrderedSetContains(OrderedSet set, OrderedElem elem); -extern Pointer OrderedSetGetHead(OrderedSet set); -extern Pointer OrderedElemGetPredecessor(OrderedElem elem); -extern Pointer OrderedElemGetSuccessor(OrderedElem elem); -extern void OrderedElemPop(OrderedElem elem); -extern void OrderedElemPushInto(OrderedElem elem, OrderedSet Set); +extern void OrderedSetInit(OrderedSet set, Offset offset); +extern bool OrderedSetContains(OrderedSet set, OrderedElem elem); +extern Pointer OrderedSetGetHead(OrderedSet set); +extern Pointer OrderedElemGetPredecessor(OrderedElem elem); +extern Pointer OrderedElemGetSuccessor(OrderedElem elem); +extern void OrderedElemPop(OrderedElem elem); +extern void OrderedElemPushInto(OrderedElem elem, OrderedSet Set); /***************************************************************************** - * aset.h -- Allocation set definitions. * + * aset.h -- Allocation set definitions. * *****************************************************************************/ /* * Description: - * An allocation set is a set containing allocated elements. When - * an allocation is requested for a set, memory is allocated and a - * pointer is returned. Subsequently, this memory may be freed or - * reallocated. In addition, an allocation set may be reset which - * will cause all allocated memory to be freed. + * An allocation set is a set containing allocated elements. When + * an allocation is requested for a set, memory is allocated and a + * pointer is returned. Subsequently, this memory may be freed or + * reallocated. In addition, an allocation set may be reset which + * will cause all allocated memory to be freed. * - * Allocations may occur in four different modes. The mode of - * allocation does not affect the behavior of allocations except in - * terms of performance. The allocation mode is set at the time of - * set initialization. Once the mode is chosen, it cannot be changed - * unless the set is reinitialized. + * Allocations may occur in four different modes. The mode of + * allocation does not affect the behavior of allocations except in + * terms of performance. The allocation mode is set at the time of + * set initialization. Once the mode is chosen, it cannot be changed + * unless the set is reinitialized. * - * "Dynamic" mode forces all allocations to occur in a heap. This - * is a good mode to use when small memory segments are allocated - * and freed very frequently. This is a good choice when allocation - * characteristics are unknown. This is the default mode. + * "Dynamic" mode forces all allocations to occur in a heap. This + * is a good mode to use when small memory segments are allocated + * and freed very frequently. This is a good choice when allocation + * characteristics are unknown. This is the default mode. * - * "Static" mode attemts to allocate space as efficiently as possible - * without regard to freeing memory. This mode should be chosen only - * when it is known that many allocations will occur but that very - * little of the allocated memory will be explicitly freed. + * "Static" mode attemts to allocate space as efficiently as possible + * without regard to freeing memory. This mode should be chosen only + * when it is known that many allocations will occur but that very + * little of the allocated memory will be explicitly freed. * - * "Tunable" mode is a hybrid of dynamic and static modes. The - * tunable mode will use static mode allocation except when the - * allocation request exceeds a size limit supplied at the time of set - * initialization. "Big" objects are allocated using dynamic mode. + * "Tunable" mode is a hybrid of dynamic and static modes. The + * tunable mode will use static mode allocation except when the + * allocation request exceeds a size limit supplied at the time of set + * initialization. "Big" objects are allocated using dynamic mode. * - * "Bounded" mode attempts to allocate space efficiently given a limit - * on space consumed by the allocation set. This restriction can be - * considered a "soft" restriction, because memory segments will - * continue to be returned after the limit is exceeded. The limit is - * specified at the time of set initialization like for tunable mode. + * "Bounded" mode attempts to allocate space efficiently given a limit + * on space consumed by the allocation set. This restriction can be + * considered a "soft" restriction, because memory segments will + * continue to be returned after the limit is exceeded. The limit is + * specified at the time of set initialization like for tunable mode. * * Note: - * Allocation sets are not automatically reset on a system reset. - * Higher level code is responsible for cleaning up. + * Allocation sets are not automatically reset on a system reset. + * Higher level code is responsible for cleaning up. * - * There may other modes in the future. + * There may other modes in the future. */ /* * AllocPointer -- - * Aligned pointer which may be a member of an allocation set. + * Aligned pointer which may be a member of an allocation set. */ typedef Pointer AllocPointer; /* * AllocMode -- - * Mode of allocation for an allocation set. + * Mode of allocation for an allocation set. * * Note: - * See above for a description of the various nodes. + * See above for a description of the various nodes. */ -typedef enum AllocMode { - DynamicAllocMode, /* always dynamically allocate */ - StaticAllocMode, /* always "statically" allocate */ - TunableAllocMode, /* allocations are "tuned" */ - BoundedAllocMode /* allocations bounded to fixed usage */ -} AllocMode; +typedef enum AllocMode +{ + DynamicAllocMode, /* always dynamically allocate */ + StaticAllocMode, /* always "statically" allocate */ + TunableAllocMode, /* allocations are "tuned" */ + BoundedAllocMode /* allocations bounded to fixed usage */ +} AllocMode; -#define DefaultAllocMode DynamicAllocMode +#define DefaultAllocMode DynamicAllocMode /* * AllocSet -- - * Allocation set. + * Allocation set. */ -typedef struct AllocSetData { - OrderedSetData setData; +typedef struct AllocSetData +{ + OrderedSetData setData; /* Note: this will change in the future to support other modes */ -} AllocSetData; +} AllocSetData; typedef AllocSetData *AllocSet; /* * AllocPointerIsValid -- - * True iff pointer is valid allocation pointer. + * True iff pointer is valid allocation pointer. */ #define AllocPointerIsValid(pointer) PointerIsValid(pointer) /* * AllocSetIsValid -- - * True iff set is valid allocation set. + * True iff set is valid allocation set. */ -#define AllocSetIsValid(set) PointerIsValid(set) +#define AllocSetIsValid(set) PointerIsValid(set) -extern void AllocSetInit(AllocSet set, AllocMode mode, Size limit); +extern void AllocSetInit(AllocSet set, AllocMode mode, Size limit); -extern void AllocSetReset(AllocSet set); +extern void AllocSetReset(AllocSet set); -extern bool AllocSetContains(AllocSet set, AllocPointer pointer); +extern bool AllocSetContains(AllocSet set, AllocPointer pointer); extern AllocPointer AllocSetAlloc(AllocSet set, Size size); -extern void AllocSetFree(AllocSet set, AllocPointer pointer); -extern AllocPointer AllocSetRealloc(AllocSet set, AllocPointer pointer, - Size size); +extern void AllocSetFree(AllocSet set, AllocPointer pointer); +extern AllocPointer +AllocSetRealloc(AllocSet set, AllocPointer pointer, + Size size); -extern void AllocSetDump(AllocSet set); +extern void AllocSetDump(AllocSet set); /***************************************************************************** - * clib.h -- Standard C library definitions * + * clib.h -- Standard C library definitions * *****************************************************************************/ /* * Note: - * This file is OPERATING SYSTEM dependent!!! + * This file is OPERATING SYSTEM dependent!!! * */ -/* - * LibCCopyLength is only used within this file. -cim 6/12/90 - * +/* + * LibCCopyLength is only used within this file. -cim 6/12/90 + * */ -typedef int LibCCopyLength; +typedef int LibCCopyLength; /* * MemoryCopy -- - * Copies fixed length block of memory to another. + * Copies fixed length block of memory to another. */ #define MemoryCopy(toBuffer, fromBuffer, length)\ - memcpy(toBuffer, fromBuffer, length) + memcpy(toBuffer, fromBuffer, length) /***************************************************************************** - * limit.h -- POSTGRES limit definitions. * + * limit.h -- POSTGRES limit definitions. * *****************************************************************************/ #define MaxBitsPerByte 8 typedef uint32 AttributeSize; /* XXX should be defined elsewhere */ -#define MaxHeapTupleSize 0x7fffffff -#define MaxAttributeSize 0x7fffffff +#define MaxHeapTupleSize 0x7fffffff +#define MaxAttributeSize 0x7fffffff -#define MaxIndexAttributeNumber 7 +#define MaxIndexAttributeNumber 7 -#endif /* MEMUTILS_H */ +#endif /* MEMUTILS_H */ diff --git a/src/include/utils/module.h b/src/include/utils/module.h index 6c5d77d6ada..cadff1aa6c3 100644 --- a/src/include/utils/module.h +++ b/src/include/utils/module.h @@ -1,25 +1,25 @@ /*------------------------------------------------------------------------- * * module.h-- - * this file contains general "module" stuff that used to be - * spread out between the following files: + * this file contains general "module" stuff that used to be + * spread out between the following files: * - * enbl.h module enable stuff - * trace.h module trace stuff (now gone) + * enbl.h module enable stuff + * trace.h module trace stuff (now gone) * * * Copyright (c) 1994, Regents of the University of California * - * $Id: module.h,v 1.1 1996/08/28 01:59:12 scrappy Exp $ + * $Id: module.h,v 1.2 1997/09/07 05:02:44 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef MODULE_H #define MODULE_H -/* - * prototypes for functions in init/enbl.c +/* + * prototypes for functions in init/enbl.c */ -extern bool BypassEnable(int *enableCountInOutP, bool on); +extern bool BypassEnable(int *enableCountInOutP, bool on); -#endif /* MODULE_H */ +#endif /* MODULE_H */ diff --git a/src/include/utils/nabstime.h b/src/include/utils/nabstime.h index 4db0fefa50c..5372501bcb0 100644 --- a/src/include/utils/nabstime.h +++ b/src/include/utils/nabstime.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * nabstime.h-- - * Definitions for the "new" abstime code. + * Definitions for the "new" abstime code. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: nabstime.h,v 1.10 1997/08/19 21:40:47 momjian Exp $ + * $Id: nabstime.h,v 1.11 1997/09/07 05:02:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,7 +18,7 @@ /* ---------------------------------------------------------------- - * time types + support macros + * time types + support macros * * * ---------------------------------------------------------------- @@ -26,92 +26,98 @@ typedef int32 AbsoluteTime; typedef int32 RelativeTime; -typedef struct { - int32 status; - AbsoluteTime data[2]; -} TimeIntervalData; +typedef struct +{ + int32 status; + AbsoluteTime data[2]; +} TimeIntervalData; typedef TimeIntervalData *TimeInterval; /* * Reserved values * Epoch is Unix system time zero, but needs to be kept as a reserved - * value rather than converting to time since timezone calculations - * might move it away from 1970-01-01 00:00:00Z - tgl 97/02/20 + * value rather than converting to time since timezone calculations + * might move it away from 1970-01-01 00:00:00Z - tgl 97/02/20 * * Pre-v6.1 code had large decimal numbers for reserved values. * These were chosen as special 32-bit bit patterns, - * so redefine them explicitly using these bit patterns. - tgl 97/02/24 + * so redefine them explicitly using these bit patterns. - tgl 97/02/24 */ #define EPOCH_ABSTIME ((AbsoluteTime) 0) -#define INVALID_ABSTIME ((AbsoluteTime) 0x7FFFFFFE) /* 2147483647 == 2^31 - 1 */ -#define CURRENT_ABSTIME ((AbsoluteTime) 0x7FFFFFFD) /* 2147483646 == 2^31 - 2 */ -#define NOEND_ABSTIME ((AbsoluteTime) 0x7FFFFFFC) /* 2147483645 == 2^31 - 3 */ -#define BIG_ABSTIME ((AbsoluteTime) 0x7FFFFFFB) /* 2147483644 == 2^31 - 4 */ +#define INVALID_ABSTIME ((AbsoluteTime) 0x7FFFFFFE) /* 2147483647 == 2^31 - + * 1 */ +#define CURRENT_ABSTIME ((AbsoluteTime) 0x7FFFFFFD) /* 2147483646 == 2^31 - + * 2 */ +#define NOEND_ABSTIME ((AbsoluteTime) 0x7FFFFFFC) /* 2147483645 == 2^31 - + * 3 */ +#define BIG_ABSTIME ((AbsoluteTime) 0x7FFFFFFB) /* 2147483644 == 2^31 - + * 4 */ #if defined(aix) /* * AIX considers 2147483648 == -2147483648 (since they have the same bit - * representation) but uses a different sign sense in a comparison to - * these integer constants depending on whether the constant is signed + * representation) but uses a different sign sense in a comparison to + * these integer constants depending on whether the constant is signed * or not! */ -#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN) +#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN) #else -#define NOSTART_ABSTIME ((AbsoluteTime) 0x80000001) /* -2147483647 == - 2^31 */ -#endif /* aix */ +#define NOSTART_ABSTIME ((AbsoluteTime) 0x80000001) /* -2147483647 == - 2^31 */ +#endif /* aix */ -#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 == 2^31 - 1 */ +#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 == 2^31 - + * 1 */ #define AbsoluteTimeIsValid(time) \ - ((bool) ((time) != INVALID_ABSTIME)) + ((bool) ((time) != INVALID_ABSTIME)) #define AbsoluteTimeIsReal(time) \ - ((bool) (((AbsoluteTime) time) < NOEND_ABSTIME && \ - ((AbsoluteTime) time) > NOSTART_ABSTIME)) + ((bool) (((AbsoluteTime) time) < NOEND_ABSTIME && \ + ((AbsoluteTime) time) > NOSTART_ABSTIME)) /* have to include this because EPOCH_ABSTIME used to be invalid - yuk */ #define AbsoluteTimeIsBackwardCompatiblyValid(time) \ - ((bool) (((AbsoluteTime) time) != INVALID_ABSTIME && \ - ((AbsoluteTime) time) > EPOCH_ABSTIME)) + ((bool) (((AbsoluteTime) time) != INVALID_ABSTIME && \ + ((AbsoluteTime) time) > EPOCH_ABSTIME)) #define AbsoluteTimeIsBackwardCompatiblyReal(time) \ - ((bool) (((AbsoluteTime) time) < NOEND_ABSTIME && \ - ((AbsoluteTime) time) > NOSTART_ABSTIME && \ - ((AbsoluteTime) time) > EPOCH_ABSTIME)) + ((bool) (((AbsoluteTime) time) < NOEND_ABSTIME && \ + ((AbsoluteTime) time) > NOSTART_ABSTIME && \ + ((AbsoluteTime) time) > EPOCH_ABSTIME)) #define RelativeTimeIsValid(time) \ - ((bool) (((RelativeTime) time) != INVALID_RELTIME)) + ((bool) (((RelativeTime) time) != INVALID_RELTIME)) extern AbsoluteTime GetCurrentAbsoluteTime(void); /* * getSystemTime -- - * Returns system time. + * Returns system time. */ #define getSystemTime() \ - ((time_t) (time(0l))) + ((time_t) (time(0l))) /* - * nabstime.c prototypes + * nabstime.c prototypes */ extern AbsoluteTime nabstimein(char *timestr); -extern char *nabstimeout(AbsoluteTime time); +extern char *nabstimeout(AbsoluteTime time); -extern bool abstimeeq(AbsoluteTime t1, AbsoluteTime t2); -extern bool abstimene(AbsoluteTime t1, AbsoluteTime t2); -extern bool abstimelt(AbsoluteTime t1, AbsoluteTime t2); -extern bool abstimegt(AbsoluteTime t1, AbsoluteTime t2); -extern bool abstimele(AbsoluteTime t1, AbsoluteTime t2); -extern bool abstimege(AbsoluteTime t1, AbsoluteTime t2); -extern bool abstime_finite(AbsoluteTime time); +extern bool abstimeeq(AbsoluteTime t1, AbsoluteTime t2); +extern bool abstimene(AbsoluteTime t1, AbsoluteTime t2); +extern bool abstimelt(AbsoluteTime t1, AbsoluteTime t2); +extern bool abstimegt(AbsoluteTime t1, AbsoluteTime t2); +extern bool abstimele(AbsoluteTime t1, AbsoluteTime t2); +extern bool abstimege(AbsoluteTime t1, AbsoluteTime t2); +extern bool abstime_finite(AbsoluteTime time); -extern AbsoluteTime datetime_abstime(DateTime *datetime); +extern AbsoluteTime datetime_abstime(DateTime * datetime); extern DateTime *abstime_datetime(AbsoluteTime abstime); -extern bool AbsoluteTimeIsBefore(AbsoluteTime time1, AbsoluteTime time2); -extern bool AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2); +extern bool AbsoluteTimeIsBefore(AbsoluteTime time1, AbsoluteTime time2); +extern bool AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2); -extern void abstime2tm(AbsoluteTime time, int *tzp, struct tm *tm, char *tzn); +extern void abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn); -#endif /* NABSTIME_H */ +#endif /* NABSTIME_H */ diff --git a/src/include/utils/oidcompos.h b/src/include/utils/oidcompos.h index 290fb08ee65..f4980051f05 100644 --- a/src/include/utils/oidcompos.h +++ b/src/include/utils/oidcompos.h @@ -1,52 +1,52 @@ /*------------------------------------------------------------------------- * * oidcompos.h-- - * prototype file for the oid {char16,int4} composite type functions. + * prototype file for the oid {char16,int4} composite type functions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: oidcompos.h,v 1.1 1996/08/28 01:59:15 scrappy Exp $ + * $Id: oidcompos.h,v 1.2 1997/09/07 05:02:47 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef OIDCOMPOS_H +#ifndef OIDCOMPOS_H #define OIDCOMPOS_H /* oidint4.c */ -OidInt4 oidint4in(char *o); -char *oidint4out(OidInt4 o); -bool oidint4lt(OidInt4 o1, OidInt4 o2); -bool oidint4le(OidInt4 o1, OidInt4 o2); -bool oidint4eq(OidInt4 o1, OidInt4 o2); -bool oidint4ge(OidInt4 o1, OidInt4 o2); -bool oidint4gt(OidInt4 o1, OidInt4 o2); -bool oidint4ne(OidInt4 o1, OidInt4 o2); -int oidint4cmp(OidInt4 o1, OidInt4 o2); -OidInt4 mkoidint4(Oid v_oid, uint32 v_int4); +OidInt4 oidint4in(char *o); +char *oidint4out(OidInt4 o); +bool oidint4lt(OidInt4 o1, OidInt4 o2); +bool oidint4le(OidInt4 o1, OidInt4 o2); +bool oidint4eq(OidInt4 o1, OidInt4 o2); +bool oidint4ge(OidInt4 o1, OidInt4 o2); +bool oidint4gt(OidInt4 o1, OidInt4 o2); +bool oidint4ne(OidInt4 o1, OidInt4 o2); +int oidint4cmp(OidInt4 o1, OidInt4 o2); +OidInt4 mkoidint4(Oid v_oid, uint32 v_int4); /* oidint2.c */ -OidInt2 oidint2in(char *o); -char *oidint2out(OidInt2 o); -bool oidint2lt(OidInt2 o1, OidInt2 o2); -bool oidint2le(OidInt2 o1, OidInt2 o2); -bool oidint2eq(OidInt2 o1, OidInt2 o2); -bool oidint2ge(OidInt2 o1, OidInt2 o2); -bool oidint2gt(OidInt2 o1, OidInt2 o2); -bool oidint2ne(OidInt2 o1, OidInt2 o2); -int oidint2cmp(OidInt2 o1, OidInt2 o2); -OidInt2 mkoidint2(Oid v_oid, uint16 v_int2); +OidInt2 oidint2in(char *o); +char *oidint2out(OidInt2 o); +bool oidint2lt(OidInt2 o1, OidInt2 o2); +bool oidint2le(OidInt2 o1, OidInt2 o2); +bool oidint2eq(OidInt2 o1, OidInt2 o2); +bool oidint2ge(OidInt2 o1, OidInt2 o2); +bool oidint2gt(OidInt2 o1, OidInt2 o2); +bool oidint2ne(OidInt2 o1, OidInt2 o2); +int oidint2cmp(OidInt2 o1, OidInt2 o2); +OidInt2 mkoidint2(Oid v_oid, uint16 v_int2); /* oidname.c */ -OidName oidnamein(char *inStr); -char *oidnameout(OidName oidname); -bool oidnamelt(OidName o1, OidName o2); -bool oidnamele(OidName o1, OidName o2); -bool oidnameeq(OidName o1, OidName o2); -bool oidnamene(OidName o1, OidName o2); -bool oidnamege(OidName o1, OidName o2); -bool oidnamegt(OidName o1, OidName o2); -int oidnamecmp(OidName o1, OidName o2); -OidName mkoidname(Oid id, char *name); +OidName oidnamein(char *inStr); +char *oidnameout(OidName oidname); +bool oidnamelt(OidName o1, OidName o2); +bool oidnamele(OidName o1, OidName o2); +bool oidnameeq(OidName o1, OidName o2); +bool oidnamene(OidName o1, OidName o2); +bool oidnamege(OidName o1, OidName o2); +bool oidnamegt(OidName o1, OidName o2); +int oidnamecmp(OidName o1, OidName o2); +OidName mkoidname(Oid id, char *name); -#endif /* OIDCOMPOS_H */ +#endif /* OIDCOMPOS_H */ diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h index 02c7b9ab257..b4a35db9795 100644 --- a/src/include/utils/palloc.h +++ b/src/include/utils/palloc.h @@ -1,26 +1,25 @@ /*------------------------------------------------------------------------- * * palloc.h-- - * POSTGRES memory allocator definitions. + * POSTGRES memory allocator definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: palloc.h,v 1.3 1996/11/26 03:20:23 bryanh Exp $ + * $Id: palloc.h,v 1.4 1997/09/07 05:02:49 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PALLOC_H +#ifndef PALLOC_H #define PALLOC_H #include <c.h> -extern void* palloc(Size size); -extern void pfree(void *pointer); -extern void *repalloc(void *pointer, Size size); +extern void *palloc(Size size); +extern void pfree(void *pointer); +extern void *repalloc(void *pointer, Size size); /* like strdup except uses palloc */ -extern char* pstrdup(char* pointer); - -#endif /* PALLOC_H */ +extern char *pstrdup(char *pointer); +#endif /* PALLOC_H */ diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index 49f907c3f0b..07edce974ef 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -1,28 +1,28 @@ /*------------------------------------------------------------------------- * * portal.h-- - * POSTGRES portal definitions. + * POSTGRES portal definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: portal.h,v 1.4 1997/08/19 21:40:48 momjian Exp $ + * $Id: portal.h,v 1.5 1997/09/07 05:02:51 momjian Exp $ * *------------------------------------------------------------------------- */ /* * Note: - * A portal is an abstraction which represents the execution state of + * A portal is an abstraction which represents the execution state of * a running query (or a fixed sequence of queries). The "blank portal" is * a portal with an InvalidName. This blank portal is in existance except * between calls to BlankPortalAssignName and GetPortalByName(NULL). * * Note: - * now that PQ calls can be made from within a backend, a portal - * may also be used to keep track of the tuples resulting - * from the execution of a query. In this case, entryIndex + * now that PQ calls can be made from within a backend, a portal + * may also be used to keep track of the tuples resulting + * from the execution of a query. In this case, entryIndex */ -#ifndef PORTAL_H +#ifndef PORTAL_H #define PORTAL_H #include <executor/execdesc.h> @@ -30,58 +30,61 @@ #include <nodes/memnodes.h> #include <utils/memutils.h> -typedef struct PortalBlockData { - AllocSetData setData; - FixedItemData itemData; -} PortalBlockData; +typedef struct PortalBlockData +{ + AllocSetData setData; + FixedItemData itemData; +} PortalBlockData; -typedef PortalBlockData *PortalBlock; +typedef PortalBlockData *PortalBlock; -typedef struct PortalD PortalD; -typedef PortalD *Portal; +typedef struct PortalD PortalD; +typedef PortalD *Portal; -struct PortalD { - char *name; /* XXX PortalName */ - struct PortalVariableMemory variable; - struct PortalHeapMemory heap; - QueryDesc *queryDesc; - TupleDesc attinfo; - EState *state; - void (*cleanup)(Portal); +struct PortalD +{ + char *name; /* XXX PortalName */ + struct PortalVariableMemory variable; + struct PortalHeapMemory heap; + QueryDesc *queryDesc; + TupleDesc attinfo; + EState *state; + void (*cleanup) (Portal); }; /* * PortalIsValid -- - * True iff portal is valid. + * True iff portal is valid. */ -#define PortalIsValid(p) PointerIsValid(p) +#define PortalIsValid(p) PointerIsValid(p) /* * Special portals (well, their names anyway) */ -#define VACPNAME "<vacuum>" +#define VACPNAME "<vacuum>" -extern bool PortalNameIsSpecial(char *pname); -extern void AtEOXact_portals(void); -extern void EnablePortalManager(bool on); -extern Portal GetPortalByName(char *name); -extern Portal BlankPortalAssignName(char *name); -extern void PortalSetQuery(Portal portal, QueryDesc *queryDesc, - TupleDesc attinfo, EState *state, - void (*cleanup)(Portal portal)); +extern bool PortalNameIsSpecial(char *pname); +extern void AtEOXact_portals(void); +extern void EnablePortalManager(bool on); +extern Portal GetPortalByName(char *name); +extern Portal BlankPortalAssignName(char *name); +extern void +PortalSetQuery(Portal portal, QueryDesc * queryDesc, + TupleDesc attinfo, EState * state, + void (*cleanup) (Portal portal)); extern QueryDesc *PortalGetQueryDesc(Portal portal); -extern EState *PortalGetState(Portal portal); -extern Portal CreatePortal(char *name); -extern void PortalDestroy(Portal *portalP); -extern void StartPortalAllocMode(AllocMode mode, Size limit); -extern void EndPortalAllocMode(void); +extern EState *PortalGetState(Portal portal); +extern Portal CreatePortal(char *name); +extern void PortalDestroy(Portal * portalP); +extern void StartPortalAllocMode(AllocMode mode, Size limit); +extern void EndPortalAllocMode(void); extern PortalVariableMemory PortalGetVariableMemory(Portal portal); extern PortalHeapMemory PortalGetHeapMemory(Portal portal); /* estimate of the maximum number of open portals a user would have, - * used in initially sizing the PortalHashTable in EnablePortalManager() + * used in initially sizing the PortalHashTable in EnablePortalManager() */ -#define PORTALS_PER_USER 10 +#define PORTALS_PER_USER 10 -#endif /* PORTAL_H */ +#endif /* PORTAL_H */ diff --git a/src/include/utils/psort.h b/src/include/utils/psort.h index d7f979c8ff7..fe5e0b2f357 100644 --- a/src/include/utils/psort.h +++ b/src/include/utils/psort.h @@ -1,67 +1,71 @@ /*------------------------------------------------------------------------- * * psort.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: psort.h,v 1.7 1997/08/19 21:40:48 momjian Exp $ + * $Id: psort.h,v 1.8 1997/09/07 05:02:53 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef PSORT_H -#define PSORT_H +#ifndef PSORT_H +#define PSORT_H #include <stdio.h> #include "access/relscan.h" #include "utils/lselect.h" #include "nodes/plannodes.h" -#define MAXTAPES 7 /* 7--See Fig. 70, p273 */ -#define TAPEEXTLEN strlen("pg_psort.xxxxx.xxx") /* TEMPDIR/TAPEEXT */ -#define FREE(x) pfree((char *) x) +#define MAXTAPES 7 /* 7--See Fig. 70, p273 */ +#define TAPEEXTLEN strlen("pg_psort.xxxxx.xxx") /* TEMPDIR/TAPEEXT */ +#define FREE(x) pfree((char *) x) -struct tape { - int tp_dummy; /* (D) */ - int tp_fib; /* (A) */ - FILE *tp_file; /* (TAPE) */ - struct tape *tp_prev; +struct tape +{ + int tp_dummy; /* (D) */ + int tp_fib; /* (A) */ + FILE *tp_file; /* (TAPE) */ + struct tape *tp_prev; }; -struct cmplist { - int cp_attn; /* attribute number */ - int cp_num; /* comparison function code */ - int cp_rev; /* invert comparison flag */ - struct cmplist *cp_next; /* next in chain */ +struct cmplist +{ + int cp_attn; /* attribute number */ + int cp_num; /* comparison function code */ + int cp_rev; /* invert comparison flag */ + struct cmplist *cp_next; /* next in chain */ }; /* This structure preserves the state of psort between calls from different * nodes to its interface functions. Basically, it includes all of the global * variables in psort. In case you were wondering, pointers to these structures - * are included in Sort node structures. -Rex 2.6.1995 + * are included in Sort node structures. -Rex 2.6.1995 */ -typedef struct Psortstate { - LeftistContextData treeContext; +typedef struct Psortstate +{ + LeftistContextData treeContext; - int TapeRange; - int Level; - int TotalDummy; - struct tape Tape[MAXTAPES]; + int TapeRange; + int Level; + int TotalDummy; + struct tape Tape[MAXTAPES]; - int BytesRead; - int BytesWritten; - int tupcount; + int BytesRead; + int BytesWritten; + int tupcount; - struct leftist *Tuples; + struct leftist *Tuples; - FILE *psort_grab_file; - long psort_current; /* could be file offset, or array index */ - long psort_saved; /* could be file offset, or array index */ - bool using_tape_files; + FILE *psort_grab_file; + long psort_current; /* could be file offset, or array + * index */ + long psort_saved;/* could be file offset, or array index */ + bool using_tape_files; - HeapTuple *memtuples; -} Psortstate; + HeapTuple *memtuples; +} Psortstate; #ifdef EBUG #include <stdio.h> @@ -69,36 +73,36 @@ typedef struct Psortstate { #include "storage/buf.h" #include "storage/bufmgr.h" -#define PDEBUG(PROC, S1)\ +#define PDEBUG(PROC, S1)\ elog(DEBUG, "%s:%d>> PROC: %s.", __FILE__, __LINE__, S1) -#define PDEBUG2(PROC, S1, D1)\ +#define PDEBUG2(PROC, S1, D1)\ elog(DEBUG, "%s:%d>> PROC: %s %d.", __FILE__, __LINE__, S1, D1) -#define PDEBUG4(PROC, S1, D1, S2, D2)\ +#define PDEBUG4(PROC, S1, D1, S2, D2)\ elog(DEBUG, "%s:%d>> PROC: %s %d, %s %d.", __FILE__, __LINE__, S1, D1, S2, D2) -#define VDEBUG(VAR, FMT)\ +#define VDEBUG(VAR, FMT)\ elog(DEBUG, "%s:%d>> VAR =FMT", __FILE__, __LINE__, VAR) -#define ASSERT(EXPR, STR)\ +#define ASSERT(EXPR, STR)\ if (!(EXPR)) elog(FATAL, "%s:%d>> %s", __FILE__, __LINE__, STR) -#define TRACE(VAL, CODE)\ +#define TRACE(VAL, CODE)\ if (1) CODE; else #else -#define PDEBUG(MSG) -#define VDEBUG(VAR, FMT) -#define ASSERT(EXPR, MSG) -#define TRACE(VAL, CODE) +#define PDEBUG(MSG) +#define VDEBUG(VAR, FMT) +#define ASSERT(EXPR, MSG) +#define TRACE(VAL, CODE) #endif /* psort.c */ -extern bool psort_begin(Sort *node, int nkeys, ScanKey key); -extern HeapTuple psort_grabtuple(Sort *node); -extern void psort_markpos(Sort *node); -extern void psort_restorepos(Sort *node); -extern void psort_end(Sort *node); +extern bool psort_begin(Sort * node, int nkeys, ScanKey key); +extern HeapTuple psort_grabtuple(Sort * node); +extern void psort_markpos(Sort * node); +extern void psort_restorepos(Sort * node); +extern void psort_end(Sort * node); -#endif /* PSORT_H */ +#endif /* PSORT_H */ diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 19f9ab138d2..31dcb7401ab 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * rel.h-- - * POSTGRES relation descriptor definitions. + * POSTGRES relation descriptor definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rel.h,v 1.9 1997/09/04 13:26:45 vadim Exp $ + * $Id: rel.h,v 1.10 1997/09/07 05:02:54 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef REL_H +#ifndef REL_H #define REL_H #include <catalog/pg_am.h> @@ -20,134 +20,137 @@ #include <rewrite/prs2lock.h> #include <storage/fd.h> -typedef struct Trigger { - char *tgname; - Oid tgfoid; - func_ptr tgfunc; - int16 tgtype; - int16 tgnargs; - int16 tgattr[8]; - char **tgargs; -} Trigger; - -typedef struct TriggerDesc { - uint16 n_before_statement[4]; - uint16 n_before_row[4]; - uint16 n_after_row[4]; - uint16 n_after_statement[4]; - Trigger **tg_before_statement[4]; - Trigger **tg_before_row[4]; - Trigger **tg_after_row[4]; - Trigger **tg_after_statement[4]; - Trigger *triggers; -} TriggerDesc; - -typedef struct RelationData { - File rd_fd; /* open file descriptor */ - int rd_nblocks; /* number of blocks in rel */ - uint16 rd_refcnt; /* reference count */ - bool rd_islocal; /* uses the local buffer mgr */ - bool rd_isnailed; /* rel is nailed in cache */ - bool rd_istemp; /* rel is a temp rel */ - bool rd_tmpunlinked; /* temp rel already unlinked */ - Form_pg_am rd_am; /* AM tuple */ - Form_pg_class rd_rel; /* RELATION tuple */ - Oid rd_id; /* relations's object id */ - Pointer lockInfo; /* ptr. to misc. info. */ - TupleDesc rd_att; /* tuple desciptor */ - RuleLock *rd_rules; /* rewrite rules */ - IndexStrategy rd_istrat; - RegProcedure* rd_support; - TriggerDesc *trigdesc; -} RelationData; - -typedef RelationData *Relation; +typedef struct Trigger +{ + char *tgname; + Oid tgfoid; + func_ptr tgfunc; + int16 tgtype; + int16 tgnargs; + int16 tgattr[8]; + char **tgargs; +} Trigger; + +typedef struct TriggerDesc +{ + uint16 n_before_statement[4]; + uint16 n_before_row[4]; + uint16 n_after_row[4]; + uint16 n_after_statement[4]; + Trigger **tg_before_statement[4]; + Trigger **tg_before_row[4]; + Trigger **tg_after_row[4]; + Trigger **tg_after_statement[4]; + Trigger *triggers; +} TriggerDesc; + +typedef struct RelationData +{ + File rd_fd; /* open file descriptor */ + int rd_nblocks; /* number of blocks in rel */ + uint16 rd_refcnt; /* reference count */ + bool rd_islocal; /* uses the local buffer mgr */ + bool rd_isnailed;/* rel is nailed in cache */ + bool rd_istemp; /* rel is a temp rel */ + bool rd_tmpunlinked; /* temp rel already unlinked */ + Form_pg_am rd_am; /* AM tuple */ + Form_pg_class rd_rel; /* RELATION tuple */ + Oid rd_id; /* relations's object id */ + Pointer lockInfo; /* ptr. to misc. info. */ + TupleDesc rd_att; /* tuple desciptor */ + RuleLock *rd_rules; /* rewrite rules */ + IndexStrategy rd_istrat; + RegProcedure *rd_support; + TriggerDesc *trigdesc; +} RelationData; + +typedef RelationData *Relation; /* ---------------- - * RelationPtr is used in the executor to support index scans - * where we have to keep track of several index relations in an - * array. -cim 9/10/89 + * RelationPtr is used in the executor to support index scans + * where we have to keep track of several index relations in an + * array. -cim 9/10/89 * ---------------- */ -typedef Relation *RelationPtr; +typedef Relation *RelationPtr; -#define InvalidRelation ((Relation)NULL) +#define InvalidRelation ((Relation)NULL) typedef char ArchiveMode; /* * RelationIsValid -- - * True iff relation descriptor is valid. + * True iff relation descriptor is valid. */ -#define RelationIsValid(relation) PointerIsValid(relation) +#define RelationIsValid(relation) PointerIsValid(relation) /* * RelationGetSystemPort -- - * Returns system port of a relation. + * Returns system port of a relation. * * Note: - * Assumes relation descriptor is valid. + * Assumes relation descriptor is valid. */ #define RelationGetSystemPort(relation) ((relation)->rd_fd) /* * RelationGetLockInfo -- - * Returns the lock information structure in the reldesc + * Returns the lock information structure in the reldesc * */ #define RelationGetLockInfo(relation) ((relation)->lockInfo) /* * RelationHasReferenceCountZero -- - * True iff relation reference count is zero. + * True iff relation reference count is zero. * * Note: - * Assumes relation descriptor is valid. + * Assumes relation descriptor is valid. */ #define RelationHasReferenceCountZero(relation) \ - ((bool)((relation)->rd_refcnt == 0)) + ((bool)((relation)->rd_refcnt == 0)) /* * RelationSetReferenceCount -- - * Sets relation reference count. + * Sets relation reference count. */ #define RelationSetReferenceCount(relation,count) ((relation)->rd_refcnt = count) /* * RelationIncrementReferenceCount -- - * Increments relation reference count. + * Increments relation reference count. */ #define RelationIncrementReferenceCount(relation) ((relation)->rd_refcnt += 1); /* * RelationDecrementReferenceCount -- - * Decrements relation reference count. + * Decrements relation reference count. */ #define RelationDecrementReferenceCount(relation) ((relation)->rd_refcnt -= 1) /* * RelationGetAccessMethodTupleForm -- - * Returns access method attribute values for a relation. + * Returns access method attribute values for a relation. * * Note: - * Assumes relation descriptor is valid. + * Assumes relation descriptor is valid. */ #define RelationGetAccessMethodTupleForm(relation) ((relation)->rd_am) /* * RelationGetRelationTupleForm -- - * Returns relation attribute values for a relation. + * Returns relation attribute values for a relation. * * Note: - * Assumes relation descriptor is valid. + * Assumes relation descriptor is valid. */ #define RelationGetRelationTupleForm(relation) ((relation)->rd_rel) -/* +/* * RelationGetRelationId -- * - * returns the object id of the relation + * returns the object id of the relation * */ #define RelationGetRelationId(relation) ((relation)->rd_id) @@ -155,7 +158,7 @@ typedef char ArchiveMode; /* * RelationGetFile -- * - * Returns the open File decscriptor + * Returns the open File decscriptor */ #define RelationGetFile(relation) ((relation)->rd_fd) @@ -163,28 +166,30 @@ typedef char ArchiveMode; /* * RelationGetRelationName -- * - * Returns a Relation Name + * Returns a Relation Name */ #define RelationGetRelationName(relation) (&(relation)->rd_rel->relname) /* * RelationGetRelationName -- * - * Returns a the number of attributes. + * Returns a the number of attributes. */ #define RelationGetNumberOfAttributes(relation) ((relation)->rd_rel->relnatts) /* * RelationGetTupleDescriptor -- - * Returns tuple descriptor for a relation. + * Returns tuple descriptor for a relation. * * Note: - * Assumes relation descriptor is valid. + * Assumes relation descriptor is valid. */ #define RelationGetTupleDescriptor(relation) ((relation)->rd_att) extern IndexStrategy RelationGetIndexStrategy(Relation relation); -extern void RelationSetIndexSupport(Relation relation, IndexStrategy strategy, - RegProcedure *support); -#endif /* REL_H */ +extern void +RelationSetIndexSupport(Relation relation, IndexStrategy strategy, + RegProcedure * support); + +#endif /* REL_H */ diff --git a/src/include/utils/rel2.h b/src/include/utils/rel2.h index bee0c78b8fb..19873d34e28 100644 --- a/src/include/utils/rel2.h +++ b/src/include/utils/rel2.h @@ -1,23 +1,24 @@ /*------------------------------------------------------------------------- * * rel2.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: rel2.h,v 1.2 1996/11/04 11:51:25 scrappy Exp $ + * $Id: rel2.h,v 1.3 1997/09/07 05:02:58 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef TMP_REL2_H -#define TMP_REL2_H +#ifndef TMP_REL2_H +#define TMP_REL2_H #include <utils/rel.h> extern IndexStrategy RelationGetIndexStrategy(Relation relation); -extern void RelationSetIndexSupport(Relation relation, IndexStrategy strategy, - RegProcedure *support); +extern void +RelationSetIndexSupport(Relation relation, IndexStrategy strategy, + RegProcedure * support); -#endif /* TMP_REL2_H */ +#endif /* TMP_REL2_H */ diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index 7b1a0c2196b..984d0cc63ae 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -1,16 +1,16 @@ /*------------------------------------------------------------------------- * * relcache.h-- - * Relation descriptor cache definitions. + * Relation descriptor cache definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: relcache.h,v 1.6 1997/08/19 21:40:49 momjian Exp $ + * $Id: relcache.h,v 1.7 1997/09/07 05:03:00 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef RELCACHE_H +#ifndef RELCACHE_H #define RELCACHE_H #include <utils/rel.h> @@ -22,17 +22,17 @@ extern Relation RelationIdCacheGetRelation(Oid relationId); extern Relation RelationIdGetRelation(Oid relationId); extern Relation RelationNameGetRelation(char *relationName); -extern void RelationClose(Relation relation); -extern void RelationForgetRelation(Oid rid); -extern void RelationIdInvalidateRelationCacheByRelationId(Oid relationId); +extern void RelationClose(Relation relation); +extern void RelationForgetRelation(Oid rid); +extern void RelationIdInvalidateRelationCacheByRelationId(Oid relationId); -extern void -RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId); +extern void + RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId); -extern void RelationCacheInvalidate(bool onlyFlushReferenceCountZero); +extern void RelationCacheInvalidate(bool onlyFlushReferenceCountZero); -extern void RelationRegisterRelation(Relation relation); -extern void RelationPurgeLocalRelation(bool xactComitted); -extern void RelationInitialize(void); +extern void RelationRegisterRelation(Relation relation); +extern void RelationPurgeLocalRelation(bool xactComitted); +extern void RelationInitialize(void); -#endif /* RELCACHE_H */ +#endif /* RELCACHE_H */ diff --git a/src/include/utils/sets.h b/src/include/utils/sets.h index 4580f15a3dd..717989bdfe3 100644 --- a/src/include/utils/sets.h +++ b/src/include/utils/sets.h @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------- * * sets.h-- - * + * * * * Copyright (c) 1994, Regents of the University of California * - * $Id: sets.h,v 1.1 1996/08/28 01:59:25 scrappy Exp $ + * $Id: sets.h,v 1.2 1997/09/07 05:03:01 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ /* Temporary name of set, before SetDefine changes it. */ #define GENERICSETNAME "zyxset" -extern Oid SetDefine(char *querystr, char *typename); -extern int seteval(Oid funcoid); +extern Oid SetDefine(char *querystr, char *typename); +extern int seteval(Oid funcoid); -#endif /* SETS_H */ +#endif /* SETS_H */ diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 9de2b9d40a3..db830e3cd2f 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -1,90 +1,97 @@ /*------------------------------------------------------------------------- * * syscache.h-- - * System catalog cache definitions. + * System catalog cache definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: syscache.h,v 1.4 1996/11/04 11:51:27 scrappy Exp $ + * $Id: syscache.h,v 1.5 1997/09/07 05:03:02 momjian Exp $ * *------------------------------------------------------------------------- */ -#ifndef SYSCACHE_H +#ifndef SYSCACHE_H #define SYSCACHE_H #include <access/attnum.h> #include <access/htup.h> -/*#define CACHEDEBUG*/ /* turns DEBUG elogs on */ + /*#define CACHEDEBUG*//* turns DEBUG elogs on */ /* - * Declarations for util/syscache.c. + * Declarations for util/syscache.c. * - * SysCache identifiers. + * SysCache identifiers. * - * The order of these must match the order - * they are entered into the structure cacheinfo[] in syscache.c - * The best thing to do is to add yours at the END, because some - * code assumes that certain caches are at certain places in this - * array. + * The order of these must match the order + * they are entered into the structure cacheinfo[] in syscache.c + * The best thing to do is to add yours at the END, because some + * code assumes that certain caches are at certain places in this + * array. */ -#define AMOPOPID 0 -#define AMOPSTRATEGY 1 -#define ATTNAME 2 -#define ATTNUM 3 -#define INDEXRELID 4 -#define LANNAME 5 -#define OPRNAME 6 -#define OPROID 7 -#define PRONAME 8 -#define PROOID 9 -#define RELNAME 10 -#define RELOID 11 -#define TYPNAME 12 -#define TYPOID 13 -#define AMNAME 14 -#define CLANAME 15 -#define INDRELIDKEY 16 -#define INHRELID 17 -#define RULOID 18 -#define AGGNAME 19 -#define LISTENREL 20 -#define USENAME 21 -#define USESYSID 22 -#define GRONAME 23 -#define GROSYSID 24 -#define REWRITENAME 25 -#define PROSRC 26 -#define CLADEFTYPE 27 +#define AMOPOPID 0 +#define AMOPSTRATEGY 1 +#define ATTNAME 2 +#define ATTNUM 3 +#define INDEXRELID 4 +#define LANNAME 5 +#define OPRNAME 6 +#define OPROID 7 +#define PRONAME 8 +#define PROOID 9 +#define RELNAME 10 +#define RELOID 11 +#define TYPNAME 12 +#define TYPOID 13 +#define AMNAME 14 +#define CLANAME 15 +#define INDRELIDKEY 16 +#define INHRELID 17 +#define RULOID 18 +#define AGGNAME 19 +#define LISTENREL 20 +#define USENAME 21 +#define USESYSID 22 +#define GRONAME 23 +#define GROSYSID 24 +#define REWRITENAME 25 +#define PROSRC 26 +#define CLADEFTYPE 27 /* ---------------- - * struct cachedesc: information needed for a call to InitSysCache() + * struct cachedesc: information needed for a call to InitSysCache() * ---------------- */ -struct cachedesc { - char *name; /* this is Name * so that we can initialize it */ - int nkeys; - int key[4]; - int size; /* sizeof(appropriate struct) */ - char *indname; /* index relation for this cache, if exists */ - HeapTuple (*iScanFunc)(); /* function to handle index scans */ +struct cachedesc +{ + char *name; /* this is Name * so that we can + * initialize it */ + int nkeys; + int key[4]; + int size; /* sizeof(appropriate struct) */ + char *indname; /* index relation for this cache, if + * exists */ + HeapTuple(*iScanFunc) (); /* function to handle + * index scans */ }; -extern void zerocaches(void); -extern void InitCatalogCache(void); -extern HeapTuple SearchSysCacheTuple(int cacheId, Datum key1, Datum key2, - Datum key3, Datum key4); -extern int32 SearchSysCacheStruct(int cacheId, char *returnStruct, - Datum key1, Datum key2, Datum key3, Datum key4); -extern void *SearchSysCacheGetAttribute(int cacheId, - AttrNumber attributeNumber, - Datum key1, - Datum key2, - Datum key3, - Datum key4); -extern void *TypeDefaultRetrieve(Oid typId); +extern void zerocaches(void); +extern void InitCatalogCache(void); +extern HeapTuple +SearchSysCacheTuple(int cacheId, Datum key1, Datum key2, + Datum key3, Datum key4); +extern int32 +SearchSysCacheStruct(int cacheId, char *returnStruct, + Datum key1, Datum key2, Datum key3, Datum key4); +extern void * +SearchSysCacheGetAttribute(int cacheId, + AttrNumber attributeNumber, + Datum key1, + Datum key2, + Datum key3, + Datum key4); +extern void *TypeDefaultRetrieve(Oid typId); -#endif /* SYSCACHE_H */ +#endif /* SYSCACHE_H */ diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index 9c45ce0650c..a32ccb2ab13 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -1,43 +1,45 @@ /*------------------------------------------------------------------------- * * tqual.h-- - * POSTGRES time qualification definitions. + * POSTGRES time qualification definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: tqual.h,v 1.6 1997/08/19 21:40:50 momjian Exp $ + * $Id: tqual.h,v 1.7 1997/09/07 05:03:03 momjian Exp $ * * NOTE - * It may be desirable to allow time qualifications to indicate - * relative times. + * It may be desirable to allow time qualifications to indicate + * relative times. * *------------------------------------------------------------------------- */ -#ifndef TQUAL_H +#ifndef TQUAL_H #define TQUAL_H #include <access/htup.h> -typedef struct TimeQualSpace { - char data[12]; -} TimeQualSpace; +typedef struct TimeQualSpace +{ + char data[12]; +} TimeQualSpace; -typedef Pointer TimeQual; +typedef Pointer TimeQual; /* Tuples valid as of StartTransactionCommand */ -#define NowTimeQual ((TimeQual) NULL) +#define NowTimeQual ((TimeQual) NULL) /* As above, plus updates in this command */ -extern TimeQual SelfTimeQual; +extern TimeQual SelfTimeQual; -extern void setheapoverride(bool on); -extern bool heapisoverride(void); +extern void setheapoverride(bool on); +extern bool heapisoverride(void); extern TimeQual TimeFormSnapshotTimeQual(AbsoluteTime time); -extern TimeQual TimeFormRangedTimeQual(AbsoluteTime startTime, - AbsoluteTime endTime); -extern bool HeapTupleSatisfiesTimeQual(HeapTuple tuple, TimeQual qual); +extern TimeQual +TimeFormRangedTimeQual(AbsoluteTime startTime, + AbsoluteTime endTime); +extern bool HeapTupleSatisfiesTimeQual(HeapTuple tuple, TimeQual qual); -#endif /* TQUAL_H */ +#endif /* TQUAL_H */ diff --git a/src/include/version.h b/src/include/version.h index 927c11170d5..14920ffd378 100644 --- a/src/include/version.h +++ b/src/include/version.h @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------- * * version.h-- - * this file contains the interface to version.c. - * Also some parameters. + * this file contains the interface to version.c. + * Also some parameters. * - * $Id: version.h,v 1.2 1997/04/26 05:07:12 scrappy Exp $ + * $Id: version.h,v 1.3 1997/09/07 04:55:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -12,13 +12,13 @@ #define VERSION_H void -ValidatePgVersion(const char *path, char **reason_p); + ValidatePgVersion(const char *path, char **reason_p); void -SetPgVersion(const char *path, char **reason_p); + SetPgVersion(const char *path, char **reason_p); -#define PG_RELEASE 6 -#define PG_VERSION 1 -#define PG_VERFILE "PG_VERSION" +#define PG_RELEASE 6 +#define PG_VERSION 1 +#define PG_VERFILE "PG_VERSION" #endif |