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

Used modified version of indent that understands over 100 typedefs.

This commit is contained in:
Bruce Momjian
1997-09-08 21:56:23 +00:00
parent 075cede748
commit 59f6a57e59
413 changed files with 4472 additions and 4460 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: funcindex.h,v 1.4 1997/09/08 02:34:03 momjian Exp $
* $Id: funcindex.h,v 1.5 1997/09/08 21:50:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,7 +19,7 @@ typedef struct
Oid arglist[8];
Oid procOid;
NameData funcName;
} FuncIndexInfo;
} FuncIndexInfo;
typedef FuncIndexInfo *FuncIndexInfoPtr;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: genam.h,v 1.9 1997/09/08 02:34:04 momjian Exp $
* $Id: genam.h,v 1.10 1997/09/08 21:50:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,30 +25,30 @@
extern Relation index_open(Oid relationId);
extern Relation index_openr(char *relationName);
extern void index_close(Relation relation);
extern InsertIndexResult
extern InsertIndexResult
index_insert(Relation relation,
Datum * datum, char *nulls,
Datum *datum, char *nulls,
ItemPointer heap_t_ctid,
Relation heapRel);
extern void index_delete(Relation relation, ItemPointer indexItem);
extern IndexScanDesc
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 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);
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);

View File

@@ -52,7 +52,7 @@
typedef struct GISTPageOpaqueData
{
uint32 flags;
} GISTPageOpaqueData;
} GISTPageOpaqueData;
typedef GISTPageOpaqueData *GISTPageOpaque;
@@ -67,7 +67,7 @@ typedef struct GISTSTACK
struct GISTSTACK *gs_parent;
OffsetNumber gs_child;
BlockNumber gs_blk;
} GISTSTACK;
} GISTSTACK;
typedef struct GISTSTATE
{
@@ -80,7 +80,7 @@ typedef struct GISTSTATE
func_ptr equalFn;
bool haskeytype;
bool keytypbyval;
} GISTSTATE;
} GISTSTATE;
/*
@@ -94,7 +94,7 @@ typedef struct GISTScanOpaqueData
struct GISTSTACK *s_markstk;
uint16 s_flags;
struct GISTSTATE *giststate;
} GISTScanOpaqueData;
} GISTScanOpaqueData;
typedef GISTScanOpaqueData *GISTScanOpaque;
@@ -134,7 +134,7 @@ typedef struct GIST_SPLITVEC
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;
} GIST_SPLITVEC;
/*
** An entry on a GiST node. Contains the key (pred), as well as
@@ -150,7 +150,7 @@ typedef struct GISTENTRY
OffsetNumber offset;
int bytes;
bool leafkey;
} GISTENTRY;
} GISTENTRY;
/*
** macro to initialize a GISTENTRY
@@ -172,7 +172,7 @@ typedef struct txtrange
int32 vl_len;
int32 flag;
char bytes[2];
} TXTRANGE;
} TXTRANGE;
typedef struct intrange
{
@@ -184,23 +184,23 @@ typedef struct intrange
* upper is positive infinity. 0 means that both are numbers.
*/
int flag;
} INTRANGE;
} INTRANGE;
extern void
gistbuild(Relation heap,
Relation index, int natts,
AttrNumber *attnum, IndexStrategy istrat,
uint16 pint, Datum * params,
FuncIndexInfo * finfo,
PredInfo * predInfo);
extern InsertIndexResult
gistinsert(Relation r, Datum * datum,
uint16 pint, Datum *params,
FuncIndexInfo *finfo,
PredInfo *predInfo);
extern InsertIndexResult
gistinsert(Relation r, Datum *datum,
char *nulls, ItemPointer ht_ctid, Relation heapRel);
extern void _gistdump(Relation r);
extern void gistfreestack(GISTSTACK * s);
extern void initGISTstate(GISTSTATE * giststate, Relation index);
extern void gistfreestack(GISTSTACK *s);
extern void initGISTstate(GISTSTATE *giststate, Relation index);
extern void
gistdentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr,
gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation r, Page pg, OffsetNumber o, int b, bool l);
extern StrategyNumber RelationGetGISTStrategy(Relation, AttrNumber, RegProcedure);

View File

@@ -16,7 +16,7 @@
#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);

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.10 1997/09/08 20:58:02 momjian Exp $
* $Id: hash.h,v 1.11 1997/09/08 21:50:44 momjian Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
@@ -82,7 +82,7 @@ typedef struct HashPageOpaqueData
OverflowPageAddress hasho_oaddr; /* ovfl address of this ovfl pg */
BlockNumber hasho_nextblkno;/* next ovfl blkno */
BlockNumber hasho_prevblkno;/* previous ovfl (or bucket) blkno */
} HashPageOpaqueData;
} HashPageOpaqueData;
typedef HashPageOpaqueData *HashPageOpaque;
@@ -98,7 +98,7 @@ typedef struct HashScanOpaqueData
{
Buffer hashso_curbuf;
Buffer hashso_mrkbuf;
} HashScanOpaqueData;
} HashScanOpaqueData;
typedef HashScanOpaqueData *HashScanOpaque;
@@ -160,7 +160,7 @@ typedef struct HashMetaPageData
* splitpoints */
BlockNumber hashm_mapp[NCACHED]; /* blknumbers of ovfl page maps */
RegProcedure hashm_procid; /* hash procedure id from pg_proc */
} HashMetaPageData;
} HashMetaPageData;
typedef HashMetaPageData *HashMetaPage;
@@ -180,7 +180,7 @@ extern bool BuildingHash;
typedef struct HashItemData
{
IndexTupleData hash_itup;
} HashItemData;
} HashItemData;
typedef HashItemData *HashItem;
@@ -251,9 +251,9 @@ typedef HashItemData *HashItem;
extern void
hashbuild(Relation heap, Relation index, int natts,
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
extern InsertIndexResult
hashinsert(Relation rel, Datum * datum, char *nulls,
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
extern InsertIndexResult
hashinsert(Relation rel, Datum *datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *hashgettuple(IndexScanDesc scan, ScanDirection dir);
extern char *
@@ -277,7 +277,7 @@ 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 hashname(NameData *n);
/* private routines */
@@ -288,7 +288,7 @@ 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 int32
_hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum,
int32 nbits, int32 ndx);
extern void
@@ -302,7 +302,7 @@ 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 Page
_hash_chgbufaccess(Relation rel, Buffer *bufp, int from_access,
int to_access);
extern void _hash_pageinit(Page page, Size size);
@@ -322,13 +322,13 @@ _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);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heapam.h,v 1.14 1997/09/08 20:58:03 momjian Exp $
* $Id: heapam.h,v 1.15 1997/09/08 21:50:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -72,7 +72,7 @@ typedef struct HeapAccessStatisticsData
int local_heapgettup;
int local_RelationPutHeapTuple;
int local_RelationPutLongHeapTuple;
} HeapAccessStatisticsData;
} HeapAccessStatisticsData;
typedef HeapAccessStatisticsData *HeapAccessStatistics;
@@ -117,13 +117,13 @@ 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 HeapScanDesc
heap_beginscan(Relation relation, int atend,
TimeQual timeQual, unsigned nkeys, ScanKey key);
extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key);
extern void heap_endscan(HeapScanDesc sdesc);
extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer *b);
extern HeapTuple
extern HeapTuple
heap_fetch(Relation relation, TimeQual timeQual,
ItemPointer tid, Buffer *b);
extern Oid heap_insert(Relation relation, HeapTuple tup);
@@ -139,19 +139,19 @@ extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]);
extern void
DataFill(char *data, TupleDesc tupleDesc,
Datum value[], char nulls[], char *infomask,
bits8 * bit);
bits8 *bit);
extern int heap_attisnull(HeapTuple tup, int attnum);
extern int heap_sysattrlen(AttrNumber attno);
extern bool heap_sysattrbyval(AttrNumber attno);
extern char *heap_getsysattr(HeapTuple tup, Buffer b, int attnum);
extern char *
fastgetattr(HeapTuple tup, int attnum,
TupleDesc att, bool * isnull);
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);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: htup.h,v 1.5 1997/09/08 02:34:12 momjian Exp $
* $Id: htup.h,v 1.6 1997/09/08 21:50:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -58,7 +58,7 @@ typedef struct HeapTupleData
/* 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.6 1997/09/08 02:34:13 momjian Exp $
* $Id: ibit.h,v 1.7 1997/09/08 21:50:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,7 +19,7 @@ typedef struct IndexAttributeBitMapData
{
char bits[(MaxIndexAttributeNumber + MaxBitsPerByte - 1)
/ MaxBitsPerByte];
} IndexAttributeBitMapData;
} IndexAttributeBitMapData;
typedef IndexAttributeBitMapData *IndexAttributeBitMap;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: iqual.h,v 1.6 1997/09/08 02:34:14 momjian Exp $
* $Id: iqual.h,v 1.7 1997/09/08 21:50:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,7 +24,7 @@
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.7 1997/09/08 02:34:15 momjian Exp $
* $Id: istrat.h,v 1.8 1997/09/08 21:50:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,24 +47,24 @@
*/
#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);
extern void
IndexSupportInitialize(IndexStrategy indexStrategy,
RegProcedure * indexSupport, Oid indexObjectId,
RegProcedure *indexSupport, Oid indexObjectId,
Oid accessMethodObjectId, StrategyNumber maxStrategyNumber,
StrategyNumber maxSupportNumber, AttrNumber maxAttributeNumber);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: itup.h,v 1.7 1997/09/08 02:34:16 momjian Exp $
* $Id: itup.h,v 1.8 1997/09/08 21:50:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,7 +37,7 @@ typedef struct IndexTupleData
* 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;
@@ -68,7 +68,7 @@ typedef struct PredInfo
{
Node *pred;
Node *oldPred;
} PredInfo;
} 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
TupleDesc tupDesc, bool *isNullOutP);
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.17 1997/09/08 20:58:09 momjian Exp $
* $Id: nbtree.h,v 1.18 1997/09/08 21:50:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -213,12 +213,12 @@ 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);
@@ -244,9 +244,9 @@ extern bool BuildingBtree; /* in nbtree.c */
extern void
btbuild(Relation heap, Relation index, int natts,
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
extern InsertIndexResult
btinsert(Relation rel, Datum * datum, char *nulls,
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
extern InsertIndexResult
btinsert(Relation rel, Datum *datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *btgettuple(IndexScanDesc scan, ScanDirection dir);
extern char *
@@ -276,10 +276,10 @@ _bt_search(Relation rel, int keysz, ScanKey scankey,
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);
@@ -289,10 +289,10 @@ 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);
@@ -303,7 +303,7 @@ 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 bool _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok);
extern BTItem _bt_formitem(IndexTuple itup);
/*

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: relscan.h,v 1.7 1997/09/08 02:34:22 momjian Exp $
* $Id: relscan.h,v 1.8 1997/09/08 21:50:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,7 +37,7 @@ typedef struct HeapScanDescData
uint16 rs_cdelta; /* current delta in chain */
uint16 rs_nkeys; /* number of attributes in keys */
ScanKey rs_key; /* key descriptors */
} HeapScanDescData;
} HeapScanDescData;
typedef HeapScanDescData *HeapScanDesc;
@@ -55,7 +55,7 @@ typedef struct IndexScanDescData
bool scanFromEnd; /* restart scan at end? */
uint16 numberOfKeys; /* number of key attributes */
ScanKey keyData; /* key descriptor */
} IndexScanDescData;
} IndexScanDescData;
typedef IndexScanDescData *IndexScanDesc;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: rtree.h,v 1.9 1997/09/08 20:58:11 momjian Exp $
* $Id: rtree.h,v 1.10 1997/09/08 21:50:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,7 +43,7 @@
typedef struct RTreePageOpaqueData
{
uint32 flags;
} RTreePageOpaqueData;
} RTreePageOpaqueData;
typedef RTreePageOpaqueData *RTreePageOpaque;
@@ -56,7 +56,7 @@ typedef struct RTSTACK
struct RTSTACK *rts_parent;
OffsetNumber rts_child;
BlockNumber rts_blk;
} RTSTACK;
} RTSTACK;
/*
* When we're doing a scan, we need to keep track of the parent stack
@@ -75,7 +75,7 @@ typedef struct RTreeScanOpaqueData
uint16 s_flags;
uint16 s_internalNKey;
ScanKey s_internalKey;
} RTreeScanOpaqueData;
} 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,13 +114,13 @@ extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
* RTree code.
* Defined in access/index-rtree/
*/
extern InsertIndexResult
rtinsert(Relation r, Datum * datum, char *nulls,
extern InsertIndexResult
rtinsert(Relation r, Datum *datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *rtdelete(Relation r, ItemPointer tid);
extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
extern IndexScanDesc
extern IndexScanDesc
rtbeginscan(Relation r, bool fromEnd, uint16 nkeys,
ScanKey key);
@@ -131,7 +131,7 @@ 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);
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
extern void _rtdump(Relation r);
/* rtscan.c */
@@ -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,13 +6,13 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: rtstrat.h,v 1.3 1997/09/08 02:34:25 momjian Exp $
* $Id: rtstrat.h,v 1.4 1997/09/08 21:50:59 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.5 1997/09/08 02:34:26 momjian Exp $
* $Id: skey.h,v 1.6 1997/09/08 21:51:01 momjian Exp $
*
*
* Note:
@@ -26,7 +26,7 @@ typedef struct ScanKeyData
func_ptr sk_func;
int32 sk_nargs;
Datum sk_argument; /* data to compare */
} ScanKeyData;
} ScanKeyData;
typedef ScanKeyData *ScanKey;

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: strat.h,v 1.7 1997/09/08 20:58:12 momjian Exp $
* $Id: strat.h,v 1.8 1997/09/08 21:51:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,11 +23,12 @@ typedef uint16 StrategyNumber;
typedef struct StrategyTransformMapData
{
StrategyNumber strategy[1]; /* VARIABLE LENGTH ARRAY */
} StrategyTransformMapData; /* VARIABLE LENGTH
} StrategyTransformMapData; /* VARIABLE LENGTH
*
*
* STRUCTURE */
*
*
*
* STRUCTURE */
typedef StrategyTransformMapData *StrategyTransformMap;
@@ -35,7 +36,7 @@ typedef struct StrategyOperatorData
{
StrategyNumber strategy;
bits16 flags; /* scan qualification flags h/skey.h */
} StrategyOperatorData;
} StrategyOperatorData;
typedef StrategyOperatorData *StrategyOperator;
@@ -43,14 +44,14 @@ typedef struct StrategyTermData
{ /* conjunctive term */
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 */
} StrategyExpressionData; /* VARIABLE LENGTH STRUCTURE */
typedef StrategyExpressionData *StrategyExpression;
@@ -61,7 +62,7 @@ typedef struct StrategyEvaluationData
StrategyTransformMap commuteTransform;
StrategyTransformMap negateCommuteTransform;
StrategyExpression expression[12]; /* XXX VARIABLE LENGTH */
} StrategyEvaluationData; /* VARIABLE LENGTH STRUCTURE */
} StrategyEvaluationData; /* VARIABLE LENGTH STRUCTURE */
typedef StrategyEvaluationData *StrategyEvaluation;
@@ -81,14 +82,14 @@ typedef StrategyEvaluationData *StrategyEvaluation;
typedef struct StrategyMapData
{
ScanKeyData entry[1]; /* VARIABLE LENGTH ARRAY */
} StrategyMapData; /* VARIABLE LENGTH STRUCTURE */
} 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.10 1997/09/08 20:58:12 momjian Exp $
* $Id: transam.h,v 1.11 1997/09/08 21:51:03 momjian Exp $
*
* NOTES
* Transaction System Version 101 now support proper oid
@@ -86,7 +86,7 @@ typedef unsigned char XidStatus;/* (2 bits) */
typedef struct LogRelationContentsData
{
int TransSystemVersion;
} LogRelationContentsData;
} LogRelationContentsData;
typedef LogRelationContentsData *LogRelationContents;
@@ -105,7 +105,7 @@ typedef LogRelationContentsData *LogRelationContents;
typedef struct TimeRelationContentsData
{
int TransSystemVersion;
} TimeRelationContentsData;
} TimeRelationContentsData;
typedef TimeRelationContentsData *TimeRelationContents;
@@ -131,7 +131,7 @@ typedef struct VariableRelationContentsData
TransactionId nextXidData;
TransactionId lastXidData;
Oid nextOid;
} VariableRelationContentsData;
} VariableRelationContentsData;
typedef VariableRelationContentsData *VariableRelationContents;
@@ -155,26 +155,26 @@ 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);
BlockNumber blockNumber, TransactionId xid, bool *failP);
extern void
TransBlockNumberSetXidStatus(Relation relation,
BlockNumber blockNumber, TransactionId xid, XidStatus xstatus,
bool * failP);
bool *failP);
extern AbsoluteTime
TransBlockNumberGetCommitTime(Relation relation,
BlockNumber blockNumber, TransactionId xid, bool * failP);
BlockNumber blockNumber, TransactionId xid, bool *failP);
extern void
TransBlockNumberSetCommitTime(Relation relation,
BlockNumber blockNumber, TransactionId xid, AbsoluteTime xtime,
bool * failP);
bool *failP);
/* in transam/varsup.c */
extern void VariableRelationPutNextXid(TransactionId xid);
extern void GetNewTransactionId(TransactionId * xid);
extern void GetNewTransactionId(TransactionId *xid);
extern void UpdateLastCommittedXid(TransactionId xid);
extern void GetNewObjectId(Oid * oid_return);
extern void GetNewObjectId(Oid *oid_return);
extern void CheckMaxObjectId(Oid assigned_oid);
/* ----------------

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: tupdesc.h,v 1.11 1997/09/08 20:58:13 momjian Exp $
* $Id: tupdesc.h,v 1.12 1997/09/08 21:51:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,7 +30,7 @@ typedef struct constrCheck
char *ccname;
char *ccbin;
char *ccsrc;
} ConstrCheck;
} ConstrCheck;
/* This structure contains constraints of a tuple */
typedef struct tupleConstr
@@ -40,7 +40,7 @@ typedef struct tupleConstr
uint16 num_defval;
uint16 num_check;
bool has_not_null;
} TupleConstr;
} TupleConstr;
/*
* This structure contains all information (i.e. from Classes
@@ -65,7 +65,7 @@ extern TupleDesc CreateTupleDescCopyConstr(TupleDesc tupdesc);
extern void FreeTupleDesc(TupleDesc tupdesc);
extern bool
extern bool
TupleDescInitEntry(TupleDesc desc,
AttrNumber attributeNumber,
char *attributeName,
@@ -73,6 +73,6 @@ TupleDescInitEntry(TupleDesc desc,
int attdim,
bool attisset);
extern TupleDesc BuildDescForRelation(List * schema, char *relname);
extern TupleDesc BuildDescForRelation(List *schema, char *relname);
#endif /* TUPDESC_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: valid.h,v 1.6 1997/09/08 02:34:32 momjian Exp $
* $Id: valid.h,v 1.7 1997/09/08 21:51:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,11 +22,11 @@
* ----------------
*/
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,

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: xact.h,v 1.8 1997/09/08 02:34:33 momjian Exp $
* $Id: xact.h,v 1.9 1997/09/08 21:51:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,7 +27,7 @@ typedef struct TransactionStateData
AbsoluteTime startTime;
int state;
int blockState;
} TransactionStateData;
} TransactionStateData;
/* ----------------
* transaction states
@@ -89,12 +89,12 @@ extern TransactionId xidin(char *representation);
extern char *xidout(TransactionId transactionId);
extern bool xideq(TransactionId xid1, TransactionId xid2);
extern bool TransactionIdIsValid(TransactionId transactionId);
extern void StoreInvalidTransactionId(TransactionId * destination);
extern void StoreInvalidTransactionId(TransactionId *destination);
extern void
TransactionIdStore(TransactionId transactionId,
TransactionId * destination);
TransactionId *destination);
extern bool TransactionIdEquals(TransactionId id1, TransactionId id2);
extern bool TransactionIdIsLessThan(TransactionId id1, TransactionId id2);
extern void TransactionIdAdd(TransactionId * xid, int value);
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.8 1997/09/08 20:58:15 momjian Exp $
* $Id: bootstrap.h,v 1.9 1997/09/08 21:51:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,7 +23,7 @@ typedef struct hashnode
{
int strnum; /* Index into string table */
struct hashnode *next;
} hashnode;
} hashnode;
#define EMITPROMPT printf("> ")
@@ -39,9 +39,9 @@ index_register(char *heap,
int natts,
AttrNumber *attnos,
uint16 nparams,
Datum * params,
FuncIndexInfo * finfo,
PredInfo * predInfo);
Datum *params,
FuncIndexInfo *finfo,
PredInfo *predInfo);
extern void err_out(void);
extern void InsertOneTuple(Oid objectid);

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: c.h,v 1.18 1997/09/08 02:33:49 momjian Exp $
* $Id: c.h,v 1.19 1997/09/08 21:50:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -277,7 +277,7 @@ typedef unsigned int Index;
typedef struct
{
int indx[MAXDIM];
} IntArray;
} IntArray;
/*
* Offset --
@@ -568,7 +568,7 @@ typedef char *ExcMessage;
typedef struct Exception
{
ExcMessage message;
} Exception;
} Exception;
/*
* NO_ASSERT_CHECKING, if defined, turns off all the assertions.
@@ -704,7 +704,7 @@ extern Exception BadState;
/* in utils/error/assert.c */
extern int
ExceptionalCondition(char *conditionName,
Exception * exceptionP, char *details,
Exception *exceptionP, char *details,
char *fileName, int lineNumber);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heap.h,v 1.6 1997/09/08 02:34:50 momjian Exp $
* $Id: heap.h,v 1.7 1997/09/08 21:51:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,7 +17,7 @@
extern Relation heap_creatr(char *relname, unsigned smgr, TupleDesc att);
extern Oid
extern Oid
heap_create(char relname[],
char *typename,
int arch,

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: index.h,v 1.7 1997/09/08 02:34:52 momjian Exp $
* $Id: index.h,v 1.8 1997/09/08 21:51:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,11 +18,11 @@
#include <access/itup.h>
#include <access/funcindex.h>
extern Form_pg_am
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,
@@ -32,15 +32,15 @@ InitIndexStrategy(int numatts,
extern void
index_create(char *heapRelationName,
char *indexRelationName,
FuncIndexInfo * funcInfo,
List * attributeList,
FuncIndexInfo *funcInfo,
List *attributeList,
Oid accessMethodObjectId,
int numatts,
AttrNumber attNums[],
Oid classObjectId[],
uint16 parameterCount,
Datum * parameter,
Node * predicate,
Datum *parameter,
Node *predicate,
bool islossy,
bool unique);
@@ -49,20 +49,20 @@ extern void index_destroy(Oid indexId);
extern void
FormIndexDatum(int numberOfAttributes,
AttrNumber attributeNumber[], HeapTuple heapTuple,
TupleDesc heapDescriptor, Buffer buffer, Datum * datum,
TupleDesc heapDescriptor, Buffer buffer, Datum *datum,
char *nullv, FuncIndexInfoPtr fInfo);
extern void UpdateStats(Oid relid, long reltuples, bool hasindex);
extern void
FillDummyExprContext(ExprContext * econtext, TupleTableSlot * slot,
FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot,
TupleDesc tupdesc, Buffer buffer);
extern void
index_build(Relation heapRelation, Relation indexRelation,
int numberOfAttributes, AttrNumber attributeNumber[],
uint16 parameterCount, Datum * parameter, FuncIndexInfo * funcInfo,
PredInfo * predInfo);
uint16 parameterCount, Datum *parameter, FuncIndexInfo *funcInfo,
PredInfo *predInfo);
extern bool IndexIsUnique(Oid indexId);
extern bool IndexIsUniqueNoCache(Oid indexId);

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: indexing.h,v 1.6 1997/09/08 02:34:53 momjian Exp $
* $Id: indexing.h,v 1.7 1997/09/08 21:51:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -62,28 +62,28 @@ extern char *IndexedCatalogNames[];
* 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 CatalogCloseIndices(int nIndices, Relation *idescs);
extern void
CatalogIndexInsert(Relation * idescs,
CatalogIndexInsert(Relation *idescs,
int nIndices,
Relation heapRelation,
HeapTuple heapTuple);
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);
char *procName, int nargs, Oid *argTypes);
extern HeapTuple ProcedureSrcIndexScan(Relation heapRelation, text *procSrc);
extern HeapTuple TypeOidIndexScan(Relation heapRelation, Oid typeId);
extern HeapTuple TypeNameIndexScan(Relation heapRelation, char *typeName);
extern HeapTuple ClassNameIndexScan(Relation heapRelation, char *relName);

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_aggregate.h,v 1.10 1997/09/08 02:34:54 momjian Exp $
* $Id: pg_aggregate.h,v 1.11 1997/09/08 21:51:27 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -141,6 +141,6 @@ AggregateCreate(char *aggName,
char *agginitval2);
extern char *
AggNameGetInitVal(char *aggName, Oid basetype,
int xfuncno, bool * isNull);
int xfuncno, bool *isNull);
#endif /* PG_AGGREGATE_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.29 1997/09/08 02:35:23 momjian Exp $
* $Id: pg_proc.h,v 1.30 1997/09/08 21:51:29 momjian Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -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,
@@ -1116,7 +1116,7 @@ ProcedureCreate(char *procedureName,
int32 perbyte_cpu,
int32 percall_cpu,
int32 outin_ratio,
List * argList,
List *argList,
CommandDest dest);

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_type.h,v 1.18 1997/09/08 02:35:32 momjian Exp $
* $Id: pg_type.h,v 1.19 1997/09/08 21:51:31 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -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 TypeGet(char *typeName, bool *defined);
extern Oid TypeShellMake(char *typeName);
extern Oid
extern Oid
TypeCreate(char *typeName,
Oid relationOid,
int16 internalSize,

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: command.h,v 1.6 1997/09/08 02:35:42 momjian Exp $
* $Id: command.h,v 1.7 1997/09/08 21:51:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,6 +44,6 @@ extern void PortalCleanup(Portal portal);
*/
extern void
PerformAddAttribute(char *relationName, char *userName,
bool inh, ColumnDef * colDef);
bool inh, ColumnDef *colDef);
#endif /* COMMAND_H */

