TimeADT *
-time_difference(TimeADT * time1, TimeADT * time2)
+time_difference(TimeADT *time1, TimeADT *time2)
{
TimeADT *result = (TimeADT *) palloc(sizeof(TimeADT));
}
int4
-hours(TimeADT * time)
+hours(TimeADT *time)
{
return (*time / (60 * 60));
}
int4
-minutes(TimeADT * time)
+minutes(TimeADT *time)
{
return (((int) (*time / 60)) % 60);
}
int4
-seconds(TimeADT * time)
+seconds(TimeADT *time)
{
return (((int) *time) % 60);
}
int4
-day(DateADT * date)
+day(DateADT *date)
{
struct tm tm;
}
int4
-month(DateADT * date)
+month(DateADT *date)
{
struct tm tm;
}
int4
-year(DateADT * date)
+year(DateADT *date)
{
struct tm tm;
}
int4
-asminutes(TimeADT * time)
+asminutes(TimeADT *time)
{
int seconds = (int) *time;
}
int4
-asseconds(TimeADT * time)
+asseconds(TimeADT *time)
{
int seconds = (int) *time;
int32 int84(int64 * val);
#if FALSE
-int64 *int28(int16 val);
+int64 *int28 (int16 val);
int16 int82(int64 * val);
#endif
#if FALSE
int64 *
-int28(int16 val)
+int28 (int16 val)
{
int64 *result;
fflush(stderr);
/* call one clean up function if defined */
- if ((sig_func = signal(SIGTERM, SIG_DFL)) != SIG_DFL &&
- sig_func != SIG_IGN)
+ if ((sig_func = signal(SIGTERM, SIG_DFL)) !=SIG_DFL &&
+ sig_func !=SIG_IGN)
(*sig_func) (0);
- else if ((sig_func = signal(SIGHUP, SIG_DFL)) != SIG_DFL &&
- sig_func != SIG_IGN)
+ else if ((sig_func = signal(SIGHUP, SIG_DFL)) !=SIG_DFL &&
+ sig_func !=SIG_IGN)
(*sig_func) (0);
- else if ((sig_func = signal(SIGINT, SIG_DFL)) != SIG_DFL &&
- sig_func != SIG_IGN)
+ else if ((sig_func = signal(SIGINT, SIG_DFL)) !=SIG_DFL &&
+ sig_func !=SIG_IGN)
(*sig_func) (0);
- else if ((sig_func = signal(SIGQUIT, SIG_DFL)) != SIG_DFL &&
- sig_func != SIG_IGN)
+ else if ((sig_func = signal(SIGQUIT, SIG_DFL)) !=SIG_DFL &&
+ sig_func !=SIG_IGN)
(*sig_func) (0);
exit(1);
}
char *soundex(char *instr, char *outstr);
text *
-text_soundex(text * t)
+text_soundex(text *t)
{
/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
char *table = "01230120022455012623010202";
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.23 1997/09/08 02:19:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.24 1997/09/08 21:40:18 momjian Exp $
*
* NOTES
* The old interface functions have been converted to macros
Datum value[],
char nulls[],
char *infomask,
- bits8 * bit)
+ bits8 *bit)
{
bits8 *bitP = 0;
int bitmask = 0;
fastgetattr(HeapTuple tup,
int attnum,
TupleDesc tupleDesc,
- bool * isnull)
+ bool *isnull)
{
char *tp; /* ptr to att in tuple */
bits8 *bp = NULL; /* ptr to att in tuple */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.17 1997/09/08 02:19:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.18 1997/09/08 21:40:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static Size IndexInfoFindDataOffset(unsigned short t_info);
static char *
fastgetiattr(IndexTuple tup, int attnum,
- TupleDesc att, bool * isnull);
+ TupleDesc att, bool *isnull);
/* ----------------------------------------------------------------
* index_ tuple interface routines
fastgetiattr(IndexTuple tup,
int attnum,
TupleDesc tupleDesc,
- bool * isnull)
+ bool *isnull)
{
register char *tp; /* ptr to att in tuple */
register char *bp = NULL; /* ptr to att in tuple */
off = SHORTALIGN(off) +sizeof(short);
break;
case sizeof(int32):
- off = INTALIGN(off) + sizeof(int32);
+ off = INTALIGN(off) +sizeof(int32);
break;
case -1:
usecache = false;
index_getattr(IndexTuple tuple,
AttrNumber attNum,
TupleDesc tupDesc,
- bool * isNullOutP)
+ bool *isNullOutP)
{
Assert(attNum > 0);
* we assume we have space that is already palloc'ed.
*/
void
-CopyIndexTuple(IndexTuple source, IndexTuple * target)
+CopyIndexTuple(IndexTuple source, IndexTuple *target)
{
Size size;
IndexTuple ret;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.22 1997/09/08 20:53:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.23 1997/09/08 21:40:27 momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
* ----------------------------------------------------------------
*/
TupleDesc
-BuildDescForRelation(List * schema, char *relname)
+BuildDescForRelation(List *schema, char *relname)
{
int natts;
AttrNumber attnum;
/* non-export function prototypes */
static InsertIndexResult
gistdoinsert(Relation r, IndexTuple itup,
- GISTSTATE * GISTstate);
+ GISTSTATE *GISTstate);
static InsertIndexResult
-gistentryinsert(Relation r, GISTSTACK * stk,
+gistentryinsert(Relation r, GISTSTACK *stk,
IndexTuple tup,
- GISTSTATE * giststate);
+ GISTSTATE *giststate);
static void
-gistentryinserttwo(Relation r, GISTSTACK * stk, IndexTuple ltup,
- IndexTuple rtup, GISTSTATE * giststate);
+gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
+ IndexTuple rtup, GISTSTATE *giststate);
static void
-gistAdjustKeys(Relation r, GISTSTACK * stk, BlockNumber blk,
- char *datum, int att_size, GISTSTATE * giststate);
+gistAdjustKeys(Relation r, GISTSTACK *stk, BlockNumber blk,
+ char *datum, int att_size, GISTSTATE *giststate);
static void
-gistintinsert(Relation r, GISTSTACK * stk, IndexTuple ltup,
- IndexTuple rtup, GISTSTATE * giststate);
+gistintinsert(Relation r, GISTSTACK *stk, IndexTuple ltup,
+ IndexTuple rtup, GISTSTATE *giststate);
static InsertIndexResult
gistSplit(Relation r, Buffer buffer,
- GISTSTACK * stack, IndexTuple itup,
- GISTSTATE * giststate);
+ GISTSTACK *stack, IndexTuple itup,
+ GISTSTATE *giststate);
static void
-gistnewroot(GISTSTATE * giststate, Relation r, IndexTuple lt,
+gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt,
IndexTuple rt);
static void GISTInitBuffer(Buffer b, uint32 f);
static BlockNumber
gistChooseSubtree(Relation r, IndexTuple itup, int level,
- GISTSTATE * giststate,
- GISTSTACK ** retstack, Buffer *leafbuf);
+ GISTSTATE *giststate,
+ GISTSTACK **retstack, Buffer *leafbuf);
static OffsetNumber
gistchoose(Relation r, Page p, IndexTuple it,
- GISTSTATE * giststate);
+ GISTSTATE *giststate);
static int gistnospace(Page p, IndexTuple it);
void gistdelete(Relation r, ItemPointer tid);
static IndexTuple gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t);
static void
-gistcentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr,
+gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation r, Page pg, OffsetNumber o, int b, bool l);
-static char *int_range_out(INTRANGE * r);
+static char *int_range_out(INTRANGE *r);
/*
** routine to build an index. Basically calls insert over and over
AttrNumber *attnum,
IndexStrategy istrat,
uint16 pint,
- Datum * params,
- FuncIndexInfo * finfo,
- PredInfo * predInfo)
+ Datum *params,
+ FuncIndexInfo *finfo,
+ PredInfo *predInfo)
{
HeapScanDesc scan;
Buffer buffer;
* It doesn't do any work; just locks the relation and passes the buck.
*/
InsertIndexResult
-gistinsert(Relation r, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
+gistinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
{
InsertIndexResult res;
IndexTuple itup;
** on the page, for example, or do something special for leaf nodes.)
*/
static OffsetNumber
-gistPageAddItem(GISTSTATE * giststate,
+gistPageAddItem(GISTSTATE *giststate,
Relation r,
Page page,
Item item,
Size size,
OffsetNumber offsetNumber,
ItemIdFlags flags,
- GISTENTRY * dentry,
- IndexTuple * newtup)
+ GISTENTRY *dentry,
+ IndexTuple *newtup)
{
GISTENTRY tmpcentry;
IndexTuple itup = (IndexTuple) item;
&& tmpcentry.pred != (((char *) itup) + sizeof(IndexTupleData)))
pfree(tmpcentry.pred);
- return (PageAddItem(page, (Item) * newtup, IndexTupleSize(*newtup),
+ return (PageAddItem(page, (Item) *newtup, IndexTupleSize(*newtup),
offsetNumber, flags));
}
static InsertIndexResult
gistdoinsert(Relation r,
IndexTuple itup, /* itup contains compressed entry */
- GISTSTATE * giststate)
+ GISTSTATE *giststate)
{
GISTENTRY tmpdentry;
InsertIndexResult res;
gistChooseSubtree(Relation r, IndexTuple itup, /* itup has compressed
* entry */
int level,
- GISTSTATE * giststate,
- GISTSTACK ** retstack /* out */ ,
+ GISTSTATE *giststate,
+ GISTSTACK **retstack /* out */ ,
Buffer *leafbuf /* out */ )
{
Buffer buffer;
static void
gistAdjustKeys(Relation r,
- GISTSTACK * stk,
+ GISTSTACK *stk,
BlockNumber blk,
char *datum, /* datum is uncompressed */
int att_size,
- GISTSTATE * giststate)
+ GISTSTATE *giststate)
{
char *oldud;
Page p;
/* delete old tuple */
ItemPointerSet(&oldtid, stk->gs_blk, stk->gs_child);
- gistdelete(r, (ItemPointer) & oldtid);
+ gistdelete(r, (ItemPointer) &oldtid);
/* generate and insert new tuple */
tupDesc = r->rd_att;
isnull = (char *) palloc(r->rd_rel->relnatts);
memset(isnull, ' ', r->rd_rel->relnatts);
newtup = (IndexTuple) index_formtuple(tupDesc,
- (Datum *) & centry.pred, isnull);
+ (Datum *) ¢ry.pred, isnull);
pfree(isnull);
/* set pointer in new tuple to point to current child */
ItemPointerSet(&oldtid, blk, 1);
static InsertIndexResult
gistSplit(Relation r,
Buffer buffer,
- GISTSTACK * stack,
+ GISTSTACK *stack,
IndexTuple itup, /* contains compressed entry */
- GISTSTATE * giststate)
+ GISTSTATE *giststate)
{
Page p;
Buffer leftbuf,
tupDesc = r->rd_att;
ltup = (IndexTuple) index_formtuple(tupDesc,
- (Datum *) & (v.spl_ldatum), isnull);
+ (Datum *) &(v.spl_ldatum), isnull);
rtup = (IndexTuple) index_formtuple(tupDesc,
- (Datum *) & (v.spl_rdatum), isnull);
+ (Datum *) &(v.spl_rdatum), isnull);
pfree(isnull);
/* set pointers to new child pages in the internal index tuples */
*/
static void
gistintinsert(Relation r,
- GISTSTACK * stk,
+ GISTSTACK *stk,
IndexTuple ltup, /* new version of entry for old page */
IndexTuple rtup, /* entry for new page */
- GISTSTATE * giststate)
+ GISTSTATE *giststate)
{
ItemPointerData ltid;
/* remove old left pointer, insert the 2 new entries */
ItemPointerSet(<id, stk->gs_blk, stk->gs_child);
- gistdelete(r, (ItemPointer) & ltid);
+ gistdelete(r, (ItemPointer) <id);
gistentryinserttwo(r, stk, ltup, rtup, giststate);
}
** Insert two entries onto one page, handling a split for either one!
*/
static void
-gistentryinserttwo(Relation r, GISTSTACK * stk, IndexTuple ltup,
- IndexTuple rtup, GISTSTATE * giststate)
+gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
+ IndexTuple rtup, GISTSTATE *giststate)
{
Buffer b;
Page p;
** Insert an entry onto a page
*/
static InsertIndexResult
-gistentryinsert(Relation r, GISTSTACK * stk, IndexTuple tup,
- GISTSTATE * giststate)
+gistentryinsert(Relation r, GISTSTACK *stk, IndexTuple tup,
+ GISTSTATE *giststate)
{
Buffer b;
Page p;
static void
-gistnewroot(GISTSTATE * giststate, Relation r, IndexTuple lt, IndexTuple rt)
+gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt)
{
Buffer b;
Page p;
*/
static OffsetNumber
gistchoose(Relation r, Page p, IndexTuple it, /* it has compressed entry */
- GISTSTATE * giststate)
+ GISTSTATE *giststate)
{
OffsetNumber maxoff;
OffsetNumber i;
}
void
-gistfreestack(GISTSTACK * s)
+gistfreestack(GISTSTACK *s)
{
GISTSTACK *p;
}
void
-initGISTstate(GISTSTATE * giststate, Relation index)
+initGISTstate(GISTSTATE *giststate, Relation index)
{
RegProcedure consistent_proc,
union_proc,
for (blank = 0; blank < r->rd_rel->relnatts; blank++)
isnull[blank] = ' ';
newtup = (IndexTuple) index_formtuple(tupDesc,
- (Datum *) & (entry.pred),
+ (Datum *) &(entry.pred),
isnull);
newtup->t_tid = t->t_tid;
pfree(isnull);
** initialize a GiST entry with a decompressed version of pred
*/
void
-gistdentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr, Relation r,
+gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
Page pg, OffsetNumber o, int b, bool l)
{
GISTENTRY *dep;
** initialize a GiST entry with a compressed version of pred
*/
static void
-gistcentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr, Relation r,
+gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
Page pg, OffsetNumber o, int b, bool l)
{
GISTENTRY *cep;
#ifdef NOT_USED
static char *
-text_range_out(TXTRANGE * r)
+text_range_out(TXTRANGE *r)
{
char *result;
char *lower,
#endif
static char *
-int_range_out(INTRANGE * r)
+int_range_out(INTRANGE *r)
{
char *result;
static ItemPointer gistheapptr(Relation r, ItemPointer itemp);
static bool
gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
- int scanKeySize, ScanKey key, GISTSTATE * giststate,
+ int scanKeySize, ScanKey key, GISTSTATE *giststate,
Relation r, Page p, OffsetNumber offset);
TupleDesc tupdesc,
int scanKeySize,
ScanKey key,
- GISTSTATE * giststate,
+ GISTSTATE *giststate,
Relation r,
Page p,
OffsetNumber offset)
gistadjone(IndexScanDesc s, int op, BlockNumber blkno,
OffsetNumber offnum);
static void
-adjuststack(GISTSTACK * stk, BlockNumber blkno,
+adjuststack(GISTSTACK *stk, BlockNumber blkno,
OffsetNumber offnum);
static void
adjustiptr(IndexScanDesc s, ItemPointer iptr,
{
IndexScanDesc gsl_scan;
struct GISTScanListData *gsl_next;
-} GISTScanListData;
+} GISTScanListData;
typedef GISTScanListData *GISTScanList;
*/
/*ARGSUSED*/
static void
-adjuststack(GISTSTACK * stk,
+adjuststack(GISTSTACK *stk,
BlockNumber blkno,
OffsetNumber offnum)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.15 1997/09/08 20:53:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.16 1997/09/08 21:40:45 momjian Exp $
*
* NOTES
* This file contains only the public interface routines.
AttrNumber *attnum,
IndexStrategy istrat,
uint16 pcount,
- Datum * params,
- FuncIndexInfo * finfo,
- PredInfo * predInfo)
+ Datum *params,
+ FuncIndexInfo *finfo,
+ PredInfo *predInfo)
{
HeapScanDesc hscan;
Buffer buffer;
* to the caller.
*/
InsertIndexResult
-hashinsert(Relation rel, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
+hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
{
HashItem hitem;
IndexTuple itup;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.5 1997/09/08 02:20:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.6 1997/09/08 21:40:47 momjian Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
uint32
hashint2(int16 key)
{
- return ((uint32) ~ key);
+ return ((uint32) ~key);
}
uint32
uint32
hashoid(Oid key)
{
- return ((uint32) ~ key);
+ return ((uint32) ~key);
}
}
uint32
-hashname(NameData * n)
+hashname(NameData *n)
{
uint32 h;
int len;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.10 1997/09/08 02:20:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.11 1997/09/08 21:40:48 momjian Exp $
*
* NOTES
* Because we can be doing an index scan on a relation while we
{
IndexScanDesc hashsl_scan;
struct HashScanListData *hashsl_next;
-} HashScanListData;
+} HashScanListData;
typedef HashScanListData *HashScanList;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.13 1997/09/08 20:54:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.14 1997/09/08 21:40:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static void
_hash_readnext(Relation rel,
- Buffer *bufp, Page * pagep, HashPageOpaque * opaquep)
+ Buffer *bufp, Page *pagep, HashPageOpaque *opaquep)
{
BlockNumber blkno;
static void
_hash_readprev(Relation rel,
- Buffer *bufp, Page * pagep, HashPageOpaque * opaquep)
+ Buffer *bufp, Page *pagep, HashPageOpaque *opaquep)
{
BlockNumber blkno;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.18 1997/09/08 20:54:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.19 1997/09/08 21:40:57 momjian Exp $
*
*
* INTERFACE ROUTINES
*/
SetRefreshWhenInvalidate(ImmediateInvalidation);
RelationInvalidateHeapTuple(relation, tup);
- SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation);
+ SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
}
return (tup->t_oid);
*/
SetRefreshWhenInvalidate(ImmediateInvalidation);
RelationInvalidateHeapTuple(relation, tp);
- SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation);
+ SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
WriteBuffer(b);
if (IsSystemRelationName(RelationGetRelationName(relation)->data))
*/
SetRefreshWhenInvalidate(ImmediateInvalidation);
RelationInvalidateHeapTuple(relation, tp);
- SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation);
+ SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
WriteBuffer(buffer);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.15 1997/09/08 02:20:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.16 1997/09/08 21:41:06 momjian Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relationId
*/
InsertIndexResult
index_insert(Relation relation,
- Datum * datum,
+ Datum *datum,
char *nulls,
ItemPointer heap_t_ctid,
Relation heapRel)
TupleDesc hTupDesc,
int attOff,
AttrNumber attrNums[],
- FuncIndexInfo * fInfo,
- bool * attNull,
+ FuncIndexInfo *fInfo,
+ bool *attNull,
Buffer buffer)
{
Datum returnVal;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.11 1997/09/08 02:20:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.12 1997/09/08 21:41:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
void
IndexSupportInitialize(IndexStrategy indexStrategy,
- RegProcedure * indexSupport,
+ RegProcedure *indexSupport,
Oid indexObjectId,
Oid accessMethodObjectId,
StrategyNumber maxStrategyNumber,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.12 1997/09/08 02:20:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.13 1997/09/08 21:41:11 momjian Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
}
int32
-btnamecmp(NameData * a, NameData * b)
+btnamecmp(NameData *a, NameData *b)
{
return (strncmp(a->data, b->data, NAMEDATALEN));
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.19 1997/09/08 02:20:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.20 1997/09/08 21:41:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
maxoff = PageGetMaxOffsetNumber(page);
llimit = PageGetPageSize(page) - sizeof(PageHeaderData) -
DOUBLEALIGN(sizeof(BTPageOpaqueData))
- + sizeof(ItemIdData);
+ +sizeof(ItemIdData);
llimit /= 2;
firstright = _bt_findsplitloc(rel, page, start, maxoff, llimit);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.22 1997/09/08 20:54:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.23 1997/09/08 21:41:24 momjian Exp $
*
* NOTES
* This file contains only the public interface routines.
AttrNumber *attnum,
IndexStrategy istrat,
uint16 pcount,
- Datum * params,
- FuncIndexInfo * finfo,
- PredInfo * predInfo)
+ Datum *params,
+ FuncIndexInfo *finfo,
+ PredInfo *predInfo)
{
HeapScanDesc hscan;
Buffer buffer;
* return an InsertIndexResult to the caller.
*/
InsertIndexResult
-btinsert(Relation rel, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
+btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
{
BTItem btitem;
IndexTuple itup;
*
*
* IDENTIFICATION
- * $Id: nbtsort.c,v 1.22 1997/09/08 20:54:28 momjian Exp $
+ * $Id: nbtsort.c,v 1.23 1997/09/08 21:41:28 momjian Exp $
*
* NOTES
*
* allocate a new, clean btree page, not linked to any siblings.
*/
static void
-_bt_blnewpage(Relation index, Buffer *buf, Page * page, int flags)
+_bt_blnewpage(Relation index, Buffer *buf, Page *page, int flags)
{
BTPageOpaque opaque;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.13 1997/09/08 02:21:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.14 1997/09/08 21:41:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif
bool
-_bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size * keysok)
+_bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok)
{
BTScanOpaque so = (BTScanOpaque) scan->opaque;
Size keysz = so->numberOfKeys;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.10 1997/09/08 20:54:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.11 1997/09/08 21:41:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
POLYGON *
-rt_poly_union(POLYGON * a, POLYGON * b)
+rt_poly_union(POLYGON *a, POLYGON *b)
{
POLYGON *p;
}
void
-rt_poly_size(POLYGON * a, float *size)
+rt_poly_size(POLYGON *a, float *size)
{
double xdim,
ydim;
}
POLYGON *
-rt_poly_inter(POLYGON * a, POLYGON * b)
+rt_poly_inter(POLYGON *a, POLYGON *b)
{
POLYGON *p;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.16 1997/09/08 20:54:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.17 1997/09/08 21:41:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
OffsetNumber *spl_right;
int spl_nright;
char *spl_rdatum;
-} SPLITVEC;
+} SPLITVEC;
typedef struct RTSTATE
{
func_ptr unionFn; /* union function */
func_ptr sizeFn; /* size function */
func_ptr interFn; /* intersection function */
-} RTSTATE;
+} RTSTATE;
/* non-export function prototypes */
static InsertIndexResult
rtdoinsert(Relation r, IndexTuple itup,
- RTSTATE * rtstate);
+ RTSTATE *rtstate);
static void
-rttighten(Relation r, RTSTACK * stk, char *datum, int att_size,
- RTSTATE * rtstate);
+rttighten(Relation r, RTSTACK *stk, char *datum, int att_size,
+ RTSTATE *rtstate);
static InsertIndexResult
-dosplit(Relation r, Buffer buffer, RTSTACK * stack,
- IndexTuple itup, RTSTATE * rtstate);
+dosplit(Relation r, Buffer buffer, RTSTACK *stack,
+ IndexTuple itup, RTSTATE *rtstate);
static void
-rtintinsert(Relation r, RTSTACK * stk, IndexTuple ltup,
- IndexTuple rtup, RTSTATE * rtstate);
+rtintinsert(Relation r, RTSTACK *stk, IndexTuple ltup,
+ IndexTuple rtup, RTSTATE *rtstate);
static void rtnewroot(Relation r, IndexTuple lt, IndexTuple rt);
static void
-picksplit(Relation r, Page page, SPLITVEC * v, IndexTuple itup,
- RTSTATE * rtstate);
+picksplit(Relation r, Page page, SPLITVEC *v, IndexTuple itup,
+ RTSTATE *rtstate);
static void RTInitBuffer(Buffer b, uint32 f);
static OffsetNumber
choose(Relation r, Page p, IndexTuple it,
- RTSTATE * rtstate);
+ RTSTATE *rtstate);
static int nospace(Page p, IndexTuple it);
-static void initRtstate(RTSTATE * rtstate, Relation index);
+static void initRtstate(RTSTATE *rtstate, Relation index);
void
AttrNumber *attnum,
IndexStrategy istrat,
uint16 pcount,
- Datum * params,
- FuncIndexInfo * finfo,
- PredInfo * predInfo)
+ Datum *params,
+ FuncIndexInfo *finfo,
+ PredInfo *predInfo)
{
HeapScanDesc scan;
Buffer buffer;
* It doesn't do any work; just locks the relation and passes the buck.
*/
InsertIndexResult
-rtinsert(Relation r, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
+rtinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
{
InsertIndexResult res;
IndexTuple itup;
}
static InsertIndexResult
-rtdoinsert(Relation r, IndexTuple itup, RTSTATE * rtstate)
+rtdoinsert(Relation r, IndexTuple itup, RTSTATE *rtstate)
{
Page page;
Buffer buffer;
static void
rttighten(Relation r,
- RTSTACK * stk,
+ RTSTACK *stk,
char *datum,
int att_size,
- RTSTATE * rtstate)
+ RTSTATE *rtstate)
{
char *oldud;
char *tdatum;
static InsertIndexResult
dosplit(Relation r,
Buffer buffer,
- RTSTACK * stack,
+ RTSTACK *stack,
IndexTuple itup,
- RTSTATE * rtstate)
+ RTSTATE *rtstate)
{
Page p;
Buffer leftbuf,
tupDesc = r->rd_att;
ltup = (IndexTuple) index_formtuple(tupDesc,
- (Datum *) & (v.spl_ldatum), isnull);
+ (Datum *) &(v.spl_ldatum), isnull);
rtup = (IndexTuple) index_formtuple(tupDesc,
- (Datum *) & (v.spl_rdatum), isnull);
+ (Datum *) &(v.spl_rdatum), isnull);
pfree(isnull);
/* set pointers to new child pages in the internal index tuples */
static void
rtintinsert(Relation r,
- RTSTACK * stk,
+ RTSTACK *stk,
IndexTuple ltup,
IndexTuple rtup,
- RTSTATE * rtstate)
+ RTSTATE *rtstate)
{
IndexTuple old;
Buffer b;
static void
picksplit(Relation r,
Page page,
- SPLITVEC * v,
+ SPLITVEC *v,
IndexTuple itup,
- RTSTATE * rtstate)
+ RTSTATE *rtstate)
{
OffsetNumber maxoff;
OffsetNumber i,
}
static OffsetNumber
-choose(Relation r, Page p, IndexTuple it, RTSTATE * rtstate)
+choose(Relation r, Page p, IndexTuple it, RTSTATE *rtstate)
{
OffsetNumber maxoff;
OffsetNumber i;
}
void
-freestack(RTSTACK * s)
+freestack(RTSTACK *s)
{
RTSTACK *p;
}
static void
-initRtstate(RTSTATE * rtstate, Relation index)
+initRtstate(RTSTATE *rtstate, Relation index)
{
RegProcedure union_proc,
size_proc,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.12 1997/09/08 02:21:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.13 1997/09/08 21:41:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
rtadjone(IndexScanDesc s, int op, BlockNumber blkno,
OffsetNumber offnum);
static void
-adjuststack(RTSTACK * stk, BlockNumber blkno,
+adjuststack(RTSTACK *stk, BlockNumber blkno,
OffsetNumber offnum);
static void
adjustiptr(IndexScanDesc s, ItemPointer iptr,
{
IndexScanDesc rtsl_scan;
struct RTScanListData *rtsl_next;
-} RTScanListData;
+} RTScanListData;
typedef RTScanListData *RTScanList;
*/
/*ARGSUSED*/
static void
-adjuststack(RTSTACK * stk,
+adjuststack(RTSTACK *stk,
BlockNumber blkno,
OffsetNumber offnum)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.12 1997/09/08 20:54:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.13 1997/09/08 21:41:42 momjian Exp $
*
* NOTES
* This file contains the high level access-method interface to the
* --------------------------------
*/
-static bool /* true/false: does transaction id have
+static bool /* true/false: does transaction id have
* specified status? */
TransactionLogTest(TransactionId transactionId, /* transaction id to test */
XidStatus status) /* transaction status */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.12 1997/09/08 20:54:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.13 1997/09/08 21:41:46 momjian Exp $
*
* NOTES
* This file contains support functions for the high
static XidStatus
TransBlockGetLastTransactionIdStatus(Block tblock,
TransactionId baseXid,
- TransactionId * returnXidP)
+ TransactionId *returnXidP)
{
Index index;
Index maxIndex;
TransBlockNumberGetXidStatus(Relation relation,
BlockNumber blockNumber,
TransactionId xid,
- bool * failP)
+ bool *failP)
{
Buffer buffer; /* buffer associated with block */
Block block; /* block containing xstatus */
BlockNumber blockNumber,
TransactionId xid,
XidStatus xstatus,
- bool * failP)
+ bool *failP)
{
Buffer buffer; /* buffer associated with block */
Block block; /* block containing xstatus */
TransBlockNumberGetCommitTime(Relation relation,
BlockNumber blockNumber,
TransactionId xid,
- bool * failP)
+ bool *failP)
{
Buffer buffer; /* buffer associated with block */
Block block; /* block containing commit time */
BlockNumber blockNumber,
TransactionId xid,
AbsoluteTime xtime,
- bool * failP)
+ bool *failP)
{
Buffer buffer; /* buffer associated with block */
Block block; /* block containing commit time */
TransGetLastRecordedTransaction(Relation relation,
TransactionId xid, /* return: transaction
* id */
- bool * failP)
+ bool *failP)
{
BlockNumber blockNumber; /* block number */
Buffer buffer; /* buffer associated with block */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.11 1997/09/08 02:21:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.12 1997/09/08 21:41:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <access/heapam.h>
#include <catalog/catname.h>
-static void GetNewObjectIdBlock(Oid * oid_return, int oid_block_size);
-static void VariableRelationGetNextOid(Oid * oid_return);
-static void VariableRelationGetNextXid(TransactionId * xidP);
+static void GetNewObjectIdBlock(Oid *oid_return, int oid_block_size);
+static void VariableRelationGetNextOid(Oid *oid_return);
+static void VariableRelationGetNextXid(TransactionId *xidP);
static void VariableRelationPutLastXid(TransactionId xid);
-static void VariableRelationPutNextOid(Oid * oidP);
-static void VariableRelationGetLastXid(TransactionId * xidP);
+static void VariableRelationPutNextOid(Oid *oidP);
+static void VariableRelationGetLastXid(TransactionId *xidP);
/* ---------------------
* spin lock for oid generation
* --------------------------------
*/
static void
-VariableRelationGetNextXid(TransactionId * xidP)
+VariableRelationGetNextXid(TransactionId *xidP)
{
Buffer buf;
VariableRelationContents var;
* --------------------------------
*/
static void
-VariableRelationGetLastXid(TransactionId * xidP)
+VariableRelationGetLastXid(TransactionId *xidP)
{
Buffer buf;
VariableRelationContents var;
* --------------------------------
*/
static void
-VariableRelationGetNextOid(Oid * oid_return)
+VariableRelationGetNextOid(Oid *oid_return)
{
Buffer buf;
VariableRelationContents var;
* --------------------------------
*/
static void
-VariableRelationPutNextOid(Oid * oidP)
+VariableRelationPutNextOid(Oid *oidP)
{
Buffer buf;
VariableRelationContents var;
static TransactionId next_prefetched_xid;
void
-GetNewTransactionId(TransactionId * xid)
+GetNewTransactionId(TransactionId *xid)
{
TransactionId nextid;
* ----------------
*/
static void
-GetNewObjectIdBlock(Oid * oid_return, /* place to return the new object
+GetNewObjectIdBlock(Oid *oid_return, /* place to return the new object
* id */
int oid_block_size) /* number of oids desired */
{
static Oid next_prefetched_oid;
void
-GetNewObjectId(Oid * oid_return)/* place to return the new object id */
+GetNewObjectId(Oid *oid_return) /* place to return the new object id */
{
/* ----------------
* if we run out of prefetched oids, then we get some
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.15 1997/09/08 02:21:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.16 1997/09/08 21:41:52 momjian Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
* V1 transaction system. -cim 3/18/90
* ----------------
*/
-TransactionId DisabledTransactionId = (TransactionId) - 1;
+TransactionId DisabledTransactionId = (TransactionId) -1;
-CommandId DisabledCommandId = (CommandId) - 1;
+CommandId DisabledCommandId = (CommandId) -1;
AbsoluteTime DisabledStartTime = (AbsoluteTime) BIG_ABSTIME; /* 1073741823; */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.9 1997/09/08 02:21:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.10 1997/09/08 21:41:56 momjian Exp $
*
* OLD COMMENTS
* XXX WARNING
* ----------------------------------------------------------------
*/
void
-StoreInvalidTransactionId(TransactionId * destination)
+StoreInvalidTransactionId(TransactionId *destination)
{
*destination = NullTransactionId;
}
*/
void
TransactionIdStore(TransactionId transactionId,
- TransactionId * destination)
+ TransactionId *destination)
{
*destination = transactionId;
}
*/
#ifdef NOT_USED
void
-TransactionIdIncrement(TransactionId * transactionId)
+TransactionIdIncrement(TransactionId *transactionId)
{
(*transactionId)++;
* ----------------------------------------------------------------
*/
void
-TransactionIdAdd(TransactionId * xid, int value)
+TransactionIdAdd(TransactionId *xid, int value)
{
*xid += value;
return;
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.24 1997/09/08 20:54:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.25 1997/09/08 21:42:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static AttributeTupleForm AllocateAttribute(void);
static bool BootstrapAlreadySeen(Oid id);
static int CompHash(char *str, int len);
-static hashnode *FindStr(char *str, int length, hashnode * mderef);
+static hashnode *FindStr(char *str, int length, hashnode *mderef);
static int gettype(char *type);
static void cleanup(void);
FuncIndexInfo *il_finfo;
PredInfo *il_predInfo;
struct _IndexList *il_next;
-} IndexList;
+} IndexList;
static IndexList *ILHead = (IndexList *) NULL;
* ----------------
*/
static hashnode *
-FindStr(char *str, int length, hashnode * mderef)
+FindStr(char *str, int length, hashnode *mderef)
{
hashnode *node;
int natts,
AttrNumber *attnos,
uint16 nparams,
- Datum * params,
- FuncIndexInfo * finfo,
- PredInfo * predInfo)
+ Datum *params,
+ FuncIndexInfo *finfo,
+ PredInfo *predInfo)
{
Datum *v;
IndexList *newind;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.9 1997/09/08 02:21:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.10 1997/09/08 21:42:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
else
{
- (*attributeP)->attnum = (int16)++ i;
+ (*attributeP)->attnum = (int16) ++i;
/*
* Check if the attr is a set before messing with the length
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.27 1997/09/08 20:54:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.28 1997/09/08 21:42:16 momjian Exp $
*
* INTERFACE ROUTINES
* heap_creatr() - Create an uncataloged heap relation
int num; /* number of temporary relations */
int size; /* size of space allocated for the rels
* array */
-} TempRelList;
+} TempRelList;
#define TEMP_REL_LIST_SIZE 32
tempRels = NULL;
}
-extern List *flatten_tlist(List * tlist);
+extern List *flatten_tlist(List *tlist);
extern List *
-pg_plan(char *query_string, Oid * typev, int nargs,
- QueryTreeList ** queryListP, CommandDest dest);
+pg_plan(char *query_string, Oid *typev, int nargs,
+ QueryTreeList **queryListP, CommandDest dest);
static void
StoreAttrDefault(Relation rel, AttrDefault *attrdef)
}
static void
-StoreRelCheck(Relation rel, ConstrCheck * check)
+StoreRelCheck(Relation rel, ConstrCheck *check)
{
char str[MAX_PARSE_BUFFER];
QueryTreeList *queryTree_list;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.21 1997/09/08 02:21:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.22 1997/09/08 21:42:18 momjian Exp $
*
*
* INTERFACE ROUTINES
RelationNameGetObjectId(char *relationName, Relation pg_class,
bool setHasIndexAttribute);
static Oid GetHeapRelationOid(char *heapRelationName, char *indexRelationName);
-static TupleDesc BuildFuncTupleDesc(FuncIndexInfo * funcInfo);
+static TupleDesc BuildFuncTupleDesc(FuncIndexInfo *funcInfo);
static TupleDesc
ConstructTupleDescriptor(Oid heapoid, Relation heapRelation,
- List * attributeList,
+ List *attributeList,
int numatts, AttrNumber attNums[]);
static void ConstructIndexReldesc(Relation indexRelation, Oid amoid);
AppendAttributeTuples(Relation indexRelation, int numatts);
static void
UpdateIndexRelation(Oid indexoid, Oid heapoid,
- FuncIndexInfo * funcInfo, int natts,
- AttrNumber attNums[], Oid classOids[], Node * predicate,
- List * attributeList, bool islossy, bool unique);
+ FuncIndexInfo *funcInfo, int natts,
+ AttrNumber attNums[], Oid classOids[], Node *predicate,
+ List *attributeList, bool islossy, bool unique);
static void
DefaultBuild(Relation heapRelation, Relation indexRelation,
int numberOfAttributes, AttrNumber attributeNumber[],
IndexStrategy indexStrategy, uint16 parameterCount,
- Datum parameter[], FuncIndexInfoPtr funcInfo, PredInfo * predInfo);
+ Datum parameter[], FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
/* ----------------------------------------------------------------
* sysatts is a structure containing attribute tuple forms
}
static TupleDesc
-BuildFuncTupleDesc(FuncIndexInfo * funcInfo)
+BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
{
HeapTuple tuple;
TupleDesc funcTupDesc;
static TupleDesc
ConstructTupleDescriptor(Oid heapoid,
Relation heapRelation,
- List * attributeList,
+ List *attributeList,
int numatts,
AttrNumber attNums[])
{
static void
UpdateIndexRelation(Oid indexoid,
Oid heapoid,
- FuncIndexInfo * funcInfo,
+ FuncIndexInfo *funcInfo,
int natts,
AttrNumber attNums[],
Oid classOids[],
- Node * predicate,
- List * attributeList,
+ Node *predicate,
+ List *attributeList,
bool islossy,
bool unique)
{
* ----------------------------------------------------------------
*/
void
-UpdateIndexPredicate(Oid indexoid, Node * oldPred, Node * predicate)
+UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
{
Node *newPred;
char *predString;
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)
{
HeapTuple heapTuple,
TupleDesc heapDescriptor,
Buffer buffer,
- Datum * datum,
+ Datum *datum,
char *nullv,
FuncIndexInfoPtr fInfo)
{
char nulls[Natts_pg_class];
char replace[Natts_pg_class];
- fmgr_info(ObjectIdEqualRegProcedure, (func_ptr *) & key[0].sk_func,
+ fmgr_info(ObjectIdEqualRegProcedure, (func_ptr *) &key[0].sk_func,
&key[0].sk_nargs);
/* ----------------
* -------------------------
*/
void
-FillDummyExprContext(ExprContext * econtext,
- TupleTableSlot * slot,
+FillDummyExprContext(ExprContext *econtext,
+ TupleTableSlot *slot,
TupleDesc tupdesc,
Buffer buffer)
{
uint16 parameterCount, /* not used */
Datum parameter[], /* not used */
FuncIndexInfoPtr funcInfo,
- PredInfo * predInfo)
+ PredInfo *predInfo)
{
HeapScanDesc scan;
HeapTuple heapTuple;
int numberOfAttributes,
AttrNumber attributeNumber[],
uint16 parameterCount,
- Datum * parameter,
- FuncIndexInfo * funcInfo,
- PredInfo * predInfo)
+ Datum *parameter,
+ FuncIndexInfo *funcInfo,
+ PredInfo *predInfo)
{
RegProcedure procedure;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.14 1997/09/08 20:55:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.15 1997/09/08 21:42:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* This is the inverse routine to CatalogOpenIndices()
*/
void
-CatalogCloseIndices(int nIndices, Relation * idescs)
+CatalogCloseIndices(int nIndices, Relation *idescs)
{
int i;
* each catalog index.
*/
void
-CatalogIndexInsert(Relation * idescs,
+CatalogIndexInsert(Relation *idescs,
int nIndices,
Relation heapRelation,
HeapTuple heapTuple)
ProcedureNameIndexScan(Relation heapRelation,
char *procName,
int nargs,
- Oid * argTypes)
+ Oid *argTypes)
{
Relation idesc;
ScanKeyData skey;
HeapTuple
-ProcedureSrcIndexScan(Relation heapRelation, text * procSrc)
+ProcedureSrcIndexScan(Relation heapRelation, text *procSrc)
{
Relation idesc;
IndexScanDesc sd;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.7 1997/09/08 02:21:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.8 1997/09/08 21:42:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
char *
-AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool * isNull)
+AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull)
{
HeapTuple tup;
Relation aggRel;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.7 1997/09/08 02:21:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.8 1997/09/08 21:42:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
int32 perbyte_cpu,
int32 percall_cpu,
int32 outin_ratio,
- List * argList,
+ List *argList,
CommandDest dest)
{
register i;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.9 1997/09/08 02:21:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.10 1997/09/08 21:42:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static Oid
TypeGetWithOpenRelation(Relation pg_type_desc,
char *typeName,
- bool * defined)
+ bool *defined)
{
HeapScanDesc scan;
HeapTuple tup;
*/
Oid
TypeGet(char *typeName, /* name of type to be fetched */
- bool * defined) /* has the type been defined? */
+ bool *defined) /* has the type been defined? */
{
Relation pg_type_desc;
Oid typeoid;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.15 1997/09/08 02:22:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.16 1997/09/08 21:42:29 momjian Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
PerformAddAttribute(char *relationName,
char *userName,
bool inherits,
- ColumnDef * colDef)
+ ColumnDef *colDef)
{
Relation relrdesc,
attrdesc;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.32 1997/09/08 20:55:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.33 1997/09/08 21:42:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* non-export function prototypes */
-static void CopyTo(Relation rel, bool binary, bool oids, FILE * fp, char *delim);
-static void CopyFrom(Relation rel, bool binary, bool oids, FILE * fp, char *delim);
+static void CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim);
+static void CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim);
static Oid GetOutputFunction(Oid type);
static Oid GetTypeElement(Oid type);
static Oid GetInputFunction(Oid type);
static void
GetIndexRelations(Oid main_relation_oid,
int *n_indices,
- Relation ** index_rels);
+ Relation **index_rels);
#ifdef COPY_PATCH
-static void CopyReadNewline(FILE * fp, int *newline);
-static char *CopyReadAttribute(FILE * fp, bool * isnull, char *delim, int *newline);
+static void CopyReadNewline(FILE *fp, int *newline);
+static char *CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline);
#else
-static char *CopyReadAttribute(FILE * fp, bool * isnull, char *delim);
+static char *CopyReadAttribute(FILE *fp, bool *isnull, char *delim);
#endif
-static void CopyAttributeOut(FILE * fp, char *string, char *delim);
+static void CopyAttributeOut(FILE *fp, char *string, char *delim);
static int CountTuples(Relation relation);
extern FILE *Pfout,
static void
-CopyTo(Relation rel, bool binary, bool oids, FILE * fp, char *delim)
+CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
{
HeapTuple tuple;
HeapScanDesc scandesc;
}
static void
-CopyFrom(Relation rel, bool binary, bool oids, FILE * fp, char *delim)
+CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
{
HeapTuple tuple;
AttrNumber attr_count;
switch (attr[i]->attlen)
{
case sizeof(char):
- values[i] = (Datum) * (unsigned char *) ptr;
+ values[i] = (Datum) *(unsigned char *) ptr;
ptr += sizeof(char);
break;
case sizeof(short):
ptr = (char *) SHORTALIGN(ptr);
- values[i] = (Datum) * (unsigned short *) ptr;
+ values[i] = (Datum) *(unsigned short *) ptr;
ptr += sizeof(short);
break;
case sizeof(int32):
ptr = (char *) INTALIGN(ptr);
- values[i] = (Datum) * (uint32 *) ptr;
+ values[i] = (Datum) *(uint32 *) ptr;
ptr += sizeof(int32);
break;
default:
{
Oid index_rel_oid;
struct rel_list *next;
-} RelationList;
+} RelationList;
static void
GetIndexRelations(Oid main_relation_oid,
int *n_indices,
- Relation ** index_rels)
+ Relation **index_rels)
{
RelationList *head,
*scan;
*/
void
-CopyReadNewline(FILE * fp, int *newline)
+CopyReadNewline(FILE *fp, int *newline)
{
if (!*newline)
{
static char *
#ifdef COPY_PATCH
-CopyReadAttribute(FILE * fp, bool * isnull, char *delim, int *newline)
+CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline)
#else
-CopyReadAttribute(FILE * fp, bool * isnull, char *delim)
+CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
#endif
{
static char attribute[EXT_ATTLEN];
}
static void
-CopyAttributeOut(FILE * fp, char *string, char *delim)
+CopyAttributeOut(FILE *fp, char *string, char *delim)
{
char c;
int is_array = false;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.16 1997/09/08 02:22:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.17 1997/09/08 21:42:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static int
checkAttrExists(char *attributeName,
- char *attributeType, List * schema);
-static List *MergeAttributes(List * schema, List * supers, List ** supconstr);
-static void StoreCatalogInheritance(Oid relationId, List * supers);
+ char *attributeType, List *schema);
+static List *MergeAttributes(List *schema, List *supers, List **supconstr);
+static void StoreCatalogInheritance(Oid relationId, List *supers);
/* ----------------------------------------------------------------
* DefineRelation --
* ----------------------------------------------------------------
*/
void
-DefineRelation(CreateStmt * stmt)
+DefineRelation(CreateStmt *stmt)
{
char *relname = palloc(NAMEDATALEN);
List *schema = stmt->tableElts;
* stud_emp {7:percent}
*/
static List *
-MergeAttributes(List * schema, List * supers, List ** supconstr)
+MergeAttributes(List *schema, List *supers, List **supconstr)
{
List *entry;
List *inhSchema = NIL;
* Updates the system catalogs with proper inheritance information.
*/
static void
-StoreCatalogInheritance(Oid relationId, List * supers)
+StoreCatalogInheritance(Oid relationId, List *supers)
{
Relation relation;
TupleDesc desc;
* returns 1 if attribute already exists in schema, 0 otherwise.
*/
static int
-checkAttrExists(char *attributeName, char *attributeType, List * schema)
+checkAttrExists(char *attributeName, char *attributeType, List *schema)
{
List *s;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.15 1997/09/08 20:55:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.16 1997/09/08 21:42:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define IsFuncIndex(ATTR_LIST) (((IndexElem*)lfirst(ATTR_LIST))->args!=NULL)
/* non-export function prototypes */
-static void CheckPredicate(List * predList, List * rangeTable, Oid baseRelOid);
+static void CheckPredicate(List *predList, List *rangeTable, Oid baseRelOid);
static void
-CheckPredExpr(Node * predicate, List * rangeTable,
+CheckPredExpr(Node *predicate, List *rangeTable,
Oid baseRelOid);
static void
- CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid);
+ CheckPredClause(Expr *predicate, List *rangeTable, Oid baseRelOid);
static void
-FuncIndexArgs(IndexElem * funcIndex, AttrNumber *attNumP,
- Oid * argTypes, Oid * opOidP, Oid relId);
+FuncIndexArgs(IndexElem *funcIndex, AttrNumber *attNumP,
+ Oid *argTypes, Oid *opOidP, Oid relId);
static void
-NormIndexAttrs(List * attList, AttrNumber *attNumP,
- Oid * opOidP, Oid relId);
+NormIndexAttrs(List *attList, AttrNumber *attNumP,
+ Oid *opOidP, Oid relId);
static char *GetDefaultOpClass(Oid atttypid);
/*
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)
{
Oid *classObjectId;
Oid accessMethodId;
* XXX
*/
void
-ExtendIndex(char *indexRelationName, Expr * predicate, List * rangetable)
+ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
{
Oid *classObjectId;
Oid accessMethodId;
*/
static void
-CheckPredicate(List * predList, List * rangeTable, Oid baseRelOid)
+CheckPredicate(List *predList, List *rangeTable, Oid baseRelOid)
{
List *item;
}
static void
-CheckPredExpr(Node * predicate, List * rangeTable, Oid baseRelOid)
+CheckPredExpr(Node *predicate, List *rangeTable, Oid baseRelOid)
{
List *clauses = NIL,
*clause;
}
static void
-CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid)
+CheckPredClause(Expr *predicate, List *rangeTable, Oid baseRelOid)
{
Var *pred_var;
Const *pred_const;
static void
-FuncIndexArgs(IndexElem * funcIndex,
+FuncIndexArgs(IndexElem *funcIndex,
AttrNumber *attNumP,
- Oid * argTypes,
- Oid * opOidP,
+ Oid *argTypes,
+ Oid *opOidP,
Oid relId)
{
List *rest;
}
static void
-NormIndexAttrs(List * attList, /* list of IndexElem's */
+NormIndexAttrs(List *attList, /* list of IndexElem's */
AttrNumber *attNumP,
- Oid * opOidP,
+ Oid *opOidP,
Oid relId)
{
List *rest;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.15 1997/09/08 02:22:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.16 1997/09/08 21:42:38 momjian Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
#include <tcop/dest.h>
#include <catalog/pg_user.h>
-static char *defGetString(DefElem * def);
-static int defGetTypeLength(DefElem * def);
+static char *defGetString(DefElem *def);
+static int defGetTypeLength(DefElem *def);
#define DEFAULT_TYPDELIM ','
static void
-compute_return_type(const Node * returnType,
- char **prorettype_p, bool * returnsSet_p)
+compute_return_type(const Node *returnType,
+ char **prorettype_p, bool *returnsSet_p)
{
/*---------------------------------------------------------------------------
Examine the "returns" clause returnType of the CREATE FUNCTION statement
static void
-compute_full_attributes(const List * parameters, int32 * byte_pct_p,
- int32 * perbyte_cpu_p, int32 * percall_cpu_p,
- int32 * outin_ratio_p, bool * canCache_p)
+compute_full_attributes(const List *parameters, int32 *byte_pct_p,
+ int32 *perbyte_cpu_p, int32 *percall_cpu_p,
+ int32 *outin_ratio_p, bool *canCache_p)
{
/*--------------------------------------------------------------------------
Interpret the parameters *parameters and return their contents as
*
*/
void
-CreateFunction(ProcedureStmt * stmt, CommandDest dest)
+CreateFunction(ProcedureStmt *stmt, CommandDest dest)
{
char *probin_str;
*/
void
DefineOperator(char *oprName,
- List * parameters)
+ List *parameters)
{
uint16 precedence = 0; /* operator precedence */
bool canHash = false;/* operator hashes */
* ------------------
*/
void
-DefineAggregate(char *aggName, List * parameters)
+DefineAggregate(char *aggName, List *parameters)
{
char *stepfunc1Name = NULL;
*
*/
void
-DefineType(char *typeName, List * parameters)
+DefineType(char *typeName, List *parameters)
{
int16 internalLength = 0; /* int2 */
int16 externalLength = 0; /* int2 */
}
static char *
-defGetString(DefElem * def)
+defGetString(DefElem *def)
{
if (nodeTag(def->arg) != T_String)
elog(WARN, "Define: \"%s\" = what?", def->defname);
}
static int
-defGetTypeLength(DefElem * def)
+defGetTypeLength(DefElem *def)
{
if (nodeTag(def->arg) == T_Integer)
return (intVal(def->arg));
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.12 1997/09/08 02:22:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.13 1997/09/08 21:42:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
bool printNodes; /* do nodeToString() instead */
/* other states */
List *rtable; /* range table */
-} ExplainState;
+} ExplainState;
-static char *Explain_PlanToString(Plan * plan, ExplainState * es);
+static char *Explain_PlanToString(Plan *plan, ExplainState *es);
/*
* ExplainQuery -
*
*/
void
-ExplainQuery(Query * query, bool verbose, CommandDest dest)
+ExplainQuery(Query *query, bool verbose, CommandDest dest)
{
char *s = NULL,
*s2;
* converts a Node into ascii string and append it to 'str'
*/
static void
-explain_outNode(StringInfo str, Plan * plan, int indent, ExplainState * es)
+explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
{
char *pname;
char buf[1000];
}
static char *
-Explain_PlanToString(Plan * plan, ExplainState * es)
+Explain_PlanToString(Plan *plan, ExplainState *es)
{
StringInfo str;
char *s;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.8 1997/09/08 02:22:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.9 1997/09/08 21:42:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef TIOGA
void
-beginRecipe(RecipeStmt * stmt)
+beginRecipe(RecipeStmt *stmt)
{
elog(NOTICE, "You must compile with TIOGA defined in order to use recipes\n");
}
TeePlanInfo *val;
} TeeInfo;
-QueryTreeList *appendQlist(QueryTreeList * q1, QueryTreeList * q2);
-void OffsetVarAttno(Node * node, int varno, int offset);
+QueryTreeList *appendQlist(QueryTreeList *q1, QueryTreeList *q2);
+void OffsetVarAttno(Node *node, int varno, int offset);
static void
appendTeeQuery(TeeInfo * teeInfo,
- QueryTreeList * q,
+ QueryTreeList *q,
char *teeNodeName);
static Plan *
-replaceTeeScans(Plan * plan,
- Query * parsetree,
+replaceTeeScans(Plan *plan,
+ Query *parsetree,
TeeInfo * teeInfo);
static void
-replaceSeqScan(Plan * plan,
- Plan * parent,
+replaceSeqScan(Plan *plan,
+ Plan *parent,
int rt_ind,
- Plan * tplan);
+ Plan *tplan);
static void
tg_rewriteQuery(TgRecipe * r, TgNode * n,
- QueryTreeList * q,
- QueryTreeList * inputQlist);
+ QueryTreeList *q,
+ QueryTreeList *inputQlist);
static Node *
-tg_replaceNumberedParam(Node * expression,
+tg_replaceNumberedParam(Node *expression,
int pnum,
int rt_ind,
char *teeRelName);
static Node *
-tg_rewriteParamsInExpr(Node * expression,
- QueryTreeList * inputQlist);
+tg_rewriteParamsInExpr(Node *expression,
+ QueryTreeList *inputQlist);
static QueryTreeList *
tg_parseSubQuery(TgRecipe * r,
TgNode * n,
tg_parseTeeNode(TgRecipe * r,
TgNode * n,
int i,
- QueryTreeList * qList,
+ QueryTreeList *qList,
TeeInfo * teeInfo);
*/
void
-beginRecipe(RecipeStmt * stmt)
+beginRecipe(RecipeStmt *stmt)
{
TgRecipe *r;
int i;
static void
tg_rewriteQuery(TgRecipe * r,
TgNode * n,
- QueryTreeList * q,
- QueryTreeList * inputQlist)
+ QueryTreeList *q,
+ QueryTreeList *inputQlist)
{
Query *orig;
Query *inputQ;
*/
static Node *
-tg_replaceNumberedParam(Node * expression,
+tg_replaceNumberedParam(Node *expression,
int pnum, /* the number of the parameter */
int rt_ind, /* the range table index */
char *teeRelName) /* the relname of the tee
*/
static Node *
-tg_rewriteParamsInExpr(Node * expression, QueryTreeList * inputQlist)
+tg_rewriteParamsInExpr(Node *expression, QueryTreeList *inputQlist)
{
List *tl;
TargetEntry *param_tle,
tg_parseTeeNode(TgRecipe * r,
TgNode * n, /* the tee node */
int i, /* which input this node is to its parent */
- QueryTreeList * qList,
+ QueryTreeList *qList,
TeeInfo * teeInfo)
{
*/
void
-OffsetVarAttno(Node * node, int varno, int offset)
+OffsetVarAttno(Node *node, int varno, int offset)
{
if (node == NULL)
return;
*/
QueryTreeList *
-appendQlist(QueryTreeList * q1, QueryTreeList * q2)
+appendQlist(QueryTreeList *q1, QueryTreeList *q2)
{
QueryTreeList *newq;
int i,
* modify the query field of the teeInfo list of the particular tee node
*/
static void
-appendTeeQuery(TeeInfo * teeInfo, QueryTreeList * q, char *teeNodeName)
+appendTeeQuery(TeeInfo * teeInfo, QueryTreeList *q, char *teeNodeName)
{
int i;
* qual or targetlist because the child plan has been replaced with a tee node
*/
static void
-replaceSeqScan(Plan * plan, Plan * parent,
- int rt_ind, Plan * tplan)
+replaceSeqScan(Plan *plan, Plan *parent,
+ int rt_ind, Plan *tplan)
{
Scan *snode;
Tee *teePlan;
* a connection to the actual tee plan node
*/
static Plan *
-replaceTeeScans(Plan * plan, Query * parsetree, TeeInfo * teeInfo)
+replaceTeeScans(Plan *plan, Query *parsetree, TeeInfo * teeInfo)
{
int i;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.13 1997/09/08 20:55:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.14 1997/09/08 21:42:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
void
RemoveFunction(char *functionName, /* function name to be removed */
int nargs,
- List * argNameList /* list of TypeNames */ )
+ List *argNameList /* list of TypeNames */ )
{
Relation relation;
HeapScanDesc scan;
int4 cache_value;
char is_cycled;
char is_called;
-} FormData_pg_sequence;
+} FormData_pg_sequence;
typedef FormData_pg_sequence *SequenceTupleForm;
typedef struct sequence_magic
{
uint32 magic;
-} sequence_magic;
+} sequence_magic;
typedef struct SeqTableData
{
int4 last;
int4 increment;
struct SeqTableData *next;
-} SeqTableData;
+} SeqTableData;
typedef SeqTableData *SeqTable;
static SeqTable init_sequence(char *caller, char *name);
static SequenceTupleForm read_info(char *caller, SeqTable elm, Buffer *buf);
-static void init_params(CreateSeqStmt * seq, SequenceTupleForm new);
-static int get_param(DefElem * def);
+static void init_params(CreateSeqStmt *seq, SequenceTupleForm new);
+static int get_param(DefElem *def);
/*
* DefineSequence --
* Creates a new sequence relation
*/
void
-DefineSequence(CreateSeqStmt * seq)
+DefineSequence(CreateSeqStmt *seq)
{
FormData_pg_sequence new;
CreateStmt *stmt = makeNode(CreateStmt);
static void
-init_params(CreateSeqStmt * seq, SequenceTupleForm new)
+init_params(CreateSeqStmt *seq, SequenceTupleForm new)
{
DefElem *last_value = NULL;
DefElem *increment_by = NULL;
static int
-get_param(DefElem * def)
+get_param(DefElem *def)
{
if (def->arg == (Node *) NULL)
elog(WARN, "DefineSequence: \"%s\" value unspecified", def->defname);
void RelationBuildTriggers(Relation relation);
void FreeTriggerDesc(Relation relation);
-static void DescribeTrigger(TriggerDesc * trigdesc, Trigger * trigger);
+static void DescribeTrigger(TriggerDesc *trigdesc, Trigger *trigger);
-extern void fmgr_info(Oid procedureId, func_ptr * function, int *nargs);
+extern void fmgr_info(Oid procedureId, func_ptr *function, int *nargs);
extern GlobalMemory CacheCxt;
void
-CreateTrigger(CreateTrigStmt * stmt)
+CreateTrigger(CreateTrigStmt *stmt)
{
int16 tgtype;
int16 tgattr[8] = {0};
}
void
-DropTrigger(DropTrigStmt * stmt)
+DropTrigger(DropTrigStmt *stmt)
{
Relation rel;
Relation tgrel;
}
static void
-DescribeTrigger(TriggerDesc * trigdesc, Trigger * trigger)
+DescribeTrigger(TriggerDesc *trigdesc, Trigger *trigger)
{
uint16 *n;
Trigger ***t,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.45 1997/09/08 20:55:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.46 1997/09/08 21:42:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* non-export function prototypes */
static void vc_init(void);
static void vc_shutdown(void);
-static void vc_vacuum(NameData * VacRelP, bool analyze, List * va_cols);
-static VRelList vc_getrels(NameData * VacRelP);
-static void vc_vacone(Oid relid, bool analyze, List * va_cols);
-static void vc_scanheap(VRelStats * vacrelstats, Relation onerel, VPageList Vvpl, VPageList Fvpl);
-static void vc_rpfheap(VRelStats * vacrelstats, Relation onerel, VPageList Vvpl, VPageList Fvpl, int nindices, Relation * Irel);
-static void vc_vacheap(VRelStats * vacrelstats, Relation onerel, VPageList vpl);
+static void vc_vacuum(NameData *VacRelP, bool analyze, List *va_cols);
+static VRelList vc_getrels(NameData *VacRelP);
+static void vc_vacone(Oid relid, bool analyze, List *va_cols);
+static void vc_scanheap(VRelStats *vacrelstats, Relation onerel, VPageList Vvpl, VPageList Fvpl);
+static void vc_rpfheap(VRelStats *vacrelstats, Relation onerel, VPageList Vvpl, VPageList Fvpl, int nindices, Relation *Irel);
+static void vc_vacheap(VRelStats *vacrelstats, Relation onerel, VPageList vpl);
static void vc_vacpage(Page page, VPageDescr vpd, Relation archrel);
static void vc_vaconeind(VPageList vpl, Relation indrel, int nhtups);
static void vc_scanoneind(Relation indrel, int nhtups);
-static void vc_attrstats(Relation onerel, VRelStats * vacrelstats, HeapTuple htup);
-static void vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum * bucket, int16 * bucket_len);
-static void vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats * vacrelstats);
+static void vc_attrstats(Relation onerel, VRelStats *vacrelstats, HeapTuple htup);
+static void vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum *bucket, int16 *bucket_len);
+static void vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelstats);
static void vc_delhilowstats(Oid relid, int attcnt, int *attnums);
static void vc_setpagelock(Relation rel, BlockNumber blkno);
static VPageDescr vc_tidreapped(ItemPointer itemptr, VPageList vpl);
static void vc_reappage(VPageList vpl, VPageDescr vpc);
static void vc_vpinsert(VPageList vpl, VPageDescr vpnew);
static void vc_free(VRelList vrl);
-static void vc_getindices(Oid relid, int *nindices, Relation ** Irel);
-static void vc_clsindices(int nindices, Relation * Irel);
+static void vc_getindices(Oid relid, int *nindices, Relation **Irel);
+static void vc_clsindices(int nindices, Relation *Irel);
static Relation vc_getarchrel(Relation heaprel);
static void vc_archive(Relation archrel, HeapTuple htup);
static bool vc_isarchrel(char *rname);
-static void vc_mkindesc(Relation onerel, int nindices, Relation * Irel, IndDesc ** Idesc);
+static void vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc);
static char *vc_find_eq(char *bot, int nelem, int size, char *elm, int (*compar) (char *, char *));
static int vc_cmp_blk(char *left, char *right);
static int vc_cmp_offno(char *left, char *right);
static bool vc_enough_space(VPageDescr vpd, Size len);
void
-vacuum(char *vacrel, bool verbose, bool analyze, List * va_spec)
+vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec)
{
char *pname;
MemoryContext old;
* locks at one time.
*/
static void
-vc_vacuum(NameData * VacRelP, bool analyze, List * va_cols)
+vc_vacuum(NameData *VacRelP, bool analyze, List *va_cols)
{
VRelList vrl,
cur;
}
static VRelList
-vc_getrels(NameData * VacRelP)
+vc_getrels(NameData *VacRelP)
{
Relation pgclass;
TupleDesc pgcdesc;
* us to lock the entire database during one pass of the vacuum cleaner.
*/
static void
-vc_vacone(Oid relid, bool analyze, List * va_cols)
+vc_vacone(Oid relid, bool analyze, List *va_cols)
{
Relation pgclass;
TupleDesc pgcdesc;
* on the number of live tuples in a heap.
*/
static void
-vc_scanheap(VRelStats * vacrelstats, Relation onerel,
+vc_scanheap(VRelStats *vacrelstats, Relation onerel,
VPageList Vvpl, VPageList Fvpl)
{
int nblocks,
* if some end-blocks are gone away.
*/
static void
-vc_rpfheap(VRelStats * vacrelstats, Relation onerel,
- VPageList Vvpl, VPageList Fvpl, int nindices, Relation * Irel)
+vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
+ VPageList Vvpl, VPageList Fvpl, int nindices, Relation *Irel)
{
TransactionId myXID;
CommandId myCID;
* if there are "empty" end-blocks.
*/
static void
-vc_vacheap(VRelStats * vacrelstats, Relation onerel, VPageList Vvpl)
+vc_vacheap(VRelStats *vacrelstats, Relation onerel, VPageList Vvpl)
{
Buffer buf;
Page page;
*
*/
static void
-vc_attrstats(Relation onerel, VRelStats * vacrelstats, HeapTuple htup)
+vc_attrstats(Relation onerel, VRelStats *vacrelstats, HeapTuple htup)
{
int i,
attr_cnt = vacrelstats->va_natts;
*
*/
static void
-vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum * bucket, int16 * bucket_len)
+vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum *bucket, int16 *bucket_len)
{
if (attr->attbyval && attr->attlen != -1)
*bucket = value;
* historical queries very expensive.
*/
static void
-vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats * vacrelstats)
+vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelstats)
{
Relation rd,
ad,
static void
-vc_getindices(Oid relid, int *nindices, Relation ** Irel)
+vc_getindices(Oid relid, int *nindices, Relation **Irel)
{
Relation pgindex;
Relation irel;
static void
-vc_clsindices(int nindices, Relation * Irel)
+vc_clsindices(int nindices, Relation *Irel)
{
if (Irel == (Relation *) NULL)
static void
-vc_mkindesc(Relation onerel, int nindices, Relation * Irel, IndDesc ** Idesc)
+vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
{
IndDesc *idcur;
HeapTuple pgIndexTup;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.10 1997/09/08 02:22:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.11 1997/09/08 21:42:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*---------------------------------------------------------------------
*/
static void
-DefineVirtualRelation(char *relname, List * tlist)
+DefineVirtualRelation(char *relname, List *tlist)
{
CreateStmt createStmt;
List *attrList,
}
static RuleStmt *
-FormViewRetrieveRule(char *viewName, Query * viewParse)
+FormViewRetrieveRule(char *viewName, Query *viewParse)
{
RuleStmt *rule;
char *rname;
}
static void
-DefineViewRules(char *viewName, Query * viewParse)
+DefineViewRules(char *viewName, Query *viewParse)
{
RuleStmt *retrieve_rule = NULL;
*---------------------------------------------------------------
*/
static void
-UpdateRangeTableOfViewParse(char *viewName, Query * viewParse)
+UpdateRangeTableOfViewParse(char *viewName, Query *viewParse)
{
List *old_rt;
List *new_rt;
*-------------------------------------------------------------------
*/
void
-DefineView(char *viewName, Query * viewParse)
+DefineView(char *viewName, Query *viewParse)
{
List *viewTlist;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.7 1997/09/08 02:22:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.8 1997/09/08 21:42:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
bool isindex,
ScanDirection dir,
TimeQual timeRange,
- Relation * returnRelation, /* return */
- Pointer * returnScanDesc) /* return */
+ Relation *returnRelation, /* return */
+ Pointer *returnScanDesc) /* return */
{
Relation relation;
Pointer scanDesc;
* ----------------------------------------------------------------
*/
void
-ExecCloseR(Plan * node)
+ExecCloseR(Plan *node)
{
CommonScanState *state;
Relation relation;
* ----------------------------------------------------------------
*/
void
-ExecReScan(Plan * node, ExprContext * exprCtxt, Plan * parent)
+ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent)
{
switch (nodeTag(node))
{
* ----------------------------------------------------------------
*/
HeapScanDesc
-ExecReScanR(Relation relDesc, /* LLL relDesc unused */
+ExecReScanR(Relation relDesc, /* LLL relDesc unused */
HeapScanDesc scanDesc,
ScanDirection direction,
int nkeys, /* LLL nkeys unused */
* ----------------------------------------------------------------
*/
void
-ExecMarkPos(Plan * node)
+ExecMarkPos(Plan *node)
{
switch (nodeTag(node))
{
* ----------------------------------------------------------------
*/
void
-ExecRestrPos(Plan * node)
+ExecRestrPos(Plan *node)
{
switch (nodeTag(node))
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.4 1997/09/08 02:22:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.5 1997/09/08 21:42:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifdef SETS_FIXED
static bool
-FjoinBumpOuterNodes(TargetEntry * tlist, ExprContext * econtext,
+FjoinBumpOuterNodes(TargetEntry *tlist, ExprContext *econtext,
DatumPtr results, char *nulls);
#endif
Datum
-ExecEvalIter(Iter * iterNode,
- ExprContext * econtext,
- bool * resultIsNull,
- bool * iterIsDone)
+ExecEvalIter(Iter *iterNode,
+ ExprContext *econtext,
+ bool *resultIsNull,
+ bool *iterIsDone)
{
Node *expression;
}
void
-ExecEvalFjoin(TargetEntry * tlist,
- ExprContext * econtext,
- bool * isNullVect,
- bool * fj_isDone)
+ExecEvalFjoin(TargetEntry *tlist,
+ ExprContext *econtext,
+ bool *isNullVect,
+ bool *fj_isDone)
{
#ifdef SETS_FIXED
#ifdef SETS_FIXED
static bool
-FjoinBumpOuterNodes(TargetEntry * tlist,
- ExprContext * econtext,
+FjoinBumpOuterNodes(TargetEntry *tlist,
+ ExprContext *econtext,
DatumPtr results,
char *nulls)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.7 1997/09/08 02:22:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.8 1997/09/08 21:42:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*-------------------------------------------------------------------------
*/
JunkFilter *
-ExecInitJunkFilter(List * targetList)
+ExecInitJunkFilter(List *targetList)
{
JunkFilter *junkfilter;
List *cleanTargetList;
*-------------------------------------------------------------------------
*/
bool
-ExecGetJunkAttribute(JunkFilter * junkfilter,
- TupleTableSlot * slot,
+ExecGetJunkAttribute(JunkFilter *junkfilter,
+ TupleTableSlot *slot,
char *attrName,
- Datum * value,
- bool * isNull)
+ Datum *value,
+ bool *isNull)
{
List *targetList;
List *t;
*-------------------------------------------------------------------------
*/
HeapTuple
-ExecRemoveJunk(JunkFilter * junkfilter, TupleTableSlot * slot)
+ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot)
{
HeapTuple tuple;
HeapTuple cleanTuple;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.24 1997/09/08 02:22:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.25 1997/09/08 21:42:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* decls for local routines only used within this module */
static void
-ExecCheckPerms(CmdType operation, int resultRelation, List * rangeTable,
- Query * parseTree);
+ExecCheckPerms(CmdType operation, int resultRelation, List *rangeTable,
+ Query *parseTree);
static TupleDesc
-InitPlan(CmdType operation, Query * parseTree,
- Plan * plan, EState * estate);
-static void EndPlan(Plan * plan, EState * estate);
+InitPlan(CmdType operation, Query *parseTree,
+ Plan *plan, EState *estate);
+static void EndPlan(Plan *plan, EState *estate);
static TupleTableSlot *
-ExecutePlan(EState * estate, Plan * plan,
- Query * parseTree, CmdType operation,
+ExecutePlan(EState *estate, Plan *plan,
+ Query *parseTree, CmdType operation,
int numberTuples, ScanDirection direction,
void (*printfunc) ());
-static void ExecRetrieve(TupleTableSlot * slot, void (*printfunc) (),
- EState * estate);
+static void ExecRetrieve(TupleTableSlot *slot, void (*printfunc) (),
+ EState *estate);
static void
-ExecAppend(TupleTableSlot * slot, ItemPointer tupleid,
- EState * estate);
+ExecAppend(TupleTableSlot *slot, ItemPointer tupleid,
+ EState *estate);
static void
-ExecDelete(TupleTableSlot * slot, ItemPointer tupleid,
- EState * estate);
+ExecDelete(TupleTableSlot *slot, ItemPointer tupleid,
+ EState *estate);
static void
-ExecReplace(TupleTableSlot * slot, ItemPointer tupleid,
- EState * estate, Query * parseTree);
+ExecReplace(TupleTableSlot *slot, ItemPointer tupleid,
+ EState *estate, Query *parseTree);
/* end of local decls */
* ----------------------------------------------------------------
*/
TupleDesc
-ExecutorStart(QueryDesc * queryDesc, EState * estate)
+ExecutorStart(QueryDesc *queryDesc, EState *estate)
{
TupleDesc result;
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecutorRun(QueryDesc * queryDesc, EState * estate, int feature, int count)
+ExecutorRun(QueryDesc *queryDesc, EState *estate, int feature, int count)
{
CmdType operation;
Query *parseTree;
* ----------------------------------------------------------------
*/
void
-ExecutorEnd(QueryDesc * queryDesc, EState * estate)
+ExecutorEnd(QueryDesc *queryDesc, EState *estate)
{
/* sanity checks */
Assert(queryDesc != NULL);
static void
ExecCheckPerms(CmdType operation,
int resultRelation,
- List * rangeTable,
- Query * parseTree)
+ List *rangeTable,
+ Query *parseTree)
{
int i = 1;
Oid relid;
* ----------------------------------------------------------------
*/
static TupleDesc
-InitPlan(CmdType operation, Query * parseTree, Plan * plan, EState * estate)
+InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
{
List *rangeTable;
int resultRelation;
* ----------------------------------------------------------------
*/
static void
-EndPlan(Plan * plan, EState * estate)
+EndPlan(Plan *plan, EState *estate)
{
RelationInfo *resultRelationInfo;
Relation intoRelationDesc;
user can see it*/
static TupleTableSlot *
-ExecutePlan(EState * estate,
- Plan * plan,
- Query * parseTree,
+ExecutePlan(EState *estate,
+ Plan *plan,
+ Query *parseTree,
CmdType operation,
int numberTuples,
ScanDirection direction,
* ----------------------------------------------------------------
*/
static void
-ExecRetrieve(TupleTableSlot * slot,
+ExecRetrieve(TupleTableSlot *slot,
void (*printfunc) (),
- EState * estate)
+ EState *estate)
{
HeapTuple tuple;
TupleDesc attrtype;
*/
static void
-ExecAppend(TupleTableSlot * slot,
+ExecAppend(TupleTableSlot *slot,
ItemPointer tupleid,
- EState * estate)
+ EState *estate)
{
HeapTuple tuple;
RelationInfo *resultRelationInfo;
* ----------------------------------------------------------------
*/
static void
-ExecDelete(TupleTableSlot * slot,
+ExecDelete(TupleTableSlot *slot,
ItemPointer tupleid,
- EState * estate)
+ EState *estate)
{
RelationInfo *resultRelationInfo;
Relation resultRelationDesc;
* ----------------------------------------------------------------
*/
static void
-ExecReplace(TupleTableSlot * slot,
+ExecReplace(TupleTableSlot *slot,
ItemPointer tupleid,
- EState * estate,
- Query * parseTree)
+ EState *estate,
+ Query *parseTree)
{
HeapTuple tuple;
RelationInfo *resultRelationInfo;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.4 1997/09/08 02:22:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.5 1997/09/08 21:42:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ------------------------------------------------------------------------
*/
bool
-ExecInitNode(Plan * node, EState * estate, Plan * parent)
+ExecInitNode(Plan *node, EState *estate, Plan *parent)
{
bool result;
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecProcNode(Plan * node, Plan * parent)
+ExecProcNode(Plan *node, Plan *parent)
{
TupleTableSlot *result;
}
int
-ExecCountSlotsNode(Plan * node)
+ExecCountSlotsNode(Plan *node)
{
if (node == (Plan *) NULL)
return 0;
* ----------------------------------------------------------------
*/
void
-ExecEndNode(Plan * node, Plan * parent)
+ExecEndNode(Plan *node, Plan *parent)
{
/* ----------------
* do nothing when we get to the end
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.15 1997/09/08 20:55:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.16 1997/09/08 21:43:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
int execConstLen;
/* static functions decls */
-static Datum ExecEvalAggreg(Aggreg *agg, ExprContext * econtext, bool * isNull);
+static Datum ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull);
static Datum
-ExecEvalArrayRef(ArrayRef *arrayRef, ExprContext * econtext,
- bool * isNull, bool * isDone);
-static Datum ExecEvalAnd(Expr * andExpr, ExprContext * econtext, bool * isNull);
+ExecEvalArrayRef(ArrayRef *arrayRef, ExprContext *econtext,
+ bool *isNull, bool *isDone);
+static Datum ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull);
static Datum
-ExecEvalFunc(Expr * funcClause, ExprContext * econtext,
- bool * isNull, bool * isDone);
+ExecEvalFunc(Expr *funcClause, ExprContext *econtext,
+ bool *isNull, bool *isDone);
static void
-ExecEvalFuncArgs(FunctionCachePtr fcache, ExprContext * econtext,
- List * argList, Datum argV[], bool * argIsDone);
-static Datum ExecEvalNot(Expr * notclause, ExprContext * econtext, bool * isNull);
+ExecEvalFuncArgs(FunctionCachePtr fcache, ExprContext *econtext,
+ List *argList, Datum argV[], bool *argIsDone);
+static Datum ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull);
static Datum
-ExecEvalOper(Expr * opClause, ExprContext * econtext,
- bool * isNull);
-static Datum ExecEvalOr(Expr * orExpr, ExprContext * econtext, bool * isNull);
-static Datum ExecEvalVar(Var * variable, ExprContext * econtext, bool * isNull);
+ExecEvalOper(Expr *opClause, ExprContext *econtext,
+ bool *isNull);
+static Datum ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull);
+static Datum ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull);
static Datum
-ExecMakeFunctionResult(Node * node, List * arguments,
- ExprContext * econtext, bool * isNull, bool * isDone);
-static bool ExecQualClause(Node * clause, ExprContext * econtext);
+ExecMakeFunctionResult(Node *node, List *arguments,
+ ExprContext *econtext, bool *isNull, bool *isDone);
+static bool ExecQualClause(Node *clause, ExprContext *econtext);
/* --------------------------------
* ExecEvalArrayRef
*/
static Datum
ExecEvalArrayRef(ArrayRef *arrayRef,
- ExprContext * econtext,
- bool * isNull,
- bool * isDone)
+ ExprContext *econtext,
+ bool *isNull,
+ bool *isDone)
{
bool dummy;
int i = 0,
* ----------------------------------------------------------------
*/
static Datum
-ExecEvalAggreg(Aggreg *agg, ExprContext * econtext, bool * isNull)
+ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull)
{
*isNull = econtext->ecxt_nulls[agg->aggno];
*
* ---------------------------------------------------------------- */
static Datum
-ExecEvalVar(Var * variable, ExprContext * econtext, bool * isNull)
+ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull)
{
Datum result;
TupleTableSlot *slot;
* ----------------------------------------------------------------
*/
Datum
-ExecEvalParam(Param * expression, ExprContext * econtext, bool * isNull)
+ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
{
char *thisParameterName;
*/
#ifdef NOT_USED
static char *
-GetAttributeByNum(TupleTableSlot * slot,
+GetAttributeByNum(TupleTableSlot *slot,
AttrNumber attrno,
- bool * isNull)
+ bool *isNull)
{
Datum retval;
/* XXX char16 name for catalogs */
#ifdef NOT_USED
char *
-att_by_num(TupleTableSlot * slot,
+att_by_num(TupleTableSlot *slot,
AttrNumber attrno,
- bool * isNull)
+ bool *isNull)
{
return (GetAttributeByNum(slot, attrno, isNull));
}
#endif
char *
-GetAttributeByName(TupleTableSlot * slot, char *attname, bool * isNull)
+GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
{
AttrNumber attrno;
TupleDesc tupdesc;
/* XXX char16 name for catalogs */
#ifdef NOT_USED
char *
-att_by_name(TupleTableSlot * slot, char *attname, bool * isNull)
+att_by_name(TupleTableSlot *slot, char *attname, bool *isNull)
{
return (GetAttributeByName(slot, attname, isNull));
}
static void
ExecEvalFuncArgs(FunctionCachePtr fcache,
- ExprContext * econtext,
- List * argList,
+ ExprContext *econtext,
+ List *argList,
Datum argV[],
- bool * argIsDone)
+ bool *argIsDone)
{
int i;
bool argIsNull,
* ----------------
*/
static Datum
-ExecMakeFunctionResult(Node * node,
- List * arguments,
- ExprContext * econtext,
- bool * isNull,
- bool * isDone)
+ExecMakeFunctionResult(Node *node,
+ List *arguments,
+ ExprContext *econtext,
+ bool *isNull,
+ bool *isDone)
{
Datum argv[MAXFMGRARGS];
FunctionCachePtr fcache;
* ----------------------------------------------------------------
*/
static Datum
-ExecEvalOper(Expr * opClause, ExprContext * econtext, bool * isNull)
+ExecEvalOper(Expr *opClause, ExprContext *econtext, bool *isNull)
{
Oper *op;
List *argList;
*/
static Datum
-ExecEvalFunc(Expr * funcClause,
- ExprContext * econtext,
- bool * isNull,
- bool * isDone)
+ExecEvalFunc(Expr *funcClause,
+ ExprContext *econtext,
+ bool *isNull,
+ bool *isDone)
{
Func *func;
List *argList;
* ----------------------------------------------------------------
*/
static Datum
-ExecEvalNot(Expr * notclause, ExprContext * econtext, bool * isNull)
+ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull)
{
Datum expr_value;
Node *clause;
* ----------------------------------------------------------------
*/
static Datum
-ExecEvalOr(Expr * orExpr, ExprContext * econtext, bool * isNull)
+ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull)
{
List *clauses;
List *clause;
* ----------------------------------------------------------------
*/
static Datum
-ExecEvalAnd(Expr * andExpr, ExprContext * econtext, bool * isNull)
+ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull)
{
List *clauses;
List *clause;
* ----------------------------------------------------------------
*/
Datum
-ExecEvalExpr(Node * expression,
- ExprContext * econtext,
- bool * isNull,
- bool * isDone)
+ExecEvalExpr(Node *expression,
+ ExprContext *econtext,
+ bool *isNull,
+ bool *isDone)
{
Datum retDatum = 0;
* ----------------------------------------------------------------
*/
static bool
-ExecQualClause(Node * clause, ExprContext * econtext)
+ExecQualClause(Node *clause, ExprContext *econtext)
{
Datum expr_value;
bool isNull;
* ----------------------------------------------------------------
*/
bool
-ExecQual(List * qual, ExprContext * econtext)
+ExecQual(List *qual, ExprContext *econtext)
{
List *clause;
bool result;
}
int
-ExecTargetListLength(List * targetlist)
+ExecTargetListLength(List *targetlist)
{
int len;
List *tl;
* ----------------------------------------------------------------
*/
static HeapTuple
-ExecTargetList(List * targetlist,
+ExecTargetList(List *targetlist,
int nodomains,
TupleDesc targettype,
- Datum * values,
- ExprContext * econtext,
- bool * isDone)
+ Datum *values,
+ ExprContext *econtext,
+ bool *isDone)
{
char nulls_array[64];
bool fjNullArray[64];
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecProject(ProjectionInfo * projInfo, bool * isDone)
+ExecProject(ProjectionInfo *projInfo, bool *isDone)
{
TupleTableSlot *slot;
List *targetlist;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.5 1997/09/08 02:22:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.6 1997/09/08 21:43:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecScan(Scan * node,
- TupleTableSlot * (*accessMtd) ()) /* function returning a
+ExecScan(Scan *node,
+ TupleTableSlot *(*accessMtd) ()) /* function returning a
* tuple */
{
CommonScanState *scanstate;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.8 1997/09/08 02:22:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.9 1997/09/08 21:43:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "parser/catalog_utils.h"
#include "catalog/pg_type.h"
-static TupleTableSlot *NodeGetResultTupleSlot(Plan * node);
+static TupleTableSlot *NodeGetResultTupleSlot(Plan *node);
/* ----------------------------------------------------------------
* --------------------------------
*/
TupleTable /* return: address of table */
-ExecCreateTupleTable(int initialSize) /* initial number of slots
- * in table */
+ExecCreateTupleTable(int initialSize) /* initial number of slots in
+ * table */
{
TupleTable newtable; /* newly allocated table */
TupleTableSlot *array; /* newly allocated slot array */
*/
TupleTableSlot * /* return: slot passed */
ExecStoreTuple(HeapTuple tuple, /* tuple to store */
- TupleTableSlot * slot, /* slot in which to store tuple */
+ TupleTableSlot *slot, /* slot in which to store tuple */
Buffer buffer, /* buffer associated with tuple */
bool shouldFree) /* true if we call pfree() when we gc. */
{
* --------------------------------
*/
TupleTableSlot * /* return: slot passed */
-ExecClearTuple(TupleTableSlot * slot) /* slot in which to store tuple */
+ExecClearTuple(TupleTableSlot *slot) /* slot in which to store tuple */
{
HeapTuple oldtuple; /* prior contents of slot */
*/
#ifdef NOT_USED
bool /* return: slot policy */
-ExecSlotPolicy(TupleTableSlot * slot) /* slot to inspect */
+ExecSlotPolicy(TupleTableSlot *slot) /* slot to inspect */
{
return slot->ttc_shouldFree;
}
* --------------------------------
*/
bool /* return: old slot policy */
-ExecSetSlotPolicy(TupleTableSlot * slot, /* slot to change */
+ExecSetSlotPolicy(TupleTableSlot *slot, /* slot to change */
bool shouldFree) /* true if we call pfree() when we
* gc. */
{
* --------------------------------
*/
TupleDesc /* return: old slot tuple descriptor */
-ExecSetSlotDescriptor(TupleTableSlot * slot, /* slot to change */
+ExecSetSlotDescriptor(TupleTableSlot *slot, /* slot to change */
TupleDesc tupdesc) /* tuple descriptor */
{
TupleDesc old_tupdesc = slot->ttc_tupleDescriptor;
* --------------------------------
*/
void
-ExecSetSlotDescriptorIsNew(TupleTableSlot * slot, /* slot to change */
+ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, /* slot to change */
bool isNew) /* "isNew" setting */
{
slot->ttc_descIsNew = isNew;
*/
#ifdef NOT_USED
TupleDesc /* return: old slot tuple descriptor */
-ExecSetNewSlotDescriptor(TupleTableSlot * slot, /* slot to change */
+ExecSetNewSlotDescriptor(TupleTableSlot *slot, /* slot to change */
TupleDesc tupdesc) /* tuple descriptor */
{
TupleDesc old_tupdesc = slot->ttc_tupleDescriptor;
*/
#ifdef NOT_USED
Buffer /* return: old slot buffer */
-ExecSetSlotBuffer(TupleTableSlot * slot, /* slot to change */
+ExecSetSlotBuffer(TupleTableSlot *slot, /* slot to change */
Buffer b) /* tuple descriptor */
{
Buffer oldb = slot->ttc_buffer;
* --------------------------------
*/
void
-ExecIncrSlotBufferRefcnt(TupleTableSlot * slot) /* slot to bump refcnt */
+ExecIncrSlotBufferRefcnt(TupleTableSlot *slot) /* slot to bump refcnt */
{
/* Buffer b = SlotBuffer((TupleTableSlot*) slot); */
Buffer b = slot->ttc_buffer;
* ----------------
*/
bool /* return: true if tuple in slot is NULL */
-TupIsNull(TupleTableSlot * slot) /* slot to check */
+TupIsNull(TupleTableSlot *slot) /* slot to check */
{
HeapTuple tuple; /* contents of slot (returned) */
*/
#ifdef NOT_USED
bool /* return: descriptor "is new" */
-ExecSlotDescriptorIsNew(TupleTableSlot * slot) /* slot to inspect */
+ExecSlotDescriptorIsNew(TupleTableSlot *slot) /* slot to inspect */
{
/* bool isNew = SlotTupleDescriptorIsNew((TupleTableSlot*) slot);
return isNew; */
* ----------------
*/
void
-ExecInitResultTupleSlot(EState * estate, CommonState * commonstate)
+ExecInitResultTupleSlot(EState *estate, CommonState *commonstate)
{
INIT_SLOT_DEFS;
INIT_SLOT_ALLOC;
* ----------------
*/
void
-ExecInitScanTupleSlot(EState * estate, CommonScanState * commonscanstate)
+ExecInitScanTupleSlot(EState *estate, CommonScanState *commonscanstate)
{
INIT_SLOT_DEFS;
INIT_SLOT_ALLOC;
* ----------------
*/
void
-ExecInitMarkedTupleSlot(EState * estate, MergeJoinState * mergestate)
+ExecInitMarkedTupleSlot(EState *estate, MergeJoinState *mergestate)
{
INIT_SLOT_DEFS;
INIT_SLOT_ALLOC;
* ----------------
*/
void
-ExecInitOuterTupleSlot(EState * estate, HashJoinState * hashstate)
+ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate)
{
INIT_SLOT_DEFS;
INIT_SLOT_ALLOC;
*/
#ifdef NOT_USED
void
-ExecInitHashTupleSlot(EState * estate, HashJoinState * hashstate)
+ExecInitHashTupleSlot(EState *estate, HashJoinState *hashstate)
{
INIT_SLOT_DEFS;
INIT_SLOT_ALLOC;
#endif
static TupleTableSlot *
-NodeGetResultTupleSlot(Plan * node)
+NodeGetResultTupleSlot(Plan *node)
{
TupleTableSlot *slot;
*/
TupleDesc
-ExecGetTupType(Plan * node)
+ExecGetTupType(Plan *node)
{
TupleTableSlot *slot;
TupleDesc tupType;
* ----------------------------------------------------------------
*/
TupleDesc
-ExecTypeFromTL(List * targetList)
+ExecTypeFromTL(List *targetList)
{
List *tlcdr;
TupleDesc typeInfo;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.17 1997/09/08 20:55:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.18 1997/09/08 21:43:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
#ifdef NOT_USED
void
-DisplayTupleCount(FILE * statfp)
+DisplayTupleCount(FILE *statfp)
{
if (NTupleProcessed > 0)
fprintf(statfp, "!\t%d tuple%s processed, ", NTupleProcessed,
* ----------------
*/
void
-ExecAssignNodeBaseInfo(EState * estate, CommonState * cstate, Plan * parent)
+ExecAssignNodeBaseInfo(EState *estate, CommonState *cstate, Plan *parent)
{
int baseId;
* ----------------
*/
void
-ExecAssignExprContext(EState * estate, CommonState * commonstate)
+ExecAssignExprContext(EState *estate, CommonState *commonstate)
{
ExprContext *econtext;
ParamListInfo paraminfo;
* ----------------
*/
void
-ExecAssignResultType(CommonState * commonstate,
+ExecAssignResultType(CommonState *commonstate,
TupleDesc tupDesc)
{
TupleTableSlot *slot;
* ----------------
*/
void
-ExecAssignResultTypeFromOuterPlan(Plan * node, CommonState * commonstate)
+ExecAssignResultTypeFromOuterPlan(Plan *node, CommonState *commonstate)
{
Plan *outerPlan;
TupleDesc tupDesc;
* ----------------
*/
void
-ExecAssignResultTypeFromTL(Plan * node, CommonState * commonstate)
+ExecAssignResultTypeFromTL(Plan *node, CommonState *commonstate)
{
List *targetList;
int i;
* ----------------
*/
TupleDesc
-ExecGetResultType(CommonState * commonstate)
+ExecGetResultType(CommonState *commonstate)
{
TupleTableSlot *slot = commonstate->cs_ResultTupleSlot;
*/
#ifdef NOT_USED
void
-ExecFreeResultType(CommonState * commonstate)
+ExecFreeResultType(CommonState *commonstate)
{
TupleTableSlot *slot;
TupleDesc tupType;
* ----------------
*/
void
-ExecAssignProjectionInfo(Plan * node, CommonState * commonstate)
+ExecAssignProjectionInfo(Plan *node, CommonState *commonstate)
{
ProjectionInfo *projInfo;
List *targetList;
* ----------------
*/
void
-ExecFreeProjectionInfo(CommonState * commonstate)
+ExecFreeProjectionInfo(CommonState *commonstate)
{
ProjectionInfo *projInfo;
* ----------------
*/
TupleDesc
-ExecGetScanType(CommonScanState * csstate)
+ExecGetScanType(CommonScanState *csstate)
{
TupleTableSlot *slot = csstate->css_ScanTupleSlot;
*/
#ifdef NOT_USED
void
-ExecFreeScanType(CommonScanState * csstate)
+ExecFreeScanType(CommonScanState *csstate)
{
TupleTableSlot *slot;
TupleDesc tupType;
* ----------------
*/
void
-ExecAssignScanType(CommonScanState * csstate,
+ExecAssignScanType(CommonScanState *csstate,
TupleDesc tupDesc)
{
TupleTableSlot *slot;
* ----------------
*/
void
-ExecAssignScanTypeFromOuterPlan(Plan * node, CommonScanState * csstate)
+ExecAssignScanTypeFromOuterPlan(Plan *node, CommonScanState *csstate)
{
Plan *outerPlan;
TupleDesc tupDesc;
* ----------------------------------------------------------------
*/
TupleDesc
-QueryDescGetTypeInfo(QueryDesc * queryDesc)
+QueryDescGetTypeInfo(QueryDesc *queryDesc)
{
Plan *plan;
TupleDesc tupleType;
*/
void
ExecOpenIndices(Oid resultRelationOid,
- RelationInfo * resultRelationInfo)
+ RelationInfo *resultRelationInfo)
{
Relation indexRd;
HeapScanDesc indexSd;
* ----------------------------------------------------------------
*/
void
-ExecCloseIndices(RelationInfo * resultRelationInfo)
+ExecCloseIndices(RelationInfo *resultRelationInfo)
{
int i;
int numIndices;
ExecFormIndexTuple(HeapTuple heapTuple,
Relation heapRelation,
Relation indexRelation,
- IndexInfo * indexInfo)
+ IndexInfo *indexInfo)
{
IndexTuple indexTuple;
TupleDesc heapDescriptor;
* ----------------------------------------------------------------
*/
void
-ExecInsertIndexTuples(TupleTableSlot * slot,
+ExecInsertIndexTuples(TupleTableSlot *slot,
ItemPointer tupleid,
- EState * estate,
+ EState *estate,
bool is_update)
{
HeapTuple heapTuple;
* ----------------------------------------------------------------
*/
void
-setVarAttrLenForCreateTable(TupleDesc tupType, List * targetList,
- List * rangeTable)
+setVarAttrLenForCreateTable(TupleDesc tupType, List *targetList,
+ List *rangeTable)
{
List *tl;
TargetEntry *tle;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.9 1997/09/08 02:22:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.10 1997/09/08 21:43:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
typedef enum
{
F_EXEC_START, F_EXEC_RUN, F_EXEC_DONE
-} ExecStatus;
+} ExecStatus;
typedef struct local_es
{
EState *estate;
struct local_es *next;
ExecStatus status;
-} execution_state;
+} execution_state;
#define LAST_POSTQUEL_COMMAND(es) ((es)->next == (execution_state *)NULL)
/* non-export function prototypes */
-static TupleDesc postquel_start(execution_state * es);
+static TupleDesc postquel_start(execution_state *es);
static execution_state *
init_execution_state(FunctionCachePtr fcache,
char *args[]);
-static TupleTableSlot *postquel_getnext(execution_state * es);
-static void postquel_end(execution_state * es);
+static TupleTableSlot *postquel_getnext(execution_state *es);
+static void postquel_end(execution_state *es);
static void
-postquel_sub_params(execution_state * es, int nargs,
- char *args[], bool * nullV);
+postquel_sub_params(execution_state *es, int nargs,
+ char *args[], bool *nullV);
static Datum
-postquel_execute(execution_state * es, FunctionCachePtr fcache,
- List * fTlist, char **args, bool * isNull);
+postquel_execute(execution_state *es, FunctionCachePtr fcache,
+ List *fTlist, char **args, bool *isNull);
Datum
ProjectAttribute(TupleDesc TD,
- TargetEntry * tlist,
+ TargetEntry *tlist,
HeapTuple tup,
- bool * isnullP)
+ bool *isnullP)
{
Datum val,
valueP;
}
static TupleDesc
-postquel_start(execution_state * es)
+postquel_start(execution_state *es)
{
#ifdef FUNC_UTIL_PATCH
}
static TupleTableSlot *
-postquel_getnext(execution_state * es)
+postquel_getnext(execution_state *es)
{
int feature;
}
static void
-postquel_end(execution_state * es)
+postquel_end(execution_state *es)
{
#ifdef FUNC_UTIL_PATCH
}
static void
-postquel_sub_params(execution_state * es,
+postquel_sub_params(execution_state *es,
int nargs,
char *args[],
- bool * nullV)
+ bool *nullV)
{
ParamListInfo paramLI;
EState *estate;
static TupleTableSlot *
copy_function_result(FunctionCachePtr fcache,
- TupleTableSlot * resultSlot)
+ TupleTableSlot *resultSlot)
{
TupleTableSlot *funcSlot;
TupleDesc resultTd;
}
static Datum
-postquel_execute(execution_state * es,
+postquel_execute(execution_state *es,
FunctionCachePtr fcache,
- List * fTlist,
+ List *fTlist,
char **args,
- bool * isNull)
+ bool *isNull)
{
TupleTableSlot *slot;
Datum value;
}
Datum
-postquel_function(Func * funcNode, char **args, bool * isNull, bool * isDone)
+postquel_function(Func *funcNode, char **args, bool *isNull, bool *isDone)
{
execution_state *es;
Datum result = 0;
int finalfn_nargs;
} AggFuncInfo;
-static Datum aggGetAttr(TupleTableSlot * tuple, Aggreg *agg, bool * isNull);
+static Datum aggGetAttr(TupleTableSlot *tuple, Aggreg *agg, bool *isNull);
/* ---------------------------------------
value2[i] =
(Datum) fmgr_c(aggfns->xfn2, aggfns->xfn2_oid,
aggfns->xfn2_nargs,
- (FmgrValues *) & xfn2_val, &isNull2);
+ (FmgrValues *) &xfn2_val, &isNull2);
Assert(!isNull2);
}
}
* -----------------
*/
bool
-ExecInitAgg(Agg *node, EState * estate, Plan * parent)
+ExecInitAgg(Agg *node, EState *estate, Plan *parent)
{
AggState *aggstate;
Plan *outerPlan;
* over from the tuple
*/
static Datum
-aggGetAttr(TupleTableSlot * slot,
+aggGetAttr(TupleTableSlot *slot,
Aggreg *agg,
- bool * isNull)
+ bool *isNull)
{
Datum result;
AttrNumber attnum;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.8 1997/09/08 20:55:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.9 1997/09/08 21:43:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------------------------------------------------
*/
bool
-ExecInitAppend(Append *node, EState * estate, Plan * parent)
+ExecInitAppend(Append *node, EState *estate, Plan *parent)
{
AppendState *unionstate;
int nplans;
* columns. (ie. tuples from the same group are consecutive)
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.8 1997/09/08 20:55:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.9 1997/09/08 21:43:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "executor/executor.h"
#include "executor/nodeGroup.h"
-static TupleTableSlot *ExecGroupEveryTuple(Group * node);
-static TupleTableSlot *ExecGroupOneTuple(Group * node);
+static TupleTableSlot *ExecGroupEveryTuple(Group *node);
+static TupleTableSlot *ExecGroupOneTuple(Group *node);
static bool
-sameGroup(TupleTableSlot * oldslot, TupleTableSlot * newslot,
+sameGroup(TupleTableSlot *oldslot, TupleTableSlot *newslot,
int numCols, AttrNumber *grpColIdx, TupleDesc tupdesc);
/* ---------------------------------------
* ------------------------------------------
*/
TupleTableSlot *
-ExecGroup(Group * node)
+ExecGroup(Group *node)
{
if (node->tuplePerGroup)
return ExecGroupEveryTuple(node);
* return every tuple with a NULL between each group
*/
static TupleTableSlot *
-ExecGroupEveryTuple(Group * node)
+ExecGroupEveryTuple(Group *node)
{
GroupState *grpstate;
EState *estate;
* tuples.
*/
static TupleTableSlot *
-ExecGroupOneTuple(Group * node)
+ExecGroupOneTuple(Group *node)
{
GroupState *grpstate;
EState *estate;
* -----------------
*/
bool
-ExecInitGroup(Group * node, EState * estate, Plan * parent)
+ExecInitGroup(Group *node, EState *estate, Plan *parent)
{
GroupState *grpstate;
Plan *outerPlan;
}
int
-ExecCountSlotsGroup(Group * node)
+ExecCountSlotsGroup(Group *node)
{
return ExecCountSlotsNode(outerPlan(node)) + GROUP_NSLOTS;
}
* -----------------------
*/
void
-ExecEndGroup(Group * node)
+ExecEndGroup(Group *node)
{
GroupState *grpstate;
Plan *outerPlan;
* code swiped from nodeUnique.c
*/
static bool
-sameGroup(TupleTableSlot * oldslot,
- TupleTableSlot * newslot,
+sameGroup(TupleTableSlot *oldslot,
+ TupleTableSlot *newslot,
int numCols,
AttrNumber *grpColIdx,
TupleDesc tupdesc)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.12 1997/09/08 02:22:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.13 1997/09/08 21:43:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static void mk_hj_temp(char *tempname);
static int hashFunc(char *key, int len);
-static int ExecHashPartition(Hash * node);
+static int ExecHashPartition(Hash *node);
static RelativeAddr hashTableAlloc(int size, HashJoinTable hashtable);
static void
ExecHashOverflowInsert(HashJoinTable hashtable,
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecHash(Hash * node)
+ExecHash(Hash *node)
{
EState *estate;
HashState *hashstate;
* ----------------------------------------------------------------
*/
bool
-ExecInitHash(Hash * node, EState * estate, Plan * parent)
+ExecInitHash(Hash *node, EState *estate, Plan *parent)
{
HashState *hashstate;
Plan *outerPlan;
}
int
-ExecCountSlotsHash(Hash * node)
+ExecCountSlotsHash(Hash *node)
{
return ExecCountSlotsNode(outerPlan(node)) +
ExecCountSlotsNode(innerPlan(node)) +
* ----------------------------------------------------------------
*/
void
-ExecEndHash(Hash * node)
+ExecEndHash(Hash *node)
{
HashState *hashstate;
Plan *outerPlan;
#define FUDGE_FAC 1.5
HashJoinTable
-ExecHashTableCreate(Hash * node)
+ExecHashTableCreate(Hash *node)
{
Plan *outerNode;
int nbatch;
*/
void
ExecHashTableInsert(HashJoinTable hashtable,
- ExprContext * econtext,
- Var * hashkey,
- File * batches)
+ ExprContext *econtext,
+ Var *hashkey,
+ File *batches)
{
TupleTableSlot *slot;
HeapTuple heapTuple;
*/
int
ExecHashGetBucket(HashJoinTable hashtable,
- ExprContext * econtext,
- Var * hashkey)
+ ExprContext *econtext,
+ Var *hashkey)
{
int bucketno;
Datum keyval;
* ----------------------------------------------------------------
*/
HeapTuple
-ExecScanHashBucket(HashJoinState * hjstate,
+ExecScanHashBucket(HashJoinState *hjstate,
HashBucket bucket,
HeapTuple curtuple,
- List * hjclauses,
- ExprContext * econtext)
+ List *hjclauses,
+ ExprContext *econtext)
{
HeapTuple heapTuple;
bool qualResult;
* ----------------------------------------------------------------
*/
static int
-ExecHashPartition(Hash * node)
+ExecHashPartition(Hash *node)
{
Plan *outerNode;
int b;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.7 1997/09/08 02:22:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.8 1997/09/08 21:43:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "utils/palloc.h"
static TupleTableSlot *
- ExecHashJoinOuterGetTuple(Plan * node, Plan * parent, HashJoinState * hjstate);
+ ExecHashJoinOuterGetTuple(Plan *node, Plan *parent, HashJoinState *hjstate);
static TupleTableSlot *
-ExecHashJoinGetSavedTuple(HashJoinState * hjstate, char *buffer,
- File file, TupleTableSlot * tupleSlot, int *block, char **position);
+ExecHashJoinGetSavedTuple(HashJoinState *hjstate, char *buffer,
+ File file, TupleTableSlot *tupleSlot, int *block, char **position);
static int
ExecHashJoinGetBatch(int bucketno, HashJoinTable hashtable,
int nbatch);
-static int ExecHashJoinNewBatch(HashJoinState * hjstate);
+static int ExecHashJoinNewBatch(HashJoinState *hjstate);
* ----------------------------------------------------------------
*/
TupleTableSlot * /* return: a tuple or NULL */
-ExecHashJoin(HashJoin * node)
+ExecHashJoin(HashJoin *node)
{
HashJoinState *hjstate;
EState *estate;
* ----------------------------------------------------------------
*/
bool /* return: initialization status */
-ExecInitHashJoin(HashJoin * node, EState * estate, Plan * parent)
+ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent)
{
HashJoinState *hjstate;
Plan *outerNode;
}
int
-ExecCountSlotsHashJoin(HashJoin * node)
+ExecCountSlotsHashJoin(HashJoin *node)
{
return ExecCountSlotsNode(outerPlan(node)) +
ExecCountSlotsNode(innerPlan(node)) +
* ----------------------------------------------------------------
*/
void
-ExecEndHashJoin(HashJoin * node)
+ExecEndHashJoin(HashJoin *node)
{
HashJoinState *hjstate;
*/
static TupleTableSlot *
-ExecHashJoinOuterGetTuple(Plan * node, Plan * parent, HashJoinState * hjstate)
+ExecHashJoinOuterGetTuple(Plan *node, Plan *parent, HashJoinState *hjstate)
{
TupleTableSlot *slot;
HashJoinTable hashtable;
*/
static TupleTableSlot *
-ExecHashJoinGetSavedTuple(HashJoinState * hjstate,
+ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
char *buffer,
File file,
- TupleTableSlot * tupleSlot,
+ TupleTableSlot *tupleSlot,
int *block, /* return parameter */
char **position) /* return parameter */
{
* ----------------------------------------------------------------
*/
static int
-ExecHashJoinNewBatch(HashJoinState * hjstate)
+ExecHashJoinNewBatch(HashJoinState *hjstate)
{
File *innerBatches;
File *outerBatches;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.9 1997/09/08 02:22:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.10 1997/09/08 21:43:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define LEFT_OP 1
#define RIGHT_OP 2
-static TupleTableSlot *IndexNext(IndexScan * node);
+static TupleTableSlot *IndexNext(IndexScan *node);
/* ----------------------------------------------------------------
* IndexNext
* ----------------------------------------------------------------
*/
static TupleTableSlot *
-IndexNext(IndexScan * node)
+IndexNext(IndexScan *node)
{
EState *estate;
CommonScanState *scanstate;
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecIndexScan(IndexScan * node)
+ExecIndexScan(IndexScan *node)
{
TupleTableSlot *returnTuple;
* ----------------------------------------------------------------
*/
void
-ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent)
+ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent)
{
EState *estate;
IndexScanState *indexstate;
* ----------------------------------------------------------------
*/
void
-ExecEndIndexScan(IndexScan * node)
+ExecEndIndexScan(IndexScan *node)
{
CommonScanState *scanstate;
IndexScanState *indexstate;
* ----------------------------------------------------------------
*/
void
-ExecIndexMarkPos(IndexScan * node)
+ExecIndexMarkPos(IndexScan *node)
{
IndexScanState *indexstate;
IndexScanDescPtr indexScanDescs;
* ----------------------------------------------------------------
*/
void
-ExecIndexRestrPos(IndexScan * node)
+ExecIndexRestrPos(IndexScan *node)
{
IndexScanState *indexstate;
IndexScanDescPtr indexScanDescs;
* ----------------------------------------------------------------
*/
bool
-ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent)
+ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
{
IndexScanState *indexstate;
CommonScanState *scanstate;
*/
leftop = (Node *) get_leftop(clause);
- if (IsA(leftop, Var) && var_is_rel((Var *) leftop))
+ if (IsA(leftop, Var) &&var_is_rel((Var *) leftop))
{
/* ----------------
* if the leftop is a "rel-var", then it means
*/
rightop = (Node *) get_rightop(clause);
- if (IsA(rightop, Var) && var_is_rel((Var *) rightop))
+ if (IsA(rightop, Var) &&var_is_rel((Var *) rightop))
{
/* ----------------
* here we make sure only one op identifies the
direction, /* scan direction */
timeQual, /* time qual */
¤tRelation, /* return: rel desc */
- (Pointer *) & currentScanDesc); /* return: scan desc */
+ (Pointer *) ¤tScanDesc); /* return: scan desc */
scanstate->css_currentRelation = currentRelation;
scanstate->css_currentScanDesc = currentScanDesc;
direction, /* scan direction */
timeQual, /* time qual */
&(relationDescs[i]), /* return: rel desc */
- (Pointer *) & (scanDescs[i]));
+ (Pointer *) &(scanDescs[i]));
/* return: scan desc */
}
}
}
int
-ExecCountSlotsIndexScan(IndexScan * node)
+ExecCountSlotsIndexScan(IndexScan *node)
{
return ExecCountSlotsNode(outerPlan((Plan *) node)) +
ExecCountSlotsNode(innerPlan((Plan *) node)) +
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.8 1997/09/08 02:22:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.9 1997/09/08 21:43:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------------------------------------------------
*/
TupleTableSlot * /* result tuple from subplan */
-ExecMaterial(Material * node)
+ExecMaterial(Material *node)
{
EState *estate;
MaterialState *matstate;
* ----------------------------------------------------------------
*/
bool /* initialization status */
-ExecInitMaterial(Material * node, EState * estate, Plan * parent)
+ExecInitMaterial(Material *node, EState *estate, Plan *parent)
{
MaterialState *matstate;
Plan *outerPlan;
}
int
-ExecCountSlotsMaterial(Material * node)
+ExecCountSlotsMaterial(Material *node)
{
return ExecCountSlotsNode(outerPlan((Plan *) node)) +
ExecCountSlotsNode(innerPlan((Plan *) node)) +
* ----------------------------------------------------------------
*/
void
-ExecEndMaterial(Material * node)
+ExecEndMaterial(Material *node)
{
MaterialState *matstate;
Relation tempRelation;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.11 1997/09/08 20:55:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.12 1997/09/08 21:43:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "utils/lsyscache.h"
#include "utils/psort.h"
-static bool MergeCompare(List * eqQual, List * compareQual, ExprContext * econtext);
+static bool MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext);
/* ----------------------------------------------------------------
* MarkInnerTuple and RestoreInnerTuple macros
* ----------------------------------------------------------------
*/
static List *
-MJFormOSortopI(List * qualList, Oid sortOp)
+MJFormOSortopI(List *qualList, Oid sortOp)
{
List *qualCopy;
List *qualcdr;
* ----------------------------------------------------------------
*/
static List *
-MJFormISortopO(List * qualList, Oid sortOp)
+MJFormISortopO(List *qualList, Oid sortOp)
{
List *ISortopO;
List *qualcdr;
* ----------------------------------------------------------------
*/
static bool
-MergeCompare(List * eqQual, List * compareQual, ExprContext * econtext)
+MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext)
{
List *clause;
List *eqclause;
*/
#ifdef EXEC_MERGEJOINDEBUG
void
-ExecMergeTupleDumpInner(ExprContext * econtext)
+ExecMergeTupleDumpInner(ExprContext *econtext)
{
TupleTableSlot *innerSlot;
}
void
-ExecMergeTupleDumpOuter(ExprContext * econtext)
+ExecMergeTupleDumpOuter(ExprContext *econtext)
{
TupleTableSlot *outerSlot;
}
void
-ExecMergeTupleDumpMarked(ExprContext * econtext,
- MergeJoinState * mergestate)
+ExecMergeTupleDumpMarked(ExprContext *econtext,
+ MergeJoinState *mergestate)
{
TupleTableSlot *markedSlot;
}
void
-ExecMergeTupleDump(ExprContext * econtext, MergeJoinState * mergestate)
+ExecMergeTupleDump(ExprContext *econtext, MergeJoinState *mergestate)
{
printf("******** ExecMergeTupleDump ********\n");
#endif
static void
-CleanUpSort(Plan * plan)
+CleanUpSort(Plan *plan)
{
if (plan == NULL)
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecMergeJoin(MergeJoin * node)
+ExecMergeJoin(MergeJoin *node)
{
EState *estate;
MergeJoinState *mergestate;
*
* new outer tuple > marked tuple
*
- ******************************
+ *****************************
+ *
*
*
*
* we have to advance the outer scan until we find the outer
* 8.
*
- ******************************
+ *****************************
+ *
*
*
*
* we have to advance the inner scan until we find the inner
* 12.
*
- ******************************
+ *****************************
+ *
*
*
*
* ----------------------------------------------------------------
*/
bool
-ExecInitMergeJoin(MergeJoin * node, EState * estate, Plan * parent)
+ExecInitMergeJoin(MergeJoin *node, EState *estate, Plan *parent)
{
MergeJoinState *mergestate;
List *joinclauses;
}
int
-ExecCountSlotsMergeJoin(MergeJoin * node)
+ExecCountSlotsMergeJoin(MergeJoin *node)
{
return ExecCountSlotsNode(outerPlan((Plan *) node)) +
ExecCountSlotsNode(innerPlan((Plan *) node)) +
* ----------------------------------------------------------------
*/
void
-ExecEndMergeJoin(MergeJoin * node)
+ExecEndMergeJoin(MergeJoin *node)
{
MergeJoinState *mergestate;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.6 1997/09/08 20:55:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.7 1997/09/08 21:43:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecNestLoop(NestLoop * node, Plan * parent)
+ExecNestLoop(NestLoop *node, Plan *parent)
{
NestLoopState *nlstate;
Plan *innerPlan;
*/
econtext = nlstate->jstate.cs_ExprContext;
- /* ---------------- * get the current outer tuple
+ /* ---------------- * get the current outer tuple
* ----------------
*/
outerTupleSlot = nlstate->jstate.cs_OuterTupleSlot;
* ----------------------------------------------------------------
*/
bool
-ExecInitNestLoop(NestLoop * node, EState * estate, Plan * parent)
+ExecInitNestLoop(NestLoop *node, EState *estate, Plan *parent)
{
NestLoopState *nlstate;
}
int
-ExecCountSlotsNestLoop(NestLoop * node)
+ExecCountSlotsNestLoop(NestLoop *node)
{
return ExecCountSlotsNode(outerPlan(node)) +
ExecCountSlotsNode(innerPlan(node)) +
* ----------------------------------------------------------------
*/
void
-ExecEndNestLoop(NestLoop * node)
+ExecEndNestLoop(NestLoop *node)
{
NestLoopState *nlstate;
* SeqScan (emp.all)
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeResult.c,v 1.4 1997/09/08 02:22:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeResult.c,v 1.5 1997/09/08 21:43:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecResult(Result * node)
+ExecResult(Result *node)
{
ResultState *resstate;
TupleTableSlot *outerTupleSlot;
* ----------------------------------------------------------------
*/
bool
-ExecInitResult(Result * node, EState * estate, Plan * parent)
+ExecInitResult(Result *node, EState *estate, Plan *parent)
{
ResultState *resstate;
}
int
-ExecCountSlotsResult(Result * node)
+ExecCountSlotsResult(Result *node)
{
return ExecCountSlotsNode(outerPlan(node)) + RESULT_NSLOTS;
}
* ----------------------------------------------------------------
*/
void
-ExecEndResult(Result * node)
+ExecEndResult(Result *node)
{
ResultState *resstate;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.6 1997/09/08 02:22:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.7 1997/09/08 21:43:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "parser/parsetree.h"
static Oid
-InitScanRelation(SeqScan * node, EState * estate,
- CommonScanState * scanstate, Plan * outerPlan);
+InitScanRelation(SeqScan *node, EState *estate,
+ CommonScanState *scanstate, Plan *outerPlan);
-static TupleTableSlot *SeqNext(SeqScan * node);
+static TupleTableSlot *SeqNext(SeqScan *node);
/* ----------------------------------------------------------------
* Scan Support
* ----------------------------------------------------------------
*/
static TupleTableSlot *
-SeqNext(SeqScan * node)
+SeqNext(SeqScan *node)
{
HeapTuple tuple;
HeapScanDesc scandesc;
*/
TupleTableSlot *
-ExecSeqScan(SeqScan * node)
+ExecSeqScan(SeqScan *node)
{
TupleTableSlot *slot;
Plan *outerPlan;
* ----------------------------------------------------------------
*/
static Oid
-InitScanRelation(SeqScan * node, EState * estate,
- CommonScanState * scanstate, Plan * outerPlan)
+InitScanRelation(SeqScan *node, EState *estate,
+ CommonScanState *scanstate, Plan *outerPlan)
{
Index relid;
List *rangeTable;
direction,/* scan direction */
timeQual, /* time qual */
¤tRelation, /* return: rel desc */
- (Pointer *) & currentScanDesc); /* return: scan desc */
+ (Pointer *) ¤tScanDesc); /* return: scan desc */
scanstate->css_currentRelation = currentRelation;
scanstate->css_currentScanDesc = currentScanDesc;
* ----------------------------------------------------------------
*/
bool
-ExecInitSeqScan(SeqScan * node, EState * estate, Plan * parent)
+ExecInitSeqScan(SeqScan *node, EState *estate, Plan *parent)
{
CommonScanState *scanstate;
Plan *outerPlan;
}
int
-ExecCountSlotsSeqScan(SeqScan * node)
+ExecCountSlotsSeqScan(SeqScan *node)
{
return ExecCountSlotsNode(outerPlan(node)) +
ExecCountSlotsNode(innerPlan(node)) +
* ----------------------------------------------------------------
*/
void
-ExecEndSeqScan(SeqScan * node)
+ExecEndSeqScan(SeqScan *node)
{
CommonScanState *scanstate;
Plan *outerPlan;
* ----------------------------------------------------------------
*/
void
-ExecSeqReScan(SeqScan * node, ExprContext * exprCtxt, Plan * parent)
+ExecSeqReScan(SeqScan *node, ExprContext *exprCtxt, Plan *parent)
{
CommonScanState *scanstate;
EState *estate;
* ----------------------------------------------------------------
*/
void
-ExecSeqMarkPos(SeqScan * node)
+ExecSeqMarkPos(SeqScan *node)
{
CommonScanState *scanstate;
Plan *outerPlan;
* ----------------------------------------------------------------
*/
void
-ExecSeqRestrPos(SeqScan * node)
+ExecSeqRestrPos(SeqScan *node)
{
CommonScanState *scanstate;
Plan *outerPlan;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.8 1997/09/08 02:22:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.9 1997/09/08 21:43:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------------------------------------------------
*/
static ScanKey
-FormSortKeys(Sort * sortnode)
+FormSortKeys(Sort *sortnode)
{
ScanKey sortkeys;
List *targetList;
* ----------------------------------------------------------------
*/
TupleTableSlot *
-ExecSort(Sort * node)
+ExecSort(Sort *node)
{
EState *estate;
SortState *sortstate;
* ----------------------------------------------------------------
*/
bool
-ExecInitSort(Sort * node, EState * estate, Plan * parent)
+ExecInitSort(Sort *node, EState *estate, Plan *parent)
{
SortState *sortstate;
Plan *outerPlan;
}
int
-ExecCountSlotsSort(Sort * node)
+ExecCountSlotsSort(Sort *node)
{
return ExecCountSlotsNode(outerPlan((Plan *) node)) +
ExecCountSlotsNode(innerPlan((Plan *) node)) +
* ----------------------------------------------------------------
*/
void
-ExecEndSort(Sort * node)
+ExecEndSort(Sort *node)
{
SortState *sortstate;
Plan *outerPlan;
* ----------------------------------------------------------------
*/
void
-ExecSortMarkPos(Sort * node)
+ExecSortMarkPos(Sort *node)
{
SortState *sortstate;
* ----------------------------------------------------------------
*/
void
-ExecSortRestrPos(Sort * node)
+ExecSortRestrPos(Sort *node)
{
SortState *sortstate;
* ExecEndTee
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.8 1997/09/08 02:22:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.9 1997/09/08 21:43:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ------------------------------------------------------------------
*/
bool
-ExecInitTee(Tee * node, EState * currentEstate, Plan * parent)
+ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
{
TeeState *teeState;
Plan *outerPlan;
}
int
-ExecCountSlotsTee(Tee * node)
+ExecCountSlotsTee(Tee *node)
{
/* Tee nodes can't have innerPlans */
return ExecCountSlotsNode(outerPlan(node)) + TEE_NSLOTS;
* ----------------------------------------------------------------
*/
static void
-initTeeScanDescs(Tee * node)
+initTeeScanDescs(Tee *node)
{
TeeState *teeState;
Relation bufferRel;
*/
TupleTableSlot *
-ExecTee(Tee * node, Plan * parent)
+ExecTee(Tee *node, Plan *parent)
{
EState *estate;
TeeState *teeState;
* ----------------------------------------------------------------
*/
void
-ExecTeeReScan(Tee * node, ExprContext * exprCtxt, Plan * parent)
+ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent)
{
EState *estate;
*/
void
-ExecEndTee(Tee * node, Plan * parent)
+ExecEndTee(Tee *node, Plan *parent)
{
EState *estate;
TeeState *teeState;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeUnique.c,v 1.9 1997/09/08 02:22:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeUnique.c,v 1.10 1997/09/08 21:43:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* same ADT value. -cim
* ----------------------------------------------------------------
*/
-static bool /* true if tuples are identical, false
+static bool /* true if tuples are identical, false
* otherwise */
-ExecIdenticalTuples(TupleTableSlot * t1, TupleTableSlot * t2)
+ExecIdenticalTuples(TupleTableSlot *t1, TupleTableSlot *t2)
{
HeapTuple h1;
HeapTuple h2;
* ----------------------------------------------------------------
*/
TupleTableSlot * /* return: a tuple or NULL */
-ExecUnique(Unique * node)
+ExecUnique(Unique *node)
{
UniqueState *uniquestate;
TupleTableSlot *resultTupleSlot;
* ----------------------------------------------------------------
*/
bool /* return: initialization status */
-ExecInitUnique(Unique * node, EState * estate, Plan * parent)
+ExecInitUnique(Unique *node, EState *estate, Plan *parent)
{
UniqueState *uniquestate;
Plan *outerPlan;
}
int
-ExecCountSlotsUnique(Unique * node)
+ExecCountSlotsUnique(Unique *node)
{
return ExecCountSlotsNode(outerPlan(node)) +
ExecCountSlotsNode(innerPlan(node)) +
* ----------------------------------------------------------------
*/
void
-ExecEndUnique(Unique * node)
+ExecEndUnique(Unique *node)
{
UniqueState *uniquestate;
Portal portal; /* portal per procedure */
MemoryContext savedcxt;
CommandId savedId;
-} _SPI_connection;
+} _SPI_connection;
static Portal _SPI_portal = (Portal) NULL;
static _SPI_connection *_SPI_stack = NULL;
List *ptlist;
int nargs;
Oid *argtypes;
-} _SPI_plan;
+} _SPI_plan;
-static int _SPI_execute(char *src, int tcount, _SPI_plan * plan);
-static int _SPI_pquery(QueryDesc * queryDesc, EState * state, int tcount);
+static int _SPI_execute(char *src, int tcount, _SPI_plan *plan);
+static int _SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount);
#if 0
-static void _SPI_fetch(FetchStmt * stmt);
+static void _SPI_fetch(FetchStmt *stmt);
#endif
static int
-_SPI_execute_plan(_SPI_plan * plan,
+_SPI_execute_plan(_SPI_plan *plan,
char **Values, char *Nulls, int tcount);
-static _SPI_plan *_SPI_copy_plan(_SPI_plan * plan, bool local);
+static _SPI_plan *_SPI_copy_plan(_SPI_plan *plan, bool local);
static int _SPI_begin_call(bool execmem);
static int _SPI_end_call(bool procmem);
}
void *
-SPI_prepare(char *src, int nargs, Oid * argtypes)
+SPI_prepare(char *src, int nargs, Oid *argtypes)
{
_SPI_plan *plan;
}
char *
-SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool * isnull)
+SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool *isnull)
{
char *val;
*/
static int
-_SPI_execute(char *src, int tcount, _SPI_plan * plan)
+_SPI_execute(char *src, int tcount, _SPI_plan *plan)
{
QueryTreeList *queryTree_list;
List *planTree_list;
}
static int
-_SPI_execute_plan(_SPI_plan * plan, char **Values, char *Nulls, int tcount)
+_SPI_execute_plan(_SPI_plan *plan, char **Values, char *Nulls, int tcount)
{
QueryTreeList *queryTree_list = plan->qtlist;
List *planTree_list = plan->ptlist;
}
static int
-_SPI_pquery(QueryDesc * queryDesc, EState * state, int tcount)
+_SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount)
{
Query *parseTree;
Plan *plan;
#if 0
static void
-_SPI_fetch(FetchStmt * stmt)
+_SPI_fetch(FetchStmt *stmt)
{
char *name = stmt->portalname;
int feature = (stmt->direction == FORWARD) ? EXEC_FOR : EXEC_BACK;
}
static _SPI_plan *
-_SPI_copy_plan(_SPI_plan * plan, bool local)
+_SPI_copy_plan(_SPI_plan *plan, bool local)
{
_SPI_plan *newplan;
MemoryContext oldcxt;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.7 1997/09/08 02:22:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.8 1997/09/08 21:43:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* free up a list and all the nodes in it */
void
-DLFreeList(Dllist * l)
+DLFreeList(Dllist *l)
{
Dlelem *curr;
}
void
-DLFreeElem(Dlelem * e)
+DLFreeElem(Dlelem *e)
{
free(e);
}
Dlelem *
-DLGetHead(Dllist * l)
+DLGetHead(Dllist *l)
{
return (l ? l->dll_head : 0);
}
/* get the value stored in the first element */
#ifdef NOT_USED
void *
-DLGetHeadVal(Dllist * l)
+DLGetHeadVal(Dllist *l)
{
Dlelem *e = DLGetHead(l);
#endif
Dlelem *
-DLGetTail(Dllist * l)
+DLGetTail(Dllist *l)
{
return (l ? l->dll_tail : 0);
}
/* get the value stored in the first element */
#ifdef NOT_USED
void *
-DLGetTailVal(Dllist * l)
+DLGetTailVal(Dllist *l)
{
Dlelem *e = DLGetTail(l);
#endif
Dlelem *
-DLGetPred(Dlelem * e) /* get predecessor */
+DLGetPred(Dlelem *e) /* get predecessor */
{
return (e ? e->dle_prev : 0);
}
Dlelem *
-DLGetSucc(Dlelem * e) /* get successor */
+DLGetSucc(Dlelem *e) /* get successor */
{
return (e ? e->dle_next : 0);
}
void
-DLRemove(Dlelem * e)
+DLRemove(Dlelem *e)
{
Dllist *l;
}
void
-DLAddHead(Dllist * l, Dlelem * e)
+DLAddHead(Dllist *l, Dlelem *e)
{
e->dle_list = l;
}
void
-DLAddTail(Dllist * l, Dlelem * e)
+DLAddTail(Dllist *l, Dlelem *e)
{
e->dle_list = l;
}
Dlelem *
-DLRemHead(Dllist * l)
+DLRemHead(Dllist *l)
{
/* remove and return the head */
Dlelem *result;
}
Dlelem *
-DLRemTail(Dllist * l)
+DLRemTail(Dllist *l)
{
/* remove and return the tail */
Dlelem *result;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/lib/Attic/hasht.c,v 1.6 1997/09/08 02:22:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/lib/Attic/hasht.c,v 1.7 1997/09/08 21:43:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* -----------------------------------
*/
void
-HashTableWalk(HTAB * hashtable, HashtFunc function, int arg)
+HashTableWalk(HTAB *hashtable, HashtFunc function, int arg)
{
long *hashent;
long *data;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/lib/Attic/lispsort.c,v 1.6 1997/09/08 02:23:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/lib/Attic/lispsort.c,v 1.7 1997/09/08 21:43:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
** the nodes sorted. The old list is *not* freed or modified (?)
*/
List *
-lisp_qsort(List * the_list, /* the list to be sorted */
+lisp_qsort(List *the_list, /* the list to be sorted */
int (*compare) ()) /* function to compare two nodes */
{
int i;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.16 1997/09/08 02:23:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.17 1997/09/08 21:43:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif /* KRB5 */
static int
-pg_password_recvauth(Port * port, char *database, char *DataDir)
+pg_password_recvauth(Port *port, char *database, char *DataDir)
{
PacketBuf buf;
char *user,
* be_recvauth -- server demux routine for incoming authentication information
*/
int
-be_recvauth(MsgType msgtype_arg, Port * port, char *username, StartupInfo * sp)
+be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo *sp)
{
MsgType msgtype;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.7 1997/09/08 02:23:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.8 1997/09/08 21:43:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------
*/
void
-be_portalpush(PortalEntry * entry)
+be_portalpush(PortalEntry *entry)
{
DLAddTail(be_portalstack, DLNewElem(entry));
}
* ----------------
*/
void
-be_typeinit(PortalEntry * entry,
+be_typeinit(PortalEntry *entry,
TupleDesc tupDesc,
int natts)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.14 1997/09/08 02:23:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.15 1997/09/08 21:43:41 momjian Exp $
*
* NOTES
* This should be moved to a more appropriate place. It is here
static GlobalMemory fscxt = NULL;
-static int newLOfd(LargeObjectDesc * lobjCookie);
+static int newLOfd(LargeObjectDesc *lobjCookie);
static void deleteLOfd(int fd);
* imports a file as an (inversion) large object.
*/
Oid
-lo_import(text * filename)
+lo_import(text *filename)
{
int fd;
int nbytes,
* exports an (inversion) large object.
*/
int4
-lo_export(Oid lobjId, text * filename)
+lo_export(Oid lobjId, text *filename)
{
int fd;
int nbytes,
*****************************************************************************/
static int
-newLOfd(LargeObjectDesc * lobjCookie)
+newLOfd(LargeObjectDesc *lobjCookie)
{
int i;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.6 1997/09/08 02:23:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.7 1997/09/08 21:43:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
int *result_buf, /* can't use void, dec compiler barfs */
int result_len,
int result_is_int,
- PQArgBlock * args,
+ PQArgBlock *args,
int nargs)
{
char *retval; /* XXX - should be datum, maybe ? */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.21 1997/09/08 02:23:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.22 1997/09/08 21:43:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static void
-next_token(FILE * fp, char *buf, const int bufsz)
+next_token(FILE *fp, char *buf, const int bufsz)
{
/*--------------------------------------------------------------------------
Grab one token out of fp. Tokens are strings of non-blank
static void
-read_through_eol(FILE * file)
+read_through_eol(FILE *file)
{
int c;
static void
-read_hba_entry2(FILE * file, enum Userauth * userauth_p, char usermap_name[],
- bool * error_p, bool * matches_p, bool find_password_entries)
+read_hba_entry2(FILE *file, enum Userauth * userauth_p, char usermap_name[],
+ bool *error_p, bool *matches_p, bool find_password_entries)
{
/*--------------------------------------------------------------------------
Read from file FILE the rest of a host record, after the mask field,
static void
-process_hba_record(FILE * file,
+process_hba_record(FILE *file,
const struct in_addr ip_addr, const char database[],
- bool * matches_p, bool * error_p,
+ bool *matches_p, bool *error_p,
enum Userauth * userauth_p, char usermap_name[],
bool find_password_entries)
{
static void
-process_open_config_file(FILE * file,
+process_open_config_file(FILE *file,
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)
{
/*---------------------------------------------------------------------------
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)
{
/*--------------------------------------------------------------------------
static void
interpret_ident_response(char ident_response[],
- bool * error_p, char ident_username[])
+ bool *error_p, char ident_username[])
{
/*----------------------------------------------------------------------------
Parse the string "ident_response[]" as a response from a query to an Ident
static void
ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr,
const ushort remote_port, const ushort local_port,
- bool * ident_failed, char ident_username[])
+ bool *ident_failed, char ident_username[])
{
/*--------------------------------------------------------------------------
Talk to the ident server on host "remote_ip_addr" and find out who
static void
-parse_map_record(FILE * file,
+parse_map_record(FILE *file,
char file_map[], char file_pguser[], char file_iuser[])
{
/*---------------------------------------------------------------------------
static void
-verify_against_open_usermap(FILE * file,
+verify_against_open_usermap(FILE *file,
const char pguser[],
const char ident_username[],
const char usermap_name[],
- bool * checks_out_p)
+ bool *checks_out_p)
{
/*--------------------------------------------------------------------------
This function does the same thing as verify_against_usermap,
const char pguser[],
const char ident_username[],
const char usermap_name[],
- bool * checks_out_p)
+ bool *checks_out_p)
{
/*--------------------------------------------------------------------------
See if the user with ident username "ident_username" is allowed to act
authident(const char DataDir[],
const Port port, const char postgres_username[],
const char usermap_name[],
- bool * authentic_p)
+ bool *authentic_p)
{
/*---------------------------------------------------------------------------
Talk to the ident server on the remote host and find out who owns the
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[])
{
/*---------------------------------------------------------------------------
case Trust:
retvalue = STATUS_OK;
break;
- case Ident:
+ case Ident:
{
/*
bool authentic; /* He is who he says he
* is. */
- authident(DataDir, *port, user, usermap_name, &authentic);
+ authident(DataDir, *port, user, usermap_name, &authentic);
- if (authentic)
- retvalue = STATUS_OK;
+ if (authentic)
+ retvalue = STATUS_OK;
else
- retvalue = STATUS_ERROR;
+ retvalue = STATUS_ERROR;
}
- break;
+ break;
+
default:
retvalue = STATUS_ERROR;
Assert(false);
#endif
int
-verify_password(char *user, char *password, Port * port,
+verify_password(char *user, char *password, Port *port,
char *database, char *DataDir)
{
bool host_ok;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.8 1997/09/08 02:23:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.9 1997/09/08 21:43:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* --------------------------------
*/
int
-PQrulep(PortalBuffer * portal)
+PQrulep(PortalBuffer *portal)
{
if (!valid_pointer("PQrulep: invalid portal pointer", portal))
return (-1);
* --------------------------------
*/
int
-PQntuples(PortalBuffer * portal)
+PQntuples(PortalBuffer *portal)
{
if (!valid_pointer("PQntuples: invalid portal pointer", portal))
return (-1);
}
int
-PQninstances(PortalBuffer * portal)
+PQninstances(PortalBuffer *portal)
{
return (PQntuples(portal));
}
* --------------------------------
*/
int
-PQngroups(PortalBuffer * portal)
+PQngroups(PortalBuffer *portal)
{
if (!valid_pointer("PQngroups: invalid portal pointer", portal))
return (-1);
* --------------------------------
*/
int
-PQntuplesGroup(PortalBuffer * portal, int group_index)
+PQntuplesGroup(PortalBuffer *portal, int group_index)
{
GroupBuffer *gbp;
}
int
-PQninstancesGroup(PortalBuffer * portal, int group_index)
+PQninstancesGroup(PortalBuffer *portal, int group_index)
{
return (PQntuplesGroup(portal, group_index));
}
* --------------------------------
*/
int
-PQnfieldsGroup(PortalBuffer * portal, int group_index)
+PQnfieldsGroup(PortalBuffer *portal, int group_index)
{
GroupBuffer *gbp;
* --------------------------------
*/
int
-PQfnumberGroup(PortalBuffer * portal, int group_index, char *field_name)
+PQfnumberGroup(PortalBuffer *portal, int group_index, char *field_name)
{
GroupBuffer *gbp;
* --------------------------------
*/
char *
-PQfnameGroup(PortalBuffer * portal, int group_index, int field_number)
+PQfnameGroup(PortalBuffer *portal, int group_index, int field_number)
{
GroupBuffer *gbp;
* --------------------------------
*/
int
-PQftypeGroup(PortalBuffer * portal, int group_index, int field_number)
+PQftypeGroup(PortalBuffer *portal, int group_index, int field_number)
{
GroupBuffer *gbp;
* --------------------------------
*/
int
-PQfsizeGroup(PortalBuffer * portal, int group_index, int field_number)
+PQfsizeGroup(PortalBuffer *portal, int group_index, int field_number)
{
GroupBuffer *gbp;
* --------------------------------
*/
GroupBuffer *
-PQgroup(PortalBuffer * portal, int tuple_index)
+PQgroup(PortalBuffer *portal, int tuple_index)
{
GroupBuffer *gbp;
int tuple_count = 0;
* --------------------------------
*/
int
-PQgetgroup(PortalBuffer * portal, int tuple_index)
+PQgetgroup(PortalBuffer *portal, int tuple_index)
{
GroupBuffer *gbp;
int tuple_count = 0,
* --------------------------------
*/
int
-PQnfields(PortalBuffer * portal, int tuple_index)
+PQnfields(PortalBuffer *portal, int tuple_index)
{
GroupBuffer *gbp;
* --------------------------------
*/
int
-PQfnumber(PortalBuffer * portal, int tuple_index, char *field_name)
+PQfnumber(PortalBuffer *portal, int tuple_index, char *field_name)
{
GroupBuffer *gbp;
* --------------------------------
*/
char *
-PQfname(PortalBuffer * portal, int tuple_index, int field_number)
+PQfname(PortalBuffer *portal, int tuple_index, int field_number)
{
GroupBuffer *gbp;
* --------------------------------
*/
int
-PQftype(PortalBuffer * portal, int tuple_index, int field_number)
+PQftype(PortalBuffer *portal, int tuple_index, int field_number)
{
GroupBuffer *gbp;
* --------------------------------
*/
int
-PQfsize(PortalBuffer * portal, int tuple_index, int field_number)
+PQfsize(PortalBuffer *portal, int tuple_index, int field_number)
{
GroupBuffer *gbp;
* --------------------------------
*/
int
-PQsametype(PortalBuffer * portal, int tuple_index1, int tuple_index2)
+PQsametype(PortalBuffer *portal, int tuple_index1, int tuple_index2)
{
GroupBuffer *gbp1,
*gbp2;
}
static TupleBlock *
-PQGetTupleBlock(PortalBuffer * portal,
+PQGetTupleBlock(PortalBuffer *portal,
int tuple_index,
int *tuple_offset)
{
* --------------------------------
*/
char *
-PQgetvalue(PortalBuffer * portal,
+PQgetvalue(PortalBuffer *portal,
int tuple_index,
int field_number)
{
* --------------------------------
*/
char *
-PQgetAttr(PortalBuffer * portal,
+PQgetAttr(PortalBuffer *portal,
int tuple_index,
int field_number)
{
* --------------------------------
*/
int
-PQgetlength(PortalBuffer * portal,
+PQgetlength(PortalBuffer *portal,
int tuple_index,
int field_number)
{
}
void
-PQremoveNotify(PQNotifyList * nPtr)
+PQremoveNotify(PQNotifyList *nPtr)
{
nPtr->valid = 0; /* remove later */
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.6 1997/09/08 02:23:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.7 1997/09/08 21:43:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* --------------------------------
*/
GroupBuffer *
-pbuf_addGroup(PortalBuffer * portal)
+pbuf_addGroup(PortalBuffer *portal)
{
GroupBuffer *group,
*group1;
* --------------------------------
*/
void
-pbuf_freeTypes(TypeBlock * types)
+pbuf_freeTypes(TypeBlock *types)
{
pbuf_free((caddr_t) types);
}
* --------------------------------
*/
void
-pbuf_freeTuples(TupleBlock * tuples,
+pbuf_freeTuples(TupleBlock *tuples,
int no_tuples,
int no_fields)
{
* --------------------------------
*/
void
-pbuf_freeGroup(GroupBuffer * group)
+pbuf_freeGroup(GroupBuffer *group)
{
if (group->next != NULL)
pbuf_freeGroup(group->next);
* --------------------------------
*/
void
-pbuf_freePortal(PortalBuffer * portal)
+pbuf_freePortal(PortalBuffer *portal)
{
if (portal->groups != NULL)
pbuf_freeGroup(portal->groups);
* --------------------------------
*/
void
-pbuf_setportalinfo(PortalEntry * entry, char *pname)
+pbuf_setportalinfo(PortalEntry *entry, char *pname)
{
if (entry)
strNcpy(entry->name, pname, PortalNameLength - 1);
* --------------------------------
*/
GroupBuffer *
-pbuf_findGroup(PortalBuffer * portal,
+pbuf_findGroup(PortalBuffer *portal,
int group_index)
{
GroupBuffer *group;
* --------------------------------
*/
int
-pbuf_findFnumber(GroupBuffer * group,
+pbuf_findFnumber(GroupBuffer *group,
char *field_name)
{
TypeBlock *types;
* --------------------------------
*/
void
-pbuf_checkFnumber(GroupBuffer * group,
+pbuf_checkFnumber(GroupBuffer *group,
int field_number)
{
if (field_number < 0 || field_number >= group->no_fields)
* --------------------------------
*/
char *
-pbuf_findFname(GroupBuffer * group,
+pbuf_findFname(GroupBuffer *group,
int field_number)
{
pbuf_checkFnumber(group, field_number);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.21 1997/09/08 02:23:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.22 1997/09/08 21:43:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* used for debugging libpq
*/
static int
-pq_getc(FILE * fin)
+pq_getc(FILE *fin)
{
int c;
* RETURNS: STATUS_OK or STATUS_ERROR
*/
int
-StreamConnection(int server_fd, Port * port)
+StreamConnection(int server_fd, Port *port)
{
int addrlen;
* ---------------------------
*/
int
-StreamOpen(char *hostName, short portName, Port * port)
+StreamOpen(char *hostName, short portName, Port *port)
{
struct hostent *hp;
int laddrlen = sizeof(struct sockaddr_in);
/* --------------------------------------------------------------------- */
int
-pqPutShort(int integer, FILE * f)
+pqPutShort(int integer, FILE *f)
{
int retval = 0;
u_short n,
/* --------------------------------------------------------------------- */
int
-pqPutLong(int integer, FILE * f)
+pqPutLong(int integer, FILE *f)
{
int retval = 0;
u_long n;
/* --------------------------------------------------------------------- */
int
-pqGetShort(int *result, FILE * f)
+pqGetShort(int *result, FILE *f)
{
int retval = 0;
u_short n;
/* --------------------------------------------------------------------- */
int
-pqGetLong(int *result, FILE * f)
+pqGetLong(int *result, FILE *f)
{
int retval = 0;
u_long n;
Return 0 if ok.
*/
int
-pqGetNBytes(char *s, size_t len, FILE * f)
+pqGetNBytes(char *s, size_t len, FILE *f)
{
int cnt;
/* --------------------------------------------------------------------- */
int
-pqPutNBytes(const char *s, size_t len, FILE * f)
+pqPutNBytes(const char *s, size_t len, FILE *f)
{
if (f == NULL)
return 0;
/* --------------------------------------------------------------------- */
int
-pqGetString(char *s, size_t len, FILE * f)
+pqGetString(char *s, size_t len, FILE *f)
{
int c;
/* --------------------------------------------------------------------- */
int
-pqPutString(const char *s, FILE * f)
+pqPutString(const char *s, FILE *f)
{
if (f == NULL)
return 0;
/* --------------------------------------------------------------------- */
int
-pqGetByte(FILE * f)
+pqGetByte(FILE *f)
{
return getc(f);
}
/* --------------------------------------------------------------------- */
int
-pqPutByte(int c, FILE * f)
+pqPutByte(int c, FILE *f)
{
if (!f)
return 0;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.7 1997/09/08 02:23:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.8 1997/09/08 21:43:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*
*/
int
-PacketReceive(Port * port, /* receive port */
- PacketBuf * buf, /* MAX_PACKET_SIZE-worth of buffer space */
+PacketReceive(Port *port, /* receive port */
+ PacketBuf *buf, /* MAX_PACKET_SIZE-worth of buffer space */
bool nonBlocking) /* NON_BLOCKING or BLOCKING i/o */
{
PacketLen max_size = sizeof(PacketBuf);
*
*/
int
-PacketSend(Port * port,
- PacketBuf * buf,
+PacketSend(Port *port,
+ PacketBuf *buf,
PacketLen len,
bool nonBlocking)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.9 1997/09/08 20:55:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.10 1997/09/08 21:43:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* its contents. (good for list of pointers as well as list of integers).
*/
List *
-listCopy(List * list)
+listCopy(List *list)
{
List *newlist = NIL;
List *l,
* ----------------
*/
static void
-CopyPlanFields(Plan * from, Plan * newnode)
+CopyPlanFields(Plan *from, Plan *newnode)
{
newnode->cost = from->cost;
newnode->plan_size = from->plan_size;
* ----------------
*/
static Plan *
-_copyPlan(Plan * from)
+_copyPlan(Plan *from)
{
Plan *newnode = makeNode(Plan);
* ----------------
*/
static Existential *
-_copyExistential(Existential * from)
+_copyExistential(Existential *from)
{
Existential *newnode = makeNode(Existential);
* ----------------
*/
static Result *
-_copyResult(Result * from)
+_copyResult(Result *from)
{
Result *newnode = makeNode(Result);
* ----------------
*/
static void
-CopyScanFields(Scan * from, Scan * newnode)
+CopyScanFields(Scan *from, Scan *newnode)
{
newnode->scanrelid = from->scanrelid;
Node_Copy(from, newnode, scanstate);
* ----------------
*/
static Scan *
-_copyScan(Scan * from)
+_copyScan(Scan *from)
{
Scan *newnode = makeNode(Scan);
* ----------------
*/
static SeqScan *
-_copySeqScan(SeqScan * from)
+_copySeqScan(SeqScan *from)
{
SeqScan *newnode = makeNode(SeqScan);
* ----------------
*/
static IndexScan *
-_copyIndexScan(IndexScan * from)
+_copyIndexScan(IndexScan *from)
{
IndexScan *newnode = makeNode(IndexScan);
* ----------------
*/
static void
-CopyJoinFields(Join * from, Join * newnode)
+CopyJoinFields(Join *from, Join *newnode)
{
/* nothing extra */
return;
* ----------------
*/
static Join *
-_copyJoin(Join * from)
+_copyJoin(Join *from)
{
Join *newnode = makeNode(Join);
* ----------------
*/
static NestLoop *
-_copyNestLoop(NestLoop * from)
+_copyNestLoop(NestLoop *from)
{
NestLoop *newnode = makeNode(NestLoop);
* ----------------
*/
static MergeJoin *
-_copyMergeJoin(MergeJoin * from)
+_copyMergeJoin(MergeJoin *from)
{
MergeJoin *newnode = makeNode(MergeJoin);
List *newlist;
* ----------------
*/
static HashJoin *
-_copyHashJoin(HashJoin * from)
+_copyHashJoin(HashJoin *from)
{
HashJoin *newnode = makeNode(HashJoin);
* ----------------
*/
static void
-CopyTempFields(Temp * from, Temp * newnode)
+CopyTempFields(Temp *from, Temp *newnode)
{
newnode->tempid = from->tempid;
newnode->keycount = from->keycount;
* ----------------
*/
static Temp *
-_copyTemp(Temp * from)
+_copyTemp(Temp *from)
{
Temp *newnode = makeNode(Temp);
* ----------------
*/
static Material *
-_copyMaterial(Material * from)
+_copyMaterial(Material *from)
{
Material *newnode = makeNode(Material);
* ----------------
*/
static Sort *
-_copySort(Sort * from)
+_copySort(Sort *from)
{
Sort *newnode = makeNode(Sort);
* ----------------
*/
static Unique *
-_copyUnique(Unique * from)
+_copyUnique(Unique *from)
{
Unique *newnode = makeNode(Unique);
* ----------------
*/
static Hash *
-_copyHash(Hash * from)
+_copyHash(Hash *from)
{
Hash *newnode = makeNode(Hash);
* ----------------
*/
static Resdom *
-_copyResdom(Resdom * from)
+_copyResdom(Resdom *from)
{
Resdom *newnode = makeNode(Resdom);
}
static Fjoin *
-_copyFjoin(Fjoin * from)
+_copyFjoin(Fjoin *from)
{
Fjoin *newnode = makeNode(Fjoin);
* ----------------
*/
static Expr *
-_copyExpr(Expr * from)
+_copyExpr(Expr *from)
{
Expr *newnode = makeNode(Expr);
* ----------------
*/
static Var *
-_copyVar(Var * from)
+_copyVar(Var *from)
{
Var *newnode = makeNode(Var);
* ----------------
*/
static Oper *
-_copyOper(Oper * from)
+_copyOper(Oper *from)
{
Oper *newnode = makeNode(Oper);
* ----------------
*/
static Const *
-_copyConst(Const * from)
+_copyConst(Const *from)
{
static Oid cached_type;
static bool cached_typbyval;
* ----------------
*/
static Param *
-_copyParam(Param * from)
+_copyParam(Param *from)
{
Param *newnode = makeNode(Param);
* ----------------
*/
static Func *
-_copyFunc(Func * from)
+_copyFunc(Func *from)
{
Func *newnode = makeNode(Func);
** -- JMH, 8/2/93
*/
static Rel *
-_copyRel(Rel * from)
+_copyRel(Rel *from)
{
Rel *newnode = makeNode(Rel);
int i,
* ----------------
*/
static void
-CopyPathFields(Path * from, Path * newnode)
+CopyPathFields(Path *from, Path *newnode)
{
newnode->pathtype = from->pathtype;
* ----------------
*/
static Path *
-_copyPath(Path * from)
+_copyPath(Path *from)
{
Path *newnode = makeNode(Path);
* ----------------
*/
static IndexPath *
-_copyIndexPath(IndexPath * from)
+_copyIndexPath(IndexPath *from)
{
IndexPath *newnode = makeNode(IndexPath);
* ----------------
*/
static void
-CopyJoinPathFields(JoinPath * from, JoinPath * newnode)
+CopyJoinPathFields(JoinPath *from, JoinPath *newnode)
{
Node_Copy(from, newnode, pathclauseinfo);
Node_Copy(from, newnode, outerjoinpath);
* ----------------
*/
static JoinPath *
-_copyJoinPath(JoinPath * from)
+_copyJoinPath(JoinPath *from)
{
JoinPath *newnode = makeNode(JoinPath);
* ----------------
*/
static MergePath *
-_copyMergePath(MergePath * from)
+_copyMergePath(MergePath *from)
{
MergePath *newnode = makeNode(MergePath);
* ----------------
*/
static HashPath *
-_copyHashPath(HashPath * from)
+_copyHashPath(HashPath *from)
{
HashPath *newnode = makeNode(HashPath);
* ----------------
*/
static OrderKey *
-_copyOrderKey(OrderKey * from)
+_copyOrderKey(OrderKey *from)
{
OrderKey *newnode = makeNode(OrderKey);
* ----------------
*/
static JoinKey *
-_copyJoinKey(JoinKey * from)
+_copyJoinKey(JoinKey *from)
{
JoinKey *newnode = makeNode(JoinKey);
* ----------------
*/
static MergeOrder *
-_copyMergeOrder(MergeOrder * from)
+_copyMergeOrder(MergeOrder *from)
{
MergeOrder *newnode = makeNode(MergeOrder);
* ----------------
*/
static CInfo *
-_copyCInfo(CInfo * from)
+_copyCInfo(CInfo *from)
{
CInfo *newnode = makeNode(CInfo);
* ----------------
*/
static void
-CopyJoinMethodFields(JoinMethod * from, JoinMethod * newnode)
+CopyJoinMethodFields(JoinMethod *from, JoinMethod *newnode)
{
Node_Copy(from, newnode, jmkeys);
Node_Copy(from, newnode, clauses);
* ----------------
*/
static JoinMethod *
-_copyJoinMethod(JoinMethod * from)
+_copyJoinMethod(JoinMethod *from)
{
JoinMethod *newnode = makeNode(JoinMethod);
* ----------------
*/
static HInfo *
-_copyHInfo(HInfo * from)
+_copyHInfo(HInfo *from)
{
HInfo *newnode = makeNode(HInfo);
* ----------------
*/
static MInfo *
-_copyMInfo(MInfo * from)
+_copyMInfo(MInfo *from)
{
MInfo *newnode = makeNode(MInfo);
* ----------------
*/
static JInfo *
-_copyJInfo(JInfo * from)
+_copyJInfo(JInfo *from)
{
JInfo *newnode = makeNode(JInfo);
}
static Iter *
-_copyIter(Iter * from)
+_copyIter(Iter *from)
{
Iter *newnode = makeNode(Iter);
}
static Stream *
-_copyStream(Stream * from)
+_copyStream(Stream *from)
{
Stream *newnode = makeNode(Stream);
*/
static TargetEntry *
-_copyTargetEntry(TargetEntry * from)
+_copyTargetEntry(TargetEntry *from)
{
TargetEntry *newnode = makeNode(TargetEntry);
}
static RangeTblEntry *
-_copyRangeTblEntry(RangeTblEntry * from)
+_copyRangeTblEntry(RangeTblEntry *from)
{
RangeTblEntry *newnode = makeNode(RangeTblEntry);
}
static SortClause *
-_copySortClause(SortClause * from)
+_copySortClause(SortClause *from)
{
SortClause *newnode = makeNode(SortClause);
}
static TypeName *
-_copyTypeName(TypeName * from)
+_copyTypeName(TypeName *from)
{
TypeName *newnode = makeNode(TypeName);
}
static Query *
-_copyQuery(Query * from)
+_copyQuery(Query *from)
{
Query *newnode = makeNode(Query);
*/
static Value *
-_copyValue(Value * from)
+_copyValue(Value *from)
{
Value *newnode = makeNode(Value);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.9 1997/09/08 20:55:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.10 1997/09/08 21:44:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "utils/elog.h"
#include "storage/itemptr.h"
-static bool equali(List * a, List * b);
+static bool equali(List *a, List *b);
/*
* Stuff from primnodes.h
* Resdom is a subclass of Node.
*/
static bool
-_equalResdom(Resdom * a, Resdom * b)
+_equalResdom(Resdom *a, Resdom *b)
{
if (a->resno != b->resno)
return (false);
}
static bool
-_equalFjoin(Fjoin * a, Fjoin * b)
+_equalFjoin(Fjoin *a, Fjoin *b)
{
int nNodes;
* Expr is a subclass of Node.
*/
static bool
-_equalExpr(Expr * a, Expr * b)
+_equalExpr(Expr *a, Expr *b)
{
if (a->opType != b->opType)
return (false);
}
static bool
-_equalIter(Iter * a, Iter * b)
+_equalIter(Iter *a, Iter *b)
{
return (equal(a->iterexpr, b->iterexpr));
}
static bool
-_equalStream(Stream * a, Stream * b)
+_equalStream(Stream *a, Stream *b)
{
if (a->clausetype != b->clausetype)
return (false);
* Var is a subclass of Expr.
*/
static bool
-_equalVar(Var * a, Var * b)
+_equalVar(Var *a, Var *b)
{
if (a->varno != b->varno)
return (false);
* Oper is a subclass of Expr.
*/
static bool
-_equalOper(Oper * a, Oper * b)
+_equalOper(Oper *a, Oper *b)
{
if (a->opno != b->opno)
return (false);
* Const is a subclass of Expr.
*/
static bool
-_equalConst(Const * a, Const * b)
+_equalConst(Const *a, Const *b)
{
/*
* Param is a subclass of Expr.
*/
static bool
-_equalParam(Param * a, Param * b)
+_equalParam(Param *a, Param *b)
{
if (a->paramkind != b->paramkind)
return (false);
* Func is a subclass of Expr.
*/
static bool
-_equalFunc(Func * a, Func * b)
+_equalFunc(Func *a, Func *b)
{
if (a->funcid != b->funcid)
return (false);
* CInfo is a subclass of Node.
*/
static bool
-_equalCInfo(CInfo * a, CInfo * b)
+_equalCInfo(CInfo *a, CInfo *b)
{
Assert(IsA(a, CInfo));
Assert(IsA(b, CInfo));
}
static bool
-_equalJoinMethod(JoinMethod * a, JoinMethod * b)
+_equalJoinMethod(JoinMethod *a, JoinMethod *b)
{
Assert(IsA(a, JoinMethod));
Assert(IsA(b, JoinMethod));
}
static bool
-_equalPath(Path * a, Path * b)
+_equalPath(Path *a, Path *b)
{
if (a->pathtype != b->pathtype)
return (false);
}
static bool
-_equalIndexPath(IndexPath * a, IndexPath * b)
+_equalIndexPath(IndexPath *a, IndexPath *b)
{
if (!_equalPath((Path *) a, (Path *) b))
return (false);
}
static bool
-_equalJoinPath(JoinPath * a, JoinPath * b)
+_equalJoinPath(JoinPath *a, JoinPath *b)
{
Assert(IsA_JoinPath(a));
Assert(IsA_JoinPath(b));
}
static bool
-_equalMergePath(MergePath * a, MergePath * b)
+_equalMergePath(MergePath *a, MergePath *b)
{
Assert(IsA(a, MergePath));
Assert(IsA(b, MergePath));
}
static bool
-_equalHashPath(HashPath * a, HashPath * b)
+_equalHashPath(HashPath *a, HashPath *b)
{
Assert(IsA(a, HashPath));
Assert(IsA(b, HashPath));
}
static bool
-_equalJoinKey(JoinKey * a, JoinKey * b)
+_equalJoinKey(JoinKey *a, JoinKey *b)
{
Assert(IsA(a, JoinKey));
Assert(IsA(b, JoinKey));
}
static bool
-_equalMergeOrder(MergeOrder * a, MergeOrder * b)
+_equalMergeOrder(MergeOrder *a, MergeOrder *b)
{
if (a == (MergeOrder *) NULL && b == (MergeOrder *) NULL)
return (true);
}
static bool
-_equalHInfo(HInfo * a, HInfo * b)
+_equalHInfo(HInfo *a, HInfo *b)
{
Assert(IsA(a, HInfo));
Assert(IsA(b, HInfo));
* fixed to compare all fields.
*/
static bool
-_equalIndexScan(IndexScan * a, IndexScan * b)
+_equalIndexScan(IndexScan *a, IndexScan *b)
{
Assert(IsA(a, IndexScan));
Assert(IsA(b, IndexScan));
}
static bool
-_equalJInfo(JInfo * a, JInfo * b)
+_equalJInfo(JInfo *a, JInfo *b)
{
Assert(IsA(a, JInfo));
Assert(IsA(b, JInfo));
* EState is a subclass of Node.
*/
static bool
-_equalEState(EState * a, EState * b)
+_equalEState(EState *a, EState *b)
{
if (a->es_direction != b->es_direction)
return (false);
}
static bool
-_equalTargetEntry(TargetEntry * a, TargetEntry * b)
+_equalTargetEntry(TargetEntry *a, TargetEntry *b)
{
if (!equal(a->resdom, b->resdom))
return (false);
* to be recursive, but it should run faster if we iterate.
*/
static bool
-_equalValue(Value * a, Value * b)
+_equalValue(Value *a, Value *b)
{
if (a->type != b->type)
return (false);
* XXX temp hack. needs something like T_IntList
*/
static bool
-equali(List * a, List * b)
+equali(List *a, List *b)
{
List *la = (List *) a;
List *lb = (List *) b;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.6 1997/09/08 02:23:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.7 1997/09/08 21:44:04 momjian Exp $
*
* NOTES
* XXX a few of the following functions are duplicated to handle
}
List *
-lcons(void *obj, List * list)
+lcons(void *obj, List *list)
{
List *l = makeNode(List);
}
List *
-lconsi(int datum, List * list)
+lconsi(int datum, List *list)
{
List *l = makeNode(List);
}
List *
-lappend(List * list, void *obj)
+lappend(List *list, void *obj)
{
return nconc(list, lcons(obj, NIL));
}
List *
-lappendi(List * list, int datum)
+lappendi(List *list, int datum)
{
return nconc(list, lconsi(datum, NIL));
}
/* n starts with 0 */
void *
-nth(int n, List * l)
+nth(int n, List *l)
{
/* XXX assume list is long enough */
while (n > 0)
}
int
-nthi(int n, List * l)
+nthi(int n, List *l)
{
/* XXX assume list is long enough */
while (n > 0)
/* this is here solely for rt_store. Get rid of me some day! */
void
-set_nth(List * l, int n, void *elem)
+set_nth(List *l, int n, void *elem)
{
/* XXX assume list is long enough */
while (n > 0)
}
int
-length(List * l)
+length(List *l)
{
int i = 0;
}
void
-freeList(List * list)
+freeList(List *list)
{
while (list != NIL)
{
* below are for backwards compatibility
*/
List *
-append(List * l1, List * l2)
+append(List *l1, List *l2)
{
List *newlist,
*newlist2,
* below are for backwards compatibility
*/
List *
-intAppend(List * l1, List * l2)
+intAppend(List *l1, List *l2)
{
List *newlist,
*newlist2,
}
List *
-nconc(List * l1, List * l2)
+nconc(List *l1, List *l2)
{
List *temp;
List *
-nreverse(List * list)
+nreverse(List *list)
{
List *rlist = NIL;
List *p = NIL;
* XXX only good for IntList -ay
*/
bool
-same(List * foo, List * bar)
+same(List *foo, List *bar)
{
List *temp = NIL;
}
List *
-LispUnion(List * foo, List * bar)
+LispUnion(List *foo, List *bar)
{
List *retval = NIL;
List *i = NIL;
}
List *
-LispUnioni(List * foo, List * bar)
+LispUnioni(List *foo, List *bar)
{
List *retval = NIL;
List *i = NIL;
* bar
*/
bool
-member(void *foo, List * bar)
+member(void *foo, List *bar)
{
List *i;
}
bool
-intMember(int foo, List * bar)
+intMember(int foo, List *bar)
{
List *i;
* only does pointer comparisons. Removes 'elem' from the the linked list.
*/
List *
-lremove(void *elem, List * list)
+lremove(void *elem, List *list)
{
List *l;
List *prev = NIL;
}
List *
-LispRemove(void *elem, List * list)
+LispRemove(void *elem, List *list)
{
List *temp = NIL;
List *prev = NIL;
#ifdef NOT_USED
List *
-intLispRemove(int elem, List * list)
+intLispRemove(int elem, List *list)
{
List *temp = NIL;
List *prev = NIL;
#endif
List *
-set_difference(List * list1, List * list2)
+set_difference(List *list1, List *list2)
{
List *temp1 = NIL;
List *result = NIL;
}
List *
-set_differencei(List * list1, List * list2)
+set_differencei(List *list1, List *list2)
{
List *temp1 = NIL;
List *result = NIL;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.5 1997/09/08 02:23:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.6 1997/09/08 21:44:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "nodes/nodeFuncs.h"
#include "utils/lsyscache.h"
-static bool var_is_inner(Var * var);
+static bool var_is_inner(Var *var);
/*
* single_node -
* Returns t if node corresponds to a single-noded expression
*/
bool
-single_node(Node * node)
+single_node(Node *node)
{
- if (IsA(node, Ident) || IsA(node, Const) || IsA(node, Var) || IsA(node, Param))
+ if (IsA(node, Ident) ||IsA(node, Const) ||IsA(node, Var) ||IsA(node, Param))
return (true);
else
return (false);
*
*/
bool
-var_is_outer(Var * var)
+var_is_outer(Var *var)
{
return ((bool) (var->varno == OUTER));
}
static bool
-var_is_inner(Var * var)
+var_is_inner(Var *var)
{
return ((bool) (var->varno == INNER));
}
bool
-var_is_rel(Var * var)
+var_is_rel(Var *var)
{
return (bool)
- ! (var_is_inner(var) || var_is_outer(var));
+ !(var_is_inner(var) || var_is_outer(var));
}
/*****************************************************************************
*
*/
Oper *
-replace_opid(Oper * oper)
+replace_opid(Oper *oper)
{
oper->opid = get_opcode(oper->opno);
oper->op_fcache = NULL;
*
*/
bool
-non_null(Expr * c)
+non_null(Expr *c)
{
- if (IsA(c, Const) && !((Const *) c)->constisnull)
+ if (IsA(c, Const) &&!((Const *) c)->constisnull)
return (true);
else
return (false);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.9 1997/09/08 20:55:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.10 1997/09/08 21:44:07 momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
* converts a List of integers
*/
static void
-_outIntList(StringInfo str, List * list)
+_outIntList(StringInfo str, List *list)
{
List *l;
char buf[500];
}
static void
-_outQuery(StringInfo str, Query * node)
+_outQuery(StringInfo str, Query *node)
{
char buf[500];
* print the basic stuff of all nodes that inherit from Plan
*/
static void
-_outPlanInfo(StringInfo str, Plan * node)
+_outPlanInfo(StringInfo str, Plan *node)
{
char buf[500];
* Stuff from plannodes.h
*/
static void
-_outPlan(StringInfo str, Plan * node)
+_outPlan(StringInfo str, Plan *node)
{
char buf[500];
}
static void
-_outResult(StringInfo str, Result * node)
+_outResult(StringInfo str, Result *node)
{
char buf[500];
* Existential is a subclass of Plan.
*/
static void
-_outExistential(StringInfo str, Existential * node)
+_outExistential(StringInfo str, Existential *node)
{
char buf[500];
* Join is a subclass of Plan
*/
static void
-_outJoin(StringInfo str, Join * node)
+_outJoin(StringInfo str, Join *node)
{
char buf[500];
* NestLoop is a subclass of Join
*/
static void
-_outNestLoop(StringInfo str, NestLoop * node)
+_outNestLoop(StringInfo str, NestLoop *node)
{
char buf[500];
* MergeJoin is a subclass of Join
*/
static void
-_outMergeJoin(StringInfo str, MergeJoin * node)
+_outMergeJoin(StringInfo str, MergeJoin *node)
{
char buf[500];
* HashJoin is a subclass of Join.
*/
static void
-_outHashJoin(StringInfo str, HashJoin * node)
+_outHashJoin(StringInfo str, HashJoin *node)
{
char buf[500];
* Scan is a subclass of Node
*/
static void
-_outScan(StringInfo str, Scan * node)
+_outScan(StringInfo str, Scan *node)
{
char buf[500];
* SeqScan is a subclass of Scan
*/
static void
-_outSeqScan(StringInfo str, SeqScan * node)
+_outSeqScan(StringInfo str, SeqScan *node)
{
char buf[500];
* IndexScan is a subclass of Scan
*/
static void
-_outIndexScan(StringInfo str, IndexScan * node)
+_outIndexScan(StringInfo str, IndexScan *node)
{
char buf[500];
* Temp is a subclass of Plan
*/
static void
-_outTemp(StringInfo str, Temp * node)
+_outTemp(StringInfo str, Temp *node)
{
char buf[500];
* Sort is a subclass of Temp
*/
static void
-_outSort(StringInfo str, Sort * node)
+_outSort(StringInfo str, Sort *node)
{
char buf[500];
}
static void
-_outGroup(StringInfo str, Group * node)
+_outGroup(StringInfo str, Group *node)
{
char buf[500];
* For some reason, unique is a subclass of Temp.
*/
static void
-_outUnique(StringInfo str, Unique * node)
+_outUnique(StringInfo str, Unique *node)
{
char buf[500];
* Hash is a subclass of Temp
*/
static void
-_outHash(StringInfo str, Hash * node)
+_outHash(StringInfo str, Hash *node)
{
char buf[500];
}
static void
-_outTee(StringInfo str, Tee * node)
+_outTee(StringInfo str, Tee *node)
{
char buf[500];
* Resdom is a subclass of Node
*/
static void
-_outResdom(StringInfo str, Resdom * node)
+_outResdom(StringInfo str, Resdom *node)
{
char buf[500];
}
static void
-_outFjoin(StringInfo str, Fjoin * node)
+_outFjoin(StringInfo str, Fjoin *node)
{
char buf[500];
int i;
* Expr is a subclass of Node
*/
static void
-_outExpr(StringInfo str, Expr * node)
+_outExpr(StringInfo str, Expr *node)
{
char buf[500];
char *opstr = NULL;
* Var is a subclass of Expr
*/
static void
-_outVar(StringInfo str, Var * node)
+_outVar(StringInfo str, Var *node)
{
char buf[500];
* Const is a subclass of Expr
*/
static void
-_outConst(StringInfo str, Const * node)
+_outConst(StringInfo str, Const *node)
{
char buf[500];
* Func is a subclass of Expr
*/
static void
-_outFunc(StringInfo str, Func * node)
+_outFunc(StringInfo str, Func *node)
{
char buf[500];
* Oper is a subclass of Expr
*/
static void
-_outOper(StringInfo str, Oper * node)
+_outOper(StringInfo str, Oper *node)
{
char buf[500];
* Param is a subclass of Expr
*/
static void
-_outParam(StringInfo str, Param * node)
+_outParam(StringInfo str, Param *node)
{
char buf[500];
* EState is a subclass of Node.
*/
static void
-_outEState(StringInfo str, EState * node)
+_outEState(StringInfo str, EState *node)
{
char buf[500];
* Stuff from relation.h
*/
static void
-_outRel(StringInfo str, Rel * node)
+_outRel(StringInfo str, Rel *node)
{
char buf[500];
* TargetEntry is a subclass of Node.
*/
static void
-_outTargetEntry(StringInfo str, TargetEntry * node)
+_outTargetEntry(StringInfo str, TargetEntry *node)
{
char buf[500];
}
static void
-_outRangeTblEntry(StringInfo str, RangeTblEntry * node)
+_outRangeTblEntry(StringInfo str, RangeTblEntry *node)
{
char buf[500];
* Path is a subclass of Node.
*/
static void
-_outPath(StringInfo str, Path * node)
+_outPath(StringInfo str, Path *node)
{
char buf[500];
* IndexPath is a subclass of Path.
*/
static void
-_outIndexPath(StringInfo str, IndexPath * node)
+_outIndexPath(StringInfo str, IndexPath *node)
{
char buf[500];
* JoinPath is a subclass of Path
*/
static void
-_outJoinPath(StringInfo str, JoinPath * node)
+_outJoinPath(StringInfo str, JoinPath *node)
{
char buf[500];
* MergePath is a subclass of JoinPath.
*/
static void
-_outMergePath(StringInfo str, MergePath * node)
+_outMergePath(StringInfo str, MergePath *node)
{
char buf[500];
* HashPath is a subclass of JoinPath.
*/
static void
-_outHashPath(StringInfo str, HashPath * node)
+_outHashPath(StringInfo str, HashPath *node)
{
char buf[500];
* OrderKey is a subclass of Node.
*/
static void
-_outOrderKey(StringInfo str, OrderKey * node)
+_outOrderKey(StringInfo str, OrderKey *node)
{
char buf[500];
* JoinKey is a subclass of Node.
*/
static void
-_outJoinKey(StringInfo str, JoinKey * node)
+_outJoinKey(StringInfo str, JoinKey *node)
{
char buf[500];
* MergeOrder is a subclass of Node.
*/
static void
-_outMergeOrder(StringInfo str, MergeOrder * node)
+_outMergeOrder(StringInfo str, MergeOrder *node)
{
char buf[500];
* CInfo is a subclass of Node.
*/
static void
-_outCInfo(StringInfo str, CInfo * node)
+_outCInfo(StringInfo str, CInfo *node)
{
char buf[500];
* JoinMethod is a subclass of Node.
*/
static void
-_outJoinMethod(StringInfo str, JoinMethod * node)
+_outJoinMethod(StringInfo str, JoinMethod *node)
{
char buf[500];
* HInfo is a subclass of JoinMethod.
*/
static void
-_outHInfo(StringInfo str, HInfo * node)
+_outHInfo(StringInfo str, HInfo *node)
{
char buf[500];
* JInfo is a subclass of Node.
*/
static void
-_outJInfo(StringInfo str, JInfo * node)
+_outJInfo(StringInfo str, JInfo *node)
{
char buf[500];
}
static void
-_outIter(StringInfo str, Iter * node)
+_outIter(StringInfo str, Iter *node)
{
appendStringInfo(str, "ITER");
}
static void
-_outStream(StringInfo str, Stream * node)
+_outStream(StringInfo str, Stream *node)
{
char buf[500];
}
static void
-_outValue(StringInfo str, Value * value)
+_outValue(StringInfo str, Value *value)
{
char buf[500];
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.8 1997/09/08 02:23:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.9 1997/09/08 21:44:10 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
#include "nodes/plannodes.h"
#include "optimizer/clauses.h"
-static char *plannode_type(Plan * p);
+static char *plannode_type(Plan *p);
/*
* print--
* print contents of range table
*/
void
-print_rt(List * rtable)
+print_rt(List *rtable)
{
List *l;
int i = 1;
* print an expression
*/
void
-print_expr(Node * expr, List * rtable)
+print_expr(Node *expr, List *rtable)
{
if (expr == NULL)
{
* temporary here. where is keys list of list??
*/
void
-print_keys(List * keys, List * rtable)
+print_keys(List *keys, List *rtable)
{
List *k;
* print targetlist in a more legible way.
*/
void
-print_tl(List * tlist, List * rtable)
+print_tl(List *tlist, List *rtable)
{
List *tl;
* print out the tuple with the given TupleTableSlot
*/
void
-print_slot(TupleTableSlot * slot)
+print_slot(TupleTableSlot *slot)
{
if (!slot->val)
{
}
static char *
-plannode_type(Plan * p)
+plannode_type(Plan *p)
{
switch (nodeTag(p))
{
*/
void
-print_plan_recursive(Plan * p, Query * parsetree, int indentLevel, char *label)
+print_plan_recursive(Plan *p, Query *parsetree, int indentLevel, char *label)
{
int i;
char extraInfo[100];
printf(" ");
printf("%s%s :c=%.4f :s=%d :w=%d ", label, plannode_type(p),
p->cost, p->plan_size, p->plan_width);
- if (IsA(p, Scan) || IsA(p, SeqScan))
+ if (IsA(p, Scan) ||IsA(p, SeqScan))
{
RangeTblEntry *rte;
prints just the plan node types */
void
-print_plan(Plan * p, Query * parsetree)
+print_plan(Plan *p, Query *parsetree)
{
print_plan_recursive(p, parsetree, 0, "");
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.8 1997/09/08 02:23:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.9 1997/09/08 21:44:11 momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
static Datum readDatum(Oid type);
static List *
-toIntList(List * list)
+toIntList(List *list)
{
List *l;
* ----------------
*/
static void
-_getPlan(Plan * node)
+_getPlan(Plan *node)
{
char *token;
int length;
else
{ /* Disgusting hack until I figure out what
* to do here */
- node->state = (EState *) ! NULL;
+ node->state = (EState *) !NULL;
}
token = lsptok(NULL, &length); /* eat :qptargetlist */
* ----------------
*/
static void
-_getJoin(Join * node)
+_getJoin(Join *node)
{
_getPlan((Plan *) node);
}
* ----------------
*/
static void
-_getScan(Scan * node)
+_getScan(Scan *node)
{
char *token;
int length;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_copy.c,v 1.3 1997/09/08 02:23:47 momjian Exp $
+ * $Id: geqo_copy.c,v 1.4 1997/09/08 21:44:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*
*/
void
-geqo_copy(Chromosome * chromo1, Chromosome * chromo2, int string_length)
+geqo_copy(Chromosome *chromo1, Chromosome *chromo2, int string_length)
{
int i;
* CX operator according to Oliver et al
* (Proc 2nd Int'l Conf on GA's)
*
-* $Id: geqo_cx.c,v 1.3 1997/09/08 02:23:49 momjian Exp $
+* $Id: geqo_cx.c,v 1.4 1997/09/08 21:44:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* cycle crossover
*/
int
-cx(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene, City * city_table)
+cx(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)
{
int i,
* geqo_erx.c--
* edge recombination crossover [ER]
*
-* $Id: geqo_erx.c,v 1.4 1997/09/08 02:23:52 momjian Exp $
+* $Id: geqo_erx.c,v 1.5 1997/09/08 21:44:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "optimizer/geqo_random.h"
-static int gimme_edge(Gene gene1, Gene gene2, Edge * edge_table);
-static void remove_gene(Gene gene, Edge edge, Edge * edge_table);
-static Gene gimme_gene(Edge edge, Edge * edge_table);
+static int gimme_edge(Gene gene1, Gene gene2, Edge *edge_table);
+static void remove_gene(Gene gene, Edge edge, Edge *edge_table);
+static Gene gimme_gene(Edge edge, Edge *edge_table);
-static Gene edge_failure(Gene * gene, int index, Edge * edge_table, int num_gene);
+static Gene edge_failure(Gene *gene, int index, Edge *edge_table, int num_gene);
/* alloc_edge_table--
*
*/
void
-free_edge_table(Edge * edge_table)
+free_edge_table(Edge *edge_table)
{
pfree(edge_table);
}
*
*/
float
-gimme_edge_table(Gene * tour1, Gene * tour2, int num_gene, Edge * edge_table)
+gimme_edge_table(Gene *tour1, Gene *tour2, int num_gene, Edge *edge_table)
{
int i,
index1,
* 0 if edge was already registered and edge_table is unchanged
*/
static int
-gimme_edge(Gene gene1, Gene gene2, Edge * edge_table)
+gimme_edge(Gene gene1, Gene gene2, Edge *edge_table)
{
int i;
int edges;
*
*/
int
-gimme_tour(Edge * edge_table, Gene * new_gene, int num_gene)
+gimme_tour(Edge *edge_table, Gene *new_gene, int num_gene)
{
int i;
int edge_failures = 0;
*
*/
static void
-remove_gene(Gene gene, Edge edge, Edge * edge_table)
+remove_gene(Gene gene, Edge edge, Edge *edge_table)
{
int i,
j;
*
*/
static Gene
-gimme_gene(Edge edge, Edge * edge_table)
+gimme_gene(Edge edge, Edge *edge_table)
{
int i;
Gene friend;
*
*/
static Gene
-edge_failure(Gene * gene, int index, Edge * edge_table, int num_gene)
+edge_failure(Gene *gene, int index, Edge *edge_table, int num_gene)
{
int i;
Gene fail_gene = gene[index];
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_eval.c,v 1.14 1997/09/08 02:23:53 momjian Exp $
+ * $Id: geqo_eval.c,v 1.15 1997/09/08 21:44:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "optimizer/geqo_paths.h"
-static List *gimme_clause_joins(Query * root, Rel * outer_rel, Rel * inner_rel);
-static Rel *gimme_clauseless_join(Rel * outer_rel, Rel * inner_rel);
-static Rel *init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo);
-static List *new_join_tlist(List * tlist, List * other_relids, int first_resdomno);
-static List *new_joininfo_list(List * joininfo_list, List * join_relids);
-static void geqo_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel);
-static Rel *geqo_nth(int stop, List * rels);
+static List *gimme_clause_joins(Query *root, Rel *outer_rel, Rel *inner_rel);
+static Rel *gimme_clauseless_join(Rel *outer_rel, Rel *inner_rel);
+static Rel *init_join_rel(Rel *outer_rel, Rel *inner_rel, JInfo *joininfo);
+static List *new_join_tlist(List *tlist, List *other_relids, int first_resdomno);
+static List *new_joininfo_list(List *joininfo_list, List *join_relids);
+static void geqo_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel);
+static Rel *geqo_nth(int stop, List *rels);
/*
* geqo_eval--
* Returns cost of a query tree as an individual of the population.
*/
Cost
-geqo_eval(Query * root, Gene * tour, int num_gene)
+geqo_eval(Query *root, Gene *tour, int num_gene)
{
Rel *joinrel;
Cost fitness;
* Returns a new join relation incorporating all joins in a left-sided tree.
*/
Rel *
-gimme_tree(Query * root, Gene * tour, int rel_count, int num_gene, Rel * outer_rel)
+gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, Rel *outer_rel)
{
Rel *inner_rel; /* current relation */
int base_rel_index;
*/
static List *
-gimme_clause_joins(Query * root, Rel * outer_rel, Rel * inner_rel)
+gimme_clause_joins(Query *root, Rel *outer_rel, Rel *inner_rel)
{
List *join_list = NIL;
List *i = NIL;
*/
static Rel *
-gimme_clauseless_join(Rel * outer_rel, Rel * inner_rel)
+gimme_clauseless_join(Rel *outer_rel, Rel *inner_rel)
{
return (init_join_rel(outer_rel, inner_rel, (JInfo *) NULL));
}
* Returns the new join relation node.
*/
static Rel *
-init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo)
+init_join_rel(Rel *outer_rel, Rel *inner_rel, JInfo *joininfo)
{
Rel *joinrel = makeNode(Rel);
List *joinrel_joininfo_list = NIL;
* Returns the new target list.
*/
static List *
-new_join_tlist(List * tlist,
- List * other_relids,
+new_join_tlist(List *tlist,
+ List *other_relids,
int first_resdomno)
{
int resdomno = first_resdomno - 1;
* Returns a list of joininfo nodes, new and old.
*/
static List *
-new_joininfo_list(List * joininfo_list, List * join_relids)
+new_joininfo_list(List *joininfo_list, List *join_relids)
{
List *current_joininfo_list = NIL;
List *new_otherrels = NIL;
* Modifies the joininfo field of appropriate rel nodes.
*/
static void
-geqo_add_new_joininfos(Query * root, List * joinrels, List * outerrels)
+geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
{
List *xjoinrel = NIL;
List *xrelid = NIL;
* Returns the list of final join relations.
*/
static List *
-geqo_final_join_rels(List * join_rel_list)
+geqo_final_join_rels(List *join_rel_list)
{
List *xrel = NIL;
List *temp = NIL;
* Modifies the superrels field of rel
*/
static void
-add_superrels(Rel * rel, Rel * super_rel)
+add_superrels(Rel *rel, Rel *super_rel)
{
rel->superrels = lappend(rel->superrels, super_rel);
}
* Returns non-nil if rel1 and rel2 do not overlap.
*/
static bool
-nonoverlap_rels(Rel * rel1, Rel * rel2)
+nonoverlap_rels(Rel *rel1, Rel *rel2)
{
return (nonoverlap_sets(rel1->relids, rel2->relids));
}
static bool
-nonoverlap_sets(List * s1, List * s2)
+nonoverlap_sets(List *s1, List *s2)
{
List *x = NIL;
* long join queries; so get logarithm of size when MAXINT overflow;
*/
static void
-geqo_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel)
+geqo_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel)
{
Cost temp;
int ntuples;
}
static Rel *
-geqo_nth(int stop, List * rels)
+geqo_nth(int stop, List *rels)
{
List *r;
int i = 1;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_main.c,v 1.5 1997/09/08 02:23:55 momjian Exp $
+ * $Id: geqo_main.c,v 1.6 1997/09/08 21:44:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
Rel *
-geqo(Query * root)
+geqo(Query *root)
{
int generation;
Chromosome *momma;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_misc.c,v 1.4 1997/09/08 02:23:57 momjian Exp $
+ * $Id: geqo_misc.c,v 1.5 1997/09/08 21:44:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_misc.h"
-static float avg_pool(Pool * pool);
+static float avg_pool(Pool *pool);
/* avg_pool--
*
*/
static float
-avg_pool(Pool * pool)
+avg_pool(Pool *pool)
{
int i;
double cumulative = 0.0;
/* print_pool--
*/
void
-print_pool(FILE * fp, Pool * pool, int start, int stop)
+print_pool(FILE *fp, Pool *pool, int start, int stop)
{
int i,
j;
*
*/
void
-print_gen(FILE * fp, Pool * pool, int generation)
+print_gen(FILE *fp, Pool *pool, int generation)
{
int lowest;
void
-print_edge_table(FILE * fp, Edge * edge_table, int num_gene)
+print_edge_table(FILE *fp, Edge *edge_table, int num_gene)
{
int i,
j;
*************************************************************/
void
-geqo_print_joinclauses(Query * root, List * clauses)
+geqo_print_joinclauses(Query *root, List *clauses)
{
List *l;
- extern void print_expr(Node * expr, List * rtable); /* in print.c */
+ extern void print_expr(Node *expr, List *rtable); /* in print.c */
foreach(l, clauses)
{
}
void
-geqo_print_path(Query * root, Path * path, int indent)
+geqo_print_path(Query *root, Path *path, int indent)
{
char *ptype = NULL;
JoinPath *jp;
}
void
-geqo_print_rel(Query * root, Rel * rel)
+geqo_print_rel(Query *root, Rel *rel)
{
List *l;
*
* TSP mutation routines
*
-* $Id: geqo_mutation.c,v 1.3 1997/09/08 02:23:57 momjian Exp $
+* $Id: geqo_mutation.c,v 1.4 1997/09/08 21:44:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "optimizer/geqo_mutation.h"
void
-geqo_mutation(Gene * tour, int num_gene)
+geqo_mutation(Gene *tour, int num_gene)
{
int swap1;
int swap2;
* OX1 operator according to Davis
* (Proc Int'l Joint Conf on AI)
*
-* $Id: geqo_ox1.c,v 1.3 1997/09/08 02:23:58 momjian Exp $
+* $Id: geqo_ox1.c,v 1.4 1997/09/08 21:44:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* position crossover
*/
void
-ox1(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene, City * city_table)
+ox1(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)
{
int left,
right,
* OX2 operator according to Syswerda
* (The Genetic Algorithms Handbook, ed L Davis)
*
-* $Id: geqo_ox2.c,v 1.3 1997/09/08 02:23:59 momjian Exp $
+* $Id: geqo_ox2.c,v 1.4 1997/09/08 21:44:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* position crossover
*/
void
-ox2(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene, City * city_table)
+ox2(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)
{
int k,
j,
*
* Copyright (c) 1994, Regents of the University of California
*
-* $Id: geqo_params.c,v 1.7 1997/09/08 02:24:00 momjian Exp $
+* $Id: geqo_params.c,v 1.8 1997/09/08 21:44:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* other cases return 0.
*/
static int
-next_token(FILE * fp, char *buf, int bufsz)
+next_token(FILE *fp, char *buf, int bufsz)
{
int c;
char *eb = buf + (bufsz - 1);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_paths.c,v 1.6 1997/09/08 02:24:05 momjian Exp $
+ * $Id: geqo_paths.c,v 1.7 1997/09/08 21:44:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/