1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-03 09:13:20 +03:00

Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.

This commit is contained in:
Bruce Momjian
1997-09-08 02:41:22 +00:00
parent a90f12fd9d
commit 319dbfa736
632 changed files with 28301 additions and 28220 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: attnum.h,v 1.5 1997/09/07 04:55:45 momjian Exp $
* $Id: attnum.h,v 1.6 1997/09/08 02:34:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,7 +17,7 @@
/*
* user defined attribute numbers start at 1. -ay 2/95
*/
typedef int16 AttrNumber;
typedef int16 AttrNumber;
#define InvalidAttrNumber 0

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: funcindex.h,v 1.3 1997/09/07 04:55:47 momjian Exp $
* $Id: funcindex.h,v 1.4 1997/09/08 02:34:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,11 +15,11 @@
typedef struct
{
int nargs;
Oid arglist[8];
Oid procOid;
NameData funcName;
} FuncIndexInfo;
int nargs;
Oid arglist[8];
Oid procOid;
NameData funcName;
} FuncIndexInfo;
typedef FuncIndexInfo *FuncIndexInfoPtr;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: genam.h,v 1.8 1997/09/07 04:55:48 momjian Exp $
* $Id: genam.h,v 1.9 1997/09/08 02:34:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,34 +24,34 @@
*/
extern Relation index_open(Oid relationId);
extern Relation index_openr(char *relationName);
extern void index_close(Relation relation);
extern InsertIndexResult
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
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
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
extern RegProcedure
index_getprocid(Relation irel, AttrNumber attnum,
uint16 procnum);
extern Datum
extern Datum
GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc,
int attOff, AttrNumber attrNums[], FuncIndexInfo * fInfo,
bool * attNull, Buffer buffer);
/* in genam.c */
extern IndexScanDesc
extern IndexScanDesc
RelationGetIndexScan(Relation relation, bool scanFromEnd,
uint16 numberOfKeys, ScanKey key);
extern void IndexScanMarkPosition(IndexScanDesc scan);
extern void IndexScanRestorePosition(IndexScanDesc scan);
extern void IndexScanMarkPosition(IndexScanDesc scan);
extern void IndexScanRestorePosition(IndexScanDesc scan);
#endif /* GENAM_H */

View File

@@ -51,8 +51,8 @@
typedef struct GISTPageOpaqueData
{
uint32 flags;
} GISTPageOpaqueData;
uint32 flags;
} GISTPageOpaqueData;
typedef GISTPageOpaqueData *GISTPageOpaque;
@@ -65,22 +65,22 @@ typedef GISTPageOpaqueData *GISTPageOpaque;
typedef struct GISTSTACK
{
struct GISTSTACK *gs_parent;
OffsetNumber gs_child;
BlockNumber gs_blk;
} GISTSTACK;
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;
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;
/*
@@ -92,9 +92,9 @@ typedef struct GISTScanOpaqueData
{
struct GISTSTACK *s_stack;
struct GISTSTACK *s_markstk;
uint16 s_flags;
uint16 s_flags;
struct GISTSTATE *giststate;
} GISTScanOpaqueData;
} GISTScanOpaqueData;
typedef GISTScanOpaqueData *GISTScanOpaque;
@@ -128,13 +128,13 @@ typedef GISTScanOpaqueData *GISTScanOpaque;
*/
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;
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
@@ -144,13 +144,13 @@ typedef struct GIST_SPLITVEC
*/
typedef struct GISTENTRY
{
char *pred;
Relation rel;
Page page;
OffsetNumber offset;
int bytes;
bool leafkey;
} GISTENTRY;
char *pred;
Relation rel;
Page page;
OffsetNumber offset;
int bytes;
bool leafkey;
} GISTENTRY;
/*
** macro to initialize a GISTENTRY
@@ -169,22 +169,22 @@ 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;
int32 vl_len;
int32 flag;
char bytes[2];
} TXTRANGE;
typedef struct intrange
{
int lower;
int upper;
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;
int flag;
} INTRANGE;
extern void
gistbuild(Relation heap,
@@ -193,12 +193,12 @@ gistbuild(Relation heap,
uint16 pint, Datum * params,
FuncIndexInfo * finfo,
PredInfo * predInfo);
extern InsertIndexResult
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 _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);

View File

@@ -16,13 +16,13 @@
#include <storage/block.h>
#include <utils/rel.h>
extern IndexScanDesc
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 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 */

View File