View File

@@ -6,14 +6,14 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: creatinh.h,v 1.3 1997/09/08 02:35:44 momjian Exp $
* $Id: creatinh.h,v 1.4 1997/09/08 21:51:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef CREATINH_H
#define CREATINH_H
extern void DefineRelation(CreateStmt * stmt);
extern void DefineRelation(CreateStmt *stmt);
extern void RemoveRelation(char *name);
extern char *MakeArchiveName(Oid relid);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: defrem.h,v 1.9 1997/09/08 02:35:47 momjian Exp $
* $Id: defrem.h,v 1.10 1997/09/08 21:51:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,30 +23,30 @@ extern void
DefineIndex(char *heapRelationName,
char *indexRelationName,
char *accessMethodName,
List * attributeList,
List * parameterList,
List *attributeList,
List *parameterList,
bool unique,
Expr * predicate,
List * rangetable);
Expr *predicate,
List *rangetable);
extern void
ExtendIndex(char *indexRelationName,
Expr * predicate,
List * rangetable);
Expr *predicate,
List *rangetable);
extern void RemoveIndex(char *name);
/*
* prototypes in define.c
*/
extern void CreateFunction(ProcedureStmt * stmt, CommandDest dest);
extern void DefineOperator(char *name, List * parameters);
extern void DefineAggregate(char *name, List * parameters);
extern void DefineType(char *name, List * parameters);
extern void CreateFunction(ProcedureStmt * stmt, CommandDest dest);
extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest);
extern void DefineOperator(char *name, List *parameters);
extern void DefineAggregate(char *name, List *parameters);
extern void DefineType(char *name, List *parameters);
extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest);
/*
* prototypes in remove.c
*/
extern void RemoveFunction(char *functionName, int nargs, List * argNameList);
extern void RemoveFunction(char *functionName, int nargs, List *argNameList);
extern void
RemoveOperator(char *operatorName,
char *typeName1, char *typeName2);

View File

@@ -5,13 +5,13 @@
*
* Copyright (c) 1994-5, Regents of the University of California
*
* $Id: explain.h,v 1.4 1997/09/08 02:35:52 momjian Exp $
* $Id: explain.h,v 1.5 1997/09/08 21:51:38 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.3 1997/09/08 02:35:53 momjian Exp $
* $Id: purge.h,v 1.4 1997/09/08 21:51:39 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.3 1997/09/08 02:35:56 momjian Exp $
* $Id: recipe.h,v 1.4 1997/09/08 21:51:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef RECIPE_H
#define RECIPE_H
extern void beginRecipe(RecipeStmt * stmt);
extern void beginRecipe(RecipeStmt *stmt);
#endif /* RECIPE_H */

View File

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

View File

@@ -22,7 +22,7 @@ typedef struct TriggerData
HeapTuple tg_trigtuple;
HeapTuple tg_newtuple;
Trigger *tg_trigger;
} TriggerData;
} TriggerData;
extern TriggerData *CurrentTriggerData;
@@ -58,8 +58,8 @@ extern TriggerData *CurrentTriggerData;
(!TRIGGER_FIRED_BEFORE (event))
extern void CreateTrigger(CreateTrigStmt * stmt);
extern void DropTrigger(DropTrigStmt * stmt);
extern void CreateTrigger(CreateTrigStmt *stmt);
extern void DropTrigger(DropTrigStmt *stmt);
extern void RelationRemoveTriggers(Relation rel);
extern HeapTuple ExecBRInsertTriggers(Relation rel, HeapTuple tuple);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: vacuum.h,v 1.9 1997/09/08 02:36:05 momjian Exp $
* $Id: vacuum.h,v 1.10 1997/09/08 21:51:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,7 +20,7 @@ typedef struct VAttListData
{
int val_dummy;
struct VAttListData *val_next;
} VAttListData;
} VAttListData;
typedef VAttListData *VAttList;
@@ -31,7 +31,7 @@ typedef struct VPageDescrData
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;
} VPageDescrData;
typedef VPageDescrData *VPageDescr;
@@ -40,7 +40,7 @@ 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;
} VPageListData;
typedef VPageListData *VPageList;
@@ -50,7 +50,7 @@ typedef struct
FuncIndexInfo *finfoP;
IndexTupleForm tform;
int natts;
} IndDesc;
} IndDesc;
typedef struct
{
@@ -78,13 +78,13 @@ typedef struct
f_cmpgt;
regproc outfunc;
bool initialized;
} VacAttrStats;
} VacAttrStats;
typedef struct VRelListData
{
Oid vrl_relid;
struct VRelListData *vrl_next;
} VRelListData;
} VRelListData;
typedef VRelListData *VRelList;
@@ -98,12 +98,12 @@ typedef struct VRelStats
bool hasindex;
int va_natts; /* number of attrs being analyzed */
VacAttrStats *vacattrstats;
} VRelStats;
} VRelStats;
extern bool VacuumRunning;
extern void vc_abort(void);
extern void vacuum(char *vacrel, bool verbose, bool analyze, List * va_spec);
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,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: view.h,v 1.3 1997/09/08 02:36:05 momjian Exp $
* $Id: view.h,v 1.4 1997/09/08 21:51:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,7 +14,7 @@
#define VIEW_H
extern char *MakeRetrieveViewRuleName(char *view_name);
extern void DefineView(char *view_name, Query * view_parse);
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.4 1997/09/08 02:36:08 momjian Exp $
* $Id: execFlatten.h,v 1.5 1997/09/08 21:51:49 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

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execdesc.h,v 1.5 1997/09/08 02:36:16 momjian Exp $
* $Id: execdesc.h,v 1.6 1997/09/08 21:51:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,11 +30,11 @@ typedef struct QueryDesc
Query *parsetree;
Plan *plantree;
CommandDest dest; /* the destination output of the execution */
} QueryDesc;
} QueryDesc;
/* in pquery.c */
extern QueryDesc *
CreateQueryDesc(Query * parsetree, Plan * plantree,
CreateQueryDesc(Query *parsetree, Plan *plantree,
CommandDest dest);
#endif /* EXECDESC_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: executor.h,v 1.12 1997/09/08 02:36:17 momjian Exp $
* $Id: executor.h,v 1.13 1997/09/08 21:51:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,41 +29,41 @@
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
Relation *returnRelation, Pointer *returnScanDesc);
extern void ExecCloseR(Plan *node);
extern void ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent);
extern HeapScanDesc
ExecReScanR(Relation relDesc, HeapScanDesc scanDesc,
ScanDirection direction, int nkeys, ScanKey skeys);
extern void ExecMarkPos(Plan * node);
extern void ExecRestrPos(Plan * node);
extern void ExecMarkPos(Plan *node);
extern void ExecRestrPos(Plan *node);
extern Relation ExecCreatR(TupleDesc tupType, Oid relationOid);
/*
* prototypes from functions in execJunk.c
*/
extern JunkFilter *ExecInitJunkFilter(List * targetList);
extern bool
ExecGetJunkAttribute(JunkFilter * junkfilter, TupleTableSlot * slot,
char *attrName, Datum * value, bool * isNull);
extern HeapTuple ExecRemoveJunk(JunkFilter * junkfilter, TupleTableSlot * slot);
extern JunkFilter *ExecInitJunkFilter(List *targetList);
extern bool
ExecGetJunkAttribute(JunkFilter *junkfilter, TupleTableSlot *slot,
char *attrName, Datum *value, bool *isNull);
extern HeapTuple ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot);
/*
* prototypes from functions in execMain.c
*/
extern TupleDesc ExecutorStart(QueryDesc * queryDesc, EState * estate);
extern TupleTableSlot *ExecutorRun(QueryDesc * queryDesc, EState * estate, int feature, int count);
extern void ExecutorEnd(QueryDesc * queryDesc, EState * estate);
extern TupleDesc ExecutorStart(QueryDesc *queryDesc, EState *estate);
extern TupleTableSlot *ExecutorRun(QueryDesc *queryDesc, EState *estate, int feature, int count);
extern void ExecutorEnd(QueryDesc *queryDesc, EState *estate);
extern HeapTuple ExecConstraints(char *caller, Relation rel, HeapTuple tuple);
/*
* prototypes from functions in execProcnode.c
*/
extern bool ExecInitNode(Plan * node, EState * estate, Plan * parent);
extern TupleTableSlot *ExecProcNode(Plan * node, Plan * parent);
extern int ExecCountSlotsNode(Plan * node);
extern void ExecEndNode(Plan * node, Plan * parent);
extern bool ExecInitNode(Plan *node, EState *estate, Plan *parent);
extern TupleTableSlot *ExecProcNode(Plan *node, Plan *parent);
extern int ExecCountSlotsNode(Plan *node);
extern void ExecEndNode(Plan *node, Plan *parent);
/*
* prototypes from functions in execQual.c
@@ -71,28 +71,28 @@ extern void ExecEndNode(Plan * node, Plan * parent);
extern bool execConstByVal;
extern int execConstLen;
extern Datum
ExecExtractResult(TupleTableSlot * slot, AttrNumber attnum,
bool * isNull);
extern Datum
ExecEvalParam(Param * expression, ExprContext * econtext,
bool * isNull);
extern Datum
ExecExtractResult(TupleTableSlot *slot, AttrNumber attnum,
bool *isNull);
extern Datum
ExecEvalParam(Param *expression, ExprContext *econtext,
bool *isNull);
/* stop here */
extern char *
GetAttributeByName(TupleTableSlot * slot, char *attname,
bool * isNull);
extern Datum
ExecEvalExpr(Node * expression, ExprContext * econtext, bool * isNull,
bool * isDone);
extern bool ExecQual(List * qual, ExprContext * econtext);
extern int ExecTargetListLength(List * targetlist);
extern TupleTableSlot *ExecProject(ProjectionInfo * projInfo, bool * isDone);
GetAttributeByName(TupleTableSlot *slot, char *attname,
bool *isNull);
extern Datum
ExecEvalExpr(Node *expression, ExprContext *econtext, bool *isNull,
bool *isDone);
extern bool ExecQual(List *qual, ExprContext *econtext);
extern int ExecTargetListLength(List *targetlist);
extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo, bool *isDone);
/*
* prototypes from functions in execScan.c
*/
extern TupleTableSlot *ExecScan(Scan * node, TupleTableSlot * (*accessMtd) ());
extern TupleTableSlot *ExecScan(Scan *node, TupleTableSlot *(*accessMtd) ());
/*
* prototypes from functions in execTuples.c
@@ -102,65 +102,65 @@ extern void ExecDestroyTupleTable(TupleTable table, bool shouldFree);
extern TupleTableSlot *ExecAllocTableSlot(TupleTable table);
extern TupleTableSlot *
ExecStoreTuple(HeapTuple tuple,
TupleTableSlot * slot,
TupleTableSlot *slot,
Buffer buffer,
bool shouldFree);
extern TupleTableSlot *ExecClearTuple(TupleTableSlot * slot);
extern bool ExecSetSlotPolicy(TupleTableSlot * slot, bool shouldFree);
extern TupleDesc
ExecSetSlotDescriptor(TupleTableSlot * slot,
extern TupleTableSlot *ExecClearTuple(TupleTableSlot *slot);
extern bool ExecSetSlotPolicy(TupleTableSlot *slot, bool shouldFree);
extern TupleDesc
ExecSetSlotDescriptor(TupleTableSlot *slot,
TupleDesc tupdesc);
extern void ExecSetSlotDescriptorIsNew(TupleTableSlot * slot, bool isNew);
extern void ExecIncrSlotBufferRefcnt(TupleTableSlot * slot);
extern bool TupIsNull(TupleTableSlot * slot);
extern void ExecInitResultTupleSlot(EState * estate, CommonState * commonstate);
extern void 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);
ExecInitScanTupleSlot(EState *estate,
CommonScanState *commonscanstate);
extern void ExecInitMarkedTupleSlot(EState *estate, MergeJoinState *mergestate);
extern void ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate);
extern TupleDesc ExecGetTupType(Plan * node);
extern TupleDesc ExecTypeFromTL(List * targetList);
extern TupleDesc ExecGetTupType(Plan *node);
extern TupleDesc ExecTypeFromTL(List *targetList);
/*
* prototypes from functions in execTuples.c
*/
extern void ResetTupleCount(void);
extern void
ExecAssignNodeBaseInfo(EState * estate, CommonState * basenode,
Plan * parent);
extern void ExecAssignExprContext(EState * estate, CommonState * commonstate);
ExecAssignNodeBaseInfo(EState *estate, CommonState *basenode,
Plan *parent);
extern void ExecAssignExprContext(EState *estate, CommonState *commonstate);
extern void
ExecAssignResultType(CommonState * commonstate,
ExecAssignResultType(CommonState *commonstate,
TupleDesc tupDesc);
extern void
ExecAssignResultTypeFromOuterPlan(Plan * node,
CommonState * commonstate);
extern void ExecAssignResultTypeFromTL(Plan * node, CommonState * commonstate);
extern TupleDesc ExecGetResultType(CommonState * commonstate);
extern void ExecAssignProjectionInfo(Plan * node, CommonState * commonstate);
extern void ExecFreeProjectionInfo(CommonState * commonstate);
extern TupleDesc ExecGetScanType(CommonScanState * csstate);
ExecAssignResultTypeFromOuterPlan(Plan *node,
CommonState *commonstate);
extern void ExecAssignResultTypeFromTL(Plan *node, CommonState *commonstate);
extern TupleDesc ExecGetResultType(CommonState *commonstate);
extern void ExecAssignProjectionInfo(Plan *node, CommonState *commonstate);
extern void ExecFreeProjectionInfo(CommonState *commonstate);
extern TupleDesc ExecGetScanType(CommonScanState *csstate);
extern void
ExecAssignScanType(CommonScanState * csstate,
ExecAssignScanType(CommonScanState *csstate,
TupleDesc tupDesc);
extern void
ExecAssignScanTypeFromOuterPlan(Plan * node,
CommonScanState * csstate);
ExecAssignScanTypeFromOuterPlan(Plan *node,
CommonScanState *csstate);
extern AttributeTupleForm ExecGetTypeInfo(Relation relDesc);
extern void
ExecOpenIndices(Oid resultRelationOid,
RelationInfo * resultRelationInfo);
extern void ExecCloseIndices(RelationInfo * resultRelationInfo);
RelationInfo *resultRelationInfo);
extern void ExecCloseIndices(RelationInfo *resultRelationInfo);
extern void
ExecInsertIndexTuples(TupleTableSlot * slot, ItemPointer tupleid,
EState * estate, bool is_update);
ExecInsertIndexTuples(TupleTableSlot *slot, ItemPointer tupleid,
EState *estate, bool is_update);
extern void resetVarAttrLenForCreateTable(TupleDesc tupType);
extern void
setVarAttrLenForCreateTable(TupleDesc tupType,
List * targetList, List * rangeTable);
List *targetList, List *rangeTable);
/* ----------------------------------------------------------------

View File

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

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: hashjoin.h,v 1.5 1997/09/08 02:36:20 momjian Exp $
* $Id: hashjoin.h,v 1.6 1997/09/08 21:52:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,7 +57,7 @@ typedef struct HashTableData
int curbatch;
int nprocess;
int pcount;
} HashTableData; /* real hash table follows here */
} HashTableData; /* real hash table follows here */
typedef HashTableData *HashJoinTable;
@@ -65,7 +65,7 @@ typedef struct OverflowTupleData
{
RelativeAddr tuple; /* HeapTuple */
RelativeAddr next; /* struct OverflowTupleData * */
} OverflowTupleData; /* real tuple follows here */
} OverflowTupleData; /* real tuple follows here */
typedef OverflowTupleData *OverflowTuple;
@@ -75,7 +75,7 @@ typedef struct HashBucketData
RelativeAddr bottom; /* HeapTuple */
RelativeAddr firstotuple; /* OverflowTuple */
RelativeAddr lastotuple; /* OverflowTuple */
} HashBucketData; /* real bucket follows here */
} 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.4 1997/09/08 20:58:17 momjian Exp $
* $Id: nodeAgg.h,v 1.5 1997/09/08 21:52:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,7 +14,7 @@
#define NODEAGG_H
extern TupleTableSlot *ExecAgg(Agg *node);
extern bool ExecInitAgg(Agg *node, EState * estate, Plan * parent);
extern bool ExecInitAgg(Agg *node, EState *estate, Plan *parent);
extern int ExecCountSlotsAgg(Agg *node);
extern void ExecEndAgg(Agg *node);

View File

@@ -6,14 +6,14 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeAppend.h,v 1.5 1997/09/08 20:58:19 momjian Exp $
* $Id: nodeAppend.h,v 1.6 1997/09/08 21:52:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEAPPEND_H
#define NODEAPPEND_H
extern bool ExecInitAppend(Append *node, EState * estate, Plan * parent);
extern bool ExecInitAppend(Append *node, EState *estate, Plan *parent);
extern int ExecCountSlotsAppend(Append *node);
extern TupleTableSlot *ExecProcAppend(Append *node);
extern void ExecEndAppend(Append *node);

View File

@@ -6,16 +6,16 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeGroup.h,v 1.3 1997/09/08 02:36:23 momjian Exp $
* $Id: nodeGroup.h,v 1.4 1997/09/08 21:52:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEGROUP_H
#define NODEGROUP_H
extern TupleTableSlot *ExecGroup(Group * node);
extern bool ExecInitGroup(Group * node, EState * estate, Plan * parent);
extern int ExecCountSlotsGroup(Group * node);
extern void ExecEndGroup(Group * node);
extern TupleTableSlot *ExecGroup(Group *node);
extern bool ExecInitGroup(Group *node, EState *estate, Plan *parent);
extern int ExecCountSlotsGroup(Group *node);
extern void ExecEndGroup(Group *node);
#endif /* NODEGROUP_H */

View File

@@ -6,29 +6,29 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeHash.h,v 1.4 1997/09/08 02:36:23 momjian Exp $
* $Id: nodeHash.h,v 1.5 1997/09/08 21:52:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEHASH_H
#define NODEHASH_H
extern TupleTableSlot *ExecHash(Hash * node);
extern bool ExecInitHash(Hash * node, EState * estate, Plan * parent);
extern int ExecCountSlotsHash(Hash * node);
extern void ExecEndHash(Hash * node);
extern HashJoinTable ExecHashTableCreate(Hash * node);
extern TupleTableSlot *ExecHash(Hash *node);
extern bool ExecInitHash(Hash *node, EState *estate, Plan *parent);
extern int ExecCountSlotsHash(Hash *node);
extern void ExecEndHash(Hash *node);
extern HashJoinTable ExecHashTableCreate(Hash *node);
extern void
ExecHashTableInsert(HashJoinTable hashtable, ExprContext * econtext,
Var * hashkey, File * batches);
ExecHashTableInsert(HashJoinTable hashtable, ExprContext *econtext,
Var *hashkey, File *batches);
extern void ExecHashTableDestroy(HashJoinTable hashtable);
extern int
ExecHashGetBucket(HashJoinTable hashtable, ExprContext * econtext,
Var * hashkey);
extern HeapTuple
ExecScanHashBucket(HashJoinState * hjstate, HashBucket bucket,
HeapTuple curtuple, List * hjclauses,
ExprContext * econtext);
ExecHashGetBucket(HashJoinTable hashtable, ExprContext *econtext,
Var *hashkey);
extern HeapTuple
ExecScanHashBucket(HashJoinState *hjstate, HashBucket bucket,
HeapTuple curtuple, List *hjclauses,
ExprContext *econtext);
extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples);
#endif /* NODEHASH_H */

View File

@@ -6,20 +6,20 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeHashjoin.h,v 1.4 1997/09/08 02:36:25 momjian Exp $
* $Id: nodeHashjoin.h,v 1.5 1997/09/08 21:52:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEHASHJOIN_H
#define NODEHASHJOIN_H
extern TupleTableSlot *ExecHashJoin(HashJoin * node);
extern TupleTableSlot *ExecHashJoin(HashJoin *node);
extern bool ExecInitHashJoin(HashJoin * node, EState * estate, Plan * parent);
extern bool ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent);
extern int ExecCountSlotsHashJoin(HashJoin * node);
extern int ExecCountSlotsHashJoin(HashJoin *node);
extern void ExecEndHashJoin(HashJoin * node);
extern void ExecEndHashJoin(HashJoin *node);
extern char *
ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer,

View File

@@ -6,29 +6,29 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeIndexscan.h,v 1.4 1997/09/08 02:36:25 momjian Exp $
* $Id: nodeIndexscan.h,v 1.5 1997/09/08 21:52:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEINDEXSCAN_H
#define NODEINDEXSCAN_H
extern TupleTableSlot *ExecIndexScan(IndexScan * node);
extern TupleTableSlot *ExecIndexScan(IndexScan *node);
extern void ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent);
extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecEndIndexScan(IndexScan * node);
extern void ExecEndIndexScan(IndexScan *node);
extern void ExecIndexMarkPos(IndexScan * node);
extern void ExecIndexMarkPos(IndexScan *node);
extern void ExecIndexRestrPos(IndexScan * node);
extern void ExecIndexRestrPos(IndexScan *node);
extern void ExecUpdateIndexScanKeys(IndexScan * node, ExprContext * econtext);
extern void ExecUpdateIndexScanKeys(IndexScan *node, ExprContext *econtext);
extern bool ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent);
extern bool ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent);
extern int ExecCountSlotsIndexScan(IndexScan * node);
extern int ExecCountSlotsIndexScan(IndexScan *node);
extern void ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent);
extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent);
#endif /* NODEINDEXSCAN_H */

View File