@@ -15,7 +15,7 @@
#include <access/strat.h>
#include <utils/rel.h>
extern StrategyNumber
extern StrategyNumber
RelationGetGISTStrategy(Relation r,
AttrNumber attnum, RegProcedure proc);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: hash.h,v 1.8 1997/09/07 04:55:54 momjian Exp $
* $Id: hash.h,v 1.9 1997/09/08 02:34:08 momjian Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
@@ -39,10 +39,10 @@
* macro OADDR_OF(S, O) where S is the splitnumber and O is the page
* offset.
*/
typedef uint32 Bucket;
typedef bits16 OverflowPageAddress;
typedef uint32 SplitNumber;
typedef uint32 PageOffset;
typedef uint32 Bucket;
typedef bits16 OverflowPageAddress;
typedef uint32 SplitNumber;
typedef uint32 PageOffset;
/* A valid overflow address will always have a page offset >= 1 */
#define InvalidOvflAddress 0
@@ -77,13 +77,12 @@ typedef uint32 PageOffset;
typedef struct HashPageOpaqueData
{
bits16 hasho_flag; /* is this page a bucket or ovfl */
Bucket hasho_bucket; /* bucket number this pg belongs
* to */
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;
BlockNumber hasho_nextblkno;/* next ovfl blkno */
BlockNumber hasho_prevblkno;/* previous ovfl (or bucket) blkno */
} HashPageOpaqueData;
typedef HashPageOpaqueData *HashPageOpaque;
@@ -97,9 +96,9 @@ typedef HashPageOpaqueData *HashPageOpaque;
typedef struct HashScanOpaqueData
{
Buffer hashso_curbuf;
Buffer hashso_mrkbuf;
} HashScanOpaqueData;
Buffer hashso_curbuf;
Buffer hashso_mrkbuf;
} HashScanOpaqueData;
typedef HashScanOpaqueData *HashScanOpaque;
@@ -140,31 +139,28 @@ typedef HashScanOpaqueData *HashScanOpaque;
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
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;
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;
@@ -179,12 +175,12 @@ typedef HashMetaPageData *HashMetaPage;
#define NKEYS hashm_nkeys
#define SPARES hashm_spares
extern bool BuildingHash;
extern bool BuildingHash;
typedef struct HashItemData
{
IndexTupleData hash_itup;
} HashItemData;
IndexTupleData hash_itup;
} HashItemData;
typedef HashItemData *HashItem;
@@ -256,32 +252,32 @@ extern void
hashbuild(Relation heap, Relation index, int natts,
AttrNumber * attnum, IndexStrategy istrat, uint16 pcount,
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
extern InsertIndexResult
extern InsertIndexResult
hashinsert(Relation rel, Datum * datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *hashgettuple(IndexScanDesc scan, ScanDirection dir);
extern char *
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 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 */
@@ -290,9 +286,9 @@ 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
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
@@ -301,23 +297,23 @@ _hash_squeezebucket(Relation rel, HashMetaPage metap,
/* 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
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_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 */
@@ -326,20 +322,20 @@ _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
extern bool
_hash_step(IndexScanDesc scan, Buffer * bufP, ScanDirection dir,
Buffer metabuf);
/* hashutil.c */
extern ScanKey
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 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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heapam.h,v 1.12 1997/09/07 04:55:55 momjian Exp $
* $Id: heapam.h,v 1.13 1997/09/08 02:34:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,57 +25,54 @@
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 */
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 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;
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;
@@ -115,58 +112,58 @@ extern HeapAccessStatistics heap_access_stats; /* in stats.c */
/* 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
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 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
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 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_markpos(HeapScanDesc sdesc);
extern void heap_restrpos(HeapScanDesc sdesc);
/* in common/heaptuple.c */
extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]);
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 *
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
extern HeapTuple
heap_formtuple(TupleDesc tupleDescriptor,
Datum value[], char nulls[]);
extern HeapTuple
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);
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 RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple);
#endif /* HEAPAM_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: hio.h,v 1.4 1997/09/07 04:55:56 momjian Exp $
* $Id: hio.h,v 1.5 1997/09/08 02:34:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,6 +20,6 @@
extern void
RelationPutHeapTuple(Relation relation, BlockNumber blockIndex,
HeapTuple tuple);
extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple);
extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple);
#endif /* HIO_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: htup.h,v 1.4 1997/09/07 04:55:58 momjian Exp $
* $Id: htup.h,v 1.5 1997/09/08 02:34:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,36 +29,36 @@
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_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
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];
bits8 t_bits[MinHeapTupleBitmapSize / 8];
/* bit map of domains */
/* MORE DATA FOLLOWS AT END OF STRUCT */
} HeapTupleData;
} HeapTupleData;
typedef HeapTupleData *HeapTuple;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: ibit.h,v 1.5 1997/09/07 04:56:01 momjian Exp $
* $Id: ibit.h,v 1.6 1997/09/08 02:34:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,9 +17,9 @@
typedef struct IndexAttributeBitMapData
{
char bits[(MaxIndexAttributeNumber + MaxBitsPerByte - 1)
/ MaxBitsPerByte];
} IndexAttributeBitMapData;
char bits[(MaxIndexAttributeNumber + MaxBitsPerByte - 1)
/ MaxBitsPerByte];
} IndexAttributeBitMapData;
typedef IndexAttributeBitMapData *IndexAttributeBitMap;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: iqual.h,v 1.5 1997/09/07 04:56:04 momjian Exp $
* $Id: iqual.h,v 1.6 1997/09/08 02:34:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,9 +22,9 @@
* ----------------
*/
extern int NIndexTupleProcessed;
extern int NIndexTupleProcessed;
extern bool
extern bool
index_keytest(IndexTuple tuple, TupleDesc tupdesc,
int scanKeySize, ScanKey key);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: istrat.h,v 1.6 1997/09/07 04:56:05 momjian Exp $
* $Id: istrat.h,v 1.7 1997/09/08 02:34:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,18 +47,18 @@
*/
#define IndexStrategyIsValid(s) PointerIsValid(s)
extern StrategyMap
extern StrategyMap
IndexStrategyGetStrategyMap(IndexStrategy indexStrategy,
StrategyNumber maxStrategyNum, AttrNumber attrNum);
extern Size
extern Size
AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber,
StrategyNumber maxStrategyNumber);
extern StrategyNumber
extern StrategyNumber
RelationGetStrategy(Relation relation,
AttrNumber attributeNumber, StrategyEvaluation evaluation,
RegProcedure procedure);
extern bool
extern bool
RelationInvokeStrategy(Relation relation,
StrategyEvaluation evaluation, AttrNumber attributeNumber,
StrategyNumber strategy, Datum left, Datum right);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: itup.h,v 1.6 1997/09/07 04:56:05 momjian Exp $
* $Id: itup.h,v 1.7 1997/09/08 02:34:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,14 +30,14 @@ typedef struct IndexTupleData
* 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 */
} IndexTupleData; /* MORE DATA FOLLOWS AT END OF STRUCT */
typedef IndexTupleData *IndexTuple;
@@ -45,7 +45,7 @@ typedef IndexTupleData *IndexTuple;
typedef struct InsertIndexResultData
{
ItemPointerData pointerData;
} InsertIndexResultData;
} InsertIndexResultData;
typedef InsertIndexResultData *InsertIndexResult;
@@ -54,7 +54,7 @@ typedef struct RetrieveIndexResultData
{
ItemPointerData index_iptr;
ItemPointerData heap_iptr;
} RetrieveIndexResultData;
} RetrieveIndexResultData;
typedef RetrieveIndexResultData *RetrieveIndexResult;
@@ -66,9 +66,9 @@ typedef RetrieveIndexResultData *RetrieveIndexResult;
*/
typedef struct PredInfo
{
Node *pred;
Node *oldPred;
} PredInfo;
Node *pred;
Node *oldPred;
} PredInfo;
/* ----------------
@@ -89,16 +89,16 @@ typedef struct PredInfo
/* indextuple.h */
extern IndexTuple
extern IndexTuple
index_formtuple(TupleDesc tupleDescriptor,
Datum value[], char null[]);
extern Datum
extern Datum
index_getattr(IndexTuple tuple, AttrNumber attNum,
TupleDesc tupDesc, bool * isNullOutP);
extern RetrieveIndexResult
extern RetrieveIndexResult
FormRetrieveIndexResult(ItemPointer indexItemPointer,
ItemPointer heapItemPointer);
extern void CopyIndexTuple(IndexTuple source, IndexTuple * target);
extern void CopyIndexTuple(IndexTuple source, IndexTuple * target);
#endif /* ITUP_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nbtree.h,v 1.15 1997/09/07 04:56:06 momjian Exp $
* $Id: nbtree.h,v 1.16 1997/09/08 02:34:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,9 +40,9 @@
typedef struct BTPageOpaqueData
{
BlockNumber btpo_prev;
BlockNumber btpo_next;
uint16 btpo_flags;
BlockNumber btpo_prev;
BlockNumber btpo_next;
uint16 btpo_flags;
#define BTP_LEAF (1 << 0)
#define BTP_ROOT (1 << 1)
@@ -50,7 +50,7 @@ typedef struct BTPageOpaqueData
#define BTP_META (1 << 3)
#define BTP_CHAIN (1 << 4)
} BTPageOpaqueData;
} BTPageOpaqueData;
typedef BTPageOpaqueData *BTPageOpaque;
@@ -67,14 +67,14 @@ typedef BTPageOpaqueData *BTPageOpaque;
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
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;
ScanKey keyData; /* key descriptor */
} BTScanOpaqueData;
typedef BTScanOpaqueData *BTScanOpaque;
@@ -99,12 +99,12 @@ typedef BTScanOpaqueData *BTScanOpaque;
typedef struct BTItemData
{
#ifndef BTREE_VERSION_1
Oid bti_oid;
int32 bti_dummy; /* padding to make bti_itup align at
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;
@@ -131,25 +131,25 @@ typedef BTItemData *BTItem;
typedef struct BTStackData
{
BlockNumber bts_blkno;
OffsetNumber bts_offset;
BTItem bts_btitem;
BlockNumber bts_blkno;
OffsetNumber bts_offset;
BTItem bts_btitem;
struct BTStackData *bts_parent;
} BTStackData;
} 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;
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;
} BTPageState;
/*
* We need to be able to tell the difference between read and write
@@ -213,105 +213,105 @@ typedef struct BTPageState
/*
* prototypes for functions in nbtinsert.c
*/
extern InsertIndexResult
extern InsertIndexResult
_bt_doinsert(Relation rel, BTItem btitem,
bool index_is_unique, Relation heapRel);
/* default is to allow duplicates */
extern bool
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 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
extern InsertIndexResult
btinsert(Relation rel, Datum * datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *btgettuple(IndexScanDesc scan, ScanDirection dir);
extern char *
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 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
extern BTStack
_bt_search(Relation rel, int keysz, ScanKey scankey,
Buffer * bufP);
extern Buffer
extern Buffer
_bt_moveright(Relation rel, Buffer buf, int keysz,
ScanKey scankey, int access);
extern bool
extern bool
_bt_skeycmp(Relation rel, Size keysz, ScanKey scankey,
Page page, ItemId itemid, StrategyNumber strat);
extern OffsetNumber
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
extern StrategyNumber
_bt_getstrat(Relation rel, AttrNumber attno,
RegProcedure proc);
extern bool
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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: printtup.h,v 1.3 1997/09/07 04:56:07 momjian Exp $
* $Id: printtup.h,v 1.4 1997/09/08 02:34:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,11 +16,11 @@
#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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: relscan.h,v 1.6 1997/09/07 04:56:08 momjian Exp $
* $Id: relscan.h,v 1.7 1997/09/08 02:34:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,41 +21,41 @@ 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 */
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;
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 */
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;
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;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: rtree.h,v 1.7 1997/09/07 04:56:09 momjian Exp $
* $Id: rtree.h,v 1.8 1997/09/08 02:34:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,8 +42,8 @@
typedef struct RTreePageOpaqueData
{
uint32 flags;
} RTreePageOpaqueData;
uint32 flags;
} RTreePageOpaqueData;
typedef RTreePageOpaqueData *RTreePageOpaque;
@@ -54,9 +54,9 @@ typedef RTreePageOpaqueData *RTreePageOpaque;
typedef struct RTSTACK
{
struct RTSTACK *rts_parent;
OffsetNumber rts_child;
BlockNumber rts_blk;
} RTSTACK;
OffsetNumber rts_child;
BlockNumber rts_blk;
} RTSTACK;
/*
* When we're doing a scan, we need to keep track of the parent stack
@@ -72,10 +72,10 @@ typedef struct RTreeScanOpaqueData
{
struct RTSTACK *s_stack;
struct RTSTACK *s_markstk;
uint16 s_flags;
uint16 s_internalNKey;
ScanKey s_internalKey;
} RTreeScanOpaqueData;
uint16 s_flags;
uint16 s_internalNKey;
ScanKey s_internalKey;
} RTreeScanOpaqueData;
typedef RTreeScanOpaqueData *RTreeScanOpaque;
@@ -105,7 +105,7 @@ typedef RTreeScanOpaqueData *RTreeScanOpaque;
#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);
@@ -114,25 +114,25 @@ extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
* RTree code.
* Defined in access/index-rtree/
*/
extern InsertIndexResult
extern InsertIndexResult
rtinsert(Relation r, Datum * datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *rtdelete(Relation r, ItemPointer tid);
extern char *rtdelete(Relation r, ItemPointer tid);
extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
extern IndexScanDesc
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 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 void _rtdump(Relation r);
/* rtscan.c */
extern void
@@ -140,7 +140,7 @@ rtadjscans(Relation r, int op, BlockNumber blkno,
OffsetNumber offnum);
/* rtstrat.h */
extern RegProcedure
extern RegProcedure
RTMapOperator(Relation r, AttrNumber attnum,
RegProcedure proc);

View File

@@ -6,12 +6,12 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: rtscan.h,v 1.2 1997/09/07 04:56:10 momjian Exp $
* $Id: rtscan.h,v 1.3 1997/09/08 02:34:24 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 */

View File

@@ -6,13 +6,13 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: rtstrat.h,v 1.2 1997/09/07 04:56:11 momjian Exp $
* $Id: rtstrat.h,v 1.3 1997/09/08 02:34:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef RTSTRAT_H
extern RegProcedure
extern RegProcedure
RTMapOperator(Relation r, AttrNumber attnum,
RegProcedure proc);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: skey.h,v 1.4 1997/09/07 04:56:13 momjian Exp $
* $Id: skey.h,v 1.5 1997/09/08 02:34:26 momjian Exp $
*
*
* Note:
@@ -20,13 +20,13 @@
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;
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;
@@ -44,7 +44,7 @@ typedef ScanKeyData *ScanKey;
/*
* prototypes for functions in access/common/scankey.c
*/
extern void ScanKeyEntrySetIllegal(ScanKey entry);
extern void ScanKeyEntrySetIllegal(ScanKey entry);
extern void
ScanKeyEntryInitialize(ScanKey entry, bits16 flags,
AttrNumber attributeNumber, RegProcedure procedure, Datum argument);

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: strat.h,v 1.5 1997/09/07 04:56:14 momjian Exp $
* $Id: strat.h,v 1.6 1997/09/08 02:34:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,50 +16,51 @@
#include <access/skey.h>
typedef uint16 StrategyNumber;
typedef uint16 StrategyNumber;
#define InvalidStrategy 0
typedef struct StrategyTransformMapData
{
StrategyNumber strategy[1];/* VARIABLE LENGTH ARRAY */
} StrategyTransformMapData; /* VARIABLE LENGTH
StrategyNumber strategy[1]; /* VARIABLE LENGTH ARRAY */
} StrategyTransformMapData; /* VARIABLE LENGTH
* STRUCTURE */
*
* STRUCTURE */
typedef StrategyTransformMapData *StrategyTransformMap;
typedef struct StrategyOperatorData
{
StrategyNumber strategy;
bits16 flags; /* scan qualification flags h/skey.h */
} StrategyOperatorData;
StrategyNumber strategy;
bits16 flags; /* scan qualification flags h/skey.h */
} StrategyOperatorData;
typedef StrategyOperatorData *StrategyOperator;
typedef struct StrategyTermData
{ /* conjunctive term */
uint16 degree;
uint16 degree;
StrategyOperatorData operatorData[1]; /* VARIABLE LENGTH */
} StrategyTermData; /* VARIABLE LENGTH STRUCTURE */
} StrategyTermData; /* VARIABLE LENGTH STRUCTURE */
typedef StrategyTermData *StrategyTerm;
typedef struct StrategyExpressionData
{ /* disjunctive normal form */
StrategyTerm term[1]; /* VARIABLE LENGTH ARRAY */
} StrategyExpressionData; /* VARIABLE LENGTH STRUCTURE */
StrategyTerm term[1]; /* VARIABLE LENGTH ARRAY */
} StrategyExpressionData; /* VARIABLE LENGTH STRUCTURE */
typedef StrategyExpressionData *StrategyExpression;
typedef struct StrategyEvaluationData
{
StrategyNumber maxStrategy;
StrategyNumber maxStrategy;
StrategyTransformMap negateTransform;
StrategyTransformMap commuteTransform;
StrategyTransformMap negateCommuteTransform;
StrategyExpression expression[12]; /* XXX VARIABLE LENGTH */
} StrategyEvaluationData; /* VARIABLE LENGTH STRUCTURE */
} StrategyEvaluationData; /* VARIABLE LENGTH STRUCTURE */
typedef StrategyEvaluationData *StrategyEvaluation;
@@ -78,15 +79,15 @@ typedef StrategyEvaluationData *StrategyEvaluation;
typedef struct StrategyMapData
{
ScanKeyData entry[1]; /* VARIABLE LENGTH ARRAY */
} StrategyMapData;/* VARIABLE LENGTH STRUCTURE */
ScanKeyData entry[1]; /* VARIABLE LENGTH ARRAY */
} StrategyMapData; /* VARIABLE LENGTH STRUCTURE */
typedef StrategyMapData *StrategyMap;
typedef struct IndexStrategyData
{
StrategyMapData strategyMapData[1]; /* VARIABLE LENGTH ARRAY */
} IndexStrategyData; /* VARIABLE LENGTH STRUCTURE */
} IndexStrategyData; /* VARIABLE LENGTH STRUCTURE */
typedef IndexStrategyData *IndexStrategy;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: transam.h,v 1.8 1997/09/07 04:56:14 momjian Exp $
* $Id: transam.h,v 1.9 1997/09/08 02:34:27 momjian Exp $
*
* NOTES
* Transaction System Version 101 now support proper oid
@@ -85,8 +85,8 @@ typedef unsigned char XidStatus;/* (2 bits) */
*/
typedef struct LogRelationContentsData
{
int TransSystemVersion;
} LogRelationContentsData;
int TransSystemVersion;
} LogRelationContentsData;
typedef LogRelationContentsData *LogRelationContents;
@@ -104,8 +104,8 @@ typedef LogRelationContentsData *LogRelationContents;
*/
typedef struct TimeRelationContentsData
{
int TransSystemVersion;
} TimeRelationContentsData;
int TransSystemVersion;
} TimeRelationContentsData;
typedef TimeRelationContentsData *TimeRelationContents;
@@ -127,11 +127,11 @@ typedef TimeRelationContentsData *TimeRelationContents;
*/
typedef struct VariableRelationContentsData
{
int TransSystemVersion;
TransactionId nextXidData;
TransactionId lastXidData;
Oid nextOid;
} VariableRelationContentsData;
int TransSystemVersion;
TransactionId nextXidData;
TransactionId lastXidData;
Oid nextOid;
} VariableRelationContentsData;
typedef VariableRelationContentsData *VariableRelationContents;
@@ -144,25 +144,25 @@ 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 AmiTransactionOverride(bool flag);
extern void
TransComputeBlockNumber(Relation relation,
TransactionId transactionId, BlockNumber * blockNumberOutP);
extern XidStatus
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
extern AbsoluteTime
TransBlockNumberGetCommitTime(Relation relation,
BlockNumber blockNumber, TransactionId xid, bool * failP);
extern void
@@ -171,11 +171,11 @@ TransBlockNumberSetCommitTime(Relation relation,
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
@@ -196,12 +196,12 @@ 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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: tupdesc.h,v 1.9 1997/09/07 04:56:16 momjian Exp $
* $Id: tupdesc.h,v 1.10 1997/09/08 02:34:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,27 +20,27 @@
typedef struct attrDefault
{
AttrNumber adnum;
char *adbin;
char *adsrc;
} AttrDefault;
AttrNumber adnum;
char *adbin;
char *adsrc;
} AttrDefault;
typedef struct constrCheck
{
char *ccname;
char *ccbin;
char *ccsrc;
} 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;
AttrDefault *defval;
ConstrCheck *check;
uint16 num_defval;
uint16 num_check;
bool has_not_null;
} TupleConstr;
/*
* This structure contains all information (i.e. from Classes
@@ -48,12 +48,12 @@ typedef struct tupleConstr
*/
typedef struct tupleDesc
{
int natts;
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;
TupleConstr *constr;
} *TupleDesc;
extern TupleDesc CreateTemplateTupleDesc(int natts);
@@ -63,9 +63,9 @@ extern TupleDesc CreateTupleDescCopy(TupleDesc tupdesc);
extern TupleDesc CreateTupleDescCopyConstr(TupleDesc tupdesc);
extern void FreeTupleDesc(TupleDesc tupdesc);
extern void FreeTupleDesc(TupleDesc tupdesc);
extern bool
extern bool
TupleDescInitEntry(TupleDesc desc,
AttrNumber attributeNumber,
char *attributeName,

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: valid.h,v 1.5 1997/09/07 04:56:18 momjian Exp $
* $Id: valid.h,v 1.6 1997/09/08 02:34:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,16 +22,16 @@
* ----------------
*/
extern bool
extern bool
heap_keytest(HeapTuple t, TupleDesc tupdesc,
int nkeys, ScanKey keys);
extern HeapTuple
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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: xact.h,v 1.7 1997/09/07 04:56:19 momjian Exp $
* $Id: xact.h,v 1.8 1997/09/08 02:34:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,13 +21,13 @@
*/
typedef struct TransactionStateData
{
TransactionId transactionIdData;
CommandId commandId;
CommandId scanCommandId;
AbsoluteTime startTime;
int state;
int blockState;
} TransactionStateData;
TransactionId transactionIdData;
CommandId commandId;
CommandId scanCommandId;
AbsoluteTime startTime;
int state;
int blockState;
} TransactionStateData;
/* ----------------
* transaction states
@@ -57,44 +57,44 @@ typedef TransactionStateData *TransactionState;
* 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 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 bool TransactionIdEquals(TransactionId id1, TransactionId id2);
extern bool TransactionIdIsLessThan(TransactionId id1, TransactionId id2);
extern void TransactionIdAdd(TransactionId * xid, int value);
#endif /* XACT_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: bootstrap.h,v 1.6 1997/09/07 04:56:23 momjian Exp $
* $Id: bootstrap.h,v 1.7 1997/09/08 02:34:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,18 +21,18 @@
typedef struct hashnode
{
int strnum; /* Index into string table */
int strnum; /* Index into string table */
struct hashnode *next;
} hashnode;
} 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 int BootstrapMain(int ac, char *av[]);
extern void
index_register(char *heap,
char *ind,
@@ -43,18 +43,18 @@ index_register(char *heap,
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 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);
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 */

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: c.h,v 1.17 1997/09/07 04:55:35 momjian Exp $
* $Id: c.h,v 1.18 1997/09/08 02:33:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,10 +61,10 @@
#define false ((char) 0)
#define true ((char) 1)
#ifndef __cplusplus
typedef char bool;
typedef char bool;
#endif /* not C++ */
typedef bool *BoolPtr;
typedef bool *BoolPtr;
#ifndef TRUE
#define TRUE 1
@@ -94,7 +94,7 @@ typedef bool *BoolPtr;
* 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
/*
@@ -116,7 +116,7 @@ typedef char *Pointer;
* Pointer --
* Variable containing address of any memory resident object.
*/
typedef char *Pointer;
typedef char *Pointer;
#ifndef NULL
/*
@@ -228,35 +228,35 @@ typedef unsigned int uint32; /* >= 32 bits */
* Since sizeof(floatN) may be > sizeof(char *), always pass
* floatN by reference.
*/
typedef float float32data;
typedef double float64data;
typedef float *float32;
typedef float float32data;
typedef double float64data;
typedef float *float32;
typedef double *float64;
/*
* boolN --
* 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.
*/
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.
*/
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 --
@@ -276,8 +276,8 @@ typedef unsigned int Index;
#define MAXDIM 6
typedef struct
{
int indx[MAXDIM];
} IntArray;
int indx[MAXDIM];
} IntArray;
/*
* Offset --
@@ -319,7 +319,7 @@ typedef signed int Offset;
*/
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)
@@ -564,11 +564,11 @@ typedef Datum *DatumPtr;
* Exception Handling definitions
*/
typedef char *ExcMessage;
typedef char *ExcMessage;
typedef struct Exception
{
ExcMessage message;
} Exception;
ExcMessage message;
} Exception;
/*
* NO_ASSERT_CHECKING, if defined, turns off all the assertions.
@@ -712,7 +712,7 @@ ExceptionalCondition(char *conditionName,
* form is used by assert and the exception handling stuff
* ----------------
*/
extern char *form(const char *fmt,...);
extern char *form(const char *fmt,...);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: catalog.h,v 1.3 1997/09/07 04:56:25 momjian Exp $
* $Id: catalog.h,v 1.4 1997/09/08 02:34:39 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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: catname.h,v 1.5 1997/09/07 04:56:27 momjian Exp $
* $Id: catname.h,v 1.6 1997/09/08 02:34:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,6 +49,6 @@
#define RelCheckRelationName "pg_relcheck"
#define TriggerRelationName "pg_trigger"
extern char *SharedSystemRelationNames[];
extern char *SharedSystemRelationNames[];
#endif /* CATNAME_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heap.h,v 1.5 1997/09/07 04:56:29 momjian Exp $
* $Id: heap.h,v 1.6 1997/09/08 02:34:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,16 +17,16 @@
extern Relation heap_creatr(char *relname, unsigned smgr, TupleDesc att);
extern Oid
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 heap_destroy(char relname[]);
extern void heap_destroyr(Relation r);
extern void InitTempRelList(void);
extern void DestroyTempRels(void);
extern void InitTempRelList(void);
extern void DestroyTempRels(void);
#endif /* HEAP_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: index.h,v 1.6 1997/09/07 04:56:31 momjian Exp $
* $Id: index.h,v 1.7 1997/09/08 02:34:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,11 +18,11 @@
#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,
@@ -44,7 +44,7 @@ index_create(char *heapRelationName,
bool islossy,
bool unique);
extern void index_destroy(Oid indexId);
extern void index_destroy(Oid indexId);
extern void
FormIndexDatum(int numberOfAttributes,
@@ -52,7 +52,7 @@ FormIndexDatum(int numberOfAttributes,
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,
@@ -64,7 +64,7 @@ index_build(Relation heapRelation, Relation indexRelation,
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 */

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: indexing.h,v 1.5 1997/09/07 04:56:32 momjian Exp $
* $Id: indexing.h,v 1.6 1997/09/08 02:34:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,41 +46,41 @@
#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
*
* 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 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 bool CatalogHasIndex(char *catName, Oid catId);
extern HeapTuple
extern HeapTuple
AttributeNameIndexScan(Relation heapRelation,
Oid relid,
char *attname);
extern HeapTuple
extern HeapTuple
AttributeNumIndexScan(Relation heapRelation,
Oid relid,
AttrNumber attnum);
extern HeapTuple ProcedureOidIndexScan(Relation heapRelation, Oid procId);
extern HeapTuple
extern HeapTuple
ProcedureNameIndexScan(Relation heapRelation,
char *procName, int nargs, Oid * argTypes);
extern HeapTuple ProcedureSrcIndexScan(Relation heapRelation, text * procSrc);

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_aggregate.h,v 1.9 1997/09/07 04:56:36 momjian Exp $
* $Id: pg_aggregate.h,v 1.10 1997/09/08 02:34:54 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -44,17 +44,17 @@
*/
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 */
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;
/* ----------------
@@ -139,7 +139,7 @@ AggregateCreate(char *aggName,
char *aggtransfn2typeName,
char *agginitval1,
char *agginitval2);
extern char *
extern char *
AggNameGetInitVal(char *aggName, Oid basetype,
int xfuncno, bool * isNull);

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_am.h,v 1.3 1997/09/07 04:56:37 momjian Exp $
* $Id: pg_am.h,v 1.4 1997/09/08 02:34:55 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -35,28 +35,28 @@
*/
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;
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;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_amop.h,v 1.6 1997/09/07 04:56:37 momjian Exp $
* $Id: pg_amop.h,v 1.7 1997/09/08 02:34:56 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,12 +32,12 @@
*/
CATALOG(pg_amop)
{
Oid amopid;
Oid amopclaid;
Oid amopopr;
int2 amopstrategy;
regproc amopselect;
regproc amopnpages;
Oid amopid;
Oid amopclaid;
Oid amopopr;
int2 amopstrategy;
regproc amopselect;
regproc amopnpages;
} FormData_pg_amop;
/* ----------------

View File

@@ -9,7 +9,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_amproc.h,v 1.5 1997/09/07 04:56:39 momjian Exp $
* $Id: pg_amproc.h,v 1.6 1997/09/08 02:34:57 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -34,10 +34,10 @@
*/
CATALOG(pg_amproc)
{
Oid amid;
Oid amopclaid;
Oid amproc;
int2 amprocnum;
Oid amid;
Oid amopclaid;
Oid amproc;
int2 amprocnum;
} FormData_pg_amproc;
/* ----------------

View File

@@ -28,10 +28,10 @@
*/
CATALOG(pg_attrdef) BOOTSTRAP
{
Oid adrelid;
int2 adnum;
text adbin;
text adsrc;
Oid adrelid;
int2 adnum;
text adbin;
text adsrc;
} FormData_pg_attrdef;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_attribute.h,v 1.15 1997/09/07 04:56:41 momjian Exp $
* $Id: pg_attribute.h,v 1.16 1997/09/08 02:35:02 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -40,9 +40,9 @@
*/
CATALOG(pg_attribute) BOOTSTRAP
{
Oid attrelid;
NameData attname;
Oid atttypid;
Oid attrelid;
NameData attname;
Oid atttypid;
/*
* atttypid is the OID of the instance in Catalog Class pg_type that
@@ -51,15 +51,15 @@ CATALOG(pg_attribute) BOOTSTRAP
* attalign attributes of this instance, so they had better match or
* Postgres will fail.
*/
float4 attdisbursion;
int2 attlen;
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;
int2 attnum;
/*
* attnum is the "attribute number" for the attribute: A value that
@@ -74,8 +74,8 @@ CATALOG(pg_attribute) BOOTSTRAP
*
* Note that (attnum - 1) is often used as the index to an array.
*/
int4 attnelems;
int4 attcacheoff;
int4 attnelems;
int4 attcacheoff;
/*
* fastgetattr() uses attcacheoff to cache byte offsets of attributes
@@ -84,25 +84,25 @@ CATALOG(pg_attribute) BOOTSTRAP
* tuple descriptor, we may then update attcacheoff in the copies.
* This speeds up the attribute walking process.
*/
bool attbyval;
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;
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;
bool attnotnull;
/* This flag represents the "NOT NULL" constraint */
bool atthasdef;
bool atthasdef;
/* Has DEFAULT value or not */
} FormData_pg_attribute;

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_class.h,v 1.10 1997/09/07 04:56:42 momjian Exp $
* $Id: pg_class.h,v 1.11 1997/09/08 02:35:03 momjian Exp $
*
* NOTES
* ``pg_relation'' is being replaced by ``pg_class''. currently
@@ -52,33 +52,33 @@
*/
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
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
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;
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 */
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 \

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_database.h,v 1.4 1997/09/07 04:56:43 momjian Exp $
* $Id: pg_database.h,v 1.5 1997/09/08 02:35:04 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,9 +32,9 @@
*/
CATALOG(pg_database) BOOTSTRAP
{
NameData datname;
int4 datdba;
text datpath; /* VARIABLE LENGTH FIELD */
NameData datname;
int4 datdba;
text datpath; /* VARIABLE LENGTH FIELD */
} FormData_pg_database;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_defaults.h,v 1.3 1997/09/07 04:56:44 momjian Exp $
* $Id: pg_defaults.h,v 1.4 1997/09/08 02:35:05 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,8 +32,8 @@
*/
CATALOG(pg_defaults) BOOTSTRAP
{
NameData defname;
NameData defvalue;
NameData defname;
NameData defvalue;
} FormData_pg_defaults;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_demon.h,v 1.3 1997/09/07 04:56:45 momjian Exp $
* $Id: pg_demon.h,v 1.4 1997/09/08 02:35:06 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,10 +32,10 @@
*/
CATALOG(pg_demon) BOOTSTRAP
{
Oid demserid;
NameData demname;
Oid demowner;
regproc demcode;
Oid demserid;
NameData demname;
Oid demowner;
regproc demcode;
} FormData_pg_demon;
/* ----------------

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_group.h,v 1.3 1997/09/07 04:56:46 momjian Exp $
* $Id: pg_group.h,v 1.4 1997/09/08 02:35:07 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -26,9 +26,9 @@
CATALOG(pg_group) BOOTSTRAP
{
NameData groname;
int4 grosysid;
int4 grolist[1];
NameData groname;
int4 grosysid;
int4 grolist[1];
} FormData_pg_group;
/* VARIABLE LENGTH STRUCTURE */

View File

@@ -10,7 +10,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_hosts.h,v 1.3 1997/09/07 04:56:46 momjian Exp $
* $Id: pg_hosts.h,v 1.4 1997/09/08 02:35:09 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -30,9 +30,9 @@
CATALOG(pg_hosts) BOOTSTRAP
{
NameData dbName;
text address;
text mask;
NameData dbName;
text address;
text mask;
} FormData_pg_hosts;
typedef FormData_pg_hosts *Form_pg_hosts;

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_index.h,v 1.4 1997/09/07 04:56:47 momjian Exp $
* $Id: pg_index.h,v 1.5 1997/09/08 02:35:12 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -41,20 +41,19 @@
*/
CATALOG(pg_index)
{
Oid indexrelid;
Oid indrelid;
Oid indproc; /* registered procedure for functional
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
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 */
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

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_inheritproc.h,v 1.3 1997/09/07 04:56:50 momjian Exp $
* $Id: pg_inheritproc.h,v 1.4 1997/09/08 02:35:13 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,10 +32,10 @@
*/
CATALOG(pg_inheritproc)
{
NameData inhproname;
Oid inhargrel;
Oid inhdefrel;
Oid inhproc;
NameData inhproname;
Oid inhargrel;
Oid inhdefrel;
Oid inhproc;
} FormData_pg_inheritproc;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_inherits.h,v 1.3 1997/09/07 04:56:51 momjian Exp $
* $Id: pg_inherits.h,v 1.4 1997/09/08 02:35:14 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,9 +32,9 @@
*/
CATALOG(pg_inherits)
{
Oid inhrel;
Oid inhparent;
int4 inhseqno;
Oid inhrel;
Oid inhparent;
int4 inhseqno;
} FormData_pg_inherits;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_ipl.h,v 1.3 1997/09/07 04:56:52 momjian Exp $
* $Id: pg_ipl.h,v 1.4 1997/09/08 02:35:15 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,9 +32,9 @@
*/
CATALOG(pg_ipl)
{
Oid iplrel;
Oid iplipl;
int4 iplseqno;
Oid iplrel;
Oid iplipl;
int4 iplseqno;
} FormData_pg_ipl;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_language.h,v 1.3 1997/09/07 04:56:53 momjian Exp $
* $Id: pg_language.h,v 1.4 1997/09/08 02:35:16 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,8 +32,8 @@
*/
CATALOG(pg_language)
{
NameData lanname;
text lancompiler;/* VARIABLE LENGTH FIELD */
NameData lanname;
text lancompiler; /* VARIABLE LENGTH FIELD */
} FormData_pg_language;
/* ----------------

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_listener.h,v 1.3 1997/09/07 04:56:54 momjian Exp $
* $Id: pg_listener.h,v 1.4 1997/09/08 02:35:17 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -33,9 +33,9 @@
CATALOG(pg_listener)
{
NameData relname;
int4 listenerpid;
int4 notification;
NameData relname;
int4 listenerpid;
int4 notification;
} FormData_pg_listener;
/* ----------------

View File

@@ -9,7 +9,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_log.h,v 1.3 1997/09/07 04:56:55 momjian Exp $
* $Id: pg_log.h,v 1.4 1997/09/08 02:35:18 momjian Exp $
*
* NOTES
* The structures and macros used by the transam/ code
@@ -29,7 +29,7 @@
CATALOG(pg_log) BOOTSTRAP
{
Oid logfoo;
Oid logfoo;
} FormData_pg_log;
typedef FormData_pg_log *Form_pg_log;

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_magic.h,v 1.3 1997/09/07 04:56:57 momjian Exp $
* $Id: pg_magic.h,v 1.4 1997/09/08 02:35:18 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,8 +32,8 @@
*/
CATALOG(pg_magic) BOOTSTRAP
{
NameData magname;
NameData magvalue;
NameData magname;
NameData magvalue;
} FormData_pg_magic;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_opclass.h,v 1.4 1997/09/07 04:56:58 momjian Exp $
* $Id: pg_opclass.h,v 1.5 1997/09/08 02:35:19 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -33,8 +33,8 @@
CATALOG(pg_opclass)
{
NameData opcname;
Oid opcdeftype;
NameData opcname;
Oid opcdeftype;
} FormData_pg_opclass;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_operator.h,v 1.14 1997/09/07 04:57:00 momjian Exp $
* $Id: pg_operator.h,v 1.15 1997/09/08 02:35:20 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -35,22 +35,22 @@
*/
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;
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;
/* ----------------

View File

@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_parg.h,v 1.4 1997/09/07 04:57:01 momjian Exp $
* $Id: pg_parg.h,v 1.5 1997/09/08 02:35:21 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -33,10 +33,10 @@
*/
CATALOG(pg_parg)
{
Oid parproid;
int2 parnum;
char parbound;
Oid partype;
Oid parproid;
int2 parnum;
char parbound;
Oid partype;
} FormData_pg_parg;
/* ----------------

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.28 1997/09/07 04:57:03 momjian Exp $
* $Id: pg_proc.h,v 1.29 1997/09/08 02:35:23 momjian Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -38,22 +38,22 @@
*/
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 */
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;
/* ----------------
@@ -1103,7 +1103,7 @@ DATA(insert OID = 1319 ( currval PGUID 11 f t f 1 f 23 "25" 100 0 0 100 fo
/*
* prototypes for functions pg_proc.c
*/
extern Oid
extern Oid
ProcedureCreate(char *procedureName,
bool returnsSet,
char *returnTypeName,

View File

@@ -28,10 +28,10 @@
*/
CATALOG(pg_relcheck) BOOTSTRAP
{
Oid rcrelid;
NameData rcname;
text rcbin;
text rcsrc;
Oid rcrelid;
NameData rcname;
text rcbin;
text rcsrc;
} FormData_pg_relcheck;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_rewrite.h,v 1.3 1997/09/07 04:57:08 momjian Exp $
* $Id: pg_rewrite.h,v 1.4 1997/09/08 02:35:25 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,13 +32,13 @@
*/
CATALOG(pg_rewrite)
{
NameData rulename;
char ev_type;
Oid ev_class;
int2 ev_attr;
bool is_instead;
text ev_qual; /* VARLENA */
text action; /* VARLENA */
NameData rulename;
char ev_type;
Oid ev_class;
int2 ev_attr;
bool is_instead;
text ev_qual; /* VARLENA */
text action; /* VARLENA */
} FormData_pg_rewrite;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_server.h,v 1.3 1997/09/07 04:57:09 momjian Exp $
* $Id: pg_server.h,v 1.4 1997/09/08 02:35:26 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,9 +32,9 @@
*/
CATALOG(pg_server) BOOTSTRAP
{
NameData sername;
int2 serpid;
int2 serport;
NameData sername;
int2 serpid;
int2 serport;
} FormData_pg_server;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_statistic.h,v 1.3 1997/09/07 04:57:10 momjian Exp $
* $Id: pg_statistic.h,v 1.4 1997/09/08 02:35:27 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,11 +32,11 @@
*/
CATALOG(pg_statistic)
{
Oid starelid;
int2 staattnum;
Oid staop;
text stalokey; /* VARIABLE LENGTH FIELD */
text stahikey; /* VARIABLE LENGTH FIELD */
Oid starelid;
int2 staattnum;
Oid staop;
text stalokey; /* VARIABLE LENGTH FIELD */
text stahikey; /* VARIABLE LENGTH FIELD */
} FormData_pg_statistic;
/* ----------------

View File

@@ -9,7 +9,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_time.h,v 1.3 1997/09/07 04:57:10 momjian Exp $
* $Id: pg_time.h,v 1.4 1997/09/08 02:35:28 momjian Exp $
*
* NOTES
* The structures and macros used by the transam/ code
@@ -29,7 +29,7 @@
CATALOG(pg_time) BOOTSTRAP
{
Oid timefoo;
Oid timefoo;
} FormData_pg_time;
typedef FormData_pg_time *Form_pg_time;

View File

@@ -28,14 +28,14 @@
*/
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
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 */
int2 tgnargs; /* # of extra arguments in tgargs */
int28 tgattr; /* UPDATE of attr1, attr2 ... (NI) */
bytea tgargs; /* first\000second\000tgnargs\000 */
} FormData_pg_trigger;
/* ----------------

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_type.h,v 1.17 1997/09/07 04:57:12 momjian Exp $
* $Id: pg_type.h,v 1.18 1997/09/08 02:35:32 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -39,17 +39,17 @@
*/
CATALOG(pg_type) BOOTSTRAP
{
NameData typname;
Oid typowner;
int2 typlen;
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;
int2 typprtlen;
bool typbyval;
/*
* typbyval determines whether internal Postgres routines pass a value
@@ -70,11 +70,11 @@ CATALOG(pg_type) BOOTSTRAP
* with the declared length, and typbyval is used somewhere. - tgl
* 97/03/20)
*/
char typtype;
bool typisdefined;
char typdelim;
Oid typrelid;
Oid typelem;
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
@@ -84,11 +84,11 @@ CATALOG(pg_type) BOOTSTRAP
* (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;
regproc typinput;
regproc typoutput;
regproc typreceive;
regproc typsend;
char typalign;
/*
* typalign is the alignment required when storing a value of this
@@ -105,7 +105,7 @@ CATALOG(pg_type) BOOTSTRAP
* (This might actually be flexible depending on machine architecture,
* but I doubt it - BRYANH 96.08).
*/
text typdefault; /* VARIABLE LENGTH FIELD */
text typdefault; /* VARIABLE LENGTH FIELD */
} TypeTupleFormData;
/* ----------------
@@ -326,9 +326,9 @@ DATA(insert OID = 1296 ( timestamp PGUID 4 19 t b t \054 0 0 timestamp_in time
/*
* prototypes for functions in pg_type.c
*/
extern Oid TypeGet(char *typeName, bool * defined);
extern Oid TypeShellMake(char *typeName);
extern Oid
extern Oid TypeGet(char *typeName, bool * defined);
extern Oid TypeShellMake(char *typeName);
extern Oid
TypeCreate(char *typeName,
Oid relationOid,
int16 internalSize,
@@ -342,8 +342,8 @@ TypeCreate(char *typeName,
char *elementTypeName,
char *defaultTypeValue,
bool passedByValue, char alignment);
extern void TypeRename(char *oldTypeName, char *newTypeName);
extern char *makeArrayTypeName(char *typeName);
extern void TypeRename(char *oldTypeName, char *newTypeName);
extern char *makeArrayTypeName(char *typeName);
#endif /* PG_TYPE_H */

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_user.h,v 1.4 1997/09/07 04:57:13 momjian Exp $
* $Id: pg_user.h,v 1.5 1997/09/08 02:35:34 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -21,7 +21,7 @@
/* Prototype required for superuser() from superuser.c */
bool superuser(void);
bool superuser(void);
/* ----------------
* pg_user definition. cpp turns this into
@@ -30,12 +30,12 @@ bool superuser(void);
*/
CATALOG(pg_user) BOOTSTRAP
{
NameData usename;
int4 usesysid;
bool usecreatedb;
bool usetrace;
bool usesuper;
bool usecatupd;
NameData usename;
int4 usesysid;
bool usecreatedb;
bool usetrace;
bool usesuper;
bool usecatupd;
} FormData_pg_user;
/* ----------------

View File

@@ -9,7 +9,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_variable.h,v 1.3 1997/09/07 04:57:15 momjian Exp $
* $Id: pg_variable.h,v 1.4 1997/09/08 02:35:34 momjian Exp $
*
* NOTES
* The structures and macros used by the transam/ code
@@ -29,7 +29,7 @@
CATALOG(pg_variable) BOOTSTRAP
{
Oid varfoo;
Oid varfoo;
} FormData_pg_variable;
typedef FormData_pg_variable *Form_pg_variable;

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_version.h,v 1.4 1997/09/07 04:57:17 momjian Exp $
* $Id: pg_version.h,v 1.5 1997/09/08 02:35:35 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -32,9 +32,9 @@
*/
CATALOG(pg_version)
{
Oid verrelid;
Oid verbaseid;
int4 vertime; /* really should be some abstime */
Oid verrelid;
Oid verbaseid;
int4 vertime; /* really should be some abstime */
} FormData_pg_version;
/* ----------------

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: async.h,v 1.6 1997/09/07 04:57:19 momjian Exp $
* $Id: async.h,v 1.7 1997/09/08 02:35:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,11 +15,11 @@
#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;

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994-5, Regents of the University of California
*
* $Id: cluster.h,v 1.3 1997/09/07 04:57:21 momjian Exp $
* $Id: cluster.h,v 1.4 1997/09/08 02:35:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,6 +22,6 @@
/*
* functions
*/
extern void cluster(char oldrelname[], char oldindexname[]);
extern void cluster(char oldrelname[], char oldindexname[]);
#endif /* CLUSTER_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: command.h,v 1.5 1997/09/07 04:57:22 momjian Exp $
* $Id: command.h,v 1.6 1997/09/08 02:35:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,9 +34,9 @@ PerformPortalFetch(char *name, bool forward, int count,
* PerformPortalClose --
* 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 --

View File

@@ -6,15 +6,15 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: creatinh.h,v 1.2 1997/09/07 04:57:24 momjian Exp $
* $Id: creatinh.h,v 1.3 1997/09/08 02:35:44 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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: defrem.h,v 1.8 1997/09/07 04:57:25 momjian Exp $
* $Id: defrem.h,v 1.9 1997/09/08 02:35:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,25 +32,25 @@ extern void
ExtendIndex(char *indexRelationName,
Expr * predicate,
List * rangetable);
extern void RemoveIndex(char *name);
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 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 */

View File

@@ -5,13 +5,13 @@
*
* Copyright (c) 1994-5, Regents of the University of California
*
* $Id: explain.h,v 1.3 1997/09/07 04:57:26 momjian Exp $
* $Id: explain.h,v 1.4 1997/09/08 02:35:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#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 */

View File

@@ -6,14 +6,14 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: purge.h,v 1.2 1997/09/07 04:57:26 momjian Exp $
* $Id: purge.h,v 1.3 1997/09/08 02:35:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PURGE_H
#define PURGE_H
extern int32
extern int32
RelationPurge(char *relationName,
char *absoluteTimeString,
char *relativeTimeString);

View File

@@ -5,13 +5,13 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: recipe.h,v 1.2 1997/09/07 04:57:28 momjian Exp $
* $Id: recipe.h,v 1.3 1997/09/08 02:35:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef RECIPE_H
#define RECIPE_H
extern void beginRecipe(RecipeStmt * stmt);
extern void beginRecipe(RecipeStmt * stmt);
#endif /* RECIPE_H */

View File

@@ -25,9 +25,9 @@
#define SEQ_COL_FIRSTCOL SEQ_COL_NAME
#define SEQ_COL_LASTCOL SEQ_COL_CALLED
extern void DefineSequence(CreateSeqStmt * stmt);
extern int4 nextval(struct varlena * seqname);
extern int4 currval(struct varlena * seqname);
extern void CloseSequences(void);
extern void DefineSequence(CreateSeqStmt * stmt);
extern int4 nextval(struct varlena * seqname);
extern int4 currval(struct varlena * seqname);
extern void CloseSequences(void);
#endif /* SEQUENCE_H */

View File

@@ -13,16 +13,16 @@
#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;
TriggerEvent tg_event;
Relation tg_relation;
HeapTuple tg_trigtuple;
HeapTuple tg_newtuple;
Trigger *tg_trigger;
} TriggerData;
extern TriggerData *CurrentTriggerData;
@@ -58,15 +58,15 @@ extern TriggerData *CurrentTriggerData;
(!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 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 void ExecARUpdateTriggers(Relation rel, ItemPointer tupleid, HeapTuple tuple);
#endif /* TRIGGER_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: vacuum.h,v 1.8 1997/09/07 04:57:33 momjian Exp $
* $Id: vacuum.h,v 1.9 1997/09/08 02:36:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,92 +18,92 @@
typedef struct VAttListData
{
int val_dummy;
int val_dummy;
struct VAttListData *val_next;
} VAttListData;
} 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;
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;
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;
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;
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;
Oid vrl_relid;
struct VRelListData *vrl_next;
} VRelListData;
} 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;
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 bool VacuumRunning;
extern void vc_abort(void);
extern void vacuum(char *vacrel, bool verbose, bool analyze, List * va_spec);
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 */

View File

@@ -6,15 +6,15 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: view.h,v 1.2 1997/09/07 04:57:40 momjian Exp $
* $Id: view.h,v 1.3 1997/09/08 02:36:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#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 */

View File

@@ -6,16 +6,16 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execFlatten.h,v 1.3 1997/09/07 04:57:41 momjian Exp $
* $Id: execFlatten.h,v 1.4 1997/09/08 02:36:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef EXECFLATTEN_H
#define EXECFLATTEN_H
extern Datum ExecEvalIter(Iter * iterNode, ExprContext * econtext, bool * resultIsNull, bool * iterIsDone);
extern Datum ExecEvalIter(Iter * iterNode, ExprContext * econtext, bool * resultIsNull, bool * iterIsDone);
extern void ExecEvalFjoin(TargetEntry * tlist, ExprContext * econtext, bool * isNullVect, bool * fj_isDone);
extern void ExecEvalFjoin(TargetEntry * tlist, ExprContext * econtext, bool * isNullVect, bool * fj_isDone);
#endif /* EXECFLATTEN_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execdebug.h,v 1.3 1997/09/07 04:57:44 momjian Exp $
* $Id: execdebug.h,v 1.4 1997/09/08 02:36:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -176,13 +176,13 @@
* ----------------
*/
#ifdef EXEC_TUPLECOUNT
extern int NTupleProcessed;
extern int NTupleRetrieved;
extern int NTupleReplaced;
extern int NTupleAppended;
extern int NTupleDeleted;
extern int NIndexTupleProcessed;
extern int NIndexTupleInserted;
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++
@@ -377,7 +377,7 @@ extern int NIndexTupleInserted;
*/
#undef NOTYET
extern long NDirectFileRead;
extern long NDirectFileWrite;
extern long NDirectFileRead;
extern long NDirectFileWrite;
#endif /* ExecDebugIncluded */

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execdesc.h,v 1.4 1997/09/07 04:57:47 momjian Exp $
* $Id: execdesc.h,v 1.5 1997/09/08 02:36:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,11 +26,11 @@
*/
typedef struct QueryDesc
{
CmdType operation; /* CMD_SELECT, CMD_UPDATE, etc. */
Query *parsetree;
Plan *plantree;
CommandDest dest; /* the destination output of the execution */
} 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 *

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: executor.h,v 1.11 1997/09/07 04:57:47 momjian Exp $
* $Id: executor.h,v 1.12 1997/09/08 02:36:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,20 +30,20 @@ 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
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 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
extern bool
ExecGetJunkAttribute(JunkFilter * junkfilter, TupleTableSlot * slot,
char *attrName, Datum * value, bool * isNull);
extern HeapTuple ExecRemoveJunk(JunkFilter * junkfilter, TupleTableSlot * slot);
@@ -54,39 +54,39 @@ extern HeapTuple ExecRemoveJunk(JunkFilter * junkfilter, TupleTableSlot * slot);
*/
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 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 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 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
extern Datum
ExecExtractResult(TupleTableSlot * slot, AttrNumber attnum,
bool * isNull);
extern Datum
extern Datum
ExecEvalParam(Param * expression, ExprContext * econtext,
bool * isNull);
/* stop here */
extern char *
extern char *
GetAttributeByName(TupleTableSlot * slot, char *attname,
bool * isNull);
extern Datum
extern Datum
ExecEvalExpr(Node * expression, ExprContext * econtext, bool * isNull,
bool * isDone);
extern bool ExecQual(List * qual, ExprContext * econtext);
extern int ExecTargetListLength(List * targetlist);
extern bool ExecQual(List * qual, ExprContext * econtext);
extern int ExecTargetListLength(List * targetlist);
extern TupleTableSlot *ExecProject(ProjectionInfo * projInfo, bool * isDone);
/*
@@ -98,7 +98,7 @@ 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 void ExecDestroyTupleTable(TupleTable table, bool shouldFree);
extern TupleTableSlot *ExecAllocTableSlot(TupleTable table);
extern TupleTableSlot *
ExecStoreTuple(HeapTuple tuple,
@@ -106,19 +106,19 @@ ExecStoreTuple(HeapTuple tuple,
Buffer buffer,
bool shouldFree);
extern TupleTableSlot *ExecClearTuple(TupleTableSlot * slot);
extern bool ExecSetSlotPolicy(TupleTableSlot * slot, bool shouldFree);
extern TupleDesc
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 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 void ExecInitMarkedTupleSlot(EState * estate, MergeJoinState * mergestate);
extern void ExecInitOuterTupleSlot(EState * estate, HashJoinState * hashstate);
extern TupleDesc ExecGetTupType(Plan * node);
extern TupleDesc ExecTypeFromTL(List * targetList);
@@ -126,21 +126,21 @@ extern TupleDesc ExecTypeFromTL(List * targetList);
/*
* prototypes from functions in execTuples.c
*/
extern void ResetTupleCount(void);
extern void ResetTupleCount(void);
extern void
ExecAssignNodeBaseInfo(EState * estate, CommonState * basenode,
Plan * parent);
extern void ExecAssignExprContext(EState * estate, CommonState * commonstate);
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 void ExecAssignResultTypeFromTL(Plan * node, CommonState * commonstate);
extern TupleDesc ExecGetResultType(CommonState * commonstate);
extern void ExecAssignProjectionInfo(Plan * node, CommonState * commonstate);
extern void ExecFreeProjectionInfo(CommonState * commonstate);
extern void ExecAssignProjectionInfo(Plan * node, CommonState * commonstate);
extern void ExecFreeProjectionInfo(CommonState * commonstate);
extern TupleDesc ExecGetScanType(CommonScanState * csstate);
extern void
ExecAssignScanType(CommonScanState * csstate,
@@ -153,11 +153,11 @@ extern AttributeTupleForm ExecGetTypeInfo(Relation relDesc);
extern void
ExecOpenIndices(Oid resultRelationOid,
RelationInfo * resultRelationInfo);
extern void ExecCloseIndices(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 resetVarAttrLenForCreateTable(TupleDesc tupType);
extern void
setVarAttrLenForCreateTable(TupleDesc tupType,
List * targetList, List * rangeTable);

View File

@@ -6,18 +6,18 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: functions.h,v 1.2 1997/09/07 04:57:48 momjian Exp $
* $Id: functions.h,v 1.3 1997/09/08 02:36:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
extern Datum
extern Datum
ProjectAttribute(TupleDesc TD, TargetEntry * tlist,
HeapTuple tup, bool * isnullP);
extern Datum
extern Datum
postquel_function(Func * funcNode, char **args,
bool * isNull, bool * isDone);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: hashjoin.h,v 1.4 1997/09/07 04:57:49 momjian Exp $
* $Id: hashjoin.h,v 1.5 1997/09/08 02:36:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,7 +20,7 @@
* 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
@@ -30,8 +30,8 @@ typedef int RelativeAddr;
#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
@@ -39,43 +39,43 @@ typedef int *intP;
*/
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 */
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 struct OverflowTupleData
{
RelativeAddr tuple; /* HeapTuple */
RelativeAddr next; /* struct OverflowTupleData * */
} OverflowTupleData; /* real tuple follows here */
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 */
RelativeAddr top; /* HeapTuple */
RelativeAddr bottom; /* HeapTuple */
RelativeAddr firstotuple; /* OverflowTuple */
RelativeAddr lastotuple; /* OverflowTuple */
} HashBucketData; /* real bucket follows here */
typedef HashBucketData *HashBucket;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeAgg.h,v 1.2 1997/09/07 04:57:50 momjian Exp $
* $Id: nodeAgg.h,v 1.3 1997/09/08 02:36:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,8 +14,8 @@
#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 bool ExecInitAgg(Agg * node, EState * estate, Plan * parent);
extern int ExecCountSlotsAgg(Agg * node);
extern void ExecEndAgg(Agg * node);
#endif /* NODEAGG_H */

View File

@@ -6,16 +6,16 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeAppend.h,v 1.3 1997/09/07 04:57:51 momjian Exp $
* $Id: nodeAppend.h,v 1.4 1997/09/08 02:36:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEAPPEND_H
#define NODEAPPEND_H
extern bool ExecInitAppend(Append * node, EState * estate, Plan * parent);
extern int ExecCountSlotsAppend(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);
extern void ExecEndAppend(Append * node);
#endif /* NODEAPPEND_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeGroup.h,v 1.2 1997/09/07 04:57:52 momjian Exp $
* $Id: nodeGroup.h,v 1.3 1997/09/08 02:36:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,8 +14,8 @@
#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 bool ExecInitGroup(Group * node, EState * estate, Plan * parent);
extern int ExecCountSlotsGroup(Group * node);
extern void ExecEndGroup(Group * node);
#endif /* NODEGROUP_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeHash.h,v 1.3 1997/09/07 04:57:52 momjian Exp $
* $Id: nodeHash.h,v 1.4 1997/09/08 02:36:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,21 +14,21 @@
#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 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 void ExecHashTableDestroy(HashJoinTable hashtable);
extern int
ExecHashGetBucket(HashJoinTable hashtable, ExprContext * econtext,
Var * hashkey);
extern HeapTuple
extern HeapTuple
ExecScanHashBucket(HashJoinState * hjstate, HashBucket bucket,
HeapTuple curtuple, List * hjclauses,
ExprContext * econtext);
extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples);
extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples);
#endif /* NODEHASH_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeHashjoin.h,v 1.3 1997/09/07 04:57:53 momjian Exp $
* $Id: nodeHashjoin.h,v 1.4 1997/09/08 02:36:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,13 +15,13 @@
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 *
extern char *
ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer,
File file, char *position);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeIndexscan.h,v 1.3 1997/09/07 04:57:54 momjian Exp $
* $Id: nodeIndexscan.h,v 1.4 1997/09/08 02:36:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,20 +15,20 @@
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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeMaterial.h,v 1.2 1997/09/07 04:57:55 momjian Exp $
* $Id: nodeMaterial.h,v 1.3 1997/09/08 02:36:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,10 +14,10 @@
#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 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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeMergejoin.h,v 1.4 1997/09/07 04:57:56 momjian Exp $
* $Id: nodeMergejoin.h,v 1.5 1997/09/08 02:36:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,10 +15,10 @@
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; */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeNestloop.h,v 1.2 1997/09/07 04:57:57 momjian Exp $
* $Id: nodeNestloop.h,v 1.3 1997/09/08 02:36:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,8 +14,8 @@
#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 bool ExecInitNestLoop(NestLoop * node, EState * estate, Plan * parent);
extern int ExecCountSlotsNestLoop(NestLoop * node);
extern void ExecEndNestLoop(NestLoop * node);
#endif /* NODENESTLOOP_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeResult.h,v 1.2 1997/09/07 04:57:58 momjian Exp $
* $Id: nodeResult.h,v 1.3 1997/09/08 02:36:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,8 +14,8 @@
#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 bool ExecInitResult(Result * node, EState * estate, Plan * parent);
extern int ExecCountSlotsResult(Result * node);
extern void ExecEndResult(Result * node);
#endif /* NODERESULT_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeSeqscan.h,v 1.3 1997/09/07 04:57:59 momjian Exp $
* $Id: nodeSeqscan.h,v 1.4 1997/09/08 02:36:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,11 +14,11 @@
#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 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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeSort.h,v 1.2 1997/09/07 04:58:00 momjian Exp $
* $Id: nodeSort.h,v 1.3 1997/09/08 02:36:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,10 +14,10 @@
#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 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 */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeTee.h,v 1.2 1997/09/07 04:58:00 momjian Exp $
* $Id: nodeTee.h,v 1.3 1997/09/08 02:36:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,9 +14,9 @@
#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 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 */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeUnique.h,v 1.2 1997/09/07 04:58:01 momjian Exp $
* $Id: nodeUnique.h,v 1.3 1997/09/08 02:36:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,8 +14,8 @@
#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 bool ExecInitUnique(Unique * node, EState * estate, Plan * parent);
extern int ExecCountSlotsUnique(Unique * node);
extern void ExecEndUnique(Unique * node);
#endif /* NODEUNIQUE_H */

View File

@@ -36,11 +36,11 @@
typedef struct
{
uint32 alloced; /* # of alloced vals */
uint32 free; /* # of free vals */
TupleDesc tupdesc; /* tuple descriptor */
HeapTuple *vals; /* tuples */
} SPITupleTable;
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
@@ -65,22 +65,22 @@ typedef struct
#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 */

Some files were not shown because too many files have changed in this diff Show More