@@ -6,18 +6,18 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeMaterial.h,v 1.3 1997/09/08 02:36:26 momjian Exp $
* $Id: nodeMaterial.h,v 1.4 1997/09/08 21:52:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEMATERIAL_H
#define NODEMATERIAL_H
extern TupleTableSlot *ExecMaterial(Material * node);
extern bool ExecInitMaterial(Material * node, EState * estate, Plan * parent);
extern int ExecCountSlotsMaterial(Material * node);
extern void ExecEndMaterial(Material * node);
extern List ExecMaterialMarkPos(Material * node);
extern void ExecMaterialRestrPos(Material * node);
extern TupleTableSlot *ExecMaterial(Material *node);
extern bool ExecInitMaterial(Material *node, EState *estate, Plan *parent);
extern int ExecCountSlotsMaterial(Material *node);
extern void ExecEndMaterial(Material *node);
extern List ExecMaterialMarkPos(Material *node);
extern void ExecMaterialRestrPos(Material *node);
#endif /* NODEMATERIAL_H */

View File

@@ -6,19 +6,19 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeMergejoin.h,v 1.5 1997/09/08 02:36:29 momjian Exp $
* $Id: nodeMergejoin.h,v 1.6 1997/09/08 21:52:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEMERGEJOIN_H
#define NODEMERGEJOIN_H
extern TupleTableSlot *ExecMergeJoin(MergeJoin * node);
extern TupleTableSlot *ExecMergeJoin(MergeJoin *node);
extern bool ExecInitMergeJoin(MergeJoin * node, EState * estate, Plan * parent);
extern bool ExecInitMergeJoin(MergeJoin *node, EState *estate, Plan *parent);
extern int ExecCountSlotsMergeJoin(MergeJoin * node);
extern int ExecCountSlotsMergeJoin(MergeJoin *node);
extern void ExecEndMergeJoin(MergeJoin * node);
extern void ExecEndMergeJoin(MergeJoin *node);
#endif /* NODEMERGEJOIN_H; */

View File

@@ -6,16 +6,16 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeNestloop.h,v 1.3 1997/09/08 02:36:34 momjian Exp $
* $Id: nodeNestloop.h,v 1.4 1997/09/08 21:52:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODENESTLOOP_H
#define NODENESTLOOP_H
extern TupleTableSlot *ExecNestLoop(NestLoop * node, Plan * parent);
extern bool ExecInitNestLoop(NestLoop * node, EState * estate, Plan * parent);
extern int ExecCountSlotsNestLoop(NestLoop * node);
extern void ExecEndNestLoop(NestLoop * node);
extern TupleTableSlot *ExecNestLoop(NestLoop *node, Plan *parent);
extern bool ExecInitNestLoop(NestLoop *node, EState *estate, Plan *parent);
extern int ExecCountSlotsNestLoop(NestLoop *node);
extern void ExecEndNestLoop(NestLoop *node);
#endif /* NODENESTLOOP_H */

View File

@@ -6,16 +6,16 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeResult.h,v 1.3 1997/09/08 02:36:38 momjian Exp $
* $Id: nodeResult.h,v 1.4 1997/09/08 21:52:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODERESULT_H
#define NODERESULT_H
extern TupleTableSlot *ExecResult(Result * node);
extern bool ExecInitResult(Result * node, EState * estate, Plan * parent);
extern int ExecCountSlotsResult(Result * node);
extern void ExecEndResult(Result * node);
extern TupleTableSlot *ExecResult(Result *node);
extern bool ExecInitResult(Result *node, EState *estate, Plan *parent);
extern int ExecCountSlotsResult(Result *node);
extern void ExecEndResult(Result *node);
#endif /* NODERESULT_H */

View File

@@ -6,19 +6,19 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeSeqscan.h,v 1.4 1997/09/08 02:36:39 momjian Exp $
* $Id: nodeSeqscan.h,v 1.5 1997/09/08 21:52:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODESEQSCAN_H
#define NODESEQSCAN_H
extern TupleTableSlot *ExecSeqScan(SeqScan * node);
extern bool ExecInitSeqScan(SeqScan * node, EState * estate, Plan * parent);
extern int ExecCountSlotsSeqScan(SeqScan * node);
extern void ExecEndSeqScan(SeqScan * node);
extern void ExecSeqReScan(SeqScan * node, ExprContext * exprCtxt, Plan * parent);
extern void ExecSeqMarkPos(SeqScan * node);
extern void ExecSeqRestrPos(SeqScan * node);
extern TupleTableSlot *ExecSeqScan(SeqScan *node);
extern bool ExecInitSeqScan(SeqScan *node, EState *estate, Plan *parent);
extern int ExecCountSlotsSeqScan(SeqScan *node);
extern void ExecEndSeqScan(SeqScan *node);
extern void ExecSeqReScan(SeqScan *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecSeqMarkPos(SeqScan *node);
extern void ExecSeqRestrPos(SeqScan *node);
#endif /* NODESEQSCAN_H */

View File

@@ -6,18 +6,18 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeSort.h,v 1.3 1997/09/08 02:36:40 momjian Exp $
* $Id: nodeSort.h,v 1.4 1997/09/08 21:52:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODESORT_H
#define NODESORT_H
extern TupleTableSlot *ExecSort(Sort * node);
extern bool ExecInitSort(Sort * node, EState * estate, Plan * parent);
extern int ExecCountSlotsSort(Sort * node);
extern void ExecEndSort(Sort * node);
extern void ExecSortMarkPos(Sort * node);
extern void ExecSortRestrPos(Sort * node);
extern TupleTableSlot *ExecSort(Sort *node);
extern bool ExecInitSort(Sort *node, EState *estate, Plan *parent);
extern int ExecCountSlotsSort(Sort *node);
extern void ExecEndSort(Sort *node);
extern void ExecSortMarkPos(Sort *node);
extern void ExecSortRestrPos(Sort *node);
#endif /* NODESORT_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeTee.h,v 1.3 1997/09/08 02:36:41 momjian Exp $
* $Id: nodeTee.h,v 1.4 1997/09/08 21:52:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -13,10 +13,10 @@
#ifndef NODETEE_H
#define NODETEE_H
extern TupleTableSlot *ExecTee(Tee * node, Plan * parent);
extern bool ExecInitTee(Tee * node, EState * estate, Plan * parent);
extern void ExecTeeReScan(Tee * node, ExprContext * exprCtxt, Plan * parent);
extern void ExecEndTee(Tee * node, Plan * parent);
extern int ExecCountSlotsTee(Tee * node);
extern TupleTableSlot *ExecTee(Tee *node, Plan *parent);
extern bool ExecInitTee(Tee *node, EState *estate, Plan *parent);
extern void ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecEndTee(Tee *node, Plan *parent);
extern int ExecCountSlotsTee(Tee *node);
#endif /* NODETEE_H */

View File

@@ -6,16 +6,16 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeUnique.h,v 1.3 1997/09/08 02:36:42 momjian Exp $
* $Id: nodeUnique.h,v 1.4 1997/09/08 21:52:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEUNIQUE_H
#define NODEUNIQUE_H
extern TupleTableSlot *ExecUnique(Unique * node);
extern bool ExecInitUnique(Unique * node, EState * estate, Plan * parent);
extern int ExecCountSlotsUnique(Unique * node);
extern void ExecEndUnique(Unique * node);
extern TupleTableSlot *ExecUnique(Unique *node);
extern bool ExecInitUnique(Unique *node, EState *estate, Plan *parent);
extern int ExecCountSlotsUnique(Unique *node);
extern void ExecEndUnique(Unique *node);
#endif /* NODEUNIQUE_H */

View File

@@ -40,7 +40,7 @@ typedef struct
uint32 free; /* # of free vals */
TupleDesc tupdesc; /* tuple descriptor */
HeapTuple *vals; /* tuples */
} SPITupleTable;
} SPITupleTable;
#define SPI_ERROR_CONNECT -1
#define SPI_ERROR_COPY -2
@@ -73,12 +73,12 @@ 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_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_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);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: tuptable.h,v 1.6 1997/09/08 02:36:45 momjian Exp $
* $Id: tuptable.h,v 1.7 1997/09/08 21:52:16 momjian Exp $
*
* NOTES
* The tuple table interface is getting pretty ugly.
@@ -53,7 +53,7 @@ typedef struct TupleTableSlot
TupleDesc ttc_tupleDescriptor;
Buffer ttc_buffer;
int ttc_whichplan;
} TupleTableSlot;
} TupleTableSlot;
/* ----------------
* tuple table data structure
@@ -64,7 +64,7 @@ typedef struct TupleTableData
int size; /* size of the table */
int next; /* next available slot number */
TupleTableSlot *array; /* array of TupleTableSlot's */
} TupleTableData;
} TupleTableData;
typedef TupleTableData *TupleTable;

View File

@@ -26,7 +26,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: dllist.h,v 1.6 1997/09/08 02:36:47 momjian Exp $
* $Id: dllist.h,v 1.7 1997/09/08 21:52:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,13 +44,13 @@ typedef struct Dlelem
struct Dlelem *dle_prev; /* previous element */
void *dle_val; /* value of the element */
struct Dllist *dle_list; /* what list this element is in */
} Dlelem;
} Dlelem;
typedef struct Dllist
{
Dlelem *dll_head;
Dlelem *dll_tail;
} Dllist;
} Dllist;
extern Dllist *DLNewList(void); /* initialize a new list */
extern void DLFreeList(Dllist *); /* free up a list and all the
@@ -59,14 +59,13 @@ extern Dlelem *DLNewElem(void *val);
extern void DLFreeElem(Dlelem *);
extern Dlelem *DLGetHead(Dllist *);
extern Dlelem *DLGetTail(Dllist *);
extern Dlelem *DLRemTail(Dllist * l);
extern Dlelem *DLRemTail(Dllist *l);
extern Dlelem *DLGetPred(Dlelem *); /* get predecessor */
extern Dlelem *DLGetSucc(Dlelem *); /* get successor */
extern void DLRemove(Dlelem *); /* removes node from list */
extern void DLAddHead(Dllist * list, Dlelem * node);
extern void DLAddTail(Dllist * list, Dlelem * node);
extern Dlelem *DLRemHead(Dllist * list); /* remove and return the
* head */
extern void DLAddHead(Dllist *list, Dlelem *node);
extern void DLAddTail(Dllist *list, Dlelem *node);
extern Dlelem *DLRemHead(Dllist *list); /* remove and return the head */
#define DLE_VAL(x) (x->dle_val)

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: fstack.h,v 1.4 1997/09/08 02:36:51 momjian Exp $
* $Id: fstack.h,v 1.5 1997/09/08 21:52:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -51,7 +51,7 @@ typedef struct FixedStackData
FixedItem top; /* Top item on the stack or NULL */
Offset offset; /* Offset from struct base to item */
/* this could be signed short int! */
} FixedStackData;
} FixedStackData;
typedef FixedStackData *FixedStack;

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: hasht.h,v 1.4 1997/09/08 02:36:54 momjian Exp $
* $Id: hasht.h,v 1.5 1997/09/08 21:52:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,6 +18,6 @@
typedef void (*HashtFunc) ();
extern void HashTableWalk(HTAB * hashtable, HashtFunc function, int arg);
extern void HashTableWalk(HTAB *hashtable, HashtFunc function, int arg);
#endif /* HASHT_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: stringinfo.h,v 1.4 1997/09/08 02:36:55 momjian Exp $
* $Id: stringinfo.h,v 1.5 1997/09/08 21:52:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,7 +28,7 @@ typedef struct StringInfoData
char *data;
int maxlen;
int len;
} StringInfoData;
} StringInfoData;
typedef StringInfoData *StringInfo;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: auth.h,v 1.6 1997/09/08 02:36:58 momjian Exp $
* $Id: auth.h,v 1.7 1997/09/08 21:52:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,11 +30,11 @@
#define DEFAULT_CLIENT_AUTHSVC "kerberos"
#endif /* KRB4 || KRB5 */
extern int fe_sendauth(MsgType msgtype, Port * port, char *hostname);
extern int fe_sendauth(MsgType msgtype, Port *port, char *hostname);
extern void fe_setauthsvc(char *name);
extern MsgType fe_getauthsvc();
extern char *fe_getauthname(void);
extern int be_recvauth(MsgType msgtype, Port * port, char *username, StartupInfo * sp);
extern int be_recvauth(MsgType msgtype, Port *port, char *username, StartupInfo *sp);
extern void be_setauthsvc(char *name);
/* the value that matches any dbName value when doing

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: be-fsstubs.h,v 1.4 1997/09/08 02:37:00 momjian Exp $
* $Id: be-fsstubs.h,v 1.5 1997/09/08 21:52:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,8 +21,8 @@
#define LOread(f,l) loread(f,l)
#define LOwrite(f,b) lowrite(f,b)
extern Oid lo_import(text * filename);
extern int4 lo_export(Oid lobjId, text * filename);
extern Oid lo_import(text *filename);
extern int4 lo_export(Oid lobjId, text *filename);
extern Oid lo_creat(int mode);

View File

@@ -4,7 +4,7 @@
* Interface to hba.c
*
*
* $Id: hba.h,v 1.4 1997/09/07 04:58:19 momjian Exp $
* $Id: hba.h,v 1.5 1997/09/08 21:52:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,16 +38,17 @@
enum Userauth
{
Trust, Ident, Password
Trust, Ident,
Password
};
extern int
hba_recvauth(const Port * port, const char database[], const char user[],
hba_recvauth(const Port *port, const char database[], const char user[],
const char DataDir[]);
void
find_hba_entry(const char DataDir[], const struct in_addr ip_addr,
const char database[],
bool * host_ok_p, enum Userauth * userauth_p,
bool *host_ok_p, enum Userauth * userauth_p,
char usermap_name[], bool find_password_entries);
#endif

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-be.h,v 1.6 1997/09/08 02:37:03 momjian Exp $
* $Id: libpq-be.h,v 1.7 1997/09/08 21:52:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,12 +31,12 @@
/* in be-dumpdata.c */
extern void be_portalinit(void);
extern void be_portalpush(PortalEntry * entry);
extern void be_portalpush(PortalEntry *entry);
extern PortalEntry *be_portalpop(void);
extern PortalEntry *be_currentportal(void);
extern PortalEntry *be_newportal(void);
extern void
be_typeinit(PortalEntry * entry, TupleDesc attrs,
be_typeinit(PortalEntry *entry, TupleDesc attrs,
int natts);
extern void be_printtup(HeapTuple tuple, TupleDesc typeinfo);
@@ -44,7 +44,7 @@ extern void be_printtup(HeapTuple tuple, TupleDesc typeinfo);
/* in be-pqexec.c */
extern char *
PQfn(int fnid, int *result_buf, int result_len, int result_is_int,
PQArgBlock * args, int nargs);
PQArgBlock *args, int nargs);
extern char *PQexec(char *query);
extern int pqtest_PQexec(char *q);
extern int pqtest_PQfn(char *q);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq.h,v 1.7 1997/09/08 02:37:08 momjian Exp $
* $Id: libpq.h,v 1.8 1997/09/08 21:52:36 momjian Exp $
*
* NOTES
* This file contains definitions for structures and
@@ -36,7 +36,7 @@ typedef struct
int *ptr; /* can't use void (dec compiler barfs) */
int integer;
} u;
} PQArgBlock;
} PQArgBlock;
/* ----------------
* TypeBlock --
@@ -50,7 +50,7 @@ typedef struct TypeBlock
char name[NAMEDATALEN]; /* name of the attribute */
int adtid; /* adtid of the type */
int adtsize; /* adtsize of the type */
} TypeBlock;
} TypeBlock;
/* ----------------
* TupleBlock --
@@ -66,7 +66,7 @@ typedef struct TupleBlock
* foreach tuple */
struct TupleBlock *next; /* next tuple block */
int tuple_index; /* current tuple index */
} TupleBlock;
} TupleBlock;
/* ----------------
* GroupBuffer --
@@ -80,7 +80,7 @@ typedef struct GroupBuffer
TypeBlock *types; /* types of the attributes */
TupleBlock *tuples; /* tuples in this group */
struct GroupBuffer *next; /* next group */
} GroupBuffer;
} GroupBuffer;
/* ----------------
* PortalBuffer --
@@ -93,7 +93,7 @@ typedef struct PortalBuffer
int no_tuples; /* number of tuples in this portal buffer */
int no_groups; /* number of tuple groups */
GroupBuffer *groups; /* linked list of tuple groups */
} PortalBuffer;
} PortalBuffer;
/* ----------------
* PortalEntry --
@@ -111,7 +111,7 @@ typedef struct PortalEntry
PortalBuffer *portal; /* tuples contained in this portal */
Pointer portalcxt; /* memory context (for backend) */
Pointer result; /* result for PQexec */
} PortalEntry;
} PortalEntry;
#define PORTALS_INITIAL_SIZE 32
#define PORTALS_GROW_BY 32
@@ -130,7 +130,7 @@ typedef struct PQNotifyList
int be_pid; /* process id of backend */
int valid; /* has this already been handled by user. */
/* SLNode Node; */
} PQNotifyList;
} PQNotifyList;
/*
* Exceptions.
@@ -170,37 +170,37 @@ extern void PQuntrace(void);
extern int PQnportals(int rule_p);
extern void PQpnames(char **pnames, int rule_p);
extern PortalBuffer *PQparray(char *pname);
extern int PQrulep(PortalBuffer * portal);
extern int PQntuples(PortalBuffer * portal);
extern int PQninstances(PortalBuffer * portal);
extern int PQngroups(PortalBuffer * portal);
extern int PQntuplesGroup(PortalBuffer * portal, int group_index);
extern int PQninstancesGroup(PortalBuffer * portal, int group_index);
extern int PQnfieldsGroup(PortalBuffer * portal, int group_index);
extern int PQfnumberGroup(PortalBuffer * portal, int group_index, char *field_name);
extern char *PQfnameGroup(PortalBuffer * portal, int group_index, int field_number);
extern int PQrulep(PortalBuffer *portal);
extern int PQntuples(PortalBuffer *portal);
extern int PQninstances(PortalBuffer *portal);
extern int PQngroups(PortalBuffer *portal);
extern int PQntuplesGroup(PortalBuffer *portal, int group_index);
extern int PQninstancesGroup(PortalBuffer *portal, int group_index);
extern int PQnfieldsGroup(PortalBuffer *portal, int group_index);
extern int PQfnumberGroup(PortalBuffer *portal, int group_index, char *field_name);
extern char *PQfnameGroup(PortalBuffer *portal, int group_index, int field_number);
extern int
PQftypeGroup(PortalBuffer * portal, int group_index,
PQftypeGroup(PortalBuffer *portal, int group_index,
int field_number);
extern int
PQfsizeGroup(PortalBuffer * portal, int group_index,
PQfsizeGroup(PortalBuffer *portal, int group_index,
int field_number);
extern GroupBuffer *PQgroup(PortalBuffer * portal, int tuple_index);
extern int PQgetgroup(PortalBuffer * portal, int tuple_index);
extern int PQnfields(PortalBuffer * portal, int tuple_index);
extern int PQfnumber(PortalBuffer * portal, int tuple_index, char *field_name);
extern char *PQfname(PortalBuffer * portal, int tuple_index, int field_number);
extern int PQftype(PortalBuffer * portal, int tuple_index, int field_number);
extern int PQfsize(PortalBuffer * portal, int tuple_index, int field_number);
extern int PQsametype(PortalBuffer * portal, int tuple_index1, int tuple_index2);
extern char *PQgetvalue(PortalBuffer * portal, int tuple_index, int field_number);
extern char *PQgetAttr(PortalBuffer * portal, int tuple_index, int field_number);
extern int PQgetlength(PortalBuffer * portal, int tuple_index, int field_number);
extern GroupBuffer *PQgroup(PortalBuffer *portal, int tuple_index);
extern int PQgetgroup(PortalBuffer *portal, int tuple_index);
extern int PQnfields(PortalBuffer *portal, int tuple_index);
extern int PQfnumber(PortalBuffer *portal, int tuple_index, char *field_name);
extern char *PQfname(PortalBuffer *portal, int tuple_index, int field_number);
extern int PQftype(PortalBuffer *portal, int tuple_index, int field_number);
extern int PQfsize(PortalBuffer *portal, int tuple_index, int field_number);
extern int PQsametype(PortalBuffer *portal, int tuple_index1, int tuple_index2);
extern char *PQgetvalue(PortalBuffer *portal, int tuple_index, int field_number);
extern char *PQgetAttr(PortalBuffer *portal, int tuple_index, int field_number);
extern int PQgetlength(PortalBuffer *portal, int tuple_index, int field_number);
extern void PQclear(char *pname);
extern void PQcleanNotify(void);
extern void PQnotifies_init(void);
extern PQNotifyList *PQnotifies(void);
extern void PQremoveNotify(PQNotifyList * nPtr);
extern void PQremoveNotify(PQNotifyList *nPtr);
extern void PQappendNotify(char *relname, int pid);
/*
@@ -209,7 +209,7 @@ extern void PQappendNotify(char *relname, int pid);
extern caddr_t pbuf_alloc(size_t size);
extern void pbuf_free(caddr_t pointer);
extern PortalBuffer *pbuf_addPortal(void);
extern GroupBuffer *pbuf_addGroup(PortalBuffer * portal);
extern GroupBuffer *pbuf_addGroup(PortalBuffer *portal);
extern TypeBlock *pbuf_addTypes(int n);
extern TupleBlock *pbuf_addTuples(void);
extern char **pbuf_addTuple(int n);
@@ -217,18 +217,18 @@ extern int *pbuf_addTupleValueLengths(int n);
extern char *pbuf_addValues(int n);
extern PortalEntry *pbuf_addEntry(void);
extern void pbuf_freeEntry(int i);
extern void pbuf_freeTypes(TypeBlock * types);
extern void pbuf_freeTuples(TupleBlock * tuples, int no_tuples, int no_fields);
extern void pbuf_freeGroup(GroupBuffer * group);
extern void pbuf_freePortal(PortalBuffer * portal);
extern void pbuf_freeTypes(TypeBlock *types);
extern void pbuf_freeTuples(TupleBlock *tuples, int no_tuples, int no_fields);
extern void pbuf_freeGroup(GroupBuffer *group);
extern void pbuf_freePortal(PortalBuffer *portal);
extern int pbuf_getIndex(char *pname);
extern void pbuf_setportalinfo(PortalEntry * entry, char *pname);
extern void pbuf_setportalinfo(PortalEntry *entry, char *pname);
extern PortalEntry *pbuf_setup(char *pname);
extern void pbuf_close(char *pname);
extern GroupBuffer *pbuf_findGroup(PortalBuffer * portal, int group_index);
extern int pbuf_findFnumber(GroupBuffer * group, char *field_name);
extern void pbuf_checkFnumber(GroupBuffer * group, int field_number);
extern char *pbuf_findFname(GroupBuffer * group, int field_number);
extern GroupBuffer *pbuf_findGroup(PortalBuffer *portal, int group_index);
extern int pbuf_findFnumber(GroupBuffer *group, char *field_name);
extern void pbuf_checkFnumber(GroupBuffer *group, int field_number);
extern char *pbuf_findFname(GroupBuffer *group, int field_number);
/*
* prototypes for functions in pqcomm.c
@@ -253,12 +253,12 @@ extern int pq_getinserv(struct sockaddr_in * sin, char *host, char *serv);
extern int
pq_connect(char *dbname, char *user, char *args, char *hostName,
char *debugTty, char *execFile, short portName);
extern int StreamOpen(char *hostName, short portName, Port * port);
extern int StreamOpen(char *hostName, short portName, Port *port);
extern void pq_regoob(void (*fptr) ());
extern void pq_unregoob(void);
extern void pq_async_notify(void);
extern int StreamServerPort(char *hostName, short portName, int *fdP);
extern int StreamConnection(int server_fd, Port * port);
extern int StreamConnection(int server_fd, Port *port);
extern void StreamClose(int sock);
#endif /* LIBPQ_H */

View File

@@ -7,7 +7,7 @@
#define PWFILE_NAME_SIZE USERMAP_NAME_SIZE
int
verify_password(char *user, char *password, Port * port,
verify_password(char *user, char *password, Port *port,
char *database, char *DataDir);
#endif

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.h,v 1.13 1997/09/08 20:58:26 momjian Exp $
* $Id: pqcomm.h,v 1.14 1997/09/08 21:52:38 momjian Exp $
*
* NOTES
* Some of this should move to libpq.h
@@ -74,7 +74,7 @@ typedef struct StartupInfo
char options[ARGV_SIZE]; /* possible additional args */
char execFile[ARGV_SIZE]; /* possible backend to use */
char tty[PATH_SIZE]; /* possible tty for debug output */
} StartupInfo;
} StartupInfo;
/* amount of available data in a packet buffer */
#define MESSAGE_SIZE sizeof(StartupInfo) + 5 /* why 5? BJM 2/11/97 */
@@ -91,7 +91,7 @@ typedef struct PacketBuf
int len;
MsgType msgtype;
char data[MESSAGE_SIZE];
} PacketBuf;
} PacketBuf;
/* update the conversion routines
StartupInfo2PacketBuf() and PacketBuf2StartupInfo() (decl. below)
@@ -113,7 +113,7 @@ typedef struct Port
* PacketBufId id;
*//* id of packet buf currently in use */
PacketBuf buf; /* stream implementation (curr pack buf) */
} Port;
} Port;
/* invalid socket descriptor */
#define INVALID_SOCK (-1)
@@ -147,9 +147,9 @@ int pqPutByte(int, FILE *);
/*
* prototypes for functions in pqpacket.c
*/
extern int PacketReceive(Port * port, PacketBuf * buf, char nonBlocking);
extern int PacketReceive(Port *port, PacketBuf *buf, char nonBlocking);
extern int
PacketSend(Port * port, PacketBuf * buf,
PacketSend(Port *port, PacketBuf *buf,
PacketLen len, char nonBlocking);
/* extern PacketBuf* StartupInfo2PacketBuf(StartupInfo*); */

View File

@@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: miscadmin.h,v 1.13 1997/09/08 02:33:50 momjian Exp $
* $Id: miscadmin.h,v 1.14 1997/09/08 21:50:26 momjian Exp $
*
* NOTES
* some of the information in this file will be moved to
@@ -154,7 +154,7 @@ typedef enum ProcessingMode
BootstrapProcessing, /* bootstrap creation of template database */
InitProcessing, /* initializing system */
NormalProcessing /* normal processing */
} ProcessingMode;
} ProcessingMode;
/*****************************************************************************

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execnodes.h,v 1.11 1997/09/08 20:58:40 momjian Exp $
* $Id: execnodes.h,v 1.12 1997/09/08 21:52:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,7 +40,7 @@ typedef struct IndexInfo
AttrNumber *ii_KeyAttributeNumbers;
FuncIndexInfoPtr ii_FuncIndexInfo;
Node *ii_Predicate;
} IndexInfo;
} IndexInfo;
/* ----------------
* RelationInfo information
@@ -65,7 +65,7 @@ typedef struct RelationInfo
int ri_NumIndices;
RelationPtr ri_IndexRelationDescs;
IndexInfo **ri_IndexRelationInfo;
} RelationInfo;
} RelationInfo;
/* ----------------
* ExprContext
@@ -90,7 +90,7 @@ typedef struct ExprContext
List *ecxt_range_table;
Datum *ecxt_values; /* precomputed values for aggreg */
char *ecxt_nulls; /* null flags for aggreg values */
} ExprContext;
} ExprContext;
/* ----------------
* ProjectionInfo node information
@@ -116,7 +116,7 @@ typedef struct ProjectionInfo
Datum *pi_tupValue;
ExprContext *pi_exprContext;
TupleTableSlot *pi_slot;
} ProjectionInfo;
} ProjectionInfo;
/* ----------------
* JunkFilter
@@ -157,7 +157,7 @@ typedef struct JunkFilter
int jf_cleanLength;
TupleDesc jf_cleanTupType;
AttrNumber *jf_cleanMap;
} JunkFilter;
} JunkFilter;
/* ----------------
* EState information
@@ -205,7 +205,7 @@ typedef struct EState
int *es_refcount;
uint32 es_processed; /* # of tuples processed */
Oid es_lastoid; /* last oid processed (by INSERT) */
} EState;
} EState;
/* ----------------
* Executor Type information needed by plannodes.h
@@ -265,7 +265,7 @@ typedef struct CommonState
ExprContext *cs_ExprContext;
ProjectionInfo *cs_ProjInfo;
bool cs_TupFromTlist;
} CommonState;
} CommonState;
/* ----------------------------------------------------------------
@@ -293,7 +293,7 @@ typedef struct ResultState
{
CommonState cstate; /* its first field is NodeTag */
int rs_done;
} ResultState;
} ResultState;
/* ----------------
* AppendState information
@@ -362,7 +362,7 @@ typedef struct CommonScanState
Relation css_currentRelation;
HeapScanDesc css_currentScanDesc;
TupleTableSlot *css_ScanTupleSlot;
} CommonScanState;
} CommonScanState;
/* ----------------
* IndexScanState information
@@ -400,7 +400,7 @@ typedef struct IndexScanState
Pointer iss_RuntimeKeyInfo;
RelationPtr iss_RelationDescs;
IndexScanDescPtr iss_ScanDescs;
} IndexScanState;
} IndexScanState;
/* ----------------------------------------------------------------
@@ -444,7 +444,7 @@ typedef struct NestLoopState
{
JoinState jstate; /* its first field is NodeTag */
bool nl_PortalFlag;
} NestLoopState;
} NestLoopState;
/* ----------------
* MergeJoinState information
@@ -473,7 +473,7 @@ typedef struct MergeJoinState
List *mj_ISortopO;
int mj_JoinState;
TupleTableSlot *mj_MarkedTupleSlot;
} MergeJoinState;
} MergeJoinState;
/* ----------------
* HashJoinState information
@@ -523,7 +523,7 @@ typedef struct HashJoinState
int hj_OuterReadBlk;
TupleTableSlot *hj_OuterTupleSlot;
TupleTableSlot *hj_HashTupleSlot;
} HashJoinState;
} HashJoinState;
/* ----------------------------------------------------------------
@@ -562,7 +562,7 @@ typedef struct MaterialState
CommonScanState csstate; /* its first field is NodeTag */
bool mat_Flag;
Relation mat_TempRelation;
} MaterialState;
} MaterialState;
/* ---------------------
* AggregateState information
@@ -587,7 +587,7 @@ typedef struct GroupState
bool grp_useLastTuple; /* last tuple not processed yet */
bool grp_done;
TupleTableSlot *grp_lastSlot;
} GroupState;
} GroupState;
/* ----------------
* SortState information
@@ -626,7 +626,7 @@ typedef struct SortState
bool sort_Flag;
ScanKey sort_Keys;
bool cleaned;
} SortState;
} SortState;
/* ----------------
* UniqueState information
@@ -670,7 +670,7 @@ typedef struct HashState
{
CommonState cstate; /* its first field is NodeTag */
File *hashBatches;
} HashState;
} HashState;
/* -----------------------
* TeeState information
@@ -697,6 +697,6 @@ typedef struct TeeState
MemoryContext tee_mcxt;
HeapScanDesc tee_leftScanDesc;
HeapScanDesc tee_rightScanDesc;
} TeeState;
} TeeState;
#endif /* EXECNODES_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: memnodes.h,v 1.6 1997/09/08 02:37:19 momjian Exp $
* $Id: memnodes.h,v 1.7 1997/09/08 21:52:44 momjian Exp $
*
* XXX the typedefs in this file are different from the other ???nodes.h;
* they are pointers to structures instead of the structures themselves.
@@ -48,10 +48,10 @@
typedef struct MemoryContextMethodsData
{
Pointer(*alloc) ();
Pointer (*alloc) ();
void (*free_p) (); /* need to use free as a #define, so can't
* use free */
Pointer(*realloc) ();
Pointer (*realloc) ();
char *(*getName) ();
void (*dump) ();
} *MemoryContextMethods;

View File

@@ -6,17 +6,17 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodeFuncs.h,v 1.4 1997/09/08 02:37:20 momjian Exp $
* $Id: nodeFuncs.h,v 1.5 1997/09/08 21:52:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEFUNCS_H
#define NODEFUNCS_H
extern bool single_node(Node * node);
extern bool var_is_outer(Var * var);
extern bool var_is_rel(Var * var);
extern Oper *replace_opid(Oper * oper);
extern bool non_null(Expr * c);
extern bool single_node(Node *node);
extern bool var_is_outer(Var *var);
extern bool var_is_rel(Var *var);
extern Oper *replace_opid(Oper *oper);
extern bool non_null(Expr *c);
#endif /* NODEFUNCS_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodes.h,v 1.13 1997/09/08 02:37:21 momjian Exp $
* $Id: nodes.h,v 1.14 1997/09/08 21:52:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -209,7 +209,7 @@ typedef enum NodeTag
T_SortClause,
T_GroupClause,
T_SubSelect
} NodeTag;
} NodeTag;
/*
* The first field of a node of any type is gauranteed to be the NodeTag.
@@ -220,7 +220,7 @@ typedef enum NodeTag
typedef struct Node
{
NodeTag type;
} Node;
} Node;
#define nodeTag(_node_) ((Node*)_node_)->type
@@ -303,7 +303,7 @@ typedef enum CmdType
CMD_NOTIFY,
CMD_UTILITY /* cmds like create, destroy, copy,
* vacuum, etc. */
} CmdType;
} CmdType;
#endif /* NODES_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: params.h,v 1.5 1997/09/08 02:37:22 momjian Exp $
* $Id: params.h,v 1.6 1997/09/08 21:52:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,7 +83,7 @@ typedef struct ParamListInfoData
bool isnull;
bool byval;
Datum value;
} ParamListInfoData;
} ParamListInfoData;
typedef ParamListInfoData *ParamListInfo;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: parsenodes.h,v 1.26 1997/09/08 20:58:47 momjian Exp $
* $Id: parsenodes.h,v 1.27 1997/09/08 21:52:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,7 +64,7 @@ typedef struct Query
List *join_relation_list_; /* list of relations generated by
* joins */
bool query_is_archival_; /* archival query flag */
} Query;
} Query;
/*****************************************************************************
@@ -98,7 +98,7 @@ typedef struct ChangeACLStmt
struct AclItem *aclitem;
unsigned modechg;
List *relNames;
} ChangeACLStmt;
} ChangeACLStmt;
/* ----------------------
* Close Portal Statement
@@ -108,7 +108,7 @@ typedef struct ClosePortalStmt
{
NodeTag type;
char *portalname; /* name of the portal (cursor) */
} ClosePortalStmt;
} ClosePortalStmt;
/* ----------------------
* Copy Statement
@@ -123,7 +123,7 @@ typedef struct CopyStmt
int direction; /* TO or FROM */
char *filename; /* if NULL, use stdin/stdout */
char *delimiter; /* delimiter character, \t by default */
} CopyStmt;
} CopyStmt;
/* ----------------------
* Create Table Statement
@@ -145,19 +145,19 @@ typedef struct CreateStmt
int location; /* smgrid (-1 if none) */
int archiveLoc; /* smgrid (-1 if none) */
List *constraints; /* list of constraints (ConstaintDef) */
} CreateStmt;
} CreateStmt;
typedef enum ConstrType
{
CONSTR_NONE, CONSTR_CHECK /* type of constaints */
} ConstrType;
} ConstrType;
typedef struct ConstraintDef
{
ConstrType type;
char *name; /* name */
void *def; /* definition */
} ConstraintDef;
} ConstraintDef;
/* ----------------------
* Create/Drop TRIGGER Statements
@@ -178,14 +178,14 @@ typedef struct CreateTrigStmt
char *text; /* AS 'text' */
List *attr; /* UPDATE OF a, b,... (NI) or NULL */
char *when; /* WHEN 'a > 10 ...' (NI) or NULL */
} CreateTrigStmt;
} CreateTrigStmt;
typedef struct DropTrigStmt
{
NodeTag type;
char *trigname; /* TRIGGER' name */
char *relname; /* triggered relation */
} DropTrigStmt;
} DropTrigStmt;
/* ----------------------
* Create SEQUENCE Statement
@@ -197,7 +197,7 @@ typedef struct CreateSeqStmt
NodeTag type;
char *seqname; /* the relation to create */
List *options;
} CreateSeqStmt;
} CreateSeqStmt;
/* ----------------------
* Create Version Statement
@@ -210,7 +210,7 @@ typedef struct VersionStmt
int direction; /* FORWARD | BACKWARD */
char *fromRelname; /* relation to create a version */
char *date; /* date of the snapshot */
} VersionStmt;
} VersionStmt;
/* ----------------------
* Create {Operator|Type|Aggregate} Statement
@@ -222,7 +222,7 @@ typedef struct DefineStmt
int defType; /* OPERATOR|P_TYPE|AGGREGATE */
char *defname;
List *definition; /* a list of DefElem */
} DefineStmt;
} DefineStmt;
/* ----------------------
* Drop Table Statement
@@ -233,7 +233,7 @@ typedef struct DestroyStmt
NodeTag type;
List *relNames; /* relations to be dropped */
bool sequence;
} DestroyStmt;
} DestroyStmt;
/* ----------------------
* Extend Index Statement
@@ -246,7 +246,7 @@ typedef struct ExtendStmt
Node *whereClause; /* qualifications */
List *rangetable; /* range table, filled in by
* transformStmt() */
} ExtendStmt;
} ExtendStmt;
/* ----------------------
* Begin Recipe Statement
@@ -256,7 +256,7 @@ typedef struct RecipeStmt
{
NodeTag type;
char *recipeName; /* name of the recipe */
} RecipeStmt;
} RecipeStmt;
/* ----------------------
* Fetch Statement
@@ -268,7 +268,7 @@ typedef struct FetchStmt
int direction; /* FORWARD or BACKWARD */
int howMany; /* amount to fetch ("ALL" --> 0) */
char *portalname; /* name of portal (cursor) */
} FetchStmt;
} FetchStmt;
/* ----------------------
* Create Index Statement
@@ -287,7 +287,7 @@ typedef struct IndexStmt
* transformStmt() */
bool *lossy; /* is index lossy? */
bool unique; /* is index unique? */
} IndexStmt;
} IndexStmt;
/* ----------------------
* Move Statement (Not implemented)
@@ -300,7 +300,7 @@ typedef struct MoveStmt
bool to;
int where;
char *portalname;
} MoveStmt;
} MoveStmt;
/* ----------------------
* Create Function Statement
@@ -317,7 +317,7 @@ typedef struct ProcedureStmt
List *withClause; /* a list of ParamString */
char *as; /* the SQL statement or filename */
char *language; /* C or SQL */
} ProcedureStmt;
} ProcedureStmt;
/* ----------------------
* Purge Statement
@@ -329,7 +329,7 @@ typedef struct PurgeStmt
char *relname; /* relation to purge */
char *beforeDate; /* purge before this date */
char *afterDate; /* purge after this date */
} PurgeStmt;
} PurgeStmt;
/* ----------------------
* Drop Aggregate Statement
@@ -340,7 +340,7 @@ typedef struct RemoveAggrStmt
NodeTag type;
char *aggname; /* aggregate to drop */
char *aggtype; /* for this type */
} RemoveAggrStmt;
} RemoveAggrStmt;
/* ----------------------
* Drop Function Statement
@@ -351,7 +351,7 @@ typedef struct RemoveFuncStmt
NodeTag type;
char *funcname; /* function to drop */
List *args; /* types of the arguments */
} RemoveFuncStmt;
} RemoveFuncStmt;
/* ----------------------
* Drop Operator Statement
@@ -362,7 +362,7 @@ typedef struct RemoveOperStmt
NodeTag type;
char *opname; /* operator to drop */
List *args; /* types of the arguments */
} RemoveOperStmt;
} RemoveOperStmt;
/* ----------------------
* Drop {Type|Index|Rule|View} Statement
@@ -373,7 +373,7 @@ typedef struct RemoveStmt
NodeTag type;
int removeType; /* P_TYPE|INDEX|RULE|VIEW */
char *name; /* name to drop */
} RemoveStmt;
} RemoveStmt;
/* ----------------------
* Alter Table Statement
@@ -388,7 +388,7 @@ typedef struct RenameStmt
* the new name. Otherwise, rename this
* column name. */
char *newname; /* the new name */
} RenameStmt;
} RenameStmt;
/* ----------------------
* Create Rule Statement
@@ -403,7 +403,7 @@ typedef struct RuleStmt
struct Attr *object; /* object affected */
bool instead; /* is a 'do instead'? */
List *actions; /* the action statements */
} RuleStmt;
} RuleStmt;
/* ----------------------
* Notify Statement
@@ -413,7 +413,7 @@ typedef struct NotifyStmt
{
NodeTag type;
char *relname; /* relation to notify */
} NotifyStmt;
} NotifyStmt;
/* ----------------------
* Listen Statement
@@ -423,7 +423,7 @@ typedef struct ListenStmt
{
NodeTag type;
char *relname; /* relation to listen on */
} ListenStmt;
} ListenStmt;
/* ----------------------
* {Begin|Abort|End} Transaction Statement
@@ -433,7 +433,7 @@ typedef struct TransactionStmt
{
NodeTag type;
int command; /* BEGIN|END|ABORT */
} TransactionStmt;
} TransactionStmt;
/* ----------------------
* Create View Statement
@@ -444,7 +444,7 @@ typedef struct ViewStmt
NodeTag type;
char *viewname; /* name of the view */
Query *query; /* the SQL statement */
} ViewStmt;
} ViewStmt;
/* ----------------------
* Load Statement
@@ -454,7 +454,7 @@ typedef struct LoadStmt
{
NodeTag type;
char *filename; /* file to load */
} LoadStmt;
} LoadStmt;
/* ----------------------
* Createdb Statement
@@ -464,7 +464,7 @@ typedef struct CreatedbStmt
{
NodeTag type;
char *dbname; /* database to create */
} CreatedbStmt;
} CreatedbStmt;
/* ----------------------
* Destroydb Statement
@@ -474,7 +474,7 @@ typedef struct DestroydbStmt
{
NodeTag type;
char *dbname; /* database to drop */
} DestroydbStmt;
} DestroydbStmt;
/* ----------------------
* Cluster Statement (support pbrown's cluster index implementation)
@@ -485,7 +485,7 @@ typedef struct ClusterStmt
NodeTag type;
char *relname; /* relation being indexed */
char *indexname; /* original index defined */
} ClusterStmt;
} ClusterStmt;
/* ----------------------
* Vacuum Statement
@@ -498,7 +498,7 @@ typedef struct VacuumStmt
bool analyze; /* analyze data */
char *vacrel; /* table to vacuum */
List *va_spec; /* columns to analyse */
} VacuumStmt;
} VacuumStmt;
/* ----------------------
* Explain Statement
@@ -509,7 +509,7 @@ typedef struct ExplainStmt
NodeTag type;
Query *query; /* the query */
bool verbose; /* print plan info */
} ExplainStmt;
} ExplainStmt;
/* ----------------------
* Set Statement
@@ -521,7 +521,7 @@ typedef struct VariableSetStmt
NodeTag type;
char *name;
char *value;
} VariableSetStmt;
} VariableSetStmt;
/* ----------------------
* Show Statement
@@ -532,7 +532,7 @@ typedef struct VariableShowStmt
{
NodeTag type;
char *name;
} VariableShowStmt;
} VariableShowStmt;
/* ----------------------
* Reset Statement
@@ -543,7 +543,7 @@ typedef struct VariableResetStmt
{
NodeTag type;
char *name;
} VariableResetStmt;
} VariableResetStmt;
/*****************************************************************************
@@ -573,7 +573,7 @@ typedef struct DeleteStmt
NodeTag type;
char *relname; /* relation to delete from */
Node *whereClause; /* qualifications */
} DeleteStmt;
} DeleteStmt;
/* ----------------------
* Update Statement
@@ -586,7 +586,7 @@ typedef struct ReplaceStmt
List *targetList; /* the target list (of ResTarget) */
Node *whereClause; /* qualifications */
List *fromClause; /* the from clause */
} ReplaceStmt;
} ReplaceStmt;
/* ----------------------
* Create Cursor Statement
@@ -603,7 +603,7 @@ typedef struct CursorStmt
Node *whereClause; /* qualifications */
List *groupClause; /* group by clause */
List *sortClause; /* sort clause (a list of SortGroupBy's) */
} CursorStmt;
} CursorStmt;
/* ----------------------
* Select Statement
@@ -621,7 +621,7 @@ typedef struct RetrieveStmt
Node *havingClause; /* having conditional-expression */
List *selectClause; /* subselect parameters */
List *sortClause; /* sort clause (a list of SortGroupBy's) */
} RetrieveStmt;
} RetrieveStmt;
/****************************************************************************
@@ -640,7 +640,7 @@ typedef struct SubSelect
Node *whereClause; /* qualifications */
List *groupClause; /* group by clause */
Node *havingClause; /* having conditional-expression */
} SubSelect;
} SubSelect;
/*
* TypeName - specifies a type in definitions
@@ -653,7 +653,7 @@ typedef struct TypeName
bool setof; /* is a set? */
List *arrayBounds; /* array bounds */
int typlen; /* length for char() and varchar() */
} TypeName;
} TypeName;
/*
* ParamNo - specifies a parameter reference
@@ -663,7 +663,7 @@ typedef struct ParamNo
NodeTag type;
int number; /* the number of the parameter */
TypeName *typename; /* the typecast */
} ParamNo;
} ParamNo;
/*
* A_Expr - binary expressions
@@ -714,7 +714,7 @@ typedef struct ColumnDef
TypeName *typename; /* type of column */
bool is_not_null; /* flag to NOT NULL constraint */
char *defval; /* default value of column */
} ColumnDef;
} ColumnDef;
/*
* Ident -
@@ -730,7 +730,7 @@ typedef struct Ident
List *indirection; /* array references */
bool isRel; /* is a relation - filled in by
* transformExpr() */
} Ident;
} Ident;
/*
* FuncCall - a function/aggregate invocation
@@ -740,7 +740,7 @@ typedef struct FuncCall
NodeTag type;
char *funcname; /* name of function */
List *args; /* the arguments (list of exprs) */
} FuncCall;
} FuncCall;
/*
* A_Indices - array reference or bounds ([lidx:uidx] or [uidx])
@@ -763,7 +763,7 @@ typedef struct ResTarget
List *indirection; /* array references */
Node *val; /* the value of the result (A_Expr or
* Attr) (or A_Const) */
} ResTarget;
} ResTarget;
/*
* ParamString - used in with clauses
@@ -773,7 +773,7 @@ typedef struct ParamString
NodeTag type;
char *name;
char *val;
} ParamString;
} ParamString;
/*
* TimeRange - specifies a time range
@@ -783,7 +783,7 @@ typedef struct TimeRange
NodeTag type;
char *startDate;
char *endDate; /* snapshot if NULL */
} TimeRange;
} TimeRange;
/*
* RelExpr - relation expressions
@@ -794,7 +794,7 @@ typedef struct RelExpr
char *relname; /* the relation name */
bool inh; /* inheritance query */
TimeRange *timeRange; /* the time range */
} RelExpr;
} RelExpr;
/*
* SortGroupBy - for order by clause
@@ -806,7 +806,7 @@ typedef struct SortGroupBy
char *range;
char *name; /* name of column to sort on */
char *useOp; /* operator to use */
} SortGroupBy;
} SortGroupBy;
/*
* RangeVar - range variable, used in from clauses
@@ -816,7 +816,7 @@ typedef struct RangeVar
NodeTag type;
RelExpr *relExpr; /* the relation expression */
char *name; /* the name to be referenced (optional) */
} RangeVar;
} RangeVar;
/*
* IndexElem - index parameters (used in create index)
@@ -828,7 +828,7 @@ typedef struct IndexElem
List *args; /* if not NULL, function index */
char *class;
TypeName *tname; /* type of index's keys (optional) */
} IndexElem;
} IndexElem;
/*
* DefElem -
@@ -839,7 +839,7 @@ typedef struct DefElem
NodeTag type;
char *defname;
Node *arg; /* a (Value *) or a (TypeName *) */
} DefElem;
} DefElem;
/****************************************************************************
@@ -859,7 +859,7 @@ typedef struct TargetEntry
Resdom *resdom; /* fjoin overload this to be a list?? */
Fjoin *fjoin;
Node *expr; /* can be a list too */
} TargetEntry;
} TargetEntry;
/*
* RangeTblEntry -
@@ -885,7 +885,7 @@ typedef struct RangeTblEntry
bool archive; /* filled in by plan_archive */
bool inFromCl; /* comes from From Clause */
TimeQual timeQual; /* filled in by pg_plan */
} RangeTblEntry;
} RangeTblEntry;
/*
* SortClause -
@@ -896,7 +896,7 @@ typedef struct SortClause
NodeTag type;
Resdom *resdom; /* attributes in tlist to be sorted */
Oid opoid; /* sort operators */
} SortClause;
} SortClause;
/*
* GroupClause -
@@ -907,6 +907,6 @@ typedef struct GroupClause
NodeTag type;
TargetEntry *entry; /* attributes to group on */
Oid grpOpoid; /* the sort operator to use */
} GroupClause;
} GroupClause;
#endif /* PARSENODES_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_list.h,v 1.7 1997/09/08 02:37:24 momjian Exp $
* $Id: pg_list.h,v 1.8 1997/09/08 21:52:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,7 +33,7 @@ typedef struct Value
long ival;
double dval;
} val;
} Value;
} Value;
#define intVal(v) (((Value *)v)->val.ival)
#define floatVal(v) (((Value *)v)->val.dval)
@@ -53,7 +53,7 @@ typedef struct List
int int_value;
} elem;
struct List *next;
} List;
} List;
#define NIL ((List *) NULL)
@@ -81,36 +81,36 @@ typedef struct List
/*
* function prototypes in nodes/list.c
*/
extern int length(List * list);
extern List *append(List * list1, List * list2);
extern List *nconc(List * list1, List * list2);
extern List *lcons(void *datum, List * list);
extern bool member(void *foo, List * bar);
extern int length(List *list);
extern List *append(List *list1, List *list2);
extern List *nconc(List *list1, List *list2);
extern List *lcons(void *datum, List *list);
extern bool member(void *foo, List *bar);
extern Value *makeInteger(long i);
extern Value *makeFloat(double d);
extern Value *makeString(char *str);
extern List *makeList(void *elem,...);
extern List *lappend(List * list, void *obj);
extern List *lremove(void *elem, List * list);
extern void freeList(List * list);
extern List *LispRemove(void *elem, List * list);
extern List *lappend(List *list, void *obj);
extern List *lremove(void *elem, List *list);
extern void freeList(List *list);
extern List *LispRemove(void *elem, List *list);
extern void *nth(int n, List * l);
extern void set_nth(List * l, int n, void *elem);
extern void *nth(int n, List *l);
extern void set_nth(List *l, int n, void *elem);
List *lconsi(int datum, List * list);
List *lappendi(List * list, int datum);
List *lconsi(int datum, List *list);
List *lappendi(List *list, int datum);
extern bool intMember(int, List *);
extern List *intAppend(List * list1, List * list2);
extern List *intAppend(List *list1, List *list2);
extern int nthi(int n, List * l);
extern int nthi(int n, List *l);
extern List *nreverse(List *);
extern List *set_difference(List *, List *);
extern List *set_differencei(List *, List *);
extern List *LispUnion(List * foo, List * bar);
extern List *LispUnioni(List * foo, List * bar);
extern bool same(List * foo, List * bar);
extern List *LispUnion(List *foo, List *bar);
extern List *LispUnioni(List *foo, List *bar);
extern bool same(List *foo, List *bar);
/* should be in nodes.h but needs List */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: plannodes.h,v 1.9 1997/09/08 20:58:48 momjian Exp $
* $Id: plannodes.h,v 1.10 1997/09/08 21:52:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -75,7 +75,7 @@ typedef struct Plan
List *qual; /* Node* or List* ?? */
struct Plan *lefttree;
struct Plan *righttree;
} Plan;
} Plan;
/* ----------------
* these are are defined to avoid confusion problems with "left"
@@ -116,7 +116,7 @@ typedef struct Result
Plan plan;
Node *resconstantqual;
ResultState *resstate;
} Result;
} Result;
/* ----------------
* append node
@@ -141,7 +141,7 @@ typedef struct Scan
Plan plan;
Index scanrelid; /* relid is index into the range table */
CommonScanState *scanstate;
} Scan;
} Scan;
/* ----------------
* sequential scan node
@@ -159,7 +159,7 @@ typedef struct IndexScan
List *indxid;
List *indxqual;
IndexScanState *indxstate;
} IndexScan;
} IndexScan;
/*
* ==========
@@ -181,7 +181,7 @@ typedef struct NestLoop
{
Join join;
NestLoopState *nlstate;
} NestLoop;
} NestLoop;
/* ----------------
* merge join node
@@ -195,7 +195,7 @@ typedef struct MergeJoin
Oid *mergerightorder;/* inner sort operator */
Oid *mergeleftorder; /* outer sort operator */
MergeJoinState *mergestate;
} MergeJoin;
} MergeJoin;
/* ----------------
* hash join (probe) node
@@ -211,7 +211,7 @@ typedef struct HashJoin
IpcMemoryKey hashjointablekey;
int hashjointablesize;
bool hashdone;
} HashJoin;
} HashJoin;
/* ---------------
* aggregate node
@@ -242,7 +242,7 @@ typedef struct Group
int numCols; /* number of group columns */
AttrNumber *grpColIdx; /* index into the target list */
GroupState *grpstate;
} Group;
} Group;
/*
* ==========
@@ -254,7 +254,7 @@ typedef struct Temp
Plan plan;
Oid tempid;
int keycount;
} Temp;
} Temp;
/* ----------------
* materialization node
@@ -266,7 +266,7 @@ typedef struct Material
Oid tempid;
int keycount;
MaterialState *matstate;
} Material;
} Material;
/* ----------------
* sort node
@@ -280,7 +280,7 @@ typedef struct Sort
SortState *sortstate;
void *psortstate;
bool cleaned;
} Sort;
} Sort;
/* ----------------
* unique node
@@ -296,7 +296,7 @@ typedef struct Unique
AttrNumber uniqueAttrNum; /* attribute number of attribute to select
* distinct on */
UniqueState *uniquestate;
} Unique;
} Unique;
/* ----------------
* hash build node
@@ -310,7 +310,7 @@ typedef struct Hash
HashJoinTable hashtable;
IpcMemoryKey hashtablekey;
int hashtablesize;
} Hash;
} Hash;
/* ---------------------
* choose node
@@ -320,7 +320,7 @@ typedef struct Choose
{
Plan plan;
List *chooseplanlist;
} Choose;
} Choose;
/* -------------------
* Tee node information
@@ -340,6 +340,6 @@ typedef struct Tee
List *rtentries; /* the range table for the plan below the
* Tee may be different than the parent
* plans */
} Tee;
} Tee;
#endif /* PLANNODES_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: primnodes.h,v 1.10 1997/09/08 20:58:50 momjian Exp $
* $Id: primnodes.h,v 1.11 1997/09/08 21:52:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,7 +46,7 @@ typedef struct Resdom
Index reskey;
Oid reskeyop;
int resjunk;
} Resdom;
} Resdom;
/* -------------
* Fjoin
@@ -73,7 +73,7 @@ typedef struct Fjoin
List *fj_innerNode;
DatumPtr fj_results;
BoolPtr fj_alwaysDone;
} Fjoin;
} Fjoin;
/* ----------------
* Expr
@@ -87,7 +87,7 @@ typedef struct Fjoin
typedef enum OpType
{
OP_EXPR, FUNC_EXPR, OR_EXPR, AND_EXPR, NOT_EXPR
} OpType;
} OpType;
typedef struct Expr
{
@@ -96,7 +96,7 @@ typedef struct Expr
OpType opType; /* type of the op */
Node *oper; /* could be Oper or Func */
List *args; /* list of argument nodes */
} Expr;
} Expr;
/* ----------------
* Var
@@ -124,7 +124,7 @@ typedef struct Var
Oid vartype;
Index varnoold; /* only used by optimizer */
AttrNumber varoattno; /* only used by optimizer */
} Var;
} Var;
/* ----------------
* Oper
@@ -154,7 +154,7 @@ typedef struct Oper
Oid opresulttype;
int opsize;
FunctionCachePtr op_fcache;
} Oper;
} Oper;
/* ----------------
@@ -183,7 +183,7 @@ typedef struct Const
bool constbyval;
bool constisset;
bool constiscast;
} Const;
} Const;
/* ----------------
* Param
@@ -220,7 +220,7 @@ typedef struct Param
char *paramname;
Oid paramtype;
List *param_tlist;
} Param;
} Param;
/* ----------------
@@ -248,7 +248,7 @@ typedef struct Func
FunctionCachePtr func_fcache;
List *func_tlist;
List *func_planlist;
} Func;
} Func;
/* ----------------
* Aggreg

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: print.h,v 1.4 1997/09/08 02:37:28 momjian Exp $
* $Id: print.h,v 1.5 1997/09/08 21:52:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,14 +21,14 @@
extern void print(void *obj);
extern void pprint(void *obj);
extern void print_rt(List * rtable);
extern void print_expr(Node * expr, List * rtable);
extern void print_keys(List * keys, List * rtable);
extern void print_tl(List * tlist, List * rtable);
extern void print_slot(TupleTableSlot * slot);
extern void print_rt(List *rtable);
extern void print_expr(Node *expr, List *rtable);
extern void print_keys(List *keys, List *rtable);
extern void print_tl(List *tlist, List *rtable);
extern void print_slot(TupleTableSlot *slot);
extern void
print_plan_recursive(Plan * p, Query * parsetree,
print_plan_recursive(Plan *p, Query *parsetree,
int indentLevel, char *label);
extern void print_plan(Plan * p, Query * parsetree);
extern void print_plan(Plan *p, Query *parsetree);
#endif /* PRINT_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: relation.h,v 1.6 1997/09/08 02:37:29 momjian Exp $
* $Id: relation.h,v 1.7 1997/09/08 21:53:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -106,9 +106,9 @@ typedef struct Rel
List *joininfo; /* join clauses */
List *innerjoin;
List *superrels;
} Rel;
} Rel;
extern Var *get_expr(TargetEntry * foo);
extern Var *get_expr(TargetEntry *foo);
typedef struct MergeOrder
{
@@ -118,12 +118,12 @@ typedef struct MergeOrder
Oid right_operator;
Oid left_type;
Oid right_type;
} MergeOrder;
} MergeOrder;
typedef enum OrderType
{
MERGE_ORDER, SORTOP_ORDER
} OrderType;
} OrderType;
typedef struct PathOrder
{
@@ -133,7 +133,7 @@ typedef struct PathOrder
Oid *sortop;
MergeOrder *merge;
} ord;
} PathOrder;
} PathOrder;
typedef struct Path
{
@@ -150,7 +150,7 @@ typedef struct Path
Cost outerjoincost;
Relid joinid;
List *locclauseinfo;
} Path;
} Path;
typedef struct IndexPath
{
@@ -159,7 +159,7 @@ typedef struct IndexPath
List *indexqual;
int *indexkeys; /* to transform heap attnos into index
* ones */
} IndexPath;
} IndexPath;
typedef struct JoinPath
{
@@ -167,7 +167,7 @@ typedef struct JoinPath
List *pathclauseinfo;
Path *outerjoinpath;
Path *innerjoinpath;
} JoinPath;
} JoinPath;
typedef struct MergePath
{
@@ -175,7 +175,7 @@ typedef struct MergePath
List *path_mergeclauses;
List *outersortkeys;
List *innersortkeys;
} MergePath;
} MergePath;
typedef struct HashPath
{
@@ -183,7 +183,7 @@ typedef struct HashPath
List *path_hashclauses;
List *outerhashkeys;
List *innerhashkeys;
} HashPath;
} HashPath;
/******
* Keys
@@ -194,14 +194,14 @@ typedef struct OrderKey
NodeTag type;
int attribute_number;
Index array_index;
} OrderKey;
} OrderKey;
typedef struct JoinKey
{
NodeTag type;
Var *outer;
Var *inner;
} JoinKey;
} JoinKey;
/*******
* clause info
@@ -221,26 +221,26 @@ typedef struct CInfo
/* hashjoin only */
Oid hashjoinoperator;
Relid cinfojoinid;
} CInfo;
} CInfo;
typedef struct JoinMethod
{
NodeTag type;
List *jmkeys;
List *clauses;
} JoinMethod;
} JoinMethod;
typedef struct HInfo
{
JoinMethod jmethod;
Oid hashop;
} HInfo;
} HInfo;
typedef struct MInfo
{
JoinMethod jmethod;
MergeOrder *m_ordering;
} MInfo;
} MInfo;
typedef struct JInfo
{
@@ -250,7 +250,7 @@ typedef struct JInfo
bool mergesortable;
bool hashjoinable;
bool inactive;
} JInfo;
} JInfo;
typedef struct Iter
{
@@ -258,7 +258,7 @@ typedef struct Iter
Node *iterexpr;
Oid itertype; /* type of the iter expr (use for type
* checking) */
} Iter;
} Iter;
/*
** Stream:
@@ -292,6 +292,6 @@ typedef struct Stream
bool groupup;
Cost groupcost;
Cost groupsel;
} Stream;
} Stream;
#endif /* RELATION_H */

View File

@@ -6,21 +6,21 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: clauseinfo.h,v 1.3 1997/09/08 02:37:32 momjian Exp $
* $Id: clauseinfo.h,v 1.4 1997/09/08 21:53:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef CLAUSEINFO_H
#define CLAUSEINFO_H
extern bool valid_or_clause(CInfo * clauseinfo);
extern List *get_actual_clauses(List * clauseinfo_list);
extern bool valid_or_clause(CInfo *clauseinfo);
extern List *get_actual_clauses(List *clauseinfo_list);
extern void
get_relattvals(List * clauseinfo_list, List ** attnos,
List ** values, List ** flags);
get_relattvals(List *clauseinfo_list, List **attnos,
List **values, List **flags);
extern void
get_joinvars(Oid relid, List * clauseinfo_list,
List ** attnos, List ** values, List ** flags);
extern List *get_opnos(List * clauseinfo_list);
get_joinvars(Oid relid, List *clauseinfo_list,
List **attnos, List **values, List **flags);
extern List *get_opnos(List *clauseinfo_list);
#endif /* CLAUSEINFO_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: clauses.h,v 1.6 1997/09/08 20:58:54 momjian Exp $
* $Id: clauses.h,v 1.7 1997/09/08 21:53:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,39 +15,39 @@
#include <nodes/primnodes.h>
extern Expr *make_clause(int type, Node * oper, List * args);
extern bool is_opclause(Node * clause);
extern Expr *make_opclause(Oper * op, Var * leftop, Var * rightop);
extern Var *get_leftop(Expr * clause);
extern Var *get_rightop(Expr * clause);
extern Expr *make_clause(int type, Node *oper, List *args);
extern bool is_opclause(Node *clause);
extern Expr *make_opclause(Oper *op, Var *leftop, Var *rightop);
extern Var *get_leftop(Expr *clause);
extern Var *get_rightop(Expr *clause);
extern bool is_funcclause(Node * clause);
extern Expr *make_funcclause(Func * func, List * funcargs);
extern bool is_funcclause(Node *clause);
extern Expr *make_funcclause(Func *func, List *funcargs);
extern bool or_clause(Node * clause);
extern Expr *make_orclause(List * orclauses);
extern bool or_clause(Node *clause);
extern Expr *make_orclause(List *orclauses);
extern bool not_clause(Node * clause);
extern Expr *make_notclause(Expr * notclause);
extern Expr *get_notclausearg(Expr * notclause);
extern bool not_clause(Node *clause);
extern Expr *make_notclause(Expr *notclause);
extern Expr *get_notclausearg(Expr *notclause);
extern bool and_clause(Node * clause);
extern Expr *make_andclause(List * andclauses);
extern bool and_clause(Node *clause);
extern Expr *make_andclause(List *andclauses);
extern List *pull_constant_clauses(List * quals, List ** constantQual);
extern void clause_relids_vars(Node * clause, List ** relids, List ** vars);
extern int NumRelids(Node * clause);
extern bool contains_not(Node * clause);
extern bool join_clause_p(Node * clause);
extern bool qual_clause_p(Node * clause);
extern void fix_opid(Node * clause);
extern List *fix_opids(List * clauses);
extern List *pull_constant_clauses(List *quals, List **constantQual);
extern void clause_relids_vars(Node *clause, List **relids, List **vars);
extern int NumRelids(Node *clause);
extern bool contains_not(Node *clause);
extern bool join_clause_p(Node *clause);
extern bool qual_clause_p(Node *clause);
extern void fix_opid(Node *clause);
extern List *fix_opids(List *clauses);
extern void
get_relattval(Node * clause, int *relid,
AttrNumber *attno, Datum * constval, int *flag);
get_relattval(Node *clause, int *relid,
AttrNumber *attno, Datum *constval, int *flag);
extern void
get_rels_atts(Node * clause, int *relid1,
get_rels_atts(Node *clause, int *relid1,
AttrNumber *attno1, int *relid2, AttrNumber *attno2);
extern void CommuteClause(Node * clause);
extern void CommuteClause(Node *clause);
#endif /* CLAUSES_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: cost.h,v 1.4 1997/09/08 02:37:40 momjian Exp $
* $Id: cost.h,v 1.5 1997/09/08 21:53:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,37 +26,37 @@ extern bool _enable_mergesort_;
extern bool _enable_hashjoin_;
extern Cost cost_seqscan(int relid, int relpages, int reltuples);
extern Cost
extern Cost
cost_index(Oid indexid, int expected_indexpages, Cost selec,
int relpages, int reltuples, int indexpages,
int indextuples, bool is_injoin);
extern Cost cost_sort(List * keys, int tuples, int width, bool noread);
extern Cost
extern Cost cost_sort(List *keys, int tuples, int width, bool noread);
extern Cost
cost_nestloop(Cost outercost, Cost innercost, int outertuples,
int innertuples, int outerpages, bool is_indexjoin);
extern Cost
extern Cost
cost_mergesort(Cost outercost, Cost innercost,
List * outersortkeys, List * innersortkeys,
List *outersortkeys, List *innersortkeys,
int outersize, int innersize, int outerwidth, int innerwidth);
extern Cost
cost_hashjoin(Cost outercost, Cost innercost, List * outerkeys,
List * innerkeys, int outersize, int innersize,
extern Cost
cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys,
List *innerkeys, int outersize, int innersize,
int outerwidth, int innerwidth);
extern int compute_rel_size(Rel * rel);
extern int compute_rel_width(Rel * rel);
extern int compute_joinrel_size(JoinPath * joinpath);
extern int compute_rel_size(Rel *rel);
extern int compute_rel_width(Rel *rel);
extern int compute_joinrel_size(JoinPath *joinpath);
extern int page_size(int tuples, int width);
/*
* prototypes for fuctions in clausesel.h--
* routines to compute clause selectivities
*/
extern void set_clause_selectivities(List * clauseinfo_list, Cost new_selectivity);
extern Cost product_selec(List * clauseinfo_list);
extern void set_rest_relselec(Query * root, List * rel_list);
extern void set_rest_selec(Query * root, List * clauseinfo_list);
extern Cost
compute_clause_selec(Query * root,
Node * clause, List * or_selectivities);
extern void set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity);
extern Cost product_selec(List *clauseinfo_list);
extern void set_rest_relselec(Query *root, List *rel_list);
extern void set_rest_selec(Query *root, List *clauseinfo_list);
extern Cost
compute_clause_selec(Query *root,
Node *clause, List *or_selectivities);
#endif /* COST_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo.h,v 1.5 1997/09/08 02:37:42 momjian Exp $
* $Id: geqo.h,v 1.6 1997/09/08 21:53:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -66,13 +66,13 @@ double SelectionBias;
/* ^^^ */
/* geqo prototypes */
extern Rel *geqo(Query * root);
extern Rel *geqo(Query *root);
extern void geqo_params(int string_length);
extern Cost geqo_eval(Query * root, Gene * tour, int num_gene);
extern Cost geqo_eval(Query *root, Gene *tour, int num_gene);
double geqo_log(double x, double b);
extern Rel *gimme_tree(Query * root, Gene * tour, int rel_count, int num_gene, Rel * outer_rel);
extern Rel *gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, Rel *outer_rel);
#endif /* GEQO_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_copy.h,v 1.3 1997/09/08 02:37:43 momjian Exp $
* $Id: geqo_copy.h,v 1.4 1997/09/08 21:53:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,6 +22,6 @@
#define GEQO_COPY_H
extern void geqo_copy(Chromosome * chromo1, Chromosome * chromo2, int string_length);
extern void geqo_copy(Chromosome *chromo1, Chromosome *chromo2, int string_length);
#endif /* GEQO_COPY_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_gene.h,v 1.3 1997/09/08 02:37:44 momjian Exp $
* $Id: geqo_gene.h,v 1.4 1997/09/08 21:53:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,19 +26,19 @@
/* we presume that int instead of Relid
is o.k. for Gene; so don't change it! */
typedef
int Gene;
int Gene;
typedef struct Chromosome
{
Gene *string;
Cost worth;
} Chromosome;
} Chromosome;
typedef struct Pool
{
Chromosome *data;
int size;
int string_length;
} Pool;
} Pool;
#endif /* GEQO_GENE_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_misc.h,v 1.3 1997/09/08 02:37:46 momjian Exp $
* $Id: geqo_misc.h,v 1.4 1997/09/08 21:53:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,12 +23,12 @@
#include <stdio.h>
extern void print_pool(FILE * fp, Pool * pool, int start, int stop);
extern void print_gen(FILE * fp, Pool * pool, int generation);
extern void print_edge_table(FILE * fp, Edge * edge_table, int num_gene);
extern void print_pool(FILE *fp, Pool *pool, int start, int stop);
extern void print_gen(FILE *fp, Pool *pool, int generation);
extern void print_edge_table(FILE *fp, Edge *edge_table, int num_gene);
extern void geqo_print_rel(Query * root, Rel * rel);
extern void geqo_print_path(Query * root, Path * path, int indent);
extern void geqo_print_joinclauses(Query * root, List * clauses);
extern void geqo_print_rel(Query *root, Rel *rel);
extern void geqo_print_path(Query *root, Path *path, int indent);
extern void geqo_print_joinclauses(Query *root, List *clauses);
#endif /* GEQO_MISC_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_mutation.h,v 1.3 1997/09/08 02:37:46 momjian Exp $
* $Id: geqo_mutation.h,v 1.4 1997/09/08 21:53:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,6 +22,6 @@
#define GEQO_MUTATION_H
extern void geqo_mutation(Gene * tour, int num_gene);
extern void geqo_mutation(Gene *tour, int num_gene);
#endif /* GEQO_MUTATION_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_paths.h,v 1.3 1997/09/08 02:37:47 momjian Exp $
* $Id: geqo_paths.h,v 1.4 1997/09/08 21:53:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,7 +22,7 @@
#define GEQO_PATHS_H
extern List *geqo_prune_rels(List * rel_list);
extern void geqo_rel_paths(Rel * rel);
extern List *geqo_prune_rels(List *rel_list);
extern void geqo_rel_paths(Rel *rel);
#endif /* GEQO_PATHS_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_pool.h,v 1.3 1997/09/08 02:37:47 momjian Exp $
* $Id: geqo_pool.h,v 1.4 1997/09/08 21:53:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,14 +24,14 @@
extern Pool *alloc_pool(int pool_size, int string_length);
extern void free_pool(Pool * pool);
extern void free_pool(Pool *pool);
extern void random_init_pool(Query * root, Pool * pool, int strt, int stop);
extern void random_init_pool(Query *root, Pool *pool, int strt, int stop);
extern Chromosome *alloc_chromo(int string_length);
extern void free_chromo(Chromosome * chromo);
extern void free_chromo(Chromosome *chromo);
extern void spread_chromo(Chromosome * chromo, Pool * pool);
extern void spread_chromo(Chromosome *chromo, Pool *pool);
extern void sort_pool(Pool * pool);
extern void sort_pool(Pool *pool);
#endif /* GEQO_POOL_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_recombination.h,v 1.3 1997/09/08 02:37:48 momjian Exp $
* $Id: geqo_recombination.h,v 1.4 1997/09/08 21:53:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,7 +24,7 @@
#define GEQO_RECOMBINATION_H
extern void init_tour(Gene * tour, int num_gene);
extern void init_tour(Gene *tour, int num_gene);
/* edge recombination crossover [ERX] */
@@ -34,14 +34,14 @@ typedef struct Edge
Gene edge_list[4]; /* list of edges */
int total_edges;
int unused_edges;
} Edge;
} Edge;
extern Edge *alloc_edge_table(int num_gene);
extern void free_edge_table(Edge * edge_table);
extern void free_edge_table(Edge *edge_table);
extern float gimme_edge_table(Gene * tour1, Gene * tour2, int num_gene, Edge * edge_table);
extern float gimme_edge_table(Gene *tour1, Gene *tour2, int num_gene, Edge *edge_table);
extern int gimme_tour(Edge * edge_table, Gene * new_gene, int num_gene);
extern int gimme_tour(Edge *edge_table, Gene *new_gene, int num_gene);
/* partially matched crossover [PMX] */
@@ -49,7 +49,7 @@ extern int gimme_tour(Edge * edge_table, Gene * new_gene, int num_gene);
#define DAD 1 /* indicator for gene from dad */
#define MOM 0 /* indicator for gene from mom */
extern void pmx(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene);
extern void pmx(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene);
typedef struct City
@@ -58,22 +58,22 @@ typedef struct City
int tour1_position;
int used;
int select_list;
} City;
} City;
extern City *alloc_city_table(int num_gene);
extern void free_city_table(City * city_table);
extern void free_city_table(City *city_table);
/* cycle crossover [CX] */
extern int cx(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene, City * city_table);
extern int cx(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table);
/* position crossover [PX] */
extern void px(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene, City * city_table);
extern void px(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table);
/* order crossover [OX1] according to Davis */
extern void ox1(Gene * mom, Gene * dad, Gene * offspring, int num_gene, City * city_table);
extern void ox1(Gene *mom, Gene *dad, Gene *offspring, int num_gene, City *city_table);
/* order crossover [OX2] according to Syswerda */
extern void ox2(Gene * mom, Gene * dad, Gene * offspring, int num_gene, City * city_table);
extern void ox2(Gene *mom, Gene *dad, Gene *offspring, int num_gene, City *city_table);
#endif /* GEQO_RECOMBINATION_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_selection.h,v 1.3 1997/09/08 02:37:49 momjian Exp $
* $Id: geqo_selection.h,v 1.4 1997/09/08 21:53:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,6 +23,6 @@
#define GEQO_SELECTION_H
extern void geqo_selection(Chromosome * momma, Chromosome * daddy, Pool * pool, double bias);
extern void geqo_selection(Chromosome *momma, Chromosome *daddy, Pool *pool, double bias);
#endif /* GEQO_SELECTION_H */

View File

@@ -6,15 +6,15 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: joininfo.h,v 1.3 1997/09/08 02:37:50 momjian Exp $
* $Id: joininfo.h,v 1.4 1997/09/08 21:53:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef JOININFO_H
#define JOININFO_H
extern JInfo *joininfo_member(List * join_relids, List * joininfo_list);
extern JInfo *find_joininfo_node(Rel * this_rel, List * join_relids);
extern Var *other_join_clause_var(Var * var, Expr * clause);
extern JInfo *joininfo_member(List *join_relids, List *joininfo_list);
extern JInfo *find_joininfo_node(Rel *this_rel, List *join_relids);
extern Var *other_join_clause_var(Var *var, Expr *clause);
#endif /* JOININFO_H */

View File

@@ -6,16 +6,16 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: keys.h,v 1.4 1997/09/08 02:37:51 momjian Exp $
* $Id: keys.h,v 1.5 1997/09/08 21:53:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef KEYS_H
#define KEYS_H
extern bool match_indexkey_operand(int indexkey, Var * operand, Rel * rel);
extern Var *extract_subkey(JoinKey * jk, int which_subkey);
extern bool samekeys(List * keys1, List * keys2);
extern List *collect_index_pathkeys(int *index_keys, List * tlist);
extern bool match_indexkey_operand(int indexkey, Var *operand, Rel *rel);
extern Var *extract_subkey(JoinKey *jk, int which_subkey);
extern bool samekeys(List *keys1, List *keys2);
extern List *collect_index_pathkeys(int *index_keys, List *tlist);
#endif /* KEYS_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: ordering.h,v 1.5 1997/09/08 02:37:52 momjian Exp $
* $Id: ordering.h,v 1.6 1997/09/08 21:53:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,14 +15,14 @@
#include <nodes/relation.h>
extern bool
equal_path_path_ordering(PathOrder * path_ordering1,
PathOrder * path_ordering2);
extern bool
equal_path_merge_ordering(Oid * path_ordering,
MergeOrder * merge_ordering);
extern bool
equal_merge_merge_ordering(MergeOrder * merge_ordering1,
MergeOrder * merge_ordering2);
extern bool
equal_path_path_ordering(PathOrder *path_ordering1,
PathOrder *path_ordering2);
extern bool
equal_path_merge_ordering(Oid *path_ordering,
MergeOrder *merge_ordering);
extern bool
equal_merge_merge_ordering(MergeOrder *merge_ordering1,
MergeOrder *merge_ordering2);
#endif /* ORDERING_H */

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pathnode.h,v 1.3 1997/09/08 02:37:52 momjian Exp $
* $Id: pathnode.h,v 1.4 1997/09/08 21:53:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,40 +16,40 @@
/*
* prototypes for pathnode.c
*/
extern bool path_is_cheaper(Path * path1, Path * path2);
extern Path *set_cheapest(Rel * parent_rel, List * pathlist);
extern bool path_is_cheaper(Path *path1, Path *path2);
extern Path *set_cheapest(Rel *parent_rel, List *pathlist);
extern List *
add_pathlist(Rel * parent_rel, List * unique_paths,
List * new_paths);
extern Path *create_seqscan_path(Rel * rel);
add_pathlist(Rel *parent_rel, List *unique_paths,
List *new_paths);
extern Path *create_seqscan_path(Rel *rel);
extern IndexPath *
create_index_path(Query * root, Rel * rel, Rel * index,
List * restriction_clauses, bool is_join_scan);
create_index_path(Query *root, Rel *rel, Rel *index,
List *restriction_clauses, bool is_join_scan);
extern JoinPath *
create_nestloop_path(Rel * joinrel, Rel * outer_rel,
Path * outer_path, Path * inner_path, List * keys);
create_nestloop_path(Rel *joinrel, Rel *outer_rel,
Path *outer_path, Path *inner_path, List *keys);
extern MergePath *
create_mergesort_path(Rel * joinrel, int outersize,
int innersize, int outerwidth, int innerwidth, Path * outer_path,
Path * inner_path, List * keys, MergeOrder * order,
List * mergeclauses, List * outersortkeys, List * innersortkeys);
create_mergesort_path(Rel *joinrel, int outersize,
int innersize, int outerwidth, int innerwidth, Path *outer_path,
Path *inner_path, List *keys, MergeOrder *order,
List *mergeclauses, List *outersortkeys, List *innersortkeys);
extern HashPath *
create_hashjoin_path(Rel * joinrel, int outersize,
int innersize, int outerwidth, int innerwidth, Path * outer_path,
Path * inner_path, List * keys, Oid operator, List * hashclauses,
List * outerkeys, List * innerkeys);
create_hashjoin_path(Rel *joinrel, int outersize,
int innersize, int outerwidth, int innerwidth, Path *outer_path,
Path *inner_path, List *keys, Oid operator, List *hashclauses,
List *outerkeys, List *innerkeys);
/*
* prototypes for rel.c
*/
extern Rel *rel_member(List * relid, List * rels);
extern Rel *get_base_rel(Query * root, int relid);
extern Rel *get_join_rel(Query * root, List * relid);
extern Rel *rel_member(List *relid, List *rels);
extern Rel *get_base_rel(Query *root, int relid);
extern Rel *get_join_rel(Query *root, List *relid);
/*
* prototypes for indexnode.h
*/
extern List *find_relation_indices(Query * root, Rel * rel);
extern List *find_relation_indices(Query *root, Rel *rel);
#endif /* PATHNODE_H */

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