diff options
author | Bruce Momjian | 1997-09-08 21:56:23 +0000 |
---|---|---|
committer | Bruce Momjian | 1997-09-08 21:56:23 +0000 |
commit | 59f6a57e59fe8353f9edaa3703516ea67e06672b (patch) | |
tree | 1b083fb66cf0be3890480a1ed5fb077dd7293790 | |
parent | 075cede74858a9a04e97097b1ccd555121516c20 (diff) |
Used modified version of indent that understands over 100 typedefs.
413 files changed, 4489 insertions, 4477 deletions
diff --git a/contrib/datetime/datetime_functions.c b/contrib/datetime/datetime_functions.c index a59bd20db6..d2c097583c 100644 --- a/contrib/datetime/datetime_functions.c +++ b/contrib/datetime/datetime_functions.c @@ -14,7 +14,7 @@ TimeADT * -time_difference(TimeADT * time1, TimeADT * time2) +time_difference(TimeADT *time1, TimeADT *time2) { TimeADT *result = (TimeADT *) palloc(sizeof(TimeADT)); @@ -51,25 +51,25 @@ currentdate() } 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; @@ -80,7 +80,7 @@ day(DateADT * date) } int4 -month(DateADT * date) +month(DateADT *date) { struct tm tm; @@ -91,7 +91,7 @@ month(DateADT * date) } int4 -year(DateADT * date) +year(DateADT *date) { struct tm tm; @@ -102,7 +102,7 @@ year(DateADT * date) } int4 -asminutes(TimeADT * time) +asminutes(TimeADT *time) { int seconds = (int) *time; @@ -110,7 +110,7 @@ asminutes(TimeADT * time) } int4 -asseconds(TimeADT * time) +asseconds(TimeADT *time) { int seconds = (int) *time; diff --git a/contrib/int8/int8.c b/contrib/int8/int8.c index ac59515a2c..6685370592 100644 --- a/contrib/int8/int8.c +++ b/contrib/int8/int8.c @@ -71,7 +71,7 @@ int64 *int48(int32 val); int32 int84(int64 * val); #if FALSE -int64 *int28(int16 val); +int64 *int28 (int16 val); int16 int82(int64 * val); #endif @@ -340,7 +340,7 @@ int84(int64 * val) #if FALSE int64 * -int28(int16 val) +int28 (int16 val) { int64 *result; diff --git a/contrib/pginterface/halt.c b/contrib/pginterface/halt.c index a9db390de7..f56385898f 100644 --- a/contrib/pginterface/halt.c +++ b/contrib/pginterface/halt.c @@ -44,17 +44,17 @@ va_dcl 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); } diff --git a/contrib/soundex/soundex.c b/contrib/soundex/soundex.c index 9b06808fa2..20b99759a1 100644 --- a/contrib/soundex/soundex.c +++ b/contrib/soundex/soundex.c @@ -14,7 +14,7 @@ char *soundex(char *instr, char *outstr); text * -text_soundex(text * t) +text_soundex(text *t) { /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */ char *table = "01230120022455012623010202"; diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index 9ce59d8165..ee3c3e9e35 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -8,7 +8,7 @@ * * * 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 @@ -116,7 +116,7 @@ DataFill(char *data, Datum value[], char nulls[], char *infomask, - bits8 * bit) + bits8 *bit) { bits8 *bitP = 0; int bitmask = 0; @@ -448,7 +448,7 @@ char * 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 */ diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index e0a6e2ba5c..d2f1ba92ab 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -29,7 +29,7 @@ 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 @@ -137,7 +137,7 @@ static char * 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 */ @@ -368,7 +368,7 @@ fastgetiattr(IndexTuple tup, off = SHORTALIGN(off) +sizeof(short); break; case sizeof(int32): - off = INTALIGN(off) + sizeof(int32); + off = INTALIGN(off) +sizeof(int32); break; case -1: usecache = false; @@ -430,7 +430,7 @@ Datum index_getattr(IndexTuple tuple, AttrNumber attNum, TupleDesc tupDesc, - bool * isNullOutP) + bool *isNullOutP) { Assert(attNum > 0); @@ -483,7 +483,7 @@ IndexInfoFindDataOffset(unsigned short t_info) * 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; diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c index f0bcd60493..18be4d120c 100644 --- a/src/backend/access/common/tupdesc.c +++ b/src/backend/access/common/tupdesc.c @@ -7,7 +7,7 @@ * * * 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 @@ -437,7 +437,7 @@ TupleDescMakeSelfReference(TupleDesc desc, * ---------------------------------------------------------------- */ TupleDesc -BuildDescForRelation(List * schema, char *relname) +BuildDescForRelation(List *schema, char *relname) { int natts; AttrNumber attnum; diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index b35cf77573..a66244eda0 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -34,42 +34,42 @@ /* 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 @@ -81,9 +81,9 @@ gistbuild(Relation heap, AttrNumber *attnum, IndexStrategy istrat, uint16 pint, - Datum * params, - FuncIndexInfo * finfo, - PredInfo * predInfo) + Datum *params, + FuncIndexInfo *finfo, + PredInfo *predInfo) { HeapScanDesc scan; Buffer buffer; @@ -328,7 +328,7 @@ gistbuild(Relation heap, * 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; @@ -374,15 +374,15 @@ gistinsert(Relation r, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation ** 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; @@ -403,7 +403,7 @@ gistPageAddItem(GISTSTATE * giststate, && 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)); } @@ -411,7 +411,7 @@ gistPageAddItem(GISTSTATE * giststate, static InsertIndexResult gistdoinsert(Relation r, IndexTuple itup, /* itup contains compressed entry */ - GISTSTATE * giststate) + GISTSTATE *giststate) { GISTENTRY tmpdentry; InsertIndexResult res; @@ -468,8 +468,8 @@ static BlockNumber 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; @@ -520,11 +520,11 @@ gistChooseSubtree(Relation r, IndexTuple itup, /* itup has compressed 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; @@ -603,14 +603,14 @@ gistAdjustKeys(Relation r, /* 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); @@ -644,9 +644,9 @@ gistAdjustKeys(Relation r, static InsertIndexResult gistSplit(Relation r, Buffer buffer, - GISTSTACK * stack, + GISTSTACK *stack, IndexTuple itup, /* contains compressed entry */ - GISTSTATE * giststate) + GISTSTATE *giststate) { Page p; Buffer leftbuf, @@ -861,9 +861,9 @@ gistSplit(Relation r, 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 */ @@ -884,10 +884,10 @@ gistSplit(Relation r, */ 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; @@ -899,7 +899,7 @@ gistintinsert(Relation r, /* 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); } @@ -908,8 +908,8 @@ gistintinsert(Relation r, ** 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; @@ -950,8 +950,8 @@ gistentryinserttwo(Relation r, GISTSTACK * stk, IndexTuple ltup, ** 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; @@ -990,7 +990,7 @@ gistentryinsert(Relation r, GISTSTACK * stk, IndexTuple tup, static void -gistnewroot(GISTSTATE * giststate, Relation r, IndexTuple lt, IndexTuple rt) +gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt) { Buffer b; Page p; @@ -1042,7 +1042,7 @@ GISTInitBuffer(Buffer b, uint32 f) */ static OffsetNumber gistchoose(Relation r, Page p, IndexTuple it, /* it has compressed entry */ - GISTSTATE * giststate) + GISTSTATE *giststate) { OffsetNumber maxoff; OffsetNumber i; @@ -1095,7 +1095,7 @@ gistnospace(Page p, IndexTuple it) } void -gistfreestack(GISTSTACK * s) +gistfreestack(GISTSTACK *s) { GISTSTACK *p; @@ -1140,7 +1140,7 @@ gistdelete(Relation r, ItemPointer tid) } void -initGISTstate(GISTSTATE * giststate, Relation index) +initGISTstate(GISTSTATE *giststate, Relation index) { RegProcedure consistent_proc, union_proc, @@ -1237,7 +1237,7 @@ gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t) 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); @@ -1250,7 +1250,7 @@ gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t) ** 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; @@ -1271,7 +1271,7 @@ gistdentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr, Relation r, ** 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; @@ -1351,7 +1351,7 @@ _gistdump(Relation r) #ifdef NOT_USED static char * -text_range_out(TXTRANGE * r) +text_range_out(TXTRANGE *r) { char *result; char *lower, @@ -1378,7 +1378,7 @@ text_range_out(TXTRANGE * r) #endif static char * -int_range_out(INTRANGE * r) +int_range_out(INTRANGE *r) { char *result; diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index 0820389ff4..3e09374584 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -37,7 +37,7 @@ static RetrieveIndexResult gistnext(IndexScanDesc s, ScanDirection dir); 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); @@ -252,7 +252,7 @@ gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc, int scanKeySize, ScanKey key, - GISTSTATE * giststate, + GISTSTATE *giststate, Relation r, Page p, OffsetNumber offset) diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c index 6707099775..ee5d93e056 100644 --- a/src/backend/access/gist/gistscan.c +++ b/src/backend/access/gist/gistscan.c @@ -33,7 +33,7 @@ static void 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, @@ -53,7 +53,7 @@ typedef struct GISTScanListData { IndexScanDesc gsl_scan; struct GISTScanListData *gsl_next; -} GISTScanListData; +} GISTScanListData; typedef GISTScanListData *GISTScanList; @@ -418,7 +418,7 @@ adjustiptr(IndexScanDesc s, */ /*ARGSUSED*/ static void -adjuststack(GISTSTACK * stk, +adjuststack(GISTSTACK *stk, BlockNumber blkno, OffsetNumber offnum) { diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c index 427c222dfc..93ae288537 100644 --- a/src/backend/access/hash/hash.c +++ b/src/backend/access/hash/hash.c @@ -7,7 +7,7 @@ * * * 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. @@ -48,9 +48,9 @@ hashbuild(Relation heap, AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, - Datum * params, - FuncIndexInfo * finfo, - PredInfo * predInfo) + Datum *params, + FuncIndexInfo *finfo, + PredInfo *predInfo) { HeapScanDesc hscan; Buffer buffer; @@ -278,7 +278,7 @@ hashbuild(Relation heap, * 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; diff --git a/src/backend/access/hash/hashfunc.c b/src/backend/access/hash/hashfunc.c index 1178586769..8da88101dd 100644 --- a/src/backend/access/hash/hashfunc.c +++ b/src/backend/access/hash/hashfunc.c @@ -7,7 +7,7 @@ * * * 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 @@ -23,7 +23,7 @@ uint32 hashint2(int16 key) { - return ((uint32) ~ key); + return ((uint32) ~key); } uint32 @@ -130,7 +130,7 @@ hashfloat8(float64 keyp) uint32 hashoid(Oid key) { - return ((uint32) ~ key); + return ((uint32) ~key); } @@ -204,7 +204,7 @@ hashchar8(char *key) } uint32 -hashname(NameData * n) +hashname(NameData *n) { uint32 h; int len; diff --git a/src/backend/access/hash/hashscan.c b/src/backend/access/hash/hashscan.c index de64ebdd06..777fb3a5cf 100644 --- a/src/backend/access/hash/hashscan.c +++ b/src/backend/access/hash/hashscan.c @@ -7,7 +7,7 @@ * * * 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 @@ -38,7 +38,7 @@ typedef struct HashScanListData { IndexScanDesc hashsl_scan; struct HashScanListData *hashsl_next; -} HashScanListData; +} HashScanListData; typedef HashScanListData *HashScanList; diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c index 4c161edb89..0ebb301c87 100644 --- a/src/backend/access/hash/hashsearch.c +++ b/src/backend/access/hash/hashsearch.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -127,7 +127,7 @@ _hash_next(IndexScanDesc scan, ScanDirection dir) static void _hash_readnext(Relation rel, - Buffer *bufp, Page * pagep, HashPageOpaque * opaquep) + Buffer *bufp, Page *pagep, HashPageOpaque *opaquep) { BlockNumber blkno; @@ -146,7 +146,7 @@ _hash_readnext(Relation rel, static void _hash_readprev(Relation rel, - Buffer *bufp, Page * pagep, HashPageOpaque * opaquep) + Buffer *bufp, Page *pagep, HashPageOpaque *opaquep) { BlockNumber blkno; diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index e1f969dffa..19bdf5b34c 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -7,7 +7,7 @@ * * * 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 @@ -1188,7 +1188,7 @@ heap_insert(Relation relation, HeapTuple tup) */ SetRefreshWhenInvalidate(ImmediateInvalidation); RelationInvalidateHeapTuple(relation, tup); - SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation); + SetRefreshWhenInvalidate((bool) !ImmediateInvalidation); } return (tup->t_oid); @@ -1287,7 +1287,7 @@ heap_delete(Relation relation, ItemPointer tid) */ SetRefreshWhenInvalidate(ImmediateInvalidation); RelationInvalidateHeapTuple(relation, tp); - SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation); + SetRefreshWhenInvalidate((bool) !ImmediateInvalidation); WriteBuffer(b); if (IsSystemRelationName(RelationGetRelationName(relation)->data)) @@ -1441,7 +1441,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup) */ SetRefreshWhenInvalidate(ImmediateInvalidation); RelationInvalidateHeapTuple(relation, tp); - SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation); + SetRefreshWhenInvalidate((bool) !ImmediateInvalidation); WriteBuffer(buffer); diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 9d0eee39b6..c2b1642caf 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -7,7 +7,7 @@ * * * 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 @@ -162,7 +162,7 @@ index_close(Relation relation) */ InsertIndexResult index_insert(Relation relation, - Datum * datum, + Datum *datum, char *nulls, ItemPointer heap_t_ctid, Relation heapRel) @@ -371,8 +371,8 @@ GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc, int attOff, AttrNumber attrNums[], - FuncIndexInfo * fInfo, - bool * attNull, + FuncIndexInfo *fInfo, + bool *attNull, Buffer buffer) { Datum returnVal; diff --git a/src/backend/access/index/istrat.c b/src/backend/access/index/istrat.c index 9cc9c06e98..d47ceed6d6 100644 --- a/src/backend/access/index/istrat.c +++ b/src/backend/access/index/istrat.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -540,7 +540,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation, */ void IndexSupportInitialize(IndexStrategy indexStrategy, - RegProcedure * indexSupport, + RegProcedure *indexSupport, Oid indexObjectId, Oid accessMethodObjectId, StrategyNumber maxStrategyNumber, diff --git a/src/backend/access/nbtree/nbtcompare.c b/src/backend/access/nbtree/nbtcompare.c index f107e2138a..55942379dc 100644 --- a/src/backend/access/nbtree/nbtcompare.c +++ b/src/backend/access/nbtree/nbtcompare.c @@ -7,7 +7,7 @@ * * * 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 @@ -126,7 +126,7 @@ btchar16cmp(char *a, char *b) } int32 -btnamecmp(NameData * a, NameData * b) +btnamecmp(NameData *a, NameData *b) { return (strncmp(a->data, b->data, NAMEDATALEN)); } diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 53c56d43ec..f634cf6715 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -435,7 +435,7 @@ _bt_insertonpg(Relation rel, 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); diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c index 203772ee2d..0bdd55d732 100644 --- a/src/backend/access/nbtree/nbtree.c +++ b/src/backend/access/nbtree/nbtree.c @@ -8,7 +8,7 @@ * * * 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. @@ -59,9 +59,9 @@ btbuild(Relation heap, AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, - Datum * params, - FuncIndexInfo * finfo, - PredInfo * predInfo) + Datum *params, + FuncIndexInfo *finfo, + PredInfo *predInfo) { HeapScanDesc hscan; Buffer buffer; @@ -356,7 +356,7 @@ btbuild(Relation heap, * 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; diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index 5cfc12e8cc..154c3a81bf 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -5,7 +5,7 @@ * * * 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 * @@ -800,7 +800,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool) * 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; diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index 0ee1ef9d32..2b77d77d4b 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -347,7 +347,7 @@ _bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz) #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; diff --git a/src/backend/access/rtree/rtproc.c b/src/backend/access/rtree/rtproc.c index b2c967e585..d93285c231 100644 --- a/src/backend/access/rtree/rtproc.c +++ b/src/backend/access/rtree/rtproc.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -87,7 +87,7 @@ rt_bigbox_size(BOX *a, float *size) } POLYGON * -rt_poly_union(POLYGON * a, POLYGON * b) +rt_poly_union(POLYGON *a, POLYGON *b) { POLYGON *p; @@ -107,7 +107,7 @@ rt_poly_union(POLYGON * a, POLYGON * b) } void -rt_poly_size(POLYGON * a, float *size) +rt_poly_size(POLYGON *a, float *size) { double xdim, ydim; @@ -129,7 +129,7 @@ rt_poly_size(POLYGON * a, float *size) } POLYGON * -rt_poly_inter(POLYGON * a, POLYGON * b) +rt_poly_inter(POLYGON *a, POLYGON *b) { POLYGON *p; diff --git a/src/backend/access/rtree/rtree.c b/src/backend/access/rtree/rtree.c index 2d18f20540..02d8aaead3 100644 --- a/src/backend/access/rtree/rtree.c +++ b/src/backend/access/rtree/rtree.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -40,38 +40,38 @@ typedef struct SPLITVEC 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 @@ -81,9 +81,9 @@ rtbuild(Relation heap, AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, - Datum * params, - FuncIndexInfo * finfo, - PredInfo * predInfo) + Datum *params, + FuncIndexInfo *finfo, + PredInfo *predInfo) { HeapScanDesc scan; Buffer buffer; @@ -305,7 +305,7 @@ rtbuild(Relation heap, * 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; @@ -324,7 +324,7 @@ rtinsert(Relation r, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation h } static InsertIndexResult -rtdoinsert(Relation r, IndexTuple itup, RTSTATE * rtstate) +rtdoinsert(Relation r, IndexTuple itup, RTSTATE *rtstate) { Page page; Buffer buffer; @@ -409,10 +409,10 @@ rtdoinsert(Relation r, IndexTuple itup, RTSTATE * rtstate) static void rttighten(Relation r, - RTSTACK * stk, + RTSTACK *stk, char *datum, int att_size, - RTSTATE * rtstate) + RTSTATE *rtstate) { char *oldud; char *tdatum; @@ -483,9 +483,9 @@ rttighten(Relation r, static InsertIndexResult dosplit(Relation r, Buffer buffer, - RTSTACK * stack, + RTSTACK *stack, IndexTuple itup, - RTSTATE * rtstate) + RTSTATE *rtstate) { Page p; Buffer leftbuf, @@ -614,9 +614,9 @@ dosplit(Relation r, 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 */ @@ -633,10 +633,10 @@ dosplit(Relation r, static void rtintinsert(Relation r, - RTSTACK * stk, + RTSTACK *stk, IndexTuple ltup, IndexTuple rtup, - RTSTATE * rtstate) + RTSTATE *rtstate) { IndexTuple old; Buffer b; @@ -714,9 +714,9 @@ rtnewroot(Relation r, IndexTuple lt, IndexTuple rt) static void picksplit(Relation r, Page page, - SPLITVEC * v, + SPLITVEC *v, IndexTuple itup, - RTSTATE * rtstate) + RTSTATE *rtstate) { OffsetNumber maxoff; OffsetNumber i, @@ -900,7 +900,7 @@ RTInitBuffer(Buffer b, uint32 f) } static OffsetNumber -choose(Relation r, Page p, IndexTuple it, RTSTATE * rtstate) +choose(Relation r, Page p, IndexTuple it, RTSTATE *rtstate) { OffsetNumber maxoff; OffsetNumber i; @@ -944,7 +944,7 @@ nospace(Page p, IndexTuple it) } void -freestack(RTSTACK * s) +freestack(RTSTACK *s) { RTSTACK *p; @@ -986,7 +986,7 @@ rtdelete(Relation r, ItemPointer tid) } static void -initRtstate(RTSTATE * rtstate, Relation index) +initRtstate(RTSTATE *rtstate, Relation index) { RegProcedure union_proc, size_proc, diff --git a/src/backend/access/rtree/rtscan.c b/src/backend/access/rtree/rtscan.c index 2a4810ccae..73038a2ee8 100644 --- a/src/backend/access/rtree/rtscan.c +++ b/src/backend/access/rtree/rtscan.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -34,7 +34,7 @@ static void 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, @@ -54,7 +54,7 @@ typedef struct RTScanListData { IndexScanDesc rtsl_scan; struct RTScanListData *rtsl_next; -} RTScanListData; +} RTScanListData; typedef RTScanListData *RTScanList; @@ -421,7 +421,7 @@ adjustiptr(IndexScanDesc s, */ /*ARGSUSED*/ static void -adjuststack(RTSTACK * stk, +adjuststack(RTSTACK *stk, BlockNumber blkno, OffsetNumber offnum) { diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c index 9d5724fad1..91c7ec8a3d 100644 --- a/src/backend/access/transam/transam.c +++ b/src/backend/access/transam/transam.c @@ -7,7 +7,7 @@ * * * 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 @@ -134,7 +134,7 @@ SetRecoveryCheckingEnabled(bool state) * -------------------------------- */ -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 */ diff --git a/src/backend/access/transam/transsup.c b/src/backend/access/transam/transsup.c index 15645d61b1..227c47ef54 100644 --- a/src/backend/access/transam/transsup.c +++ b/src/backend/access/transam/transsup.c @@ -7,7 +7,7 @@ * * * 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 @@ -111,7 +111,7 @@ TransComputeBlockNumber(Relation relation, /* relation to test */ static XidStatus TransBlockGetLastTransactionIdStatus(Block tblock, TransactionId baseXid, - TransactionId * returnXidP) + TransactionId *returnXidP) { Index index; Index maxIndex; @@ -392,7 +392,7 @@ XidStatus TransBlockNumberGetXidStatus(Relation relation, BlockNumber blockNumber, TransactionId xid, - bool * failP) + bool *failP) { Buffer buffer; /* buffer associated with block */ Block block; /* block containing xstatus */ @@ -449,7 +449,7 @@ TransBlockNumberSetXidStatus(Relation relation, BlockNumber blockNumber, TransactionId xid, XidStatus xstatus, - bool * failP) + bool *failP) { Buffer buffer; /* buffer associated with block */ Block block; /* block containing xstatus */ @@ -502,7 +502,7 @@ AbsoluteTime TransBlockNumberGetCommitTime(Relation relation, BlockNumber blockNumber, TransactionId xid, - bool * failP) + bool *failP) { Buffer buffer; /* buffer associated with block */ Block block; /* block containing commit time */ @@ -563,7 +563,7 @@ TransBlockNumberSetCommitTime(Relation relation, BlockNumber blockNumber, TransactionId xid, AbsoluteTime xtime, - bool * failP) + bool *failP) { Buffer buffer; /* buffer associated with block */ Block block; /* block containing commit time */ @@ -618,7 +618,7 @@ void TransGetLastRecordedTransaction(Relation relation, TransactionId xid, /* return: transaction * id */ - bool * failP) + bool *failP) { BlockNumber blockNumber; /* block number */ Buffer buffer; /* buffer associated with block */ diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c index fb44b210be..7fdbfd3bcc 100644 --- a/src/backend/access/transam/varsup.c +++ b/src/backend/access/transam/varsup.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -20,12 +20,12 @@ #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 @@ -43,7 +43,7 @@ int OidGenLockId; * -------------------------------- */ static void -VariableRelationGetNextXid(TransactionId * xidP) +VariableRelationGetNextXid(TransactionId *xidP) { Buffer buf; VariableRelationContents var; @@ -85,7 +85,7 @@ VariableRelationGetNextXid(TransactionId * xidP) * -------------------------------- */ static void -VariableRelationGetLastXid(TransactionId * xidP) +VariableRelationGetLastXid(TransactionId *xidP) { Buffer buf; VariableRelationContents var; @@ -217,7 +217,7 @@ VariableRelationPutLastXid(TransactionId xid) * -------------------------------- */ static void -VariableRelationGetNextOid(Oid * oid_return) +VariableRelationGetNextOid(Oid *oid_return) { Buffer buf; VariableRelationContents var; @@ -287,7 +287,7 @@ VariableRelationGetNextOid(Oid * oid_return) * -------------------------------- */ static void -VariableRelationPutNextOid(Oid * oidP) +VariableRelationPutNextOid(Oid *oidP) { Buffer buf; VariableRelationContents var; @@ -387,7 +387,7 @@ static int prefetched_xid_count = 0; static TransactionId next_prefetched_xid; void -GetNewTransactionId(TransactionId * xid) +GetNewTransactionId(TransactionId *xid) { TransactionId nextid; @@ -497,7 +497,7 @@ UpdateLastCommittedXid(TransactionId xid) * ---------------- */ 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 */ { @@ -558,7 +558,7 @@ static int prefetched_oid_count = 0; 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 diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index b6ff2dd296..e5e1057bba 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -7,7 +7,7 @@ * * * 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: @@ -202,9 +202,9 @@ TransactionState CurrentTransactionState = * 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; */ diff --git a/src/backend/access/transam/xid.c b/src/backend/access/transam/xid.c index 9cfc8235d4..b60c6ba7ef 100644 --- a/src/backend/access/transam/xid.c +++ b/src/backend/access/transam/xid.c @@ -7,7 +7,7 @@ * * * 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 @@ -73,7 +73,7 @@ xidout(TransactionId transactionId) * ---------------------------------------------------------------- */ void -StoreInvalidTransactionId(TransactionId * destination) +StoreInvalidTransactionId(TransactionId *destination) { *destination = NullTransactionId; } @@ -86,7 +86,7 @@ StoreInvalidTransactionId(TransactionId * destination) */ void TransactionIdStore(TransactionId transactionId, - TransactionId * destination) + TransactionId *destination) { *destination = transactionId; } @@ -134,7 +134,7 @@ xideq(TransactionId xid1, TransactionId xid2) */ #ifdef NOT_USED void -TransactionIdIncrement(TransactionId * transactionId) +TransactionIdIncrement(TransactionId *transactionId) { (*transactionId)++; @@ -150,7 +150,7 @@ TransactionIdIncrement(TransactionId * transactionId) * ---------------------------------------------------------------- */ void -TransactionIdAdd(TransactionId * xid, int value) +TransactionIdAdd(TransactionId *xid, int value) { *xid += value; return; diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index ff0c5ef7ba..829ad1b634 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -7,7 +7,7 @@ * 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 $ * *------------------------------------------------------------------------- */ @@ -108,7 +108,7 @@ static hashnode *AddStr(char *str, int strlength, int mderef); 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); @@ -234,7 +234,7 @@ typedef struct _IndexList FuncIndexInfo *il_finfo; PredInfo *il_predInfo; struct _IndexList *il_next; -} IndexList; +} IndexList; static IndexList *ILHead = (IndexList *) NULL; @@ -1002,7 +1002,7 @@ CompHash(char *str, int len) * ---------------- */ static hashnode * -FindStr(char *str, int length, hashnode * mderef) +FindStr(char *str, int length, hashnode *mderef) { hashnode *node; @@ -1113,9 +1113,9 @@ index_register(char *heap, int natts, AttrNumber *attnos, uint16 nparams, - Datum * params, - FuncIndexInfo * finfo, - PredInfo * predInfo) + Datum *params, + FuncIndexInfo *finfo, + PredInfo *predInfo) { Datum *v; IndexList *newind; diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c index 779dfec4b2..09eac542ee 100644 --- a/src/backend/catalog/catalog.c +++ b/src/backend/catalog/catalog.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -183,7 +183,7 @@ fillatt(TupleDesc tupleDesc) } else { - (*attributeP)->attnum = (int16)++ i; + (*attributeP)->attnum = (int16) ++i; /* * Check if the attr is a set before messing with the length diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 4c6c421758..a3fd606403 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -7,7 +7,7 @@ * * * 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 @@ -164,7 +164,7 @@ typedef struct tempRelList int num; /* number of temporary relations */ int size; /* size of space allocated for the rels * array */ -} TempRelList; +} TempRelList; #define TEMP_REL_LIST_SIZE 32 @@ -1518,10 +1518,10 @@ DestroyTempRels(void) 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) @@ -1598,7 +1598,7 @@ start:; } static void -StoreRelCheck(Relation rel, ConstrCheck * check) +StoreRelCheck(Relation rel, ConstrCheck *check) { char str[MAX_PARSE_BUFFER]; QueryTreeList *queryTree_list; diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index d6459fbe2b..7255593330 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -7,7 +7,7 @@ * * * 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 @@ -67,10 +67,10 @@ static Oid 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); @@ -83,14 +83,14 @@ static void 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 @@ -269,7 +269,7 @@ GetHeapRelationOid(char *heapRelationName, char *indexRelationName) } static TupleDesc -BuildFuncTupleDesc(FuncIndexInfo * funcInfo) +BuildFuncTupleDesc(FuncIndexInfo *funcInfo) { HeapTuple tuple; TupleDesc funcTupDesc; @@ -334,7 +334,7 @@ BuildFuncTupleDesc(FuncIndexInfo * funcInfo) static TupleDesc ConstructTupleDescriptor(Oid heapoid, Relation heapRelation, - List * attributeList, + List *attributeList, int numatts, AttrNumber attNums[]) { @@ -777,12 +777,12 @@ AppendAttributeTuples(Relation indexRelation, int numatts) 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) { @@ -901,7 +901,7 @@ UpdateIndexRelation(Oid indexoid, * ---------------------------------------------------------------- */ void -UpdateIndexPredicate(Oid indexoid, Node * oldPred, Node * predicate) +UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate) { Node *newPred; char *predString; @@ -1065,15 +1065,15 @@ InitIndexStrategy(int numatts, 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) { @@ -1321,7 +1321,7 @@ FormIndexDatum(int numberOfAttributes, HeapTuple heapTuple, TupleDesc heapDescriptor, Buffer buffer, - Datum * datum, + Datum *datum, char *nullv, FuncIndexInfoPtr fInfo) { @@ -1379,7 +1379,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex) 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); /* ---------------- @@ -1501,8 +1501,8 @@ UpdateStats(Oid relid, long reltuples, bool hasindex) * ------------------------- */ void -FillDummyExprContext(ExprContext * econtext, - TupleTableSlot * slot, +FillDummyExprContext(ExprContext *econtext, + TupleTableSlot *slot, TupleDesc tupdesc, Buffer buffer) { @@ -1532,7 +1532,7 @@ DefaultBuild(Relation heapRelation, uint16 parameterCount, /* not used */ Datum parameter[], /* not used */ FuncIndexInfoPtr funcInfo, - PredInfo * predInfo) + PredInfo *predInfo) { HeapScanDesc scan; HeapTuple heapTuple; @@ -1732,9 +1732,9 @@ index_build(Relation heapRelation, int numberOfAttributes, AttrNumber attributeNumber[], uint16 parameterCount, - Datum * parameter, - FuncIndexInfo * funcInfo, - PredInfo * predInfo) + Datum *parameter, + FuncIndexInfo *funcInfo, + PredInfo *predInfo) { RegProcedure procedure; diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c index 4e36b1ecd6..1927d84f06 100644 --- a/src/backend/catalog/indexing.c +++ b/src/backend/catalog/indexing.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -88,7 +88,7 @@ CatalogOpenIndices(int nIndices, char *names[], Relation idescs[]) * This is the inverse routine to CatalogOpenIndices() */ void -CatalogCloseIndices(int nIndices, Relation * idescs) +CatalogCloseIndices(int nIndices, Relation *idescs) { int i; @@ -103,7 +103,7 @@ CatalogCloseIndices(int nIndices, Relation * idescs) * each catalog index. */ void -CatalogIndexInsert(Relation * idescs, +CatalogIndexInsert(Relation *idescs, int nIndices, Relation heapRelation, HeapTuple heapTuple) @@ -345,7 +345,7 @@ HeapTuple ProcedureNameIndexScan(Relation heapRelation, char *procName, int nargs, - Oid * argTypes) + Oid *argTypes) { Relation idesc; ScanKeyData skey; @@ -435,7 +435,7 @@ ProcedureNameIndexScan(Relation heapRelation, HeapTuple -ProcedureSrcIndexScan(Relation heapRelation, text * procSrc) +ProcedureSrcIndexScan(Relation heapRelation, text *procSrc) { Relation idesc; IndexScanDesc sd; diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c index 32c89110c0..95287334a6 100644 --- a/src/backend/catalog/pg_aggregate.c +++ b/src/backend/catalog/pg_aggregate.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -268,7 +268,7 @@ AggregateCreate(char *aggName, } char * -AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool * isNull) +AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull) { HeapTuple tup; Relation aggRel; diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index e135784ca6..50c74c8d78 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -52,7 +52,7 @@ ProcedureCreate(char *procedureName, int32 perbyte_cpu, int32 percall_cpu, int32 outin_ratio, - List * argList, + List *argList, CommandDest dest) { register i; diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c index 63bae1ec59..b6fe76bc1f 100644 --- a/src/backend/catalog/pg_type.c +++ b/src/backend/catalog/pg_type.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -47,7 +47,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, static Oid TypeGetWithOpenRelation(Relation pg_type_desc, char *typeName, - bool * defined) + bool *defined) { HeapScanDesc scan; HeapTuple tup; @@ -116,7 +116,7 @@ TypeGetWithOpenRelation(Relation pg_type_desc, */ 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; diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index 0e409396ac..c8e13949af 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -7,7 +7,7 @@ * * * 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 @@ -255,7 +255,7 @@ void PerformAddAttribute(char *relationName, char *userName, bool inherits, - ColumnDef * colDef) + ColumnDef *colDef) { Relation relrdesc, attrdesc; diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 9fa3ad163d..ba8df5ff8d 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -6,7 +6,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -42,8 +42,8 @@ /* 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); @@ -51,17 +51,17 @@ static Oid IsTypeByVal(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, @@ -197,7 +197,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, 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; @@ -356,7 +356,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE * fp, char *delim) } 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; @@ -648,17 +648,17 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE * fp, char *delim) 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: @@ -904,12 +904,12 @@ typedef struct rel_list { 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; @@ -1002,7 +1002,7 @@ inString(char c, char *s) */ void -CopyReadNewline(FILE * fp, int *newline) +CopyReadNewline(FILE *fp, int *newline) { if (!*newline) { @@ -1028,9 +1028,9 @@ CopyReadNewline(FILE * fp, int *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]; @@ -1151,7 +1151,7 @@ CopyReadAttribute(FILE * fp, bool * isnull, char *delim) } static void -CopyAttributeOut(FILE * fp, char *string, char *delim) +CopyAttributeOut(FILE *fp, char *string, char *delim) { char c; int is_array = false; diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c index e1dac613fe..36d81bdc4e 100644 --- a/src/backend/commands/creatinh.c +++ b/src/backend/commands/creatinh.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -35,9 +35,9 @@ 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 -- @@ -45,7 +45,7 @@ static void StoreCatalogInheritance(Oid relationId, List * supers); * ---------------------------------------------------------------- */ void -DefineRelation(CreateStmt * stmt) +DefineRelation(CreateStmt *stmt) { char *relname = palloc(NAMEDATALEN); List *schema = stmt->tableElts; @@ -280,7 +280,7 @@ RemoveRelation(char *name) * 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; @@ -459,7 +459,7 @@ MergeAttributes(List * schema, List * supers, List ** supconstr) * Updates the system catalogs with proper inheritance information. */ static void -StoreCatalogInheritance(Oid relationId, List * supers) +StoreCatalogInheritance(Oid relationId, List *supers) { Relation relation; TupleDesc desc; @@ -640,7 +640,7 @@ again: * 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; diff --git a/src/backend/commands/defind.c b/src/backend/commands/defind.c index 52f7736b5f..8b48e638ce 100644 --- a/src/backend/commands/defind.c +++ b/src/backend/commands/defind.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -39,18 +39,18 @@ #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); /* @@ -70,11 +70,11 @@ void DefineIndex(char *heapRelationName, char *indexRelationName, char *accessMethodName, - List * attributeList, - List * parameterList, + List *attributeList, + List *parameterList, bool unique, - Expr * predicate, - List * rangetable) + Expr *predicate, + List *rangetable) { Oid *classObjectId; Oid accessMethodId; @@ -223,7 +223,7 @@ DefineIndex(char *heapRelationName, * XXX */ void -ExtendIndex(char *indexRelationName, Expr * predicate, List * rangetable) +ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable) { Oid *classObjectId; Oid accessMethodId; @@ -364,7 +364,7 @@ ExtendIndex(char *indexRelationName, Expr * predicate, List * rangetable) */ static void -CheckPredicate(List * predList, List * rangeTable, Oid baseRelOid) +CheckPredicate(List *predList, List *rangeTable, Oid baseRelOid) { List *item; @@ -375,7 +375,7 @@ CheckPredicate(List * predList, List * rangeTable, Oid baseRelOid) } static void -CheckPredExpr(Node * predicate, List * rangeTable, Oid baseRelOid) +CheckPredExpr(Node *predicate, List *rangeTable, Oid baseRelOid) { List *clauses = NIL, *clause; @@ -399,7 +399,7 @@ CheckPredExpr(Node * predicate, List * rangeTable, Oid baseRelOid) } static void -CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid) +CheckPredClause(Expr *predicate, List *rangeTable, Oid baseRelOid) { Var *pred_var; Const *pred_const; @@ -421,10 +421,10 @@ CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid) static void -FuncIndexArgs(IndexElem * funcIndex, +FuncIndexArgs(IndexElem *funcIndex, AttrNumber *attNumP, - Oid * argTypes, - Oid * opOidP, + Oid *argTypes, + Oid *opOidP, Oid relId) { List *rest; @@ -470,9 +470,9 @@ FuncIndexArgs(IndexElem * funcIndex, } 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; diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c index 52a0b716f9..903bb51649 100644 --- a/src/backend/commands/define.c +++ b/src/backend/commands/define.c @@ -9,7 +9,7 @@ * * * 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 @@ -53,8 +53,8 @@ #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 ',' @@ -80,8 +80,8 @@ case_translate_language_name(const char *input, char *output) 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 @@ -106,9 +106,9 @@ compute_return_type(const Node * returnType, 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 @@ -210,7 +210,7 @@ interpret_AS_clause(const char languageName[], const char as[], * */ void -CreateFunction(ProcedureStmt * stmt, CommandDest dest) +CreateFunction(ProcedureStmt *stmt, CommandDest dest) { char *probin_str; @@ -315,7 +315,7 @@ CreateFunction(ProcedureStmt * stmt, CommandDest dest) */ void DefineOperator(char *oprName, - List * parameters) + List *parameters) { uint16 precedence = 0; /* operator precedence */ bool canHash = false;/* operator hashes */ @@ -461,7 +461,7 @@ DefineOperator(char *oprName, * ------------------ */ void -DefineAggregate(char *aggName, List * parameters) +DefineAggregate(char *aggName, List *parameters) { char *stepfunc1Name = NULL; @@ -570,7 +570,7 @@ DefineAggregate(char *aggName, List * parameters) * */ void -DefineType(char *typeName, List * parameters) +DefineType(char *typeName, List *parameters) { int16 internalLength = 0; /* int2 */ int16 externalLength = 0; /* int2 */ @@ -720,7 +720,7 @@ DefineType(char *typeName, List * parameters) } static char * -defGetString(DefElem * def) +defGetString(DefElem *def) { if (nodeTag(def->arg) != T_String) elog(WARN, "Define: \"%s\" = what?", def->defname); @@ -728,7 +728,7 @@ defGetString(DefElem * def) } static int -defGetTypeLength(DefElem * def) +defGetTypeLength(DefElem *def) { if (nodeTag(def->arg) == T_Integer) return (intVal(def->arg)); diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index c1ad092e92..55a8d2b85d 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -32,9 +32,9 @@ typedef struct ExplainState 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 - @@ -42,7 +42,7 @@ static char *Explain_PlanToString(Plan * plan, ExplainState * es); * */ void -ExplainQuery(Query * query, bool verbose, CommandDest dest) +ExplainQuery(Query *query, bool verbose, CommandDest dest) { char *s = NULL, *s2; @@ -116,7 +116,7 @@ ExplainQuery(Query * query, bool verbose, CommandDest dest) * 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]; @@ -225,7 +225,7 @@ explain_outNode(StringInfo str, Plan * plan, int indent, ExplainState * es) } static char * -Explain_PlanToString(Plan * plan, ExplainState * es) +Explain_PlanToString(Plan *plan, ExplainState *es) { StringInfo str; char *s; diff --git a/src/backend/commands/recipe.c b/src/backend/commands/recipe.c index 7796b164c3..945dc7d7c2 100644 --- a/src/backend/commands/recipe.c +++ b/src/backend/commands/recipe.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -36,7 +36,7 @@ extern CommandDest whereToSendOutput; #ifndef TIOGA void -beginRecipe(RecipeStmt * stmt) +beginRecipe(RecipeStmt *stmt) { elog(NOTICE, "You must compile with TIOGA defined in order to use recipes\n"); } @@ -61,36 +61,36 @@ typedef struct _teeInfo 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, @@ -99,7 +99,7 @@ static QueryTreeList * tg_parseTeeNode(TgRecipe * r, TgNode * n, int i, - QueryTreeList * qList, + QueryTreeList *qList, TeeInfo * teeInfo); @@ -127,7 +127,7 @@ tg_parseTeeNode(TgRecipe * r, */ void -beginRecipe(RecipeStmt * stmt) +beginRecipe(RecipeStmt *stmt) { TgRecipe *r; int i; @@ -317,8 +317,8 @@ beginRecipe(RecipeStmt * stmt) static void tg_rewriteQuery(TgRecipe * r, TgNode * n, - QueryTreeList * q, - QueryTreeList * inputQlist) + QueryTreeList *q, + QueryTreeList *inputQlist) { Query *orig; Query *inputQ; @@ -426,7 +426,7 @@ tg_rewriteQuery(TgRecipe * r, */ 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 @@ -573,7 +573,7 @@ tg_replaceNumberedParam(Node * expression, */ static Node * -tg_rewriteParamsInExpr(Node * expression, QueryTreeList * inputQlist) +tg_rewriteParamsInExpr(Node *expression, QueryTreeList *inputQlist) { List *tl; TargetEntry *param_tle, @@ -759,7 +759,7 @@ static QueryTreeList * 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) { @@ -1104,7 +1104,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) */ void -OffsetVarAttno(Node * node, int varno, int offset) +OffsetVarAttno(Node *node, int varno, int offset) { if (node == NULL) return; @@ -1157,7 +1157,7 @@ OffsetVarAttno(Node * node, int varno, int offset) */ QueryTreeList * -appendQlist(QueryTreeList * q1, QueryTreeList * q2) +appendQlist(QueryTreeList *q1, QueryTreeList *q2) { QueryTreeList *newq; int i, @@ -1189,7 +1189,7 @@ appendQlist(QueryTreeList * q1, QueryTreeList * q2) * 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; @@ -1220,8 +1220,8 @@ appendTeeQuery(TeeInfo * teeInfo, QueryTreeList * q, char *teeNodeName) * 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; @@ -1307,7 +1307,7 @@ replaceSeqScan(Plan * plan, Plan * parent, * 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; diff --git a/src/backend/commands/remove.c b/src/backend/commands/remove.c index 41f18a8f8b..5a5f811d7e 100644 --- a/src/backend/commands/remove.c +++ b/src/backend/commands/remove.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -330,7 +330,7 @@ RemoveType(char *typeName) /* type name to be removed */ 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; diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 82c3deaf64..1f63b9e96e 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -36,14 +36,14 @@ typedef struct FormData_pg_sequence 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 { @@ -54,7 +54,7 @@ typedef struct SeqTableData int4 last; int4 increment; struct SeqTableData *next; -} SeqTableData; +} SeqTableData; typedef SeqTableData *SeqTable; @@ -62,15 +62,15 @@ static SeqTable seqtab = NULL; 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); @@ -459,7 +459,7 @@ CloseSequences(void) static void -init_params(CreateSeqStmt * seq, SequenceTupleForm new) +init_params(CreateSeqStmt *seq, SequenceTupleForm new) { DefElem *last_value = NULL; DefElem *increment_by = NULL; @@ -544,7 +544,7 @@ init_params(CreateSeqStmt * seq, SequenceTupleForm new) static int -get_param(DefElem * def) +get_param(DefElem *def) { if (def->arg == (Node *) NULL) elog(WARN, "DefineSequence: \"%s\" value unspecified", def->defname); diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index e25c955d8d..cb5cc434f3 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -37,13 +37,13 @@ TriggerData *CurrentTriggerData = NULL; 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}; @@ -211,7 +211,7 @@ CreateTrigger(CreateTrigStmt * stmt) } void -DropTrigger(DropTrigStmt * stmt) +DropTrigger(DropTrigStmt *stmt) { Relation rel; Relation tgrel; @@ -481,7 +481,7 @@ FreeTriggerDesc(Relation relation) } static void -DescribeTrigger(TriggerDesc * trigdesc, Trigger * trigger) +DescribeTrigger(TriggerDesc *trigdesc, Trigger *trigger) { uint16 *n; Trigger ***t, diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 1bd08c8a3f..7f93d02433 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -74,37 +74,37 @@ static int MESSAGE_LEVEL; /* message level */ /* 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; @@ -236,7 +236,7 @@ vc_abort() * 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; @@ -255,7 +255,7 @@ vc_vacuum(NameData * VacRelP, bool analyze, List * va_cols) } static VRelList -vc_getrels(NameData * VacRelP) +vc_getrels(NameData *VacRelP) { Relation pgclass; TupleDesc pgcdesc; @@ -402,7 +402,7 @@ vc_getrels(NameData * VacRelP) * 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; @@ -639,7 +639,7 @@ vc_vacone(Oid relid, bool analyze, List * va_cols) * 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, @@ -969,8 +969,8 @@ Tup %u: Vac %u, Crash %u, UnUsed %u, MinLen %u, MaxLen %u; Re-using: Free/Avail. * 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; @@ -1424,7 +1424,7 @@ Elapsed %u/%u sec.", * 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; @@ -1700,7 +1700,7 @@ vc_tidreapped(ItemPointer itemptr, VPageList vpl) * */ 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; @@ -1800,7 +1800,7 @@ vc_attrstats(Relation onerel, VRelStats * vacrelstats, HeapTuple htup) * */ 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; @@ -1831,7 +1831,7 @@ vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum * bucket, int16 * bucke * 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, @@ -2259,7 +2259,7 @@ vc_cmp_offno(char *left, char *right) static void -vc_getindices(Oid relid, int *nindices, Relation ** Irel) +vc_getindices(Oid relid, int *nindices, Relation **Irel) { Relation pgindex; Relation irel; @@ -2336,7 +2336,7 @@ vc_getindices(Oid relid, int *nindices, Relation ** Irel) static void -vc_clsindices(int nindices, Relation * Irel) +vc_clsindices(int nindices, Relation *Irel) { if (Irel == (Relation *) NULL) @@ -2352,7 +2352,7 @@ vc_clsindices(int nindices, Relation * Irel) 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; diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index c4f411021a..0c4c62074c 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -42,7 +42,7 @@ *--------------------------------------------------------------------- */ static void -DefineVirtualRelation(char *relname, List * tlist) +DefineVirtualRelation(char *relname, List *tlist) { CreateStmt createStmt; List *attrList, @@ -143,7 +143,7 @@ MakeRetrieveViewRuleName(char *viewName) } static RuleStmt * -FormViewRetrieveRule(char *viewName, Query * viewParse) +FormViewRetrieveRule(char *viewName, Query *viewParse) { RuleStmt *rule; char *rname; @@ -170,7 +170,7 @@ FormViewRetrieveRule(char *viewName, Query * viewParse) } static void -DefineViewRules(char *viewName, Query * viewParse) +DefineViewRules(char *viewName, Query *viewParse) { RuleStmt *retrieve_rule = NULL; @@ -224,7 +224,7 @@ DefineViewRules(char *viewName, Query * viewParse) *--------------------------------------------------------------- */ static void -UpdateRangeTableOfViewParse(char *viewName, Query * viewParse) +UpdateRangeTableOfViewParse(char *viewName, Query *viewParse) { List *old_rt; List *new_rt; @@ -275,7 +275,7 @@ UpdateRangeTableOfViewParse(char *viewName, Query * viewParse) *------------------------------------------------------------------- */ void -DefineView(char *viewName, Query * viewParse) +DefineView(char *viewName, Query *viewParse) { List *viewTlist; diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index 3aeb78ed37..ad659f5995 100644 --- a/src/backend/executor/execAmi.c +++ b/src/backend/executor/execAmi.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -71,8 +71,8 @@ ExecOpenScanR(Oid relOid, bool isindex, ScanDirection dir, TimeQual timeRange, - Relation * returnRelation, /* return */ - Pointer * returnScanDesc) /* return */ + Relation *returnRelation, /* return */ + Pointer *returnScanDesc) /* return */ { Relation relation; Pointer scanDesc; @@ -195,7 +195,7 @@ ExecBeginScan(Relation relation, * ---------------------------------------------------------------- */ void -ExecCloseR(Plan * node) +ExecCloseR(Plan *node) { CommonScanState *state; Relation relation; @@ -288,7 +288,7 @@ ExecCloseR(Plan * node) * ---------------------------------------------------------------- */ void -ExecReScan(Plan * node, ExprContext * exprCtxt, Plan * parent) +ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent) { switch (nodeTag(node)) { @@ -328,7 +328,7 @@ ExecReScan(Plan * node, ExprContext * exprCtxt, Plan * parent) * ---------------------------------------------------------------- */ HeapScanDesc -ExecReScanR(Relation relDesc, /* LLL relDesc unused */ +ExecReScanR(Relation relDesc, /* LLL relDesc unused */ HeapScanDesc scanDesc, ScanDirection direction, int nkeys, /* LLL nkeys unused */ @@ -351,7 +351,7 @@ ExecReScanR(Relation relDesc, /* LLL relDesc unused */ * ---------------------------------------------------------------- */ void -ExecMarkPos(Plan * node) +ExecMarkPos(Plan *node) { switch (nodeTag(node)) { @@ -381,7 +381,7 @@ ExecMarkPos(Plan * node) * ---------------------------------------------------------------- */ void -ExecRestrPos(Plan * node) +ExecRestrPos(Plan *node) { switch (nodeTag(node)) { diff --git a/src/backend/executor/execFlatten.c b/src/backend/executor/execFlatten.c index cc98dd6e20..92bef496fc 100644 --- a/src/backend/executor/execFlatten.c +++ b/src/backend/executor/execFlatten.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -34,16 +34,16 @@ #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; @@ -59,10 +59,10 @@ ExecEvalIter(Iter * iterNode, } void -ExecEvalFjoin(TargetEntry * tlist, - ExprContext * econtext, - bool * isNullVect, - bool * fj_isDone) +ExecEvalFjoin(TargetEntry *tlist, + ExprContext *econtext, + bool *isNullVect, + bool *fj_isDone) { #ifdef SETS_FIXED @@ -182,8 +182,8 @@ ExecEvalFjoin(TargetEntry * tlist, #ifdef SETS_FIXED static bool -FjoinBumpOuterNodes(TargetEntry * tlist, - ExprContext * econtext, +FjoinBumpOuterNodes(TargetEntry *tlist, + ExprContext *econtext, DatumPtr results, char *nulls) { diff --git a/src/backend/executor/execJunk.c b/src/backend/executor/execJunk.c index 1c9476fc35..cd07b2fa1d 100644 --- a/src/backend/executor/execJunk.c +++ b/src/backend/executor/execJunk.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -61,7 +61,7 @@ *------------------------------------------------------------------------- */ JunkFilter * -ExecInitJunkFilter(List * targetList) +ExecInitJunkFilter(List *targetList) { JunkFilter *junkfilter; List *cleanTargetList; @@ -264,11 +264,11 @@ ExecInitJunkFilter(List * targetList) *------------------------------------------------------------------------- */ 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; @@ -328,7 +328,7 @@ ExecGetJunkAttribute(JunkFilter * junkfilter, *------------------------------------------------------------------------- */ HeapTuple -ExecRemoveJunk(JunkFilter * junkfilter, TupleTableSlot * slot) +ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot) { HeapTuple tuple; HeapTuple cleanTuple; diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index c7ff5aa910..91dc05922a 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -26,7 +26,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -57,28 +57,28 @@ /* 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 */ @@ -110,7 +110,7 @@ ExecutorLimit(int limit) * ---------------------------------------------------------------- */ TupleDesc -ExecutorStart(QueryDesc * queryDesc, EState * estate) +ExecutorStart(QueryDesc *queryDesc, EState *estate) { TupleDesc result; @@ -155,7 +155,7 @@ ExecutorStart(QueryDesc * queryDesc, EState * estate) * ---------------------------------------------------------------- */ TupleTableSlot * -ExecutorRun(QueryDesc * queryDesc, EState * estate, int feature, int count) +ExecutorRun(QueryDesc *queryDesc, EState *estate, int feature, int count) { CmdType operation; Query *parseTree; @@ -279,7 +279,7 @@ ExecutorRun(QueryDesc * queryDesc, EState * estate, int feature, int count) * ---------------------------------------------------------------- */ void -ExecutorEnd(QueryDesc * queryDesc, EState * estate) +ExecutorEnd(QueryDesc *queryDesc, EState *estate) { /* sanity checks */ Assert(queryDesc != NULL); @@ -300,8 +300,8 @@ ExecutorEnd(QueryDesc * queryDesc, EState * estate) static void ExecCheckPerms(CmdType operation, int resultRelation, - List * rangeTable, - Query * parseTree) + List *rangeTable, + Query *parseTree) { int i = 1; Oid relid; @@ -390,7 +390,7 @@ ExecCheckPerms(CmdType operation, * ---------------------------------------------------------------- */ static TupleDesc -InitPlan(CmdType operation, Query * parseTree, Plan * plan, EState * estate) +InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate) { List *rangeTable; int resultRelation; @@ -625,7 +625,7 @@ InitPlan(CmdType operation, Query * parseTree, Plan * plan, EState * estate) * ---------------------------------------------------------------- */ static void -EndPlan(Plan * plan, EState * estate) +EndPlan(Plan *plan, EState *estate) { RelationInfo *resultRelationInfo; Relation intoRelationDesc; @@ -699,9 +699,9 @@ EndPlan(Plan * plan, EState * estate) 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, @@ -898,9 +898,9 @@ ExecutePlan(EState * estate, * ---------------------------------------------------------------- */ static void -ExecRetrieve(TupleTableSlot * slot, +ExecRetrieve(TupleTableSlot *slot, void (*printfunc) (), - EState * estate) + EState *estate) { HeapTuple tuple; TupleDesc attrtype; @@ -941,9 +941,9 @@ ExecRetrieve(TupleTableSlot * slot, */ static void -ExecAppend(TupleTableSlot * slot, +ExecAppend(TupleTableSlot *slot, ItemPointer tupleid, - EState * estate) + EState *estate) { HeapTuple tuple; RelationInfo *resultRelationInfo; @@ -1046,9 +1046,9 @@ ExecAppend(TupleTableSlot * slot, * ---------------------------------------------------------------- */ static void -ExecDelete(TupleTableSlot * slot, +ExecDelete(TupleTableSlot *slot, ItemPointer tupleid, - EState * estate) + EState *estate) { RelationInfo *resultRelationInfo; Relation resultRelationDesc; @@ -1114,10 +1114,10 @@ ExecDelete(TupleTableSlot * slot, * ---------------------------------------------------------------- */ static void -ExecReplace(TupleTableSlot * slot, +ExecReplace(TupleTableSlot *slot, ItemPointer tupleid, - EState * estate, - Query * parseTree) + EState *estate, + Query *parseTree) { HeapTuple tuple; RelationInfo *resultRelationInfo; diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c index 7e8cce52c7..8671e8e1b0 100644 --- a/src/backend/executor/execProcnode.c +++ b/src/backend/executor/execProcnode.c @@ -11,7 +11,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -103,7 +103,7 @@ * ------------------------------------------------------------------------ */ bool -ExecInitNode(Plan * node, EState * estate, Plan * parent) +ExecInitNode(Plan *node, EState *estate, Plan *parent) { bool result; @@ -207,7 +207,7 @@ ExecInitNode(Plan * node, EState * estate, Plan * parent) * ---------------------------------------------------------------- */ TupleTableSlot * -ExecProcNode(Plan * node, Plan * parent) +ExecProcNode(Plan *node, Plan *parent) { TupleTableSlot *result; @@ -302,7 +302,7 @@ ExecProcNode(Plan * node, Plan * parent) } int -ExecCountSlotsNode(Plan * node) +ExecCountSlotsNode(Plan *node) { if (node == (Plan *) NULL) return 0; @@ -387,7 +387,7 @@ ExecCountSlotsNode(Plan * node) * ---------------------------------------------------------------- */ void -ExecEndNode(Plan * node, Plan * parent) +ExecEndNode(Plan *node, Plan *parent) { /* ---------------- * do nothing when we get to the end diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index 8248c8f5c3..05d0721e31 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -69,27 +69,27 @@ bool execConstByVal; 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 @@ -102,9 +102,9 @@ static bool ExecQualClause(Node * clause, ExprContext * econtext); */ static Datum ExecEvalArrayRef(ArrayRef *arrayRef, - ExprContext * econtext, - bool * isNull, - bool * isDone) + ExprContext *econtext, + bool *isNull, + bool *isDone) { bool dummy; int i = 0, @@ -200,7 +200,7 @@ ExecEvalArrayRef(ArrayRef *arrayRef, * ---------------------------------------------------------------- */ static Datum -ExecEvalAggreg(Aggreg *agg, ExprContext * econtext, bool * isNull) +ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull) { *isNull = econtext->ecxt_nulls[agg->aggno]; @@ -231,7 +231,7 @@ ExecEvalAggreg(Aggreg *agg, ExprContext * econtext, bool * isNull) * * ---------------------------------------------------------------- */ static Datum -ExecEvalVar(Var * variable, ExprContext * econtext, bool * isNull) +ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull) { Datum result; TupleTableSlot *slot; @@ -377,7 +377,7 @@ ExecEvalVar(Var * variable, ExprContext * econtext, bool * isNull) * ---------------------------------------------------------------- */ Datum -ExecEvalParam(Param * expression, ExprContext * econtext, bool * isNull) +ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull) { char *thisParameterName; @@ -509,9 +509,9 @@ ExecEvalParam(Param * expression, ExprContext * econtext, bool * isNull) */ #ifdef NOT_USED static char * -GetAttributeByNum(TupleTableSlot * slot, +GetAttributeByNum(TupleTableSlot *slot, AttrNumber attrno, - bool * isNull) + bool *isNull) { Datum retval; @@ -546,9 +546,9 @@ GetAttributeByNum(TupleTableSlot * slot, /* 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)); } @@ -556,7 +556,7 @@ att_by_num(TupleTableSlot * slot, #endif char * -GetAttributeByName(TupleTableSlot * slot, char *attname, bool * isNull) +GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull) { AttrNumber attrno; TupleDesc tupdesc; @@ -609,7 +609,7 @@ GetAttributeByName(TupleTableSlot * slot, char *attname, bool * isNull) /* 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)); } @@ -618,10 +618,10 @@ att_by_name(TupleTableSlot * slot, char *attname, bool * isNull) static void ExecEvalFuncArgs(FunctionCachePtr fcache, - ExprContext * econtext, - List * argList, + ExprContext *econtext, + List *argList, Datum argV[], - bool * argIsDone) + bool *argIsDone) { int i; bool argIsNull, @@ -664,11 +664,11 @@ ExecEvalFuncArgs(FunctionCachePtr fcache, * ---------------- */ 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; @@ -864,7 +864,7 @@ ExecMakeFunctionResult(Node * node, * ---------------------------------------------------------------- */ static Datum -ExecEvalOper(Expr * opClause, ExprContext * econtext, bool * isNull) +ExecEvalOper(Expr *opClause, ExprContext *econtext, bool *isNull) { Oper *op; List *argList; @@ -909,10 +909,10 @@ ExecEvalOper(Expr * opClause, ExprContext * econtext, bool * isNull) */ static Datum -ExecEvalFunc(Expr * funcClause, - ExprContext * econtext, - bool * isNull, - bool * isDone) +ExecEvalFunc(Expr *funcClause, + ExprContext *econtext, + bool *isNull, + bool *isDone) { Func *func; List *argList; @@ -964,7 +964,7 @@ ExecEvalFunc(Expr * funcClause, * ---------------------------------------------------------------- */ static Datum -ExecEvalNot(Expr * notclause, ExprContext * econtext, bool * isNull) +ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull) { Datum expr_value; Node *clause; @@ -1003,7 +1003,7 @@ ExecEvalNot(Expr * notclause, ExprContext * econtext, bool * isNull) * ---------------------------------------------------------------- */ static Datum -ExecEvalOr(Expr * orExpr, ExprContext * econtext, bool * isNull) +ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull) { List *clauses; List *clause; @@ -1067,7 +1067,7 @@ ExecEvalOr(Expr * orExpr, ExprContext * econtext, bool * isNull) * ---------------------------------------------------------------- */ static Datum -ExecEvalAnd(Expr * andExpr, ExprContext * econtext, bool * isNull) +ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull) { List *clauses; List *clause; @@ -1144,10 +1144,10 @@ ExecEvalAnd(Expr * andExpr, ExprContext * econtext, bool * isNull) * ---------------------------------------------------------------- */ Datum -ExecEvalExpr(Node * expression, - ExprContext * econtext, - bool * isNull, - bool * isDone) +ExecEvalExpr(Node *expression, + ExprContext *econtext, + bool *isNull, + bool *isDone) { Datum retDatum = 0; @@ -1257,7 +1257,7 @@ ExecEvalExpr(Node * expression, * ---------------------------------------------------------------- */ static bool -ExecQualClause(Node * clause, ExprContext * econtext) +ExecQualClause(Node *clause, ExprContext *econtext) { Datum expr_value; bool isNull; @@ -1302,7 +1302,7 @@ ExecQualClause(Node * clause, ExprContext * econtext) * ---------------------------------------------------------------- */ bool -ExecQual(List * qual, ExprContext * econtext) +ExecQual(List *qual, ExprContext *econtext) { List *clause; bool result; @@ -1354,7 +1354,7 @@ ExecQual(List * qual, ExprContext * econtext) } int -ExecTargetListLength(List * targetlist) +ExecTargetListLength(List *targetlist) { int len; List *tl; @@ -1381,12 +1381,12 @@ ExecTargetListLength(List * targetlist) * ---------------------------------------------------------------- */ 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]; @@ -1579,7 +1579,7 @@ ExecTargetList(List * targetlist, * ---------------------------------------------------------------- */ TupleTableSlot * -ExecProject(ProjectionInfo * projInfo, bool * isDone) +ExecProject(ProjectionInfo *projInfo, bool *isDone) { TupleTableSlot *slot; List *targetlist; diff --git a/src/backend/executor/execScan.c b/src/backend/executor/execScan.c index 84dac56a23..6c9a16a12b 100644 --- a/src/backend/executor/execScan.c +++ b/src/backend/executor/execScan.c @@ -11,7 +11,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -43,8 +43,8 @@ * ---------------------------------------------------------------- */ TupleTableSlot * -ExecScan(Scan * node, - TupleTableSlot * (*accessMtd) ()) /* function returning a +ExecScan(Scan *node, + TupleTableSlot *(*accessMtd) ()) /* function returning a * tuple */ { CommonScanState *scanstate; diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 373e94ae1a..7e13b95b7a 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -14,7 +14,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -131,7 +131,7 @@ #include "parser/catalog_utils.h" #include "catalog/pg_type.h" -static TupleTableSlot *NodeGetResultTupleSlot(Plan * node); +static TupleTableSlot *NodeGetResultTupleSlot(Plan *node); /* ---------------------------------------------------------------- @@ -150,8 +150,8 @@ 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 */ @@ -349,7 +349,7 @@ ExecAllocTableSlot(TupleTable table) */ 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. */ { @@ -381,7 +381,7 @@ ExecStoreTuple(HeapTuple tuple, /* tuple to store */ * -------------------------------- */ 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 */ @@ -441,7 +441,7 @@ ExecClearTuple(TupleTableSlot * slot) /* slot in which to store tuple */ */ #ifdef NOT_USED bool /* return: slot policy */ -ExecSlotPolicy(TupleTableSlot * slot) /* slot to inspect */ +ExecSlotPolicy(TupleTableSlot *slot) /* slot to inspect */ { return slot->ttc_shouldFree; } @@ -458,7 +458,7 @@ ExecSlotPolicy(TupleTableSlot * slot) /* slot to inspect */ * -------------------------------- */ 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. */ { @@ -487,7 +487,7 @@ ExecSetSlotPolicy(TupleTableSlot * slot, /* slot to change */ * -------------------------------- */ 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; @@ -503,7 +503,7 @@ ExecSetSlotDescriptor(TupleTableSlot * slot, /* slot to change */ * -------------------------------- */ void -ExecSetSlotDescriptorIsNew(TupleTableSlot * slot, /* slot to change */ +ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, /* slot to change */ bool isNew) /* "isNew" setting */ { slot->ttc_descIsNew = isNew; @@ -518,7 +518,7 @@ ExecSetSlotDescriptorIsNew(TupleTableSlot * slot, /* slot to change */ */ #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; @@ -554,7 +554,7 @@ ExecSetNewSlotDescriptor(TupleTableSlot * slot, /* slot to change */ */ #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; @@ -575,7 +575,7 @@ ExecSetSlotBuffer(TupleTableSlot * slot, /* slot to change */ * -------------------------------- */ 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; @@ -597,7 +597,7 @@ ExecIncrSlotBufferRefcnt(TupleTableSlot * slot) /* slot to bump refcnt */ * ---------------- */ 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) */ @@ -629,7 +629,7 @@ TupIsNull(TupleTableSlot * slot) /* slot to check */ */ #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; */ @@ -667,7 +667,7 @@ ExecSlotDescriptorIsNew(TupleTableSlot * slot) /* slot to inspect */ * ---------------- */ void -ExecInitResultTupleSlot(EState * estate, CommonState * commonstate) +ExecInitResultTupleSlot(EState *estate, CommonState *commonstate) { INIT_SLOT_DEFS; INIT_SLOT_ALLOC; @@ -679,7 +679,7 @@ ExecInitResultTupleSlot(EState * estate, CommonState * commonstate) * ---------------- */ void -ExecInitScanTupleSlot(EState * estate, CommonScanState * commonscanstate) +ExecInitScanTupleSlot(EState *estate, CommonScanState *commonscanstate) { INIT_SLOT_DEFS; INIT_SLOT_ALLOC; @@ -691,7 +691,7 @@ ExecInitScanTupleSlot(EState * estate, CommonScanState * commonscanstate) * ---------------- */ void -ExecInitMarkedTupleSlot(EState * estate, MergeJoinState * mergestate) +ExecInitMarkedTupleSlot(EState *estate, MergeJoinState *mergestate) { INIT_SLOT_DEFS; INIT_SLOT_ALLOC; @@ -703,7 +703,7 @@ ExecInitMarkedTupleSlot(EState * estate, MergeJoinState * mergestate) * ---------------- */ void -ExecInitOuterTupleSlot(EState * estate, HashJoinState * hashstate) +ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate) { INIT_SLOT_DEFS; INIT_SLOT_ALLOC; @@ -716,7 +716,7 @@ ExecInitOuterTupleSlot(EState * estate, HashJoinState * hashstate) */ #ifdef NOT_USED void -ExecInitHashTupleSlot(EState * estate, HashJoinState * hashstate) +ExecInitHashTupleSlot(EState *estate, HashJoinState *hashstate) { INIT_SLOT_DEFS; INIT_SLOT_ALLOC; @@ -726,7 +726,7 @@ ExecInitHashTupleSlot(EState * estate, HashJoinState * hashstate) #endif static TupleTableSlot * -NodeGetResultTupleSlot(Plan * node) +NodeGetResultTupleSlot(Plan *node) { TupleTableSlot *slot; @@ -894,7 +894,7 @@ NodeGetResultTupleSlot(Plan * node) */ TupleDesc -ExecGetTupType(Plan * node) +ExecGetTupType(Plan *node) { TupleTableSlot *slot; TupleDesc tupType; @@ -946,7 +946,7 @@ ExecCopyTupType(TupleDesc td, int natts) * ---------------------------------------------------------------- */ TupleDesc -ExecTypeFromTL(List * targetList) +ExecTypeFromTL(List *targetList) { List *tlcdr; TupleDesc typeInfo; diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 8d87e8591a..ad478e06e1 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -106,7 +106,7 @@ ResetTupleCount(void) */ #ifdef NOT_USED void -DisplayTupleCount(FILE * statfp) +DisplayTupleCount(FILE *statfp) { if (NTupleProcessed > 0) fprintf(statfp, "!\t%d tuple%s processed, ", NTupleProcessed, @@ -157,7 +157,7 @@ DisplayTupleCount(FILE * statfp) * ---------------- */ void -ExecAssignNodeBaseInfo(EState * estate, CommonState * cstate, Plan * parent) +ExecAssignNodeBaseInfo(EState *estate, CommonState *cstate, Plan *parent) { int baseId; @@ -176,7 +176,7 @@ ExecAssignNodeBaseInfo(EState * estate, CommonState * cstate, Plan * parent) * ---------------- */ void -ExecAssignExprContext(EState * estate, CommonState * commonstate) +ExecAssignExprContext(EState *estate, CommonState *commonstate) { ExprContext *econtext; ParamListInfo paraminfo; @@ -207,7 +207,7 @@ ExecAssignExprContext(EState * estate, CommonState * commonstate) * ---------------- */ void -ExecAssignResultType(CommonState * commonstate, +ExecAssignResultType(CommonState *commonstate, TupleDesc tupDesc) { TupleTableSlot *slot; @@ -221,7 +221,7 @@ ExecAssignResultType(CommonState * commonstate, * ---------------- */ void -ExecAssignResultTypeFromOuterPlan(Plan * node, CommonState * commonstate) +ExecAssignResultTypeFromOuterPlan(Plan *node, CommonState *commonstate) { Plan *outerPlan; TupleDesc tupDesc; @@ -237,7 +237,7 @@ ExecAssignResultTypeFromOuterPlan(Plan * node, CommonState * commonstate) * ---------------- */ void -ExecAssignResultTypeFromTL(Plan * node, CommonState * commonstate) +ExecAssignResultTypeFromTL(Plan *node, CommonState *commonstate) { List *targetList; int i; @@ -293,7 +293,7 @@ ExecAssignResultTypeFromTL(Plan * node, CommonState * commonstate) * ---------------- */ TupleDesc -ExecGetResultType(CommonState * commonstate) +ExecGetResultType(CommonState *commonstate) { TupleTableSlot *slot = commonstate->cs_ResultTupleSlot; @@ -306,7 +306,7 @@ ExecGetResultType(CommonState * commonstate) */ #ifdef NOT_USED void -ExecFreeResultType(CommonState * commonstate) +ExecFreeResultType(CommonState *commonstate) { TupleTableSlot *slot; TupleDesc tupType; @@ -326,7 +326,7 @@ ExecFreeResultType(CommonState * commonstate) * ---------------- */ void -ExecAssignProjectionInfo(Plan * node, CommonState * commonstate) +ExecAssignProjectionInfo(Plan *node, CommonState *commonstate) { ProjectionInfo *projInfo; List *targetList; @@ -352,7 +352,7 @@ ExecAssignProjectionInfo(Plan * node, CommonState * commonstate) * ---------------- */ void -ExecFreeProjectionInfo(CommonState * commonstate) +ExecFreeProjectionInfo(CommonState *commonstate) { ProjectionInfo *projInfo; @@ -391,7 +391,7 @@ ExecFreeProjectionInfo(CommonState * commonstate) * ---------------- */ TupleDesc -ExecGetScanType(CommonScanState * csstate) +ExecGetScanType(CommonScanState *csstate) { TupleTableSlot *slot = csstate->css_ScanTupleSlot; @@ -404,7 +404,7 @@ ExecGetScanType(CommonScanState * csstate) */ #ifdef NOT_USED void -ExecFreeScanType(CommonScanState * csstate) +ExecFreeScanType(CommonScanState *csstate) { TupleTableSlot *slot; TupleDesc tupType; @@ -423,7 +423,7 @@ ExecFreeScanType(CommonScanState * csstate) * ---------------- */ void -ExecAssignScanType(CommonScanState * csstate, +ExecAssignScanType(CommonScanState *csstate, TupleDesc tupDesc) { TupleTableSlot *slot; @@ -437,7 +437,7 @@ ExecAssignScanType(CommonScanState * csstate, * ---------------- */ void -ExecAssignScanTypeFromOuterPlan(Plan * node, CommonScanState * csstate) +ExecAssignScanTypeFromOuterPlan(Plan *node, CommonScanState *csstate) { Plan *outerPlan; TupleDesc tupDesc; @@ -569,7 +569,7 @@ ExecFreeTypeInfo(TupleDesc typeInfo) * ---------------------------------------------------------------- */ TupleDesc -QueryDescGetTypeInfo(QueryDesc * queryDesc) +QueryDescGetTypeInfo(QueryDesc *queryDesc) { Plan *plan; TupleDesc tupleType; @@ -706,7 +706,7 @@ ExecGetIndexKeyInfo(IndexTupleForm indexTuple, */ void ExecOpenIndices(Oid resultRelationOid, - RelationInfo * resultRelationInfo) + RelationInfo *resultRelationInfo) { Relation indexRd; HeapScanDesc indexSd; @@ -952,7 +952,7 @@ ExecOpenIndices(Oid resultRelationOid, * ---------------------------------------------------------------- */ void -ExecCloseIndices(RelationInfo * resultRelationInfo) +ExecCloseIndices(RelationInfo *resultRelationInfo) { int i; int numIndices; @@ -984,7 +984,7 @@ IndexTuple ExecFormIndexTuple(HeapTuple heapTuple, Relation heapRelation, Relation indexRelation, - IndexInfo * indexInfo) + IndexInfo *indexInfo) { IndexTuple indexTuple; TupleDesc heapDescriptor; @@ -1070,9 +1070,9 @@ ExecFormIndexTuple(HeapTuple heapTuple, * ---------------------------------------------------------------- */ void -ExecInsertIndexTuples(TupleTableSlot * slot, +ExecInsertIndexTuples(TupleTableSlot *slot, ItemPointer tupleid, - EState * estate, + EState *estate, bool is_update) { HeapTuple heapTuple; @@ -1186,8 +1186,8 @@ ExecInsertIndexTuples(TupleTableSlot * slot, * ---------------------------------------------------------------- */ void -setVarAttrLenForCreateTable(TupleDesc tupType, List * targetList, - List * rangeTable) +setVarAttrLenForCreateTable(TupleDesc tupType, List *targetList, + List *rangeTable) { List *tl; TargetEntry *tle; diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 6b10ead651..500a6eaa99 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -44,7 +44,7 @@ typedef enum { F_EXEC_START, F_EXEC_RUN, F_EXEC_DONE -} ExecStatus; +} ExecStatus; typedef struct local_es { @@ -52,30 +52,30 @@ 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; @@ -172,7 +172,7 @@ init_execution_state(FunctionCachePtr fcache, } static TupleDesc -postquel_start(execution_state * es) +postquel_start(execution_state *es) { #ifdef FUNC_UTIL_PATCH @@ -189,7 +189,7 @@ postquel_start(execution_state * es) } static TupleTableSlot * -postquel_getnext(execution_state * es) +postquel_getnext(execution_state *es) { int feature; @@ -214,7 +214,7 @@ postquel_getnext(execution_state * es) } static void -postquel_end(execution_state * es) +postquel_end(execution_state *es) { #ifdef FUNC_UTIL_PATCH @@ -231,10 +231,10 @@ postquel_end(execution_state * es) } 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; @@ -256,7 +256,7 @@ postquel_sub_params(execution_state * es, static TupleTableSlot * copy_function_result(FunctionCachePtr fcache, - TupleTableSlot * resultSlot) + TupleTableSlot *resultSlot) { TupleTableSlot *funcSlot; TupleDesc resultTd; @@ -299,11 +299,11 @@ copy_function_result(FunctionCachePtr fcache, } 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; @@ -398,7 +398,7 @@ postquel_execute(execution_state * es, } 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; diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 71646b67e0..7d7550ab43 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -47,7 +47,7 @@ typedef struct AggFuncInfo int finalfn_nargs; } AggFuncInfo; -static Datum aggGetAttr(TupleTableSlot * tuple, Aggreg *agg, bool * isNull); +static Datum aggGetAttr(TupleTableSlot *tuple, Aggreg *agg, bool *isNull); /* --------------------------------------- @@ -376,7 +376,7 @@ ExecAgg(Agg *node) value2[i] = (Datum) fmgr_c(aggfns->xfn2, aggfns->xfn2_oid, aggfns->xfn2_nargs, - (FmgrValues *) & xfn2_val, &isNull2); + (FmgrValues *) &xfn2_val, &isNull2); Assert(!isNull2); } } @@ -488,7 +488,7 @@ ExecAgg(Agg *node) * ----------------- */ bool -ExecInitAgg(Agg *node, EState * estate, Plan * parent) +ExecInitAgg(Agg *node, EState *estate, Plan *parent) { AggState *aggstate; Plan *outerPlan; @@ -591,9 +591,9 @@ ExecEndAgg(Agg *node) * over from the tuple */ static Datum -aggGetAttr(TupleTableSlot * slot, +aggGetAttr(TupleTableSlot *slot, Aggreg *agg, - bool * isNull) + bool *isNull) { Datum result; AttrNumber attnum; diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c index 786c93c719..3c07310127 100644 --- a/src/backend/executor/nodeAppend.c +++ b/src/backend/executor/nodeAppend.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -182,7 +182,7 @@ exec_append_initialize_next(Append *node) * ---------------------------------------------------------------- */ bool -ExecInitAppend(Append *node, EState * estate, Plan * parent) +ExecInitAppend(Append *node, EState *estate, Plan *parent) { AppendState *unionstate; int nplans; diff --git a/src/backend/executor/nodeGroup.c b/src/backend/executor/nodeGroup.c index 4e9ab4cfc8..3a86ef089d 100644 --- a/src/backend/executor/nodeGroup.c +++ b/src/backend/executor/nodeGroup.c @@ -13,7 +13,7 @@ * 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 $ * *------------------------------------------------------------------------- */ @@ -28,10 +28,10 @@ #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); /* --------------------------------------- @@ -51,7 +51,7 @@ sameGroup(TupleTableSlot * oldslot, TupleTableSlot * newslot, * ------------------------------------------ */ TupleTableSlot * -ExecGroup(Group * node) +ExecGroup(Group *node) { if (node->tuplePerGroup) return ExecGroupEveryTuple(node); @@ -64,7 +64,7 @@ ExecGroup(Group * node) * return every tuple with a NULL between each group */ static TupleTableSlot * -ExecGroupEveryTuple(Group * node) +ExecGroupEveryTuple(Group *node) { GroupState *grpstate; EState *estate; @@ -165,7 +165,7 @@ ExecGroupEveryTuple(Group * node) * tuples. */ static TupleTableSlot * -ExecGroupOneTuple(Group * node) +ExecGroupOneTuple(Group *node) { GroupState *grpstate; EState *estate; @@ -289,7 +289,7 @@ ExecGroupOneTuple(Group * node) * ----------------- */ bool -ExecInitGroup(Group * node, EState * estate, Plan * parent) +ExecInitGroup(Group *node, EState *estate, Plan *parent) { GroupState *grpstate; Plan *outerPlan; @@ -345,7 +345,7 @@ ExecInitGroup(Group * node, EState * estate, Plan * parent) } int -ExecCountSlotsGroup(Group * node) +ExecCountSlotsGroup(Group *node) { return ExecCountSlotsNode(outerPlan(node)) + GROUP_NSLOTS; } @@ -356,7 +356,7 @@ ExecCountSlotsGroup(Group * node) * ----------------------- */ void -ExecEndGroup(Group * node) +ExecEndGroup(Group *node) { GroupState *grpstate; Plan *outerPlan; @@ -380,8 +380,8 @@ ExecEndGroup(Group * node) * code swiped from nodeUnique.c */ static bool -sameGroup(TupleTableSlot * oldslot, - TupleTableSlot * newslot, +sameGroup(TupleTableSlot *oldslot, + TupleTableSlot *newslot, int numCols, AttrNumber *grpColIdx, TupleDesc tupdesc) diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index b0e7ca4dd5..fbc7340700 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -47,7 +47,7 @@ static int HashTBSize; 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, @@ -62,7 +62,7 @@ ExecHashOverflowInsert(HashJoinTable hashtable, * ---------------------------------------------------------------- */ TupleTableSlot * -ExecHash(Hash * node) +ExecHash(Hash *node) { EState *estate; HashState *hashstate; @@ -165,7 +165,7 @@ ExecHash(Hash * node) * ---------------------------------------------------------------- */ bool -ExecInitHash(Hash * node, EState * estate, Plan * parent) +ExecInitHash(Hash *node, EState *estate, Plan *parent) { HashState *hashstate; Plan *outerPlan; @@ -224,7 +224,7 @@ ExecInitHash(Hash * node, EState * estate, Plan * parent) } int -ExecCountSlotsHash(Hash * node) +ExecCountSlotsHash(Hash *node) { return ExecCountSlotsNode(outerPlan(node)) + ExecCountSlotsNode(innerPlan(node)) + @@ -238,7 +238,7 @@ ExecCountSlotsHash(Hash * node) * ---------------------------------------------------------------- */ void -ExecEndHash(Hash * node) +ExecEndHash(Hash *node) { HashState *hashstate; Plan *outerPlan; @@ -288,7 +288,7 @@ hashTableAlloc(int size, HashJoinTable hashtable) #define FUDGE_FAC 1.5 HashJoinTable -ExecHashTableCreate(Hash * node) +ExecHashTableCreate(Hash *node) { Plan *outerNode; int nbatch; @@ -456,9 +456,9 @@ ExecHashTableCreate(Hash * node) */ void ExecHashTableInsert(HashJoinTable hashtable, - ExprContext * econtext, - Var * hashkey, - File * batches) + ExprContext *econtext, + Var *hashkey, + File *batches) { TupleTableSlot *slot; HeapTuple heapTuple; @@ -548,8 +548,8 @@ ExecHashTableDestroy(HashJoinTable hashtable) */ int ExecHashGetBucket(HashJoinTable hashtable, - ExprContext * econtext, - Var * hashkey) + ExprContext *econtext, + Var *hashkey) { int bucketno; Datum keyval; @@ -681,11 +681,11 @@ ExecHashOverflowInsert(HashJoinTable hashtable, * ---------------------------------------------------------------- */ HeapTuple -ExecScanHashBucket(HashJoinState * hjstate, +ExecScanHashBucket(HashJoinState *hjstate, HashBucket bucket, HeapTuple curtuple, - List * hjclauses, - ExprContext * econtext) + List *hjclauses, + ExprContext *econtext) { HeapTuple heapTuple; bool qualResult; @@ -826,7 +826,7 @@ hashFunc(char *key, int len) * ---------------------------------------------------------------- */ static int -ExecHashPartition(Hash * node) +ExecHashPartition(Hash *node) { Plan *outerNode; int b; diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index b0c6eec3c0..0ef0c28ee1 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -33,17 +33,17 @@ #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); @@ -57,7 +57,7 @@ static int ExecHashJoinNewBatch(HashJoinState * hjstate); * ---------------------------------------------------------------- */ TupleTableSlot * /* return: a tuple or NULL */ -ExecHashJoin(HashJoin * node) +ExecHashJoin(HashJoin *node) { HashJoinState *hjstate; EState *estate; @@ -392,7 +392,7 @@ ExecHashJoin(HashJoin * node) * ---------------------------------------------------------------- */ bool /* return: initialization status */ -ExecInitHashJoin(HashJoin * node, EState * estate, Plan * parent) +ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent) { HashJoinState *hjstate; Plan *outerNode; @@ -497,7 +497,7 @@ ExecInitHashJoin(HashJoin * node, EState * estate, Plan * parent) } int -ExecCountSlotsHashJoin(HashJoin * node) +ExecCountSlotsHashJoin(HashJoin *node) { return ExecCountSlotsNode(outerPlan(node)) + ExecCountSlotsNode(innerPlan(node)) + @@ -511,7 +511,7 @@ ExecCountSlotsHashJoin(HashJoin * node) * ---------------------------------------------------------------- */ void -ExecEndHashJoin(HashJoin * node) +ExecEndHashJoin(HashJoin *node) { HashJoinState *hjstate; @@ -569,7 +569,7 @@ ExecEndHashJoin(HashJoin * node) */ static TupleTableSlot * -ExecHashJoinOuterGetTuple(Plan * node, Plan * parent, HashJoinState * hjstate) +ExecHashJoinOuterGetTuple(Plan *node, Plan *parent, HashJoinState *hjstate) { TupleTableSlot *slot; HashJoinTable hashtable; @@ -619,10 +619,10 @@ ExecHashJoinOuterGetTuple(Plan * node, Plan * parent, HashJoinState * hjstate) */ static TupleTableSlot * -ExecHashJoinGetSavedTuple(HashJoinState * hjstate, +ExecHashJoinGetSavedTuple(HashJoinState *hjstate, char *buffer, File file, - TupleTableSlot * tupleSlot, + TupleTableSlot *tupleSlot, int *block, /* return parameter */ char **position) /* return parameter */ { @@ -664,7 +664,7 @@ ExecHashJoinGetSavedTuple(HashJoinState * hjstate, * ---------------------------------------------------------------- */ static int -ExecHashJoinNewBatch(HashJoinState * hjstate) +ExecHashJoinNewBatch(HashJoinState *hjstate) { File *innerBatches; File *outerBatches; diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 61fca80a0c..2ad35f822e 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -55,7 +55,7 @@ #define LEFT_OP 1 #define RIGHT_OP 2 -static TupleTableSlot *IndexNext(IndexScan * node); +static TupleTableSlot *IndexNext(IndexScan *node); /* ---------------------------------------------------------------- * IndexNext @@ -80,7 +80,7 @@ static TupleTableSlot *IndexNext(IndexScan * node); * ---------------------------------------------------------------- */ static TupleTableSlot * -IndexNext(IndexScan * node) +IndexNext(IndexScan *node) { EState *estate; CommonScanState *scanstate; @@ -192,7 +192,7 @@ IndexNext(IndexScan * node) * ---------------------------------------------------------------- */ TupleTableSlot * -ExecIndexScan(IndexScan * node) +ExecIndexScan(IndexScan *node) { TupleTableSlot *returnTuple; @@ -217,7 +217,7 @@ ExecIndexScan(IndexScan * node) * ---------------------------------------------------------------- */ void -ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent) +ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent) { EState *estate; IndexScanState *indexstate; @@ -331,7 +331,7 @@ ExecIndexReScan(IndexScan * node, ExprContext * exprCtxt, Plan * parent) * ---------------------------------------------------------------- */ void -ExecEndIndexScan(IndexScan * node) +ExecEndIndexScan(IndexScan *node) { CommonScanState *scanstate; IndexScanState *indexstate; @@ -395,7 +395,7 @@ ExecEndIndexScan(IndexScan * node) * ---------------------------------------------------------------- */ void -ExecIndexMarkPos(IndexScan * node) +ExecIndexMarkPos(IndexScan *node) { IndexScanState *indexstate; IndexScanDescPtr indexScanDescs; @@ -426,7 +426,7 @@ ExecIndexMarkPos(IndexScan * node) * ---------------------------------------------------------------- */ void -ExecIndexRestrPos(IndexScan * node) +ExecIndexRestrPos(IndexScan *node) { IndexScanState *indexstate; IndexScanDescPtr indexScanDescs; @@ -461,7 +461,7 @@ ExecIndexRestrPos(IndexScan * node) * ---------------------------------------------------------------- */ bool -ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent) +ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent) { IndexScanState *indexstate; CommonScanState *scanstate; @@ -677,7 +677,7 @@ ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent) */ 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 @@ -750,7 +750,7 @@ ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent) */ 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 @@ -920,7 +920,7 @@ ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent) 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; @@ -959,7 +959,7 @@ ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent) direction, /* scan direction */ timeQual, /* time qual */ &(relationDescs[i]), /* return: rel desc */ - (Pointer *) & (scanDescs[i])); + (Pointer *) &(scanDescs[i])); /* return: scan desc */ } } @@ -977,7 +977,7 @@ ExecInitIndexScan(IndexScan * node, EState * estate, Plan * parent) } int -ExecCountSlotsIndexScan(IndexScan * node) +ExecCountSlotsIndexScan(IndexScan *node) { return ExecCountSlotsNode(outerPlan((Plan *) node)) + ExecCountSlotsNode(innerPlan((Plan *) node)) + diff --git a/src/backend/executor/nodeMaterial.c b/src/backend/executor/nodeMaterial.c index 6ff8598901..ecb7c0ee28 100644 --- a/src/backend/executor/nodeMaterial.c +++ b/src/backend/executor/nodeMaterial.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -48,7 +48,7 @@ * ---------------------------------------------------------------- */ TupleTableSlot * /* result tuple from subplan */ -ExecMaterial(Material * node) +ExecMaterial(Material *node) { EState *estate; MaterialState *matstate; @@ -188,7 +188,7 @@ ExecMaterial(Material * node) * ---------------------------------------------------------------- */ bool /* initialization status */ -ExecInitMaterial(Material * node, EState * estate, Plan * parent) +ExecInitMaterial(Material *node, EState *estate, Plan *parent) { MaterialState *matstate; Plan *outerPlan; @@ -291,7 +291,7 @@ ExecInitMaterial(Material * node, EState * estate, Plan * parent) } int -ExecCountSlotsMaterial(Material * node) +ExecCountSlotsMaterial(Material *node) { return ExecCountSlotsNode(outerPlan((Plan *) node)) + ExecCountSlotsNode(innerPlan((Plan *) node)) + @@ -306,7 +306,7 @@ ExecCountSlotsMaterial(Material * node) * ---------------------------------------------------------------- */ void -ExecEndMaterial(Material * node) +ExecEndMaterial(Material *node) { MaterialState *matstate; Relation tempRelation; diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index 54c085b1d6..e592bb3164 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -84,7 +84,7 @@ #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 @@ -143,7 +143,7 @@ static bool MergeCompare(List * eqQual, List * compareQual, ExprContext * econte * ---------------------------------------------------------------- */ static List * -MJFormOSortopI(List * qualList, Oid sortOp) +MJFormOSortopI(List *qualList, Oid sortOp) { List *qualCopy; List *qualcdr; @@ -207,7 +207,7 @@ MJFormOSortopI(List * qualList, Oid sortOp) * ---------------------------------------------------------------- */ static List * -MJFormISortopO(List * qualList, Oid sortOp) +MJFormISortopO(List *qualList, Oid sortOp) { List *ISortopO; List *qualcdr; @@ -258,7 +258,7 @@ MJFormISortopO(List * qualList, Oid sortOp) * ---------------------------------------------------------------- */ static bool -MergeCompare(List * eqQual, List * compareQual, ExprContext * econtext) +MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext) { List *clause; List *eqclause; @@ -328,7 +328,7 @@ MergeCompare(List * eqQual, List * compareQual, ExprContext * econtext) */ #ifdef EXEC_MERGEJOINDEBUG void -ExecMergeTupleDumpInner(ExprContext * econtext) +ExecMergeTupleDumpInner(ExprContext *econtext) { TupleTableSlot *innerSlot; @@ -342,7 +342,7 @@ ExecMergeTupleDumpInner(ExprContext * econtext) } void -ExecMergeTupleDumpOuter(ExprContext * econtext) +ExecMergeTupleDumpOuter(ExprContext *econtext) { TupleTableSlot *outerSlot; @@ -356,8 +356,8 @@ ExecMergeTupleDumpOuter(ExprContext * econtext) } void -ExecMergeTupleDumpMarked(ExprContext * econtext, - MergeJoinState * mergestate) +ExecMergeTupleDumpMarked(ExprContext *econtext, + MergeJoinState *mergestate) { TupleTableSlot *markedSlot; @@ -372,7 +372,7 @@ ExecMergeTupleDumpMarked(ExprContext * econtext, } void -ExecMergeTupleDump(ExprContext * econtext, MergeJoinState * mergestate) +ExecMergeTupleDump(ExprContext *econtext, MergeJoinState *mergestate) { printf("******** ExecMergeTupleDump ********\n"); @@ -386,7 +386,7 @@ ExecMergeTupleDump(ExprContext * econtext, MergeJoinState * mergestate) #endif static void -CleanUpSort(Plan * plan) +CleanUpSort(Plan *plan) { if (plan == NULL) @@ -449,7 +449,7 @@ CleanUpSort(Plan * plan) * ---------------------------------------------------------------- */ TupleTableSlot * -ExecMergeJoin(MergeJoin * node) +ExecMergeJoin(MergeJoin *node) { EState *estate; MergeJoinState *mergestate; @@ -749,7 +749,8 @@ ExecMergeJoin(MergeJoin * node) * * new outer tuple > marked tuple * - ****************************** + ***************************** + * * * * @@ -830,7 +831,8 @@ ExecMergeJoin(MergeJoin * node) * we have to advance the outer scan until we find the outer * 8. * - ****************************** + ***************************** + * * * * @@ -933,7 +935,8 @@ ExecMergeJoin(MergeJoin * node) * we have to advance the inner scan until we find the inner * 12. * - ****************************** + ***************************** + * * * * @@ -1065,7 +1068,7 @@ ExecMergeJoin(MergeJoin * node) * ---------------------------------------------------------------- */ bool -ExecInitMergeJoin(MergeJoin * node, EState * estate, Plan * parent) +ExecInitMergeJoin(MergeJoin *node, EState *estate, Plan *parent) { MergeJoinState *mergestate; List *joinclauses; @@ -1185,7 +1188,7 @@ ExecInitMergeJoin(MergeJoin * node, EState * estate, Plan * parent) } int -ExecCountSlotsMergeJoin(MergeJoin * node) +ExecCountSlotsMergeJoin(MergeJoin *node) { return ExecCountSlotsNode(outerPlan((Plan *) node)) + ExecCountSlotsNode(innerPlan((Plan *) node)) + @@ -1200,7 +1203,7 @@ ExecCountSlotsMergeJoin(MergeJoin * node) * ---------------------------------------------------------------- */ void -ExecEndMergeJoin(MergeJoin * node) +ExecEndMergeJoin(MergeJoin *node) { MergeJoinState *mergestate; diff --git a/src/backend/executor/nodeNestloop.c b/src/backend/executor/nodeNestloop.c index fe6123a0aa..ff9327ee99 100644 --- a/src/backend/executor/nodeNestloop.c +++ b/src/backend/executor/nodeNestloop.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -55,7 +55,7 @@ * ---------------------------------------------------------------- */ TupleTableSlot * -ExecNestLoop(NestLoop * node, Plan * parent) +ExecNestLoop(NestLoop *node, Plan *parent) { NestLoopState *nlstate; Plan *innerPlan; @@ -86,7 +86,7 @@ ExecNestLoop(NestLoop * node, Plan * parent) */ econtext = nlstate->jstate.cs_ExprContext; - /* ---------------- * get the current outer tuple + /* ---------------- * get the current outer tuple * ---------------- */ outerTupleSlot = nlstate->jstate.cs_OuterTupleSlot; @@ -265,7 +265,7 @@ ExecNestLoop(NestLoop * node, Plan * parent) * ---------------------------------------------------------------- */ bool -ExecInitNestLoop(NestLoop * node, EState * estate, Plan * parent) +ExecInitNestLoop(NestLoop *node, EState *estate, Plan *parent) { NestLoopState *nlstate; @@ -331,7 +331,7 @@ ExecInitNestLoop(NestLoop * node, EState * estate, Plan * parent) } int -ExecCountSlotsNestLoop(NestLoop * node) +ExecCountSlotsNestLoop(NestLoop *node) { return ExecCountSlotsNode(outerPlan(node)) + ExecCountSlotsNode(innerPlan(node)) + @@ -345,7 +345,7 @@ ExecCountSlotsNestLoop(NestLoop * node) * ---------------------------------------------------------------- */ void -ExecEndNestLoop(NestLoop * node) +ExecEndNestLoop(NestLoop *node) { NestLoopState *nlstate; diff --git a/src/backend/executor/nodeResult.c b/src/backend/executor/nodeResult.c index 4e0e62ddfe..78f8c76261 100644 --- a/src/backend/executor/nodeResult.c +++ b/src/backend/executor/nodeResult.c @@ -27,7 +27,7 @@ * 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 $ * *------------------------------------------------------------------------- */ @@ -51,7 +51,7 @@ * ---------------------------------------------------------------- */ TupleTableSlot * -ExecResult(Result * node) +ExecResult(Result *node) { ResultState *resstate; TupleTableSlot *outerTupleSlot; @@ -189,7 +189,7 @@ ExecResult(Result * node) * ---------------------------------------------------------------- */ bool -ExecInitResult(Result * node, EState * estate, Plan * parent) +ExecInitResult(Result *node, EState *estate, Plan *parent) { ResultState *resstate; @@ -253,7 +253,7 @@ ExecInitResult(Result * node, EState * estate, Plan * parent) } int -ExecCountSlotsResult(Result * node) +ExecCountSlotsResult(Result *node) { return ExecCountSlotsNode(outerPlan(node)) + RESULT_NSLOTS; } @@ -265,7 +265,7 @@ ExecCountSlotsResult(Result * node) * ---------------------------------------------------------------- */ void -ExecEndResult(Result * node) +ExecEndResult(Result *node) { ResultState *resstate; diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c index 1d04360c9d..5bcde93479 100644 --- a/src/backend/executor/nodeSeqscan.c +++ b/src/backend/executor/nodeSeqscan.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -31,10 +31,10 @@ #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 @@ -47,7 +47,7 @@ static TupleTableSlot *SeqNext(SeqScan * node); * ---------------------------------------------------------------- */ static TupleTableSlot * -SeqNext(SeqScan * node) +SeqNext(SeqScan *node) { HeapTuple tuple; HeapScanDesc scandesc; @@ -115,7 +115,7 @@ SeqNext(SeqScan * node) */ TupleTableSlot * -ExecSeqScan(SeqScan * node) +ExecSeqScan(SeqScan *node) { TupleTableSlot *slot; Plan *outerPlan; @@ -151,8 +151,8 @@ ExecSeqScan(SeqScan * node) * ---------------------------------------------------------------- */ static Oid -InitScanRelation(SeqScan * node, EState * estate, - CommonScanState * scanstate, Plan * outerPlan) +InitScanRelation(SeqScan *node, EState *estate, + CommonScanState *scanstate, Plan *outerPlan) { Index relid; List *rangeTable; @@ -190,7 +190,7 @@ InitScanRelation(SeqScan * node, EState * estate, 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; @@ -236,7 +236,7 @@ InitScanRelation(SeqScan * node, EState * estate, * ---------------------------------------------------------------- */ bool -ExecInitSeqScan(SeqScan * node, EState * estate, Plan * parent) +ExecInitSeqScan(SeqScan *node, EState *estate, Plan *parent) { CommonScanState *scanstate; Plan *outerPlan; @@ -296,7 +296,7 @@ ExecInitSeqScan(SeqScan * node, EState * estate, Plan * parent) } int -ExecCountSlotsSeqScan(SeqScan * node) +ExecCountSlotsSeqScan(SeqScan *node) { return ExecCountSlotsNode(outerPlan(node)) + ExecCountSlotsNode(innerPlan(node)) + @@ -312,7 +312,7 @@ ExecCountSlotsSeqScan(SeqScan * node) * ---------------------------------------------------------------- */ void -ExecEndSeqScan(SeqScan * node) +ExecEndSeqScan(SeqScan *node) { CommonScanState *scanstate; Plan *outerPlan; @@ -366,7 +366,7 @@ ExecEndSeqScan(SeqScan * node) * ---------------------------------------------------------------- */ void -ExecSeqReScan(SeqScan * node, ExprContext * exprCtxt, Plan * parent) +ExecSeqReScan(SeqScan *node, ExprContext *exprCtxt, Plan *parent) { CommonScanState *scanstate; EState *estate; @@ -403,7 +403,7 @@ ExecSeqReScan(SeqScan * node, ExprContext * exprCtxt, Plan * parent) * ---------------------------------------------------------------- */ void -ExecSeqMarkPos(SeqScan * node) +ExecSeqMarkPos(SeqScan *node) { CommonScanState *scanstate; Plan *outerPlan; @@ -442,7 +442,7 @@ ExecSeqMarkPos(SeqScan * node) * ---------------------------------------------------------------- */ void -ExecSeqRestrPos(SeqScan * node) +ExecSeqRestrPos(SeqScan *node) { CommonScanState *scanstate; Plan *outerPlan; diff --git a/src/backend/executor/nodeSort.c b/src/backend/executor/nodeSort.c index 64f56bc99a..9a61300efd 100644 --- a/src/backend/executor/nodeSort.c +++ b/src/backend/executor/nodeSort.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -33,7 +33,7 @@ * ---------------------------------------------------------------- */ static ScanKey -FormSortKeys(Sort * sortnode) +FormSortKeys(Sort *sortnode) { ScanKey sortkeys; List *targetList; @@ -102,7 +102,7 @@ FormSortKeys(Sort * sortnode) * ---------------------------------------------------------------- */ TupleTableSlot * -ExecSort(Sort * node) +ExecSort(Sort *node) { EState *estate; SortState *sortstate; @@ -229,7 +229,7 @@ ExecSort(Sort * node) * ---------------------------------------------------------------- */ bool -ExecInitSort(Sort * node, EState * estate, Plan * parent) +ExecInitSort(Sort *node, EState *estate, Plan *parent) { SortState *sortstate; Plan *outerPlan; @@ -314,7 +314,7 @@ ExecInitSort(Sort * node, EState * estate, Plan * parent) } int -ExecCountSlotsSort(Sort * node) +ExecCountSlotsSort(Sort *node) { return ExecCountSlotsNode(outerPlan((Plan *) node)) + ExecCountSlotsNode(innerPlan((Plan *) node)) + @@ -328,7 +328,7 @@ ExecCountSlotsSort(Sort * node) * ---------------------------------------------------------------- */ void -ExecEndSort(Sort * node) +ExecEndSort(Sort *node) { SortState *sortstate; Plan *outerPlan; @@ -369,7 +369,7 @@ ExecEndSort(Sort * node) * ---------------------------------------------------------------- */ void -ExecSortMarkPos(Sort * node) +ExecSortMarkPos(Sort *node) { SortState *sortstate; @@ -393,7 +393,7 @@ ExecSortMarkPos(Sort * node) * ---------------------------------------------------------------- */ void -ExecSortRestrPos(Sort * node) +ExecSortRestrPos(Sort *node) { SortState *sortstate; diff --git a/src/backend/executor/nodeTee.c b/src/backend/executor/nodeTee.c index e3ddfe39d6..d7c0c19d2e 100644 --- a/src/backend/executor/nodeTee.c +++ b/src/backend/executor/nodeTee.c @@ -15,7 +15,7 @@ * 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 $ * *------------------------------------------------------------------------- */ @@ -45,7 +45,7 @@ * ------------------------------------------------------------------ */ bool -ExecInitTee(Tee * node, EState * currentEstate, Plan * parent) +ExecInitTee(Tee *node, EState *currentEstate, Plan *parent) { TeeState *teeState; Plan *outerPlan; @@ -214,7 +214,7 @@ ExecInitTee(Tee * node, EState * currentEstate, Plan * parent) } int -ExecCountSlotsTee(Tee * node) +ExecCountSlotsTee(Tee *node) { /* Tee nodes can't have innerPlans */ return ExecCountSlotsNode(outerPlan(node)) + TEE_NSLOTS; @@ -230,7 +230,7 @@ ExecCountSlotsTee(Tee * node) * ---------------------------------------------------------------- */ static void -initTeeScanDescs(Tee * node) +initTeeScanDescs(Tee *node) { TeeState *teeState; Relation bufferRel; @@ -290,7 +290,7 @@ initTeeScanDescs(Tee * node) */ TupleTableSlot * -ExecTee(Tee * node, Plan * parent) +ExecTee(Tee *node, Plan *parent) { EState *estate; TeeState *teeState; @@ -443,7 +443,7 @@ ExecTee(Tee * node, Plan * parent) * ---------------------------------------------------------------- */ void -ExecTeeReScan(Tee * node, ExprContext * exprCtxt, Plan * parent) +ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent) { EState *estate; @@ -490,7 +490,7 @@ ExecTeeReScan(Tee * node, ExprContext * exprCtxt, Plan * parent) */ void -ExecEndTee(Tee * node, Plan * parent) +ExecEndTee(Tee *node, Plan *parent) { EState *estate; TeeState *teeState; diff --git a/src/backend/executor/nodeUnique.c b/src/backend/executor/nodeUnique.c index 5a340b8cf5..84879aa091 100644 --- a/src/backend/executor/nodeUnique.c +++ b/src/backend/executor/nodeUnique.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -47,9 +47,9 @@ * 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; @@ -108,7 +108,7 @@ ExecIdenticalTuples(TupleTableSlot * t1, TupleTableSlot * t2) * ---------------------------------------------------------------- */ TupleTableSlot * /* return: a tuple or NULL */ -ExecUnique(Unique * node) +ExecUnique(Unique *node) { UniqueState *uniquestate; TupleTableSlot *resultTupleSlot; @@ -243,7 +243,7 @@ ExecUnique(Unique * node) * ---------------------------------------------------------------- */ bool /* return: initialization status */ -ExecInitUnique(Unique * node, EState * estate, Plan * parent) +ExecInitUnique(Unique *node, EState *estate, Plan *parent) { UniqueState *uniquestate; Plan *outerPlan; @@ -323,7 +323,7 @@ ExecInitUnique(Unique * node, EState * estate, Plan * parent) } int -ExecCountSlotsUnique(Unique * node) +ExecCountSlotsUnique(Unique *node) { return ExecCountSlotsNode(outerPlan(node)) + ExecCountSlotsNode(innerPlan(node)) + @@ -338,7 +338,7 @@ ExecCountSlotsUnique(Unique * node) * ---------------------------------------------------------------- */ void -ExecEndUnique(Unique * node) +ExecEndUnique(Unique *node) { UniqueState *uniquestate; diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index de4915785d..7904351c96 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -17,7 +17,7 @@ typedef struct 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; @@ -37,20 +37,20 @@ typedef struct 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); @@ -217,7 +217,7 @@ SPI_execp(void *plan, char **Values, char *Nulls, int tcount) } void * -SPI_prepare(char *src, int nargs, Oid * argtypes) +SPI_prepare(char *src, int nargs, Oid *argtypes) { _SPI_plan *plan; @@ -320,7 +320,7 @@ SPI_getvalue(HeapTuple tuple, TupleDesc tupdesc, int fnumber) } char * -SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool * isnull) +SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool *isnull) { char *val; @@ -457,7 +457,7 @@ spi_printtup(HeapTuple tuple, TupleDesc tupdesc) */ 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; @@ -554,7 +554,7 @@ _SPI_execute(char *src, int tcount, _SPI_plan * plan) } 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; @@ -625,7 +625,7 @@ _SPI_execute_plan(_SPI_plan * plan, char **Values, char *Nulls, int tcount) } static int -_SPI_pquery(QueryDesc * queryDesc, EState * state, int tcount) +_SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount) { Query *parseTree; Plan *plan; @@ -723,7 +723,7 @@ _SPI_pquery(QueryDesc * queryDesc, EState * state, int tcount) #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; @@ -864,7 +864,7 @@ _SPI_checktuples(bool isRetrieveIntoRelation) } static _SPI_plan * -_SPI_copy_plan(_SPI_plan * plan, bool local) +_SPI_copy_plan(_SPI_plan *plan, bool local) { _SPI_plan *newplan; MemoryContext oldcxt; diff --git a/src/backend/lib/dllist.c b/src/backend/lib/dllist.c index 8790a84440..85d1d7c5cd 100644 --- a/src/backend/lib/dllist.c +++ b/src/backend/lib/dllist.c @@ -9,7 +9,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -32,7 +32,7 @@ DLNewList(void) /* free up a list and all the nodes in it */ void -DLFreeList(Dllist * l) +DLFreeList(Dllist *l) { Dlelem *curr; @@ -56,13 +56,13 @@ DLNewElem(void *val) } void -DLFreeElem(Dlelem * e) +DLFreeElem(Dlelem *e) { free(e); } Dlelem * -DLGetHead(Dllist * l) +DLGetHead(Dllist *l) { return (l ? l->dll_head : 0); } @@ -70,7 +70,7 @@ DLGetHead(Dllist * l) /* get the value stored in the first element */ #ifdef NOT_USED void * -DLGetHeadVal(Dllist * l) +DLGetHeadVal(Dllist *l) { Dlelem *e = DLGetHead(l); @@ -80,7 +80,7 @@ DLGetHeadVal(Dllist * l) #endif Dlelem * -DLGetTail(Dllist * l) +DLGetTail(Dllist *l) { return (l ? l->dll_tail : 0); } @@ -88,7 +88,7 @@ DLGetTail(Dllist * l) /* get the value stored in the first element */ #ifdef NOT_USED void * -DLGetTailVal(Dllist * l) +DLGetTailVal(Dllist *l) { Dlelem *e = DLGetTail(l); @@ -98,19 +98,19 @@ DLGetTailVal(Dllist * 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; @@ -129,7 +129,7 @@ DLRemove(Dlelem * e) } void -DLAddHead(Dllist * l, Dlelem * e) +DLAddHead(Dllist *l, Dlelem *e) { e->dle_list = l; @@ -146,7 +146,7 @@ DLAddHead(Dllist * l, Dlelem * e) } void -DLAddTail(Dllist * l, Dlelem * e) +DLAddTail(Dllist *l, Dlelem *e) { e->dle_list = l; @@ -163,7 +163,7 @@ DLAddTail(Dllist * l, Dlelem * e) } Dlelem * -DLRemHead(Dllist * l) +DLRemHead(Dllist *l) { /* remove and return the head */ Dlelem *result; @@ -189,7 +189,7 @@ DLRemHead(Dllist * l) } Dlelem * -DLRemTail(Dllist * l) +DLRemTail(Dllist *l) { /* remove and return the tail */ Dlelem *result; diff --git a/src/backend/lib/hasht.c b/src/backend/lib/hasht.c index 3ad58e4e0e..0dd84b4b53 100644 --- a/src/backend/lib/hasht.c +++ b/src/backend/lib/hasht.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -26,7 +26,7 @@ * ----------------------------------- */ void -HashTableWalk(HTAB * hashtable, HashtFunc function, int arg) +HashTableWalk(HTAB *hashtable, HashtFunc function, int arg) { long *hashent; long *data; diff --git a/src/backend/lib/lispsort.c b/src/backend/lib/lispsort.c index 41c0e934e7..6ddae8fb7b 100644 --- a/src/backend/lib/lispsort.c +++ b/src/backend/lib/lispsort.c @@ -6,7 +6,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -30,7 +30,7 @@ ** 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; diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index f3af7c52cc..eeb26b9587 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -424,7 +424,7 @@ pg_krb5_recvauth(int sock, #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, @@ -449,7 +449,7 @@ pg_password_recvauth(Port * port, char *database, char *DataDir) * 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; diff --git a/src/backend/libpq/be-dumpdata.c b/src/backend/libpq/be-dumpdata.c index f2a0a71889..97413e82f4 100644 --- a/src/backend/libpq/be-dumpdata.c +++ b/src/backend/libpq/be-dumpdata.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -73,7 +73,7 @@ be_portalinit(void) * ---------------- */ void -be_portalpush(PortalEntry * entry) +be_portalpush(PortalEntry *entry) { DLAddTail(be_portalstack, DLNewElem(entry)); } @@ -166,7 +166,7 @@ be_newportal(void) * ---------------- */ void -be_typeinit(PortalEntry * entry, +be_typeinit(PortalEntry *entry, TupleDesc tupDesc, int natts) { diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c index da166ae54a..19a5275737 100644 --- a/src/backend/libpq/be-fsstubs.c +++ b/src/backend/libpq/be-fsstubs.c @@ -7,7 +7,7 @@ * * * 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 @@ -49,7 +49,7 @@ static LargeObjectDesc *cookies[MAX_LOBJ_FDS]; static GlobalMemory fscxt = NULL; -static int newLOfd(LargeObjectDesc * lobjCookie); +static int newLOfd(LargeObjectDesc *lobjCookie); static void deleteLOfd(int fd); @@ -254,7 +254,7 @@ lowrite(int fd, struct varlena * wbuf) * imports a file as an (inversion) large object. */ Oid -lo_import(text * filename) +lo_import(text *filename) { int fd; int nbytes, @@ -317,7 +317,7 @@ lo_import(text * filename) * exports an (inversion) large object. */ int4 -lo_export(Oid lobjId, text * filename) +lo_export(Oid lobjId, text *filename) { int fd; int nbytes, @@ -377,7 +377,7 @@ lo_export(Oid lobjId, text * filename) *****************************************************************************/ static int -newLOfd(LargeObjectDesc * lobjCookie) +newLOfd(LargeObjectDesc *lobjCookie) { int i; diff --git a/src/backend/libpq/be-pqexec.c b/src/backend/libpq/be-pqexec.c index 24f2240d10..31be26425f 100644 --- a/src/backend/libpq/be-pqexec.c +++ b/src/backend/libpq/be-pqexec.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -63,7 +63,7 @@ PQfn(int fnid, 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 ? */ diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 8e1a0753b2..d0734d3ea5 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -42,7 +42,7 @@ isblank(const char c) 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 @@ -85,7 +85,7 @@ next_token(FILE * fp, char *buf, const int bufsz) static void -read_through_eol(FILE * file) +read_through_eol(FILE *file) { int c; @@ -97,8 +97,8 @@ read_through_eol(FILE * file) 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, @@ -182,9 +182,9 @@ read_hba_entry2(FILE * file, enum Userauth * userauth_p, char usermap_name[], 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) { @@ -311,9 +311,9 @@ process_hba_record(FILE * file, 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) { /*--------------------------------------------------------------------------- @@ -370,7 +370,7 @@ process_open_config_file(FILE * file, 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) { /*-------------------------------------------------------------------------- @@ -461,7 +461,7 @@ find_hba_entry(const char DataDir[], const struct in_addr ip_addr, 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 @@ -549,7 +549,7 @@ interpret_ident_response(char ident_response[], 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 @@ -661,7 +661,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr, static void -parse_map_record(FILE * file, +parse_map_record(FILE *file, char file_map[], char file_pguser[], char file_iuser[]) { /*--------------------------------------------------------------------------- @@ -702,11 +702,11 @@ parse_map_record(FILE * file, 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, @@ -758,7 +758,7 @@ verify_against_usermap(const char DataDir[], 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 @@ -838,7 +838,7 @@ static void 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 @@ -878,7 +878,7 @@ authident(const char DataDir[], 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[]) { /*--------------------------------------------------------------------------- @@ -923,7 +923,7 @@ hba_recvauth(const Port * port, const char database[], const char user[], case Trust: retvalue = STATUS_OK; break; - case Ident: + case Ident: { /* @@ -934,14 +934,15 @@ hba_recvauth(const Port * port, const char database[], const char user[], 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); diff --git a/src/backend/libpq/password.c b/src/backend/libpq/password.c index 2553878fc5..bd2f6bee20 100644 --- a/src/backend/libpq/password.c +++ b/src/backend/libpq/password.c @@ -10,7 +10,7 @@ #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; diff --git a/src/backend/libpq/portal.c b/src/backend/libpq/portal.c index 2d213a1f24..c85b3a763c 100644 --- a/src/backend/libpq/portal.c +++ b/src/backend/libpq/portal.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -183,7 +183,7 @@ PQparray(char *pname) * -------------------------------- */ int -PQrulep(PortalBuffer * portal) +PQrulep(PortalBuffer *portal) { if (!valid_pointer("PQrulep: invalid portal pointer", portal)) return (-1); @@ -196,7 +196,7 @@ PQrulep(PortalBuffer * portal) * -------------------------------- */ int -PQntuples(PortalBuffer * portal) +PQntuples(PortalBuffer *portal) { if (!valid_pointer("PQntuples: invalid portal pointer", portal)) return (-1); @@ -205,7 +205,7 @@ PQntuples(PortalBuffer * portal) } int -PQninstances(PortalBuffer * portal) +PQninstances(PortalBuffer *portal) { return (PQntuples(portal)); } @@ -215,7 +215,7 @@ PQninstances(PortalBuffer * portal) * -------------------------------- */ int -PQngroups(PortalBuffer * portal) +PQngroups(PortalBuffer *portal) { if (!valid_pointer("PQngroups: invalid portal pointer", portal)) return (-1); @@ -228,7 +228,7 @@ PQngroups(PortalBuffer * portal) * -------------------------------- */ int -PQntuplesGroup(PortalBuffer * portal, int group_index) +PQntuplesGroup(PortalBuffer *portal, int group_index) { GroupBuffer *gbp; @@ -244,7 +244,7 @@ PQntuplesGroup(PortalBuffer * portal, int group_index) } int -PQninstancesGroup(PortalBuffer * portal, int group_index) +PQninstancesGroup(PortalBuffer *portal, int group_index) { return (PQntuplesGroup(portal, group_index)); } @@ -254,7 +254,7 @@ PQninstancesGroup(PortalBuffer * portal, int group_index) * -------------------------------- */ int -PQnfieldsGroup(PortalBuffer * portal, int group_index) +PQnfieldsGroup(PortalBuffer *portal, int group_index) { GroupBuffer *gbp; @@ -274,7 +274,7 @@ PQnfieldsGroup(PortalBuffer * portal, int group_index) * -------------------------------- */ int -PQfnumberGroup(PortalBuffer * portal, int group_index, char *field_name) +PQfnumberGroup(PortalBuffer *portal, int group_index, char *field_name) { GroupBuffer *gbp; @@ -296,7 +296,7 @@ PQfnumberGroup(PortalBuffer * portal, int group_index, char *field_name) * -------------------------------- */ char * -PQfnameGroup(PortalBuffer * portal, int group_index, int field_number) +PQfnameGroup(PortalBuffer *portal, int group_index, int field_number) { GroupBuffer *gbp; @@ -318,7 +318,7 @@ PQfnameGroup(PortalBuffer * portal, int group_index, int field_number) * -------------------------------- */ int -PQftypeGroup(PortalBuffer * portal, int group_index, int field_number) +PQftypeGroup(PortalBuffer *portal, int group_index, int field_number) { GroupBuffer *gbp; @@ -339,7 +339,7 @@ PQftypeGroup(PortalBuffer * portal, int group_index, int field_number) * -------------------------------- */ int -PQfsizeGroup(PortalBuffer * portal, int group_index, int field_number) +PQfsizeGroup(PortalBuffer *portal, int group_index, int field_number) { GroupBuffer *gbp; @@ -360,7 +360,7 @@ PQfsizeGroup(PortalBuffer * portal, int group_index, int field_number) * -------------------------------- */ GroupBuffer * -PQgroup(PortalBuffer * portal, int tuple_index) +PQgroup(PortalBuffer *portal, int tuple_index) { GroupBuffer *gbp; int tuple_count = 0; @@ -386,7 +386,7 @@ PQgroup(PortalBuffer * portal, int tuple_index) * -------------------------------- */ int -PQgetgroup(PortalBuffer * portal, int tuple_index) +PQgetgroup(PortalBuffer *portal, int tuple_index) { GroupBuffer *gbp; int tuple_count = 0, @@ -412,7 +412,7 @@ PQgetgroup(PortalBuffer * portal, int tuple_index) * -------------------------------- */ int -PQnfields(PortalBuffer * portal, int tuple_index) +PQnfields(PortalBuffer *portal, int tuple_index) { GroupBuffer *gbp; @@ -432,7 +432,7 @@ PQnfields(PortalBuffer * portal, int tuple_index) * -------------------------------- */ int -PQfnumber(PortalBuffer * portal, int tuple_index, char *field_name) +PQfnumber(PortalBuffer *portal, int tuple_index, char *field_name) { GroupBuffer *gbp; @@ -452,7 +452,7 @@ PQfnumber(PortalBuffer * portal, int tuple_index, char *field_name) * -------------------------------- */ char * -PQfname(PortalBuffer * portal, int tuple_index, int field_number) +PQfname(PortalBuffer *portal, int tuple_index, int field_number) { GroupBuffer *gbp; @@ -473,7 +473,7 @@ PQfname(PortalBuffer * portal, int tuple_index, int field_number) * -------------------------------- */ int -PQftype(PortalBuffer * portal, int tuple_index, int field_number) +PQftype(PortalBuffer *portal, int tuple_index, int field_number) { GroupBuffer *gbp; @@ -493,7 +493,7 @@ PQftype(PortalBuffer * portal, int tuple_index, int field_number) * -------------------------------- */ int -PQfsize(PortalBuffer * portal, int tuple_index, int field_number) +PQfsize(PortalBuffer *portal, int tuple_index, int field_number) { GroupBuffer *gbp; @@ -516,7 +516,7 @@ PQfsize(PortalBuffer * portal, int tuple_index, int field_number) * -------------------------------- */ int -PQsametype(PortalBuffer * portal, int tuple_index1, int tuple_index2) +PQsametype(PortalBuffer *portal, int tuple_index1, int tuple_index2) { GroupBuffer *gbp1, *gbp2; @@ -536,7 +536,7 @@ PQsametype(PortalBuffer * portal, int tuple_index1, int tuple_index2) } static TupleBlock * -PQGetTupleBlock(PortalBuffer * portal, +PQGetTupleBlock(PortalBuffer *portal, int tuple_index, int *tuple_offset) { @@ -579,7 +579,7 @@ PQGetTupleBlock(PortalBuffer * portal, * -------------------------------- */ char * -PQgetvalue(PortalBuffer * portal, +PQgetvalue(PortalBuffer *portal, int tuple_index, int field_number) { @@ -599,7 +599,7 @@ PQgetvalue(PortalBuffer * portal, * -------------------------------- */ char * -PQgetAttr(PortalBuffer * portal, +PQgetAttr(PortalBuffer *portal, int tuple_index, int field_number) { @@ -627,7 +627,7 @@ PQgetAttr(PortalBuffer * portal, * -------------------------------- */ int -PQgetlength(PortalBuffer * portal, +PQgetlength(PortalBuffer *portal, int tuple_index, int field_number) { @@ -716,7 +716,7 @@ PQnotifies() } void -PQremoveNotify(PQNotifyList * nPtr) +PQremoveNotify(PQNotifyList *nPtr) { nPtr->valid = 0; /* remove later */ } diff --git a/src/backend/libpq/portalbuf.c b/src/backend/libpq/portalbuf.c index 71db1d1e76..bff6a449ea 100644 --- a/src/backend/libpq/portalbuf.c +++ b/src/backend/libpq/portalbuf.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -160,7 +160,7 @@ pbuf_addPortal() * -------------------------------- */ GroupBuffer * -pbuf_addGroup(PortalBuffer * portal) +pbuf_addGroup(PortalBuffer *portal) { GroupBuffer *group, *group1; @@ -285,7 +285,7 @@ pbuf_freeEntry(int i) * -------------------------------- */ void -pbuf_freeTypes(TypeBlock * types) +pbuf_freeTypes(TypeBlock *types) { pbuf_free((caddr_t) types); } @@ -295,7 +295,7 @@ pbuf_freeTypes(TypeBlock * types) * -------------------------------- */ void -pbuf_freeTuples(TupleBlock * tuples, +pbuf_freeTuples(TupleBlock *tuples, int no_tuples, int no_fields) { @@ -328,7 +328,7 @@ pbuf_freeTuples(TupleBlock * tuples, * -------------------------------- */ void -pbuf_freeGroup(GroupBuffer * group) +pbuf_freeGroup(GroupBuffer *group) { if (group->next != NULL) pbuf_freeGroup(group->next); @@ -347,7 +347,7 @@ pbuf_freeGroup(GroupBuffer * group) * -------------------------------- */ void -pbuf_freePortal(PortalBuffer * portal) +pbuf_freePortal(PortalBuffer *portal) { if (portal->groups != NULL) pbuf_freeGroup(portal->groups); @@ -381,7 +381,7 @@ pbuf_getIndex(char *pname) * -------------------------------- */ void -pbuf_setportalinfo(PortalEntry * entry, char *pname) +pbuf_setportalinfo(PortalEntry *entry, char *pname) { if (entry) strNcpy(entry->name, pname, PortalNameLength - 1); @@ -449,7 +449,7 @@ pbuf_close(char *pname) * -------------------------------- */ GroupBuffer * -pbuf_findGroup(PortalBuffer * portal, +pbuf_findGroup(PortalBuffer *portal, int group_index) { GroupBuffer *group; @@ -473,7 +473,7 @@ pbuf_findGroup(PortalBuffer * portal, * -------------------------------- */ int -pbuf_findFnumber(GroupBuffer * group, +pbuf_findFnumber(GroupBuffer *group, char *field_name) { TypeBlock *types; @@ -498,7 +498,7 @@ pbuf_findFnumber(GroupBuffer * group, * -------------------------------- */ void -pbuf_checkFnumber(GroupBuffer * group, +pbuf_checkFnumber(GroupBuffer *group, int field_number) { if (field_number < 0 || field_number >= group->no_fields) @@ -511,7 +511,7 @@ pbuf_checkFnumber(GroupBuffer * group, * -------------------------------- */ char * -pbuf_findFname(GroupBuffer * group, +pbuf_findFname(GroupBuffer *group, int field_number) { pbuf_checkFnumber(group, field_number); diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 93e8fa81af..550e797d27 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -100,7 +100,7 @@ pq_init(int fd) * used for debugging libpq */ static int -pq_getc(FILE * fin) +pq_getc(FILE *fin) { int c; @@ -643,7 +643,7 @@ StreamServerPort(char *hostName, short portName, int *fdP) * RETURNS: STATUS_OK or STATUS_ERROR */ int -StreamConnection(int server_fd, Port * port) +StreamConnection(int server_fd, Port *port) { int addrlen; @@ -712,7 +712,7 @@ StreamClose(int sock) * --------------------------- */ int -StreamOpen(char *hostName, short portName, Port * port) +StreamOpen(char *hostName, short portName, Port *port) { struct hostent *hp; int laddrlen = sizeof(struct sockaddr_in); diff --git a/src/backend/libpq/pqcomprim.c b/src/backend/libpq/pqcomprim.c index d6bdf6f13b..594bb2b98a 100644 --- a/src/backend/libpq/pqcomprim.c +++ b/src/backend/libpq/pqcomprim.c @@ -46,7 +46,7 @@ /* --------------------------------------------------------------------- */ int -pqPutShort(int integer, FILE * f) +pqPutShort(int integer, FILE *f) { int retval = 0; u_short n, @@ -62,7 +62,7 @@ pqPutShort(int integer, FILE * f) /* --------------------------------------------------------------------- */ int -pqPutLong(int integer, FILE * f) +pqPutLong(int integer, FILE *f) { int retval = 0; u_long n; @@ -76,7 +76,7 @@ pqPutLong(int integer, FILE * f) /* --------------------------------------------------------------------- */ int -pqGetShort(int *result, FILE * f) +pqGetShort(int *result, FILE *f) { int retval = 0; u_short n; @@ -90,7 +90,7 @@ pqGetShort(int *result, FILE * f) /* --------------------------------------------------------------------- */ int -pqGetLong(int *result, FILE * f) +pqGetLong(int *result, FILE *f) { int retval = 0; u_long n; @@ -107,7 +107,7 @@ pqGetLong(int *result, FILE * f) Return 0 if ok. */ int -pqGetNBytes(char *s, size_t len, FILE * f) +pqGetNBytes(char *s, size_t len, FILE *f) { int cnt; @@ -123,7 +123,7 @@ pqGetNBytes(char *s, size_t len, FILE * f) /* --------------------------------------------------------------------- */ int -pqPutNBytes(const char *s, size_t len, FILE * f) +pqPutNBytes(const char *s, size_t len, FILE *f) { if (f == NULL) return 0; @@ -136,7 +136,7 @@ pqPutNBytes(const char *s, size_t len, FILE * f) /* --------------------------------------------------------------------- */ int -pqGetString(char *s, size_t len, FILE * f) +pqGetString(char *s, size_t len, FILE *f) { int c; @@ -153,7 +153,7 @@ pqGetString(char *s, size_t len, FILE * f) /* --------------------------------------------------------------------- */ int -pqPutString(const char *s, FILE * f) +pqPutString(const char *s, FILE *f) { if (f == NULL) return 0; @@ -170,14 +170,14 @@ pqPutString(const char *s, FILE * f) /* --------------------------------------------------------------------- */ 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; diff --git a/src/backend/libpq/pqpacket.c b/src/backend/libpq/pqpacket.c index fb1f2fbb48..1e95794c85 100644 --- a/src/backend/libpq/pqpacket.c +++ b/src/backend/libpq/pqpacket.c @@ -8,7 +8,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -57,8 +57,8 @@ * */ 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); @@ -219,8 +219,8 @@ PacketReceive(Port * port, /* receive port */ * */ int -PacketSend(Port * port, - PacketBuf * buf, +PacketSend(Port *port, + PacketBuf *buf, PacketLen len, bool nonBlocking) { diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 36ed7e86eb..ef6c1a1828 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -37,7 +37,7 @@ * 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, @@ -78,7 +78,7 @@ listCopy(List * list) * ---------------- */ static void -CopyPlanFields(Plan * from, Plan * newnode) +CopyPlanFields(Plan *from, Plan *newnode) { newnode->cost = from->cost; newnode->plan_size = from->plan_size; @@ -95,7 +95,7 @@ CopyPlanFields(Plan * from, Plan * newnode) * ---------------- */ static Plan * -_copyPlan(Plan * from) +_copyPlan(Plan *from) { Plan *newnode = makeNode(Plan); @@ -114,7 +114,7 @@ _copyPlan(Plan * from) * ---------------- */ static Existential * -_copyExistential(Existential * from) +_copyExistential(Existential *from) { Existential *newnode = makeNode(Existential); @@ -132,7 +132,7 @@ _copyExistential(Existential * from) * ---------------- */ static Result * -_copyResult(Result * from) +_copyResult(Result *from) { Result *newnode = makeNode(Result); @@ -188,7 +188,7 @@ _copyAppend(Append *from) * ---------------- */ static void -CopyScanFields(Scan * from, Scan * newnode) +CopyScanFields(Scan *from, Scan *newnode) { newnode->scanrelid = from->scanrelid; Node_Copy(from, newnode, scanstate); @@ -200,7 +200,7 @@ CopyScanFields(Scan * from, Scan * newnode) * ---------------- */ static Scan * -_copyScan(Scan * from) +_copyScan(Scan *from) { Scan *newnode = makeNode(Scan); @@ -219,7 +219,7 @@ _copyScan(Scan * from) * ---------------- */ static SeqScan * -_copySeqScan(SeqScan * from) +_copySeqScan(SeqScan *from) { SeqScan *newnode = makeNode(SeqScan); @@ -238,7 +238,7 @@ _copySeqScan(SeqScan * from) * ---------------- */ static IndexScan * -_copyIndexScan(IndexScan * from) +_copyIndexScan(IndexScan *from) { IndexScan *newnode = makeNode(IndexScan); @@ -268,7 +268,7 @@ _copyIndexScan(IndexScan * from) * ---------------- */ static void -CopyJoinFields(Join * from, Join * newnode) +CopyJoinFields(Join *from, Join *newnode) { /* nothing extra */ return; @@ -280,7 +280,7 @@ CopyJoinFields(Join * from, Join * newnode) * ---------------- */ static Join * -_copyJoin(Join * from) +_copyJoin(Join *from) { Join *newnode = makeNode(Join); @@ -300,7 +300,7 @@ _copyJoin(Join * from) * ---------------- */ static NestLoop * -_copyNestLoop(NestLoop * from) +_copyNestLoop(NestLoop *from) { NestLoop *newnode = makeNode(NestLoop); @@ -326,7 +326,7 @@ _copyNestLoop(NestLoop * from) * ---------------- */ static MergeJoin * -_copyMergeJoin(MergeJoin * from) +_copyMergeJoin(MergeJoin *from) { MergeJoin *newnode = makeNode(MergeJoin); List *newlist; @@ -365,7 +365,7 @@ _copyMergeJoin(MergeJoin * from) * ---------------- */ static HashJoin * -_copyHashJoin(HashJoin * from) +_copyHashJoin(HashJoin *from) { HashJoin *newnode = makeNode(HashJoin); @@ -403,7 +403,7 @@ _copyHashJoin(HashJoin * from) * ---------------- */ static void -CopyTempFields(Temp * from, Temp * newnode) +CopyTempFields(Temp *from, Temp *newnode) { newnode->tempid = from->tempid; newnode->keycount = from->keycount; @@ -416,7 +416,7 @@ CopyTempFields(Temp * from, Temp * newnode) * ---------------- */ static Temp * -_copyTemp(Temp * from) +_copyTemp(Temp *from) { Temp *newnode = makeNode(Temp); @@ -435,7 +435,7 @@ _copyTemp(Temp * from) * ---------------- */ static Material * -_copyMaterial(Material * from) +_copyMaterial(Material *from) { Material *newnode = makeNode(Material); @@ -461,7 +461,7 @@ _copyMaterial(Material * from) * ---------------- */ static Sort * -_copySort(Sort * from) +_copySort(Sort *from) { Sort *newnode = makeNode(Sort); @@ -512,7 +512,7 @@ _copyAgg(Agg *from) * ---------------- */ static Unique * -_copyUnique(Unique * from) +_copyUnique(Unique *from) { Unique *newnode = makeNode(Unique); @@ -538,7 +538,7 @@ _copyUnique(Unique * from) * ---------------- */ static Hash * -_copyHash(Hash * from) +_copyHash(Hash *from) { Hash *newnode = makeNode(Hash); @@ -572,7 +572,7 @@ _copyHash(Hash * from) * ---------------- */ static Resdom * -_copyResdom(Resdom * from) +_copyResdom(Resdom *from) { Resdom *newnode = makeNode(Resdom); @@ -596,7 +596,7 @@ _copyResdom(Resdom * from) } static Fjoin * -_copyFjoin(Fjoin * from) +_copyFjoin(Fjoin *from) { Fjoin *newnode = makeNode(Fjoin); @@ -633,7 +633,7 @@ _copyFjoin(Fjoin * from) * ---------------- */ static Expr * -_copyExpr(Expr * from) +_copyExpr(Expr *from) { Expr *newnode = makeNode(Expr); @@ -655,7 +655,7 @@ _copyExpr(Expr * from) * ---------------- */ static Var * -_copyVar(Var * from) +_copyVar(Var *from) { Var *newnode = makeNode(Var); @@ -678,7 +678,7 @@ _copyVar(Var * from) * ---------------- */ static Oper * -_copyOper(Oper * from) +_copyOper(Oper *from) { Oper *newnode = makeNode(Oper); @@ -706,7 +706,7 @@ _copyOper(Oper * from) * ---------------- */ static Const * -_copyConst(Const * from) +_copyConst(Const *from) { static Oid cached_type; static bool cached_typbyval; @@ -817,7 +817,7 @@ _copyConst(Const * from) * ---------------- */ static Param * -_copyParam(Param * from) +_copyParam(Param *from) { Param *newnode = makeNode(Param); @@ -846,7 +846,7 @@ _copyParam(Param * from) * ---------------- */ static Func * -_copyFunc(Func * from) +_copyFunc(Func *from) { Func *newnode = makeNode(Func); @@ -946,7 +946,7 @@ _copyArrayRef(ArrayRef *from) ** -- JMH, 8/2/93 */ static Rel * -_copyRel(Rel * from) +_copyRel(Rel *from) { Rel *newnode = makeNode(Rel); int i, @@ -1024,7 +1024,7 @@ _copyRel(Rel * from) * ---------------- */ static void -CopyPathFields(Path * from, Path * newnode) +CopyPathFields(Path *from, Path *newnode) { newnode->pathtype = from->pathtype; @@ -1079,7 +1079,7 @@ CopyPathFields(Path * from, Path * newnode) * ---------------- */ static Path * -_copyPath(Path * from) +_copyPath(Path *from) { Path *newnode = makeNode(Path); @@ -1093,7 +1093,7 @@ _copyPath(Path * from) * ---------------- */ static IndexPath * -_copyIndexPath(IndexPath * from) +_copyIndexPath(IndexPath *from) { IndexPath *newnode = makeNode(IndexPath); @@ -1136,7 +1136,7 @@ _copyIndexPath(IndexPath * from) * ---------------- */ static void -CopyJoinPathFields(JoinPath * from, JoinPath * newnode) +CopyJoinPathFields(JoinPath *from, JoinPath *newnode) { Node_Copy(from, newnode, pathclauseinfo); Node_Copy(from, newnode, outerjoinpath); @@ -1148,7 +1148,7 @@ CopyJoinPathFields(JoinPath * from, JoinPath * newnode) * ---------------- */ static JoinPath * -_copyJoinPath(JoinPath * from) +_copyJoinPath(JoinPath *from) { JoinPath *newnode = makeNode(JoinPath); @@ -1167,7 +1167,7 @@ _copyJoinPath(JoinPath * from) * ---------------- */ static MergePath * -_copyMergePath(MergePath * from) +_copyMergePath(MergePath *from) { MergePath *newnode = makeNode(MergePath); @@ -1194,7 +1194,7 @@ _copyMergePath(MergePath * from) * ---------------- */ static HashPath * -_copyHashPath(HashPath * from) +_copyHashPath(HashPath *from) { HashPath *newnode = makeNode(HashPath); @@ -1221,7 +1221,7 @@ _copyHashPath(HashPath * from) * ---------------- */ static OrderKey * -_copyOrderKey(OrderKey * from) +_copyOrderKey(OrderKey *from) { OrderKey *newnode = makeNode(OrderKey); @@ -1241,7 +1241,7 @@ _copyOrderKey(OrderKey * from) * ---------------- */ static JoinKey * -_copyJoinKey(JoinKey * from) +_copyJoinKey(JoinKey *from) { JoinKey *newnode = makeNode(JoinKey); @@ -1260,7 +1260,7 @@ _copyJoinKey(JoinKey * from) * ---------------- */ static MergeOrder * -_copyMergeOrder(MergeOrder * from) +_copyMergeOrder(MergeOrder *from) { MergeOrder *newnode = makeNode(MergeOrder); @@ -1282,7 +1282,7 @@ _copyMergeOrder(MergeOrder * from) * ---------------- */ static CInfo * -_copyCInfo(CInfo * from) +_copyCInfo(CInfo *from) { CInfo *newnode = makeNode(CInfo); @@ -1311,7 +1311,7 @@ _copyCInfo(CInfo * from) * ---------------- */ static void -CopyJoinMethodFields(JoinMethod * from, JoinMethod * newnode) +CopyJoinMethodFields(JoinMethod *from, JoinMethod *newnode) { Node_Copy(from, newnode, jmkeys); Node_Copy(from, newnode, clauses); @@ -1323,7 +1323,7 @@ CopyJoinMethodFields(JoinMethod * from, JoinMethod * newnode) * ---------------- */ static JoinMethod * -_copyJoinMethod(JoinMethod * from) +_copyJoinMethod(JoinMethod *from) { JoinMethod *newnode = makeNode(JoinMethod); @@ -1337,7 +1337,7 @@ _copyJoinMethod(JoinMethod * from) * ---------------- */ static HInfo * -_copyHInfo(HInfo * from) +_copyHInfo(HInfo *from) { HInfo *newnode = makeNode(HInfo); @@ -1355,7 +1355,7 @@ _copyHInfo(HInfo * from) * ---------------- */ static MInfo * -_copyMInfo(MInfo * from) +_copyMInfo(MInfo *from) { MInfo *newnode = makeNode(MInfo); @@ -1373,7 +1373,7 @@ _copyMInfo(MInfo * from) * ---------------- */ static JInfo * -_copyJInfo(JInfo * from) +_copyJInfo(JInfo *from) { JInfo *newnode = makeNode(JInfo); @@ -1392,7 +1392,7 @@ _copyJInfo(JInfo * from) } static Iter * -_copyIter(Iter * from) +_copyIter(Iter *from) { Iter *newnode = makeNode(Iter); @@ -1403,7 +1403,7 @@ _copyIter(Iter * from) } static Stream * -_copyStream(Stream * from) +_copyStream(Stream *from) { Stream *newnode = makeNode(Stream); @@ -1428,7 +1428,7 @@ _copyStream(Stream * from) */ static TargetEntry * -_copyTargetEntry(TargetEntry * from) +_copyTargetEntry(TargetEntry *from) { TargetEntry *newnode = makeNode(TargetEntry); @@ -1439,7 +1439,7 @@ _copyTargetEntry(TargetEntry * from) } static RangeTblEntry * -_copyRangeTblEntry(RangeTblEntry * from) +_copyRangeTblEntry(RangeTblEntry *from) { RangeTblEntry *newnode = makeNode(RangeTblEntry); @@ -1468,7 +1468,7 @@ _copyRangeTblEntry(RangeTblEntry * from) } static SortClause * -_copySortClause(SortClause * from) +_copySortClause(SortClause *from) { SortClause *newnode = makeNode(SortClause); @@ -1490,7 +1490,7 @@ _copyAConst(A_Const *from) } static TypeName * -_copyTypeName(TypeName * from) +_copyTypeName(TypeName *from) { TypeName *newnode = makeNode(TypeName); @@ -1510,7 +1510,7 @@ _copyTypeName(TypeName * from) } static Query * -_copyQuery(Query * from) +_copyQuery(Query *from) { Query *newnode = makeNode(Query); @@ -1564,7 +1564,7 @@ _copyQuery(Query * from) */ static Value * -_copyValue(Value * from) +_copyValue(Value *from) { Value *newnode = makeNode(Value); diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 3500a638ce..c5728dddd1 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -26,7 +26,7 @@ #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 @@ -36,7 +36,7 @@ static bool equali(List * a, List * b); * 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); @@ -55,7 +55,7 @@ _equalResdom(Resdom * a, Resdom * b) } static bool -_equalFjoin(Fjoin * a, Fjoin * b) +_equalFjoin(Fjoin *a, Fjoin *b) { int nNodes; @@ -79,7 +79,7 @@ _equalFjoin(Fjoin * a, Fjoin * b) * 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); @@ -92,13 +92,13 @@ _equalExpr(Expr * a, Expr * b) } 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); @@ -121,7 +121,7 @@ _equalStream(Stream * a, Stream * b) * 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); @@ -177,7 +177,7 @@ _equalArrayRef(ArrayRef *a, ArrayRef *b) * 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); @@ -191,7 +191,7 @@ _equalOper(Oper * a, Oper * b) * Const is a subclass of Expr. */ static bool -_equalConst(Const * a, Const * b) +_equalConst(Const *a, Const *b) { /* @@ -214,7 +214,7 @@ _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); @@ -254,7 +254,7 @@ _equalParam(Param * a, Param * b) * 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); @@ -276,7 +276,7 @@ _equalFunc(Func * a, Func * b) * 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)); @@ -298,7 +298,7 @@ _equalCInfo(CInfo * a, CInfo * b) } static bool -_equalJoinMethod(JoinMethod * a, JoinMethod * b) +_equalJoinMethod(JoinMethod *a, JoinMethod *b) { Assert(IsA(a, JoinMethod)); Assert(IsA(b, JoinMethod)); @@ -313,7 +313,7 @@ _equalJoinMethod(JoinMethod * a, JoinMethod * b) } static bool -_equalPath(Path * a, Path * b) +_equalPath(Path *a, Path *b) { if (a->pathtype != b->pathtype) return (false); @@ -368,7 +368,7 @@ _equalPath(Path * a, Path * b) } static bool -_equalIndexPath(IndexPath * a, IndexPath * b) +_equalIndexPath(IndexPath *a, IndexPath *b) { if (!_equalPath((Path *) a, (Path *) b)) return (false); @@ -380,7 +380,7 @@ _equalIndexPath(IndexPath * a, IndexPath * b) } static bool -_equalJoinPath(JoinPath * a, JoinPath * b) +_equalJoinPath(JoinPath *a, JoinPath *b) { Assert(IsA_JoinPath(a)); Assert(IsA_JoinPath(b)); @@ -397,7 +397,7 @@ _equalJoinPath(JoinPath * a, JoinPath * b) } static bool -_equalMergePath(MergePath * a, MergePath * b) +_equalMergePath(MergePath *a, MergePath *b) { Assert(IsA(a, MergePath)); Assert(IsA(b, MergePath)); @@ -414,7 +414,7 @@ _equalMergePath(MergePath * a, MergePath * b) } static bool -_equalHashPath(HashPath * a, HashPath * b) +_equalHashPath(HashPath *a, HashPath *b) { Assert(IsA(a, HashPath)); Assert(IsA(b, HashPath)); @@ -431,7 +431,7 @@ _equalHashPath(HashPath * a, HashPath * b) } static bool -_equalJoinKey(JoinKey * a, JoinKey * b) +_equalJoinKey(JoinKey *a, JoinKey *b) { Assert(IsA(a, JoinKey)); Assert(IsA(b, JoinKey)); @@ -444,7 +444,7 @@ _equalJoinKey(JoinKey * a, JoinKey * b) } static bool -_equalMergeOrder(MergeOrder * a, MergeOrder * b) +_equalMergeOrder(MergeOrder *a, MergeOrder *b) { if (a == (MergeOrder *) NULL && b == (MergeOrder *) NULL) return (true); @@ -465,7 +465,7 @@ _equalMergeOrder(MergeOrder * a, MergeOrder * b) } static bool -_equalHInfo(HInfo * a, HInfo * b) +_equalHInfo(HInfo *a, HInfo *b) { Assert(IsA(a, HInfo)); Assert(IsA(b, HInfo)); @@ -479,7 +479,7 @@ _equalHInfo(HInfo * a, HInfo * b) * 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)); @@ -500,7 +500,7 @@ _equalIndexScan(IndexScan * a, IndexScan * b) } static bool -_equalJInfo(JInfo * a, JInfo * b) +_equalJInfo(JInfo *a, JInfo *b) { Assert(IsA(a, JInfo)); Assert(IsA(b, JInfo)); @@ -523,7 +523,7 @@ _equalJInfo(JInfo * a, JInfo * b) * 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); @@ -538,7 +538,7 @@ _equalEState(EState * a, EState * b) } static bool -_equalTargetEntry(TargetEntry * a, TargetEntry * b) +_equalTargetEntry(TargetEntry *a, TargetEntry *b) { if (!equal(a->resdom, b->resdom)) return (false); @@ -558,7 +558,7 @@ _equalTargetEntry(TargetEntry * a, TargetEntry * b) * 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); @@ -722,7 +722,7 @@ equal(void *a, void *b) * 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; diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c index abba222b81..1f92b604e7 100644 --- a/src/backend/nodes/list.c +++ b/src/backend/nodes/list.c @@ -7,7 +7,7 @@ * * * 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 @@ -58,7 +58,7 @@ makeList(void *elem,...) } List * -lcons(void *obj, List * list) +lcons(void *obj, List *list) { List *l = makeNode(List); @@ -68,7 +68,7 @@ lcons(void *obj, List * list) } List * -lconsi(int datum, List * list) +lconsi(int datum, List *list) { List *l = makeNode(List); @@ -78,13 +78,13 @@ lconsi(int datum, List * 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)); } @@ -121,7 +121,7 @@ makeString(char *str) /* n starts with 0 */ void * -nth(int n, List * l) +nth(int n, List *l) { /* XXX assume list is long enough */ while (n > 0) @@ -133,7 +133,7 @@ nth(int n, List * l) } int -nthi(int n, List * l) +nthi(int n, List *l) { /* XXX assume list is long enough */ while (n > 0) @@ -146,7 +146,7 @@ nthi(int n, List * l) /* 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) @@ -159,7 +159,7 @@ set_nth(List * l, int n, void *elem) } int -length(List * l) +length(List *l) { int i = 0; @@ -172,7 +172,7 @@ length(List * l) } void -freeList(List * list) +freeList(List *list) { while (list != NIL) { @@ -187,7 +187,7 @@ freeList(List * list) * below are for backwards compatibility */ List * -append(List * l1, List * l2) +append(List *l1, List *l2) { List *newlist, *newlist2, @@ -209,7 +209,7 @@ append(List * l1, List * l2) * below are for backwards compatibility */ List * -intAppend(List * l1, List * l2) +intAppend(List *l1, List *l2) { List *newlist, *newlist2, @@ -228,7 +228,7 @@ intAppend(List * l1, List * l2) } List * -nconc(List * l1, List * l2) +nconc(List *l1, List *l2) { List *temp; @@ -248,7 +248,7 @@ nconc(List * l1, List * l2) List * -nreverse(List * list) +nreverse(List *list) { List *rlist = NIL; List *p = NIL; @@ -278,7 +278,7 @@ nreverse(List * list) * XXX only good for IntList -ay */ bool -same(List * foo, List * bar) +same(List *foo, List *bar) { List *temp = NIL; @@ -300,7 +300,7 @@ same(List * foo, List * bar) } List * -LispUnion(List * foo, List * bar) +LispUnion(List *foo, List *bar) { List *retval = NIL; List *i = NIL; @@ -332,7 +332,7 @@ LispUnion(List * foo, List * bar) } List * -LispUnioni(List * foo, List * bar) +LispUnioni(List *foo, List *bar) { List *retval = NIL; List *i = NIL; @@ -369,7 +369,7 @@ LispUnioni(List * foo, List * bar) * bar */ bool -member(void *foo, List * bar) +member(void *foo, List *bar) { List *i; @@ -380,7 +380,7 @@ member(void *foo, List * bar) } bool -intMember(int foo, List * bar) +intMember(int foo, List *bar) { List *i; @@ -395,7 +395,7 @@ intMember(int foo, List * bar) * 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; @@ -422,7 +422,7 @@ lremove(void *elem, List * list) } List * -LispRemove(void *elem, List * list) +LispRemove(void *elem, List *list) { List *temp = NIL; List *prev = NIL; @@ -447,7 +447,7 @@ LispRemove(void *elem, List * list) #ifdef NOT_USED List * -intLispRemove(int elem, List * list) +intLispRemove(int elem, List *list) { List *temp = NIL; List *prev = NIL; @@ -473,7 +473,7 @@ intLispRemove(int elem, List * list) #endif List * -set_difference(List * list1, List * list2) +set_difference(List *list1, List *list2) { List *temp1 = NIL; List *result = NIL; @@ -490,7 +490,7 @@ set_difference(List * list1, List * list2) } List * -set_differencei(List * list1, List * list2) +set_differencei(List *list1, List *list2) { List *temp1 = NIL; List *result = NIL; diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index 9f343ac6c0..a7c5364ba1 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -7,7 +7,7 @@ * * * 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 $ * *------------------------------------------------------------------------- */ @@ -23,16 +23,16 @@ #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); @@ -58,22 +58,22 @@ single_node(Node * node) * */ 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)); } /***************************************************************************** @@ -90,7 +90,7 @@ var_is_rel(Var * var) * */ Oper * -replace_opid(Oper * oper) +replace_opid(Oper *oper) { oper->opid = get_opcode(oper->opno); oper->op_fcache = NULL; @@ -108,10 +108,10 @@ replace_opid(Oper * oper) * */ 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); diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 9b6840ecb6..4d12af6af8 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -7,7 +7,7 @@ * * * 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 @@ -53,7 +53,7 @@ static void _outNode(StringInfo str, void *obj); * converts a List of integers */ static void -_outIntList(StringInfo str, List * list) +_outIntList(StringInfo str, List *list) { List *l; char buf[500]; @@ -68,7 +68,7 @@ _outIntList(StringInfo str, List * list) } static void -_outQuery(StringInfo str, Query * node) +_outQuery(StringInfo str, Query *node) { char buf[500]; @@ -110,7 +110,7 @@ _outQuery(StringInfo str, Query * node) * 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]; @@ -142,7 +142,7 @@ _outPlanInfo(StringInfo str, Plan * node) * Stuff from plannodes.h */ static void -_outPlan(StringInfo str, Plan * node) +_outPlan(StringInfo str, Plan *node) { char buf[500]; @@ -153,7 +153,7 @@ _outPlan(StringInfo str, Plan * node) } static void -_outResult(StringInfo str, Result * node) +_outResult(StringInfo str, Result *node) { char buf[500]; @@ -171,7 +171,7 @@ _outResult(StringInfo str, Result * node) * Existential is a subclass of Plan. */ static void -_outExistential(StringInfo str, Existential * node) +_outExistential(StringInfo str, Existential *node) { char buf[500]; @@ -211,7 +211,7 @@ _outAppend(StringInfo str, Append *node) * Join is a subclass of Plan */ static void -_outJoin(StringInfo str, Join * node) +_outJoin(StringInfo str, Join *node) { char buf[500]; @@ -225,7 +225,7 @@ _outJoin(StringInfo str, Join * node) * NestLoop is a subclass of Join */ static void -_outNestLoop(StringInfo str, NestLoop * node) +_outNestLoop(StringInfo str, NestLoop *node) { char buf[500]; @@ -238,7 +238,7 @@ _outNestLoop(StringInfo str, NestLoop * node) * MergeJoin is a subclass of Join */ static void -_outMergeJoin(StringInfo str, MergeJoin * node) +_outMergeJoin(StringInfo str, MergeJoin *node) { char buf[500]; @@ -264,7 +264,7 @@ _outMergeJoin(StringInfo str, MergeJoin * node) * HashJoin is a subclass of Join. */ static void -_outHashJoin(StringInfo str, HashJoin * node) +_outHashJoin(StringInfo str, HashJoin *node) { char buf[500]; @@ -292,7 +292,7 @@ _outHashJoin(StringInfo str, HashJoin * node) * Scan is a subclass of Node */ static void -_outScan(StringInfo str, Scan * node) +_outScan(StringInfo str, Scan *node) { char buf[500]; @@ -309,7 +309,7 @@ _outScan(StringInfo str, Scan * node) * SeqScan is a subclass of Scan */ static void -_outSeqScan(StringInfo str, SeqScan * node) +_outSeqScan(StringInfo str, SeqScan *node) { char buf[500]; @@ -327,7 +327,7 @@ _outSeqScan(StringInfo str, SeqScan * node) * IndexScan is a subclass of Scan */ static void -_outIndexScan(StringInfo str, IndexScan * node) +_outIndexScan(StringInfo str, IndexScan *node) { char buf[500]; @@ -352,7 +352,7 @@ _outIndexScan(StringInfo str, IndexScan * node) * Temp is a subclass of Plan */ static void -_outTemp(StringInfo str, Temp * node) +_outTemp(StringInfo str, Temp *node) { char buf[500]; @@ -371,7 +371,7 @@ _outTemp(StringInfo str, Temp * node) * Sort is a subclass of Temp */ static void -_outSort(StringInfo str, Sort * node) +_outSort(StringInfo str, Sort *node) { char buf[500]; @@ -401,7 +401,7 @@ _outAgg(StringInfo str, Agg *node) } static void -_outGroup(StringInfo str, Group * node) +_outGroup(StringInfo str, Group *node) { char buf[500]; @@ -422,7 +422,7 @@ _outGroup(StringInfo str, Group * node) * For some reason, unique is a subclass of Temp. */ static void -_outUnique(StringInfo str, Unique * node) +_outUnique(StringInfo str, Unique *node) { char buf[500]; @@ -442,7 +442,7 @@ _outUnique(StringInfo str, Unique * node) * Hash is a subclass of Temp */ static void -_outHash(StringInfo str, Hash * node) +_outHash(StringInfo str, Hash *node) { char buf[500]; @@ -463,7 +463,7 @@ _outHash(StringInfo str, Hash * node) } static void -_outTee(StringInfo str, Tee * node) +_outTee(StringInfo str, Tee *node) { char buf[500]; @@ -494,7 +494,7 @@ _outTee(StringInfo str, Tee * node) * Resdom is a subclass of Node */ static void -_outResdom(StringInfo str, Resdom * node) +_outResdom(StringInfo str, Resdom *node) { char buf[500]; @@ -519,7 +519,7 @@ _outResdom(StringInfo str, Resdom * node) } static void -_outFjoin(StringInfo str, Fjoin * node) +_outFjoin(StringInfo str, Fjoin *node) { char buf[500]; int i; @@ -550,7 +550,7 @@ _outFjoin(StringInfo str, Fjoin * node) * Expr is a subclass of Node */ static void -_outExpr(StringInfo str, Expr * node) +_outExpr(StringInfo str, Expr *node) { char buf[500]; char *opstr = NULL; @@ -592,7 +592,7 @@ _outExpr(StringInfo str, Expr * node) * Var is a subclass of Expr */ static void -_outVar(StringInfo str, Var * node) +_outVar(StringInfo str, Var *node) { char buf[500]; @@ -614,7 +614,7 @@ _outVar(StringInfo str, Var * node) * Const is a subclass of Expr */ static void -_outConst(StringInfo str, Const * node) +_outConst(StringInfo str, Const *node) { char buf[500]; @@ -743,7 +743,7 @@ _outArrayRef(StringInfo str, ArrayRef *node) * Func is a subclass of Expr */ static void -_outFunc(StringInfo str, Func * node) +_outFunc(StringInfo str, Func *node) { char buf[500]; @@ -772,7 +772,7 @@ _outFunc(StringInfo str, Func * node) * Oper is a subclass of Expr */ static void -_outOper(StringInfo str, Oper * node) +_outOper(StringInfo str, Oper *node) { char buf[500]; @@ -791,7 +791,7 @@ _outOper(StringInfo str, Oper * node) * Param is a subclass of Expr */ static void -_outParam(StringInfo str, Param * node) +_outParam(StringInfo str, Param *node) { char buf[500]; @@ -818,7 +818,7 @@ _outParam(StringInfo str, Param * node) * EState is a subclass of Node. */ static void -_outEState(StringInfo str, EState * node) +_outEState(StringInfo str, EState *node) { char buf[500]; @@ -841,7 +841,7 @@ _outEState(StringInfo str, EState * node) * Stuff from relation.h */ static void -_outRel(StringInfo str, Rel * node) +_outRel(StringInfo str, Rel *node) { char buf[500]; @@ -917,7 +917,7 @@ _outRel(StringInfo str, Rel * node) * TargetEntry is a subclass of Node. */ static void -_outTargetEntry(StringInfo str, TargetEntry * node) +_outTargetEntry(StringInfo str, TargetEntry *node) { char buf[500]; @@ -940,7 +940,7 @@ _outTargetEntry(StringInfo str, TargetEntry * node) } static void -_outRangeTblEntry(StringInfo str, RangeTblEntry * node) +_outRangeTblEntry(StringInfo str, RangeTblEntry *node) { char buf[500]; @@ -966,7 +966,7 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry * node) * Path is a subclass of Node. */ static void -_outPath(StringInfo str, Path * node) +_outPath(StringInfo str, Path *node) { char buf[500]; @@ -989,7 +989,7 @@ _outPath(StringInfo str, Path * node) * IndexPath is a subclass of Path. */ static void -_outIndexPath(StringInfo str, IndexPath * node) +_outIndexPath(StringInfo str, IndexPath *node) { char buf[500]; @@ -1030,7 +1030,7 @@ _outIndexPath(StringInfo str, IndexPath * node) * JoinPath is a subclass of Path */ static void -_outJoinPath(StringInfo str, JoinPath * node) +_outJoinPath(StringInfo str, JoinPath *node) { char buf[500]; @@ -1084,7 +1084,7 @@ _outJoinPath(StringInfo str, JoinPath * node) * MergePath is a subclass of JoinPath. */ static void -_outMergePath(StringInfo str, MergePath * node) +_outMergePath(StringInfo str, MergePath *node) { char buf[500]; @@ -1140,7 +1140,7 @@ _outMergePath(StringInfo str, MergePath * node) * HashPath is a subclass of JoinPath. */ static void -_outHashPath(StringInfo str, HashPath * node) +_outHashPath(StringInfo str, HashPath *node) { char buf[500]; @@ -1196,7 +1196,7 @@ _outHashPath(StringInfo str, HashPath * node) * OrderKey is a subclass of Node. */ static void -_outOrderKey(StringInfo str, OrderKey * node) +_outOrderKey(StringInfo str, OrderKey *node) { char buf[500]; @@ -1213,7 +1213,7 @@ _outOrderKey(StringInfo str, OrderKey * node) * JoinKey is a subclass of Node. */ static void -_outJoinKey(StringInfo str, JoinKey * node) +_outJoinKey(StringInfo str, JoinKey *node) { char buf[500]; @@ -1234,7 +1234,7 @@ _outJoinKey(StringInfo str, JoinKey * node) * MergeOrder is a subclass of Node. */ static void -_outMergeOrder(StringInfo str, MergeOrder * node) +_outMergeOrder(StringInfo str, MergeOrder *node) { char buf[500]; @@ -1258,7 +1258,7 @@ _outMergeOrder(StringInfo str, MergeOrder * node) * CInfo is a subclass of Node. */ static void -_outCInfo(StringInfo str, CInfo * node) +_outCInfo(StringInfo str, CInfo *node) { char buf[500]; @@ -1291,7 +1291,7 @@ _outCInfo(StringInfo str, CInfo * node) * JoinMethod is a subclass of Node. */ static void -_outJoinMethod(StringInfo str, JoinMethod * node) +_outJoinMethod(StringInfo str, JoinMethod *node) { char buf[500]; @@ -1313,7 +1313,7 @@ _outJoinMethod(StringInfo str, JoinMethod * node) * HInfo is a subclass of JoinMethod. */ static void -_outHInfo(StringInfo str, HInfo * node) +_outHInfo(StringInfo str, HInfo *node) { char buf[500]; @@ -1339,7 +1339,7 @@ _outHInfo(StringInfo str, HInfo * node) * JInfo is a subclass of Node. */ static void -_outJInfo(StringInfo str, JInfo * node) +_outJInfo(StringInfo str, JInfo *node) { char buf[500]; @@ -1431,7 +1431,7 @@ _outDatum(StringInfo str, Datum value, Oid type) } static void -_outIter(StringInfo str, Iter * node) +_outIter(StringInfo str, Iter *node) { appendStringInfo(str, "ITER"); @@ -1440,7 +1440,7 @@ _outIter(StringInfo str, Iter * node) } static void -_outStream(StringInfo str, Stream * node) +_outStream(StringInfo str, Stream *node) { char buf[500]; @@ -1472,7 +1472,7 @@ _outStream(StringInfo str, Stream * node) } static void -_outValue(StringInfo str, Value * value) +_outValue(StringInfo str, Value *value) { char buf[500]; diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c index dfe9d56345..634870ab8a 100644 --- a/src/backend/nodes/print.c +++ b/src/backend/nodes/print.c @@ -7,7 +7,7 @@ * * * 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 @@ -33,7 +33,7 @@ #include "nodes/plannodes.h" #include "optimizer/clauses.h" -static char *plannode_type(Plan * p); +static char *plannode_type(Plan *p); /* * print-- @@ -135,7 +135,7 @@ pprint(void *obj) * print contents of range table */ void -print_rt(List * rtable) +print_rt(List *rtable) { List *l; int i = 1; @@ -160,7 +160,7 @@ print_rt(List * rtable) * print an expression */ void -print_expr(Node * expr, List * rtable) +print_expr(Node *expr, List *rtable) { if (expr == NULL) { @@ -230,7 +230,7 @@ print_expr(Node * expr, List * rtable) * temporary here. where is keys list of list?? */ void -print_keys(List * keys, List * rtable) +print_keys(List *keys, List *rtable) { List *k; @@ -251,7 +251,7 @@ print_keys(List * keys, List * rtable) * print targetlist in a more legible way. */ void -print_tl(List * tlist, List * rtable) +print_tl(List *tlist, List *rtable) { List *tl; @@ -280,7 +280,7 @@ print_tl(List * tlist, List * rtable) * print out the tuple with the given TupleTableSlot */ void -print_slot(TupleTableSlot * slot) +print_slot(TupleTableSlot *slot) { if (!slot->val) { @@ -297,7 +297,7 @@ print_slot(TupleTableSlot * slot) } static char * -plannode_type(Plan * p) +plannode_type(Plan *p) { switch (nodeTag(p)) { @@ -375,7 +375,7 @@ plannode_type(Plan * 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]; @@ -386,7 +386,7 @@ print_plan_recursive(Plan * p, Query * parsetree, int indentLevel, char *label) 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; @@ -414,7 +414,7 @@ print_plan_recursive(Plan * p, Query * parsetree, int indentLevel, char *label) 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, ""); } diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index eca6c480a2..6caa2cc9a7 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -7,7 +7,7 @@ * * * 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 @@ -54,7 +54,7 @@ static Datum readDatum(Oid type); static List * -toIntList(List * list) +toIntList(List *list) { List *l; @@ -128,7 +128,7 @@ _readQuery() * ---------------- */ static void -_getPlan(Plan * node) +_getPlan(Plan *node) { char *token; int length; @@ -155,7 +155,7 @@ _getPlan(Plan * node) 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 */ @@ -273,7 +273,7 @@ _readAppend() * ---------------- */ static void -_getJoin(Join * node) +_getJoin(Join *node) { _getPlan((Plan *) node); } @@ -396,7 +396,7 @@ _readHashJoin() * ---------------- */ static void -_getScan(Scan * node) +_getScan(Scan *node) { char *token; int length; diff --git a/src/backend/optimizer/geqo/geqo_copy.c b/src/backend/optimizer/geqo/geqo_copy.c index 3a61f5d315..5453b012a4 100644 --- a/src/backend/optimizer/geqo/geqo_copy.c +++ b/src/backend/optimizer/geqo/geqo_copy.c @@ -4,7 +4,7 @@ * * 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 $ * *------------------------------------------------------------------------- */ @@ -56,7 +56,7 @@ * */ void -geqo_copy(Chromosome * chromo1, Chromosome * chromo2, int string_length) +geqo_copy(Chromosome *chromo1, Chromosome *chromo2, int string_length) { int i; diff --git a/src/backend/optimizer/geqo/geqo_cx.c b/src/backend/optimizer/geqo/geqo_cx.c index 37f49584ca..4ade514300 100644 --- a/src/backend/optimizer/geqo/geqo_cx.c +++ b/src/backend/optimizer/geqo/geqo_cx.c @@ -6,7 +6,7 @@ * 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 $ * *------------------------------------------------------------------------- */ @@ -60,7 +60,7 @@ * 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, diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c index 05381cf4da..8dbc935c87 100644 --- a/src/backend/optimizer/geqo/geqo_erx.c +++ b/src/backend/optimizer/geqo/geqo_erx.c @@ -3,7 +3,7 @@ * 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 $ * *------------------------------------------------------------------------- */ @@ -52,11 +52,11 @@ #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-- @@ -86,7 +86,7 @@ alloc_edge_table(int num_gene) * */ void -free_edge_table(Edge * edge_table) +free_edge_table(Edge *edge_table) { pfree(edge_table); } @@ -105,7 +105,7 @@ free_edge_table(Edge * 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, @@ -165,7 +165,7 @@ gimme_edge_table(Gene * tour1, Gene * tour2, int num_gene, Edge * edge_table) * 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; @@ -207,7 +207,7 @@ gimme_edge(Gene gene1, Gene gene2, Edge * edge_table) * */ 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; @@ -256,7 +256,7 @@ gimme_tour(Edge * edge_table, Gene * new_gene, int num_gene) * */ static void -remove_gene(Gene gene, Edge edge, Edge * edge_table) +remove_gene(Gene gene, Edge edge, Edge *edge_table) { int i, j; @@ -298,7 +298,7 @@ remove_gene(Gene gene, Edge edge, Edge * edge_table) * */ static Gene -gimme_gene(Edge edge, Edge * edge_table) +gimme_gene(Edge edge, Edge *edge_table) { int i; Gene friend; @@ -389,7 +389,7 @@ gimme_gene(Edge edge, Edge * edge_table) * */ 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]; diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c index 731b1c4fcd..7e721a34e8 100644 --- a/src/backend/optimizer/geqo/geqo_eval.c +++ b/src/backend/optimizer/geqo/geqo_eval.c @@ -5,7 +5,7 @@ * * 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 $ * *------------------------------------------------------------------------- */ @@ -50,13 +50,13 @@ #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-- @@ -64,7 +64,7 @@ static Rel *geqo_nth(int stop, List * rels); * 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; @@ -99,7 +99,7 @@ geqo_eval(Query * root, Gene * tour, int num_gene) * 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; @@ -191,7 +191,7 @@ gimme_tree(Query * root, Gene * tour, int rel_count, int num_gene, Rel * outer_r */ 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; @@ -244,7 +244,7 @@ gimme_clause_joins(Query * root, Rel * outer_rel, Rel * inner_rel) */ 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)); } @@ -261,7 +261,7 @@ gimme_clauseless_join(Rel * outer_rel, Rel * inner_rel) * 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; @@ -339,8 +339,8 @@ init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo) * 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; @@ -389,7 +389,7 @@ new_join_tlist(List * tlist, * 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; @@ -454,7 +454,7 @@ new_joininfo_list(List * joininfo_list, List * join_relids) * 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; @@ -603,7 +603,7 @@ geqo_add_new_joininfos(Query * root, List * joinrels, List * outerrels) * 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; @@ -649,7 +649,7 @@ geqo_final_join_rels(List * join_rel_list) * 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); } @@ -664,13 +664,13 @@ add_superrels(Rel * rel, Rel * 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; @@ -692,7 +692,7 @@ nonoverlap_sets(List * s1, List * s2) * 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; @@ -726,7 +726,7 @@ geqo_log(double x, double b) } static Rel * -geqo_nth(int stop, List * rels) +geqo_nth(int stop, List *rels) { List *r; int i = 1; diff --git a/src/backend/optimizer/geqo/geqo_main.c b/src/backend/optimizer/geqo/geqo_main.c index cfaa323770..027beb934f 100644 --- a/src/backend/optimizer/geqo/geqo_main.c +++ b/src/backend/optimizer/geqo/geqo_main.c @@ -6,7 +6,7 @@ * * 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 $ * *------------------------------------------------------------------------- */ @@ -64,7 +64,7 @@ */ Rel * -geqo(Query * root) +geqo(Query *root) { int generation; Chromosome *momma; diff --git a/src/backend/optimizer/geqo/geqo_misc.c b/src/backend/optimizer/geqo/geqo_misc.c index 5e72f46ac3..e26a8ec5e4 100644 --- a/src/backend/optimizer/geqo/geqo_misc.c +++ b/src/backend/optimizer/geqo/geqo_misc.c @@ -5,7 +5,7 @@ * * 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 $ * *------------------------------------------------------------------------- */ @@ -41,13 +41,13 @@ #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; @@ -64,7 +64,7 @@ avg_pool(Pool * pool) /* 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; @@ -97,7 +97,7 @@ print_pool(FILE * fp, Pool * pool, int start, int stop) * */ void -print_gen(FILE * fp, Pool * pool, int generation) +print_gen(FILE *fp, Pool *pool, int generation) { int lowest; @@ -116,7 +116,7 @@ print_gen(FILE * fp, Pool * pool, int generation) 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; @@ -139,10 +139,10 @@ print_edge_table(FILE * fp, Edge * edge_table, int num_gene) *************************************************************/ 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) { @@ -155,7 +155,7 @@ geqo_print_joinclauses(Query * root, List * 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; @@ -262,7 +262,7 @@ geqo_print_path(Query * root, Path * path, int indent) } void -geqo_print_rel(Query * root, Rel * rel) +geqo_print_rel(Query *root, Rel *rel) { List *l; diff --git a/src/backend/optimizer/geqo/geqo_mutation.c b/src/backend/optimizer/geqo/geqo_mutation.c index a6078c731a..c56075d50c 100644 --- a/src/backend/optimizer/geqo/geqo_mutation.c +++ b/src/backend/optimizer/geqo/geqo_mutation.c @@ -4,7 +4,7 @@ * * 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 $ * *------------------------------------------------------------------------- */ @@ -51,7 +51,7 @@ #include "optimizer/geqo_mutation.h" void -geqo_mutation(Gene * tour, int num_gene) +geqo_mutation(Gene *tour, int num_gene) { int swap1; int swap2; diff --git a/src/backend/optimizer/geqo/geqo_ox1.c b/src/backend/optimizer/geqo/geqo_ox1.c index bb3d045010..40b2f53688 100644 --- a/src/backend/optimizer/geqo/geqo_ox1.c +++ b/src/backend/optimizer/geqo/geqo_ox1.c @@ -6,7 +6,7 @@ * 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 $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ * 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, diff --git a/src/backend/optimizer/geqo/geqo_ox2.c b/src/backend/optimizer/geqo/geqo_ox2.c index 2490fb3051..69693a1d45 100644 --- a/src/backend/optimizer/geqo/geqo_ox2.c +++ b/src/backend/optimizer/geqo/geqo_ox2.c @@ -6,7 +6,7 @@ * 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 $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ * 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, diff --git a/src/backend/optimizer/geqo/geqo_params.c b/src/backend/optimizer/geqo/geqo_params.c index 9ef969a228..0deed36e16 100644 --- a/src/backend/optimizer/geqo/geqo_params.c +++ b/src/backend/optimizer/geqo/geqo_params.c @@ -5,7 +5,7 @@ * * 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 $ * *------------------------------------------------------------------------- */ @@ -270,7 +270,7 @@ geqo_params(int string_length) * 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); diff --git a/src/backend/optimizer/geqo/geqo_paths.c b/src/backend/optimizer/geqo/geqo_paths.c index 931b38985b..16e67c8bfc 100644 --- a/src/backend/optimizer/geqo/geqo_paths.c +++ b/src/backend/optimizer/geqo/geqo_paths.c @@ -5,7 +5,7 @@ * * 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 $ * *------------------------------------------------------------------------- */ @@ -28,8 +28,8 @@ #include "optimizer/geqo_paths.h" -static List *geqo_prune_rel(Rel * rel, List * other_rels); -static Path *set_paths(Rel * rel, Path * unorderedpath); +static List *geqo_prune_rel(Rel *rel, List *other_rels); +static Path *set_paths(Rel *rel, Path *unorderedpath); /* * geqo-prune-rels-- @@ -40,7 +40,7 @@ static Path *set_paths(Rel * rel, Path * unorderedpath); * */ List * -geqo_prune_rels(List * rel_list) +geqo_prune_rels(List *rel_list) { List *temp_list = NIL; @@ -65,7 +65,7 @@ geqo_prune_rels(List * rel_list) * */ static List * -geqo_prune_rel(Rel * rel, List * other_rels) +geqo_prune_rel(Rel *rel, List *other_rels) { List *i = NIL; List *t_list = NIL; @@ -102,7 +102,7 @@ geqo_prune_rel(Rel * rel, List * other_rels) * */ void -geqo_rel_paths(Rel * rel) +geqo_rel_paths(Rel *rel) { List *y = NIL; Path *path = (Path *) NULL; @@ -134,7 +134,7 @@ geqo_rel_paths(Rel * rel) * */ static Path * -set_paths(Rel * rel, Path * unorderedpath) +set_paths(Rel *rel, Path *unorderedpath) { Path *cheapest = set_cheapest(rel, rel->pathlist); diff --git a/src/backend/optimizer/geqo/geqo_pmx.c b/src/backend/optimizer/geqo/geqo_pmx.c index af4234a56e..428fa28a4d 100644 --- a/src/backend/optimizer/geqo/geqo_pmx.c +++ b/src/backend/optimizer/geqo/geqo_pmx.c @@ -6,7 +6,7 @@ * PMX operator according to Goldberg & Lingle * (Proc Int'l Conf on GA's) * -* $Id: geqo_pmx.c,v 1.3 1997/09/08 02:24:06 momjian Exp $ +* $Id: geqo_pmx.c,v 1.4 1997/09/08 21:44:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ * partially matched crossover */ void -pmx(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene) +pmx(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene) { int *failed = (int *) palloc((num_gene + 1) * sizeof(int)); int *from = (int *) palloc((num_gene + 1) * sizeof(int)); diff --git a/src/backend/optimizer/geqo/geqo_pool.c b/src/backend/optimizer/geqo/geqo_pool.c index 5e8a32d42d..f6f3d6372c 100644 --- a/src/backend/optimizer/geqo/geqo_pool.c +++ b/src/backend/optimizer/geqo/geqo_pool.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_pool.c,v 1.3 1997/09/08 02:24:06 momjian Exp $ + * $Id: geqo_pool.c,v 1.4 1997/09/08 21:44:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -80,7 +80,7 @@ alloc_pool(int pool_size, int string_length) * deallocates memory for GA pool */ void -free_pool(Pool * pool) +free_pool(Pool *pool) { Chromosome *chromo; int i; @@ -102,7 +102,7 @@ free_pool(Pool * pool) * initialize genetic pool */ void -random_init_pool(Query * root, Pool * pool, int strt, int stp) +random_init_pool(Query *root, Pool *pool, int strt, int stp) { Chromosome *chromo = (Chromosome *) pool->data; int i; @@ -125,7 +125,7 @@ random_init_pool(Query * root, Pool * pool, int strt, int stp) * maybe you have to change compare() for different ordering ... */ void -sort_pool(Pool * pool) +sort_pool(Pool *pool) { pg_qsort(pool->data, pool->size, sizeof(Chromosome), compare); @@ -170,7 +170,7 @@ alloc_chromo(int string_length) * deallocates a chromosome and string space */ void -free_chromo(Chromosome * chromo) +free_chromo(Chromosome *chromo) { pfree(chromo->string); pfree(chromo); @@ -181,7 +181,7 @@ free_chromo(Chromosome * chromo) * assumes best->worst = smallest->largest */ void -spread_chromo(Chromosome * chromo, Pool * pool) +spread_chromo(Chromosome *chromo, Pool *pool) { int top, mid, diff --git a/src/backend/optimizer/geqo/geqo_px.c b/src/backend/optimizer/geqo/geqo_px.c index 4cd1ad3aec..6751d566b3 100644 --- a/src/backend/optimizer/geqo/geqo_px.c +++ b/src/backend/optimizer/geqo/geqo_px.c @@ -6,7 +6,7 @@ * PX operator according to Syswerda * (The Genetic Algorithms Handbook, L Davis, ed) * -* $Id: geqo_px.c,v 1.3 1997/09/08 02:24:07 momjian Exp $ +* $Id: geqo_px.c,v 1.4 1997/09/08 21:44:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ * position crossover */ void -px(Gene * tour1, Gene * tour2, Gene * offspring, int num_gene, City * city_table) +px(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table) { int num_positions; diff --git a/src/backend/optimizer/geqo/geqo_recombination.c b/src/backend/optimizer/geqo/geqo_recombination.c index 400afc50d4..14bf713140 100644 --- a/src/backend/optimizer/geqo/geqo_recombination.c +++ b/src/backend/optimizer/geqo/geqo_recombination.c @@ -3,7 +3,7 @@ * geqo_recombination.c-- * misc recombination procedures * -* $Id: geqo_recombination.c,v 1.3 1997/09/08 02:24:08 momjian Exp $ +* $Id: geqo_recombination.c,v 1.4 1997/09/08 21:44:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -51,7 +51,7 @@ * */ void -init_tour(Gene * tour, int num_gene) +init_tour(Gene *tour, int num_gene) { Gene *tmp; int remainder; @@ -105,7 +105,7 @@ alloc_city_table(int num_gene) * */ void -free_city_table(City * city_table) +free_city_table(City *city_table) { pfree(city_table); } diff --git a/src/backend/optimizer/geqo/geqo_selection.c b/src/backend/optimizer/geqo/geqo_selection.c index ed0727cbfb..f41630d40a 100644 --- a/src/backend/optimizer/geqo/geqo_selection.c +++ b/src/backend/optimizer/geqo/geqo_selection.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_selection.c,v 1.3 1997/09/08 02:24:08 momjian Exp $ + * $Id: geqo_selection.c,v 1.4 1997/09/08 21:44:41 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -63,7 +63,7 @@ static int linear(int max, double bias); * second genes are selected from the pool */ void -geqo_selection(Chromosome * momma, Chromosome * daddy, Pool * pool, double bias) +geqo_selection(Chromosome *momma, Chromosome *daddy, Pool *pool, double bias) { int first, second; diff --git a/src/backend/optimizer/geqo/minspantree.c b/src/backend/optimizer/geqo/minspantree.c index 716e194395..bb5863fec7 100644 --- a/src/backend/optimizer/geqo/minspantree.c +++ b/src/backend/optimizer/geqo/minspantree.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION -* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.3 1997/09/08 02:24:09 momjian Exp $ +* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.4 1997/09/08 21:44:42 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -41,7 +41,7 @@ */ void -minspantree(Query * root, List * join_rels, Rel * garel) +minspantree(Query *root, List *join_rels, Rel *garel) { int number_of_rels = length(root->base_relation_list_); int number_of_joins = length(join_rels); @@ -113,9 +113,9 @@ minspantree(Query * root, List * join_rels, Rel * garel) else if (number_of_joins == 3) { - Rel *rel12 = (Rel *) & tmprel_array[1][2]; - Rel *rel13 = (Rel *) & tmprel_array[1][3]; - Rel *rel23 = (Rel *) & tmprel_array[2][3]; + Rel *rel12 = (Rel *) &tmprel_array[1][2]; + Rel *rel13 = (Rel *) &tmprel_array[1][3]; + Rel *rel23 = (Rel *) &tmprel_array[2][3]; if (rel12->cheapestpath->path_cost > rel13->cheapestpath->path_cost) { @@ -170,11 +170,11 @@ minspantree(Query * root, List * join_rels, Rel * garel) { if (n > tempn) { - joinrel = (Rel *) & tmprel_array[tempn][n]; + joinrel = (Rel *) &tmprel_array[tempn][n]; } else { - joinrel = (Rel *) & tmprel_array[n][tempn]; + joinrel = (Rel *) &tmprel_array[n][tempn]; } dist = joinrel->cheapestpath->path_cost; diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index ca4485fbd1..b58e386535 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.12 1997/09/08 02:24:11 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.13 1997/09/08 21:44:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -43,8 +43,8 @@ bool _use_geqo_ = false; int32 _use_geqo_rels_ = GEQO_RELS; -static void find_rel_paths(Query * root, List * rels); -static List *find_join_paths(Query * root, List * outer_rels, int levels_left); +static void find_rel_paths(Query *root, List *rels); +static List *find_join_paths(Query *root, List *outer_rels, int levels_left); /* * find-paths-- @@ -54,7 +54,7 @@ static List *find_join_paths(Query * root, List * outer_rels, int levels_left); * 'rels' is the list of single relation entries appearing in the query */ List * -find_paths(Query * root, List * rels) +find_paths(Query *root, List *rels) { int levels_left; @@ -102,7 +102,7 @@ find_paths(Query * root, List * rels) * MODIFIES: rels */ static void -find_rel_paths(Query * root, List * rels) +find_rel_paths(Query *root, List *rels) { List *temp; Rel *rel; @@ -172,7 +172,7 @@ find_rel_paths(Query * root, List * rels) * the result of joining all the original relations togehter. */ static List * -find_join_paths(Query * root, List * outer_rels, int levels_left) +find_join_paths(Query *root, List *outer_rels, int levels_left) { List *x; List *new_rels; @@ -281,10 +281,10 @@ find_join_paths(Query * root, List * outer_rels, int levels_left) #ifdef OPTIMIZER_DEBUG static void -print_joinclauses(Query * root, List * clauses) +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) { @@ -297,7 +297,7 @@ print_joinclauses(Query * root, List * clauses) } static void -print_path(Query * root, Path * path, int indent) +print_path(Query *root, Path *path, int indent) { char *ptype = NULL; JoinPath *jp; @@ -404,7 +404,7 @@ print_path(Query * root, Path * path, int indent) } static void -debug_print_rel(Query * root, Rel * rel) +debug_print_rel(Query *root, Rel *rel) { List *l; diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c index 7ae190f7fd..78b54eebbb 100644 --- a/src/backend/optimizer/path/clausesel.c +++ b/src/backend/optimizer/path/clausesel.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.3 1997/09/08 02:24:14 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.4 1997/09/08 21:44:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,7 +31,7 @@ #include "utils/elog.h" #include "utils/lsyscache.h" -static Cost compute_selec(Query * root, List * clauses, List * or_selectivities); +static Cost compute_selec(Query *root, List *clauses, List *or_selectivities); /**************************************************************************** * ROUTINES TO SET CLAUSE SELECTIVITIES @@ -47,7 +47,7 @@ static Cost compute_selec(Query * root, List * clauses, List * or_selectivities) * */ void -set_clause_selectivities(List * clauseinfo_list, Cost new_selectivity) +set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity) { List *temp; CInfo *clausenode; @@ -71,7 +71,7 @@ set_clause_selectivities(List * clauseinfo_list, Cost new_selectivity) * Returns a flonum corresponding to the selectivity of 'clauseinfo-list'. */ Cost -product_selec(List * clauseinfo_list) +product_selec(List *clauseinfo_list) { Cost result = 1.0; @@ -99,7 +99,7 @@ product_selec(List * clauseinfo_list) * slots. */ void -set_rest_relselec(Query * root, List * rel_list) +set_rest_relselec(Query *root, List *rel_list) { Rel *rel; List *x; @@ -120,7 +120,7 @@ set_rest_relselec(Query * root, List * rel_list) * */ void -set_rest_selec(Query * root, List * clauseinfo_list) +set_rest_selec(Query *root, List *clauseinfo_list) { List *temp = NIL; CInfo *clausenode = (CInfo *) NULL; @@ -163,7 +163,7 @@ set_rest_selec(Query * root, List * clauseinfo_list) * */ Cost -compute_clause_selec(Query * root, Node * clause, List * or_selectivities) +compute_clause_selec(Query *root, Node *clause, List *or_selectivities) { if (!is_opclause(clause)) { @@ -223,7 +223,7 @@ compute_clause_selec(Query * root, Node * clause, List * or_selectivities) * */ static Cost -compute_selec(Query * root, List * clauses, List * or_selectivities) +compute_selec(Query *root, List *clauses, List *or_selectivities) { Cost s1 = 0; List *clause = lfirst(clauses); diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index 6badd4780e..adaca39a90 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.18 1997/09/08 02:24:18 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.19 1997/09/08 21:44:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -39,9 +39,9 @@ extern int NBuffers; -static int compute_attribute_width(TargetEntry * tlistentry); +static int compute_attribute_width(TargetEntry *tlistentry); static double base_log(double x, double b); -static int compute_targetlist_width(List * targetlist); +static int compute_targetlist_width(List *targetlist); int _disable_cost_ = 30000000; @@ -177,7 +177,7 @@ cost_index(Oid indexid, * */ Cost -cost_sort(List * keys, int tuples, int width, bool noread) +cost_sort(List *keys, int tuples, int width, bool noread) { Cost temp = 0; int npages = page_size(tuples, width); @@ -278,8 +278,8 @@ cost_nestloop(Cost outercost, Cost cost_mergesort(Cost outercost, Cost innercost, - List * outersortkeys, - List * innersortkeys, + List *outersortkeys, + List *innersortkeys, int outersize, int innersize, int outerwidth, @@ -316,8 +316,8 @@ cost_mergesort(Cost outercost, Cost cost_hashjoin(Cost outercost, Cost innercost, - List * outerkeys, - List * innerkeys, + List *outerkeys, + List *innerkeys, int outersize, int innersize, int outerwidth, @@ -363,7 +363,7 @@ cost_hashjoin(Cost outercost, * Returns the size. */ int -compute_rel_size(Rel * rel) +compute_rel_size(Rel *rel) { Cost temp; int temp1; @@ -390,7 +390,7 @@ compute_rel_size(Rel * rel) * Returns the width of the tuple as a fixnum. */ int -compute_rel_width(Rel * rel) +compute_rel_width(Rel *rel) { return (compute_targetlist_width(get_actual_tlist(rel->targetlist))); } @@ -402,7 +402,7 @@ compute_rel_width(Rel * rel) * Returns the width of the tuple as a fixnum. */ static int -compute_targetlist_width(List * targetlist) +compute_targetlist_width(List *targetlist) { List *temp_tl; int tuple_width = 0; @@ -425,7 +425,7 @@ compute_targetlist_width(List * targetlist) * Returns the width of the attribute as a fixnum. */ static int -compute_attribute_width(TargetEntry * tlistentry) +compute_attribute_width(TargetEntry *tlistentry) { int width = get_typlen(tlistentry->resdom->restype); @@ -442,7 +442,7 @@ compute_attribute_width(TargetEntry * tlistentry) * Returns a fixnum. */ int -compute_joinrel_size(JoinPath * joinpath) +compute_joinrel_size(JoinPath *joinpath) { Cost temp = 1.0; int temp1 = 0; diff --git a/src/backend/optimizer/path/hashutils.c b/src/backend/optimizer/path/hashutils.c index ea6089355a..ffc332e8b2 100644 --- a/src/backend/optimizer/path/hashutils.c +++ b/src/backend/optimizer/path/hashutils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.3 1997/09/08 02:24:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.4 1997/09/08 21:44:51 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -20,7 +20,7 @@ #include "optimizer/clauses.h" -static HInfo *match_hashop_hashinfo(Oid hashop, List * hashinfo_list); +static HInfo *match_hashop_hashinfo(Oid hashop, List *hashinfo_list); /* * group-clauses-by-hashop-- @@ -35,7 +35,7 @@ static HInfo *match_hashop_hashinfo(Oid hashop, List * hashinfo_list); * */ List * -group_clauses_by_hashop(List * clauseinfo_list, +group_clauses_by_hashop(List *clauseinfo_list, int inner_relid) { List *hashinfo_list = NIL; @@ -109,7 +109,7 @@ group_clauses_by_hashop(List * clauseinfo_list, * */ static HInfo * -match_hashop_hashinfo(Oid hashop, List * hashinfo_list) +match_hashop_hashinfo(Oid hashop, List *hashinfo_list) { Oid key = 0; HInfo *xhashinfo = (HInfo *) NULL; diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 6018ad775d..1527ca4fac 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.10 1997/09/08 02:24:21 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.11 1997/09/08 21:44:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -47,42 +47,42 @@ static void -match_index_orclauses(Rel * rel, Rel * index, int indexkey, - int xclass, List * clauseinfo_list); +match_index_orclauses(Rel *rel, Rel *index, int indexkey, + int xclass, List *clauseinfo_list); static bool -match_index_to_operand(int indexkey, Expr * operand, - Rel * rel, Rel * index); +match_index_to_operand(int indexkey, Expr *operand, + Rel *rel, Rel *index); static List * -match_index_orclause(Rel * rel, Rel * index, int indexkey, - int xclass, List * or_clauses, List * other_matching_indices); +match_index_orclause(Rel *rel, Rel *index, int indexkey, + int xclass, List *or_clauses, List *other_matching_indices); static List * -group_clauses_by_indexkey(Rel * rel, Rel * index, - int *indexkeys, Oid * classes, List * clauseinfo_list); +group_clauses_by_indexkey(Rel *rel, Rel *index, + int *indexkeys, Oid *classes, List *clauseinfo_list); static List * -group_clauses_by_ikey_for_joins(Rel * rel, Rel * index, - int *indexkeys, Oid * classes, List * join_cinfo_list, List * restr_cinfo_list); +group_clauses_by_ikey_for_joins(Rel *rel, Rel *index, + int *indexkeys, Oid *classes, List *join_cinfo_list, List *restr_cinfo_list); static CInfo * -match_clause_to_indexkey(Rel * rel, Rel * index, int indexkey, - int xclass, CInfo * clauseInfo, bool join); +match_clause_to_indexkey(Rel *rel, Rel *index, int indexkey, + int xclass, CInfo *clauseInfo, bool join); static bool -pred_test(List * predicate_list, List * clauseinfo_list, - List * joininfo_list); -static bool one_pred_test(Expr * predicate, List * clauseinfo_list); -static bool one_pred_clause_expr_test(Expr * predicate, Node * clause); -static bool one_pred_clause_test(Expr * predicate, Node * clause); -static bool clause_pred_clause_test(Expr * predicate, Node * clause); +pred_test(List *predicate_list, List *clauseinfo_list, + List *joininfo_list); +static bool one_pred_test(Expr *predicate, List *clauseinfo_list); +static bool one_pred_clause_expr_test(Expr *predicate, Node *clause); +static bool one_pred_clause_test(Expr *predicate, Node *clause); +static bool clause_pred_clause_test(Expr *predicate, Node *clause); static List * -indexable_joinclauses(Rel * rel, Rel * index, - List * joininfo_list, List * clauseinfo_list); +indexable_joinclauses(Rel *rel, Rel *index, + List *joininfo_list, List *clauseinfo_list); static List * -index_innerjoin(Query * root, Rel * rel, - List * clausegroup_list, Rel * index); +index_innerjoin(Query *root, Rel *rel, + List *clausegroup_list, Rel *index); static List * -create_index_paths(Query * root, Rel * rel, Rel * index, - List * clausegroup_list, bool join); -static List *add_index_paths(List * indexpaths, List * new_indexpaths); -static bool function_index_operand(Expr * funcOpnd, Rel * rel, Rel * index); -static bool SingleAttributeIndex(Rel * index); +create_index_paths(Query *root, Rel *rel, Rel *index, + List *clausegroup_list, bool join); +static List *add_index_paths(List *indexpaths, List *new_indexpaths); +static bool function_index_operand(Expr *funcOpnd, Rel *rel, Rel *index); +static bool SingleAttributeIndex(Rel *index); /* If Spyros can use a constant PRS2_BOOL_TYPEID, I can use this */ #define BOOL_TYPEID ((Oid) 16) @@ -114,11 +114,11 @@ static bool SingleAttributeIndex(Rel * index); * */ List * -find_index_paths(Query * root, - Rel * rel, - List * indices, - List * clauseinfo_list, - List * joininfo_list) +find_index_paths(Query *root, + Rel *rel, + List *indices, + List *clauseinfo_list, + List *joininfo_list) { List *scanclausegroups = NIL; List *scanpaths = NIL; @@ -240,11 +240,11 @@ find_index_paths(Query * root, * */ static void -match_index_orclauses(Rel * rel, - Rel * index, +match_index_orclauses(Rel *rel, + Rel *index, int indexkey, int xclass, - List * clauseinfo_list) + List *clauseinfo_list) { CInfo *clauseinfo = (CInfo *) NULL; List *i = NIL; @@ -277,9 +277,9 @@ match_index_orclauses(Rel * rel, */ static bool match_index_to_operand(int indexkey, - Expr * operand, - Rel * rel, - Rel * index) + Expr *operand, + Rel *rel, + Rel *index) { /* @@ -316,12 +316,12 @@ match_index_to_operand(int indexkey, * match the third, g,h match the fourth, etc. */ static List * -match_index_orclause(Rel * rel, - Rel * index, +match_index_orclause(Rel *rel, + Rel *index, int indexkey, int xclass, - List * or_clauses, - List * other_matching_indices) + List *or_clauses, + List *other_matching_indices) { Node *clause = NULL; List *matched_indices = other_matching_indices; @@ -398,11 +398,11 @@ match_index_orclause(Rel * rel, * */ static List * -group_clauses_by_indexkey(Rel * rel, - Rel * index, +group_clauses_by_indexkey(Rel *rel, + Rel *index, int *indexkeys, - Oid * classes, - List * clauseinfo_list) + Oid *classes, + List *clauseinfo_list) { List *curCinfo = NIL; CInfo *matched_clause = (CInfo *) NULL; @@ -460,12 +460,12 @@ group_clauses_by_indexkey(Rel * rel, * */ static List * -group_clauses_by_ikey_for_joins(Rel * rel, - Rel * index, +group_clauses_by_ikey_for_joins(Rel *rel, + Rel *index, int *indexkeys, - Oid * classes, - List * join_cinfo_list, - List * restr_cinfo_list) + Oid *classes, + List *join_cinfo_list, + List *restr_cinfo_list) { List *curCinfo = NIL; CInfo *matched_clause = (CInfo *) NULL; @@ -583,11 +583,11 @@ group_clauses_by_ikey_for_joins(Rel * rel, * */ static CInfo * -match_clause_to_indexkey(Rel * rel, - Rel * index, +match_clause_to_indexkey(Rel *rel, + Rel *index, int indexkey, int xclass, - CInfo * clauseInfo, + CInfo *clauseInfo, bool join) { Expr *clause = clauseInfo->clause; @@ -720,7 +720,7 @@ match_clause_to_indexkey(Rel * rel, * successfully cnfify()-ed). --Nels, Jan '93 */ static bool -pred_test(List * predicate_list, List * clauseinfo_list, List * joininfo_list) +pred_test(List *predicate_list, List *clauseinfo_list, List *joininfo_list) { List *pred, *items, @@ -771,7 +771,7 @@ pred_test(List * predicate_list, List * clauseinfo_list, List * joininfo_list) * expression. */ static bool -one_pred_test(Expr * predicate, List * clauseinfo_list) +one_pred_test(Expr *predicate, List *clauseinfo_list) { CInfo *clauseinfo; List *item; @@ -794,7 +794,7 @@ one_pred_test(Expr * predicate, List * clauseinfo_list) * expression. */ static bool -one_pred_clause_expr_test(Expr * predicate, Node * clause) +one_pred_clause_expr_test(Expr *predicate, Node *clause) { List *items, *item; @@ -841,7 +841,7 @@ one_pred_clause_expr_test(Expr * predicate, Node * clause) * expression for a simple restriction clause. */ static bool -one_pred_clause_test(Expr * predicate, Node * clause) +one_pred_clause_test(Expr *predicate, Node *clause) { List *items, *item; @@ -923,7 +923,7 @@ StrategyNumber BT_implic_table[BTMaxStrategyNumber][BTMaxStrategyNumber] = { * appropriate "RT_implic_table" array. */ static bool -clause_pred_clause_test(Expr * predicate, Node * clause) +clause_pred_clause_test(Expr *predicate, Node *clause) { Var *pred_var, *clause_var; @@ -1121,8 +1121,8 @@ clause_pred_clause_test(Expr * predicate, Node * clause) * */ static List * -indexable_joinclauses(Rel * rel, Rel * index, - List * joininfo_list, List * clauseinfo_list) +indexable_joinclauses(Rel *rel, Rel *index, + List *joininfo_list, List *clauseinfo_list) { JInfo *joininfo = (JInfo *) NULL; List *cg_list = NIL; @@ -1166,7 +1166,7 @@ indexable_joinclauses(Rel * rel, Rel * index, */ #ifdef NOT_USED static List * -extract_restrict_clauses(List * clausegroup) +extract_restrict_clauses(List *clausegroup) { List *restrict_cls = NIL; List *l; @@ -1197,7 +1197,7 @@ extract_restrict_clauses(List * clausegroup) * */ static List * -index_innerjoin(Query * root, Rel * rel, List * clausegroup_list, Rel * index) +index_innerjoin(Query *root, Rel *rel, List *clausegroup_list, Rel *index) { List *clausegroup = NIL; List *cg_list = NIL; @@ -1282,10 +1282,10 @@ index_innerjoin(Query * root, Rel * rel, List * clausegroup_list, Rel * index) * */ static List * -create_index_paths(Query * root, - Rel * rel, - Rel * index, - List * clausegroup_list, +create_index_paths(Query *root, + Rel *rel, + Rel *index, + List *clausegroup_list, bool join) { List *clausegroup = NIL; @@ -1325,13 +1325,13 @@ create_index_paths(Query * root, } static List * -add_index_paths(List * indexpaths, List * new_indexpaths) +add_index_paths(List *indexpaths, List *new_indexpaths) { return append(indexpaths, new_indexpaths); } static bool -function_index_operand(Expr * funcOpnd, Rel * rel, Rel * index) +function_index_operand(Expr *funcOpnd, Rel *rel, Rel *index) { Oid heapRelid = (Oid) lfirsti(rel->relids); Func *function; @@ -1391,7 +1391,7 @@ function_index_operand(Expr * funcOpnd, Rel * rel, Rel * index) } static bool -SingleAttributeIndex(Rel * index) +SingleAttributeIndex(Rel *index) { /* diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index fe685aaaf1..fd584d6a1d 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.4 1997/09/08 02:24:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.5 1997/09/08 21:44:59 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -29,21 +29,21 @@ #include "optimizer/cost.h" /* for _enable_{hashjoin, * _enable_mergesort} */ -static Path *best_innerjoin(List * join_paths, List * outer_relid); +static Path *best_innerjoin(List *join_paths, List *outer_relid); static List * -sort_inner_and_outer(Rel * joinrel, Rel * outerrel, Rel * innerrel, - List * mergeinfo_list); +sort_inner_and_outer(Rel *joinrel, Rel *outerrel, Rel *innerrel, + List *mergeinfo_list); static List * -match_unsorted_outer(Rel * joinrel, Rel * outerrel, Rel * innerrel, - List * outerpath_list, Path * cheapest_inner, Path * best_innerjoin, - List * mergeinfo_list); +match_unsorted_outer(Rel *joinrel, Rel *outerrel, Rel *innerrel, + List *outerpath_list, Path *cheapest_inner, Path *best_innerjoin, + List *mergeinfo_list); static List * -match_unsorted_inner(Rel * joinrel, Rel * outerrel, Rel * innerrel, - List * innerpath_list, List * mergeinfo_list); -static bool EnoughMemoryForHashjoin(Rel * hashrel); +match_unsorted_inner(Rel *joinrel, Rel *outerrel, Rel *innerrel, + List *innerpath_list, List *mergeinfo_list); +static bool EnoughMemoryForHashjoin(Rel *hashrel); static List * -hash_inner_and_outer(Rel * joinrel, Rel * outerrel, Rel * innerrel, - List * hashinfo_list); +hash_inner_and_outer(Rel *joinrel, Rel *outerrel, Rel *innerrel, + List *hashinfo_list); /* * find-all-join-paths-- @@ -67,7 +67,7 @@ hash_inner_and_outer(Rel * joinrel, Rel * outerrel, Rel * innerrel, * It does a destructive modification. */ void -find_all_join_paths(Query * root, List * joinrels) +find_all_join_paths(Query *root, List *joinrels) { List *mergeinfo_list = NIL; List *hashinfo_list = NIL; @@ -206,7 +206,7 @@ find_all_join_paths(Query * root, List * joinrels) * Returns the pathnode of the selected path. */ static Path * -best_innerjoin(List * join_paths, List * outer_relids) +best_innerjoin(List *join_paths, List *outer_relids) { Path *cheapest = (Path *) NULL; List *join_path; @@ -240,10 +240,10 @@ best_innerjoin(List * join_paths, List * outer_relids) * Returns a list of mergesort paths. */ static List * -sort_inner_and_outer(Rel * joinrel, - Rel * outerrel, - Rel * innerrel, - List * mergeinfo_list) +sort_inner_and_outer(Rel *joinrel, + Rel *outerrel, + Rel *innerrel, + List *mergeinfo_list) { List *ms_list = NIL; MInfo *xmergeinfo = (MInfo *) NULL; @@ -318,13 +318,13 @@ sort_inner_and_outer(Rel * joinrel, * Returns a list of possible join path nodes. */ static List * -match_unsorted_outer(Rel * joinrel, - Rel * outerrel, - Rel * innerrel, - List * outerpath_list, - Path * cheapest_inner, - Path * best_innerjoin, - List * mergeinfo_list) +match_unsorted_outer(Rel *joinrel, + Rel *outerrel, + Rel *innerrel, + List *outerpath_list, + Path *cheapest_inner, + Path *best_innerjoin, + List *mergeinfo_list) { Path *outerpath = (Path *) NULL; List *jp_list = NIL; @@ -485,11 +485,11 @@ match_unsorted_outer(Rel * joinrel, * Returns a list of possible merge paths. */ static List * -match_unsorted_inner(Rel * joinrel, - Rel * outerrel, - Rel * innerrel, - List * innerpath_list, - List * mergeinfo_list) +match_unsorted_inner(Rel *joinrel, + Rel *outerrel, + Rel *innerrel, + List *innerpath_list, + List *mergeinfo_list) { Path *innerpath = (Path *) NULL; List *mp_list = NIL; @@ -583,7 +583,7 @@ match_unsorted_inner(Rel * joinrel, } static bool -EnoughMemoryForHashjoin(Rel * hashrel) +EnoughMemoryForHashjoin(Rel *hashrel) { int ntuples; int tupsize; @@ -617,10 +617,10 @@ EnoughMemoryForHashjoin(Rel * hashrel) * Returns a list of hashjoin paths. */ static List * -hash_inner_and_outer(Rel * joinrel, - Rel * outerrel, - Rel * innerrel, - List * hashinfo_list) +hash_inner_and_outer(Rel *joinrel, + Rel *outerrel, + Rel *innerrel, + List *hashinfo_list) { HInfo *xhashinfo = (HInfo *) NULL; List *hjoin_list = NIL; diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c index b1c1f0cb09..7e28ee5cc6 100644 --- a/src/backend/optimizer/path/joinrels.c +++ b/src/backend/optimizer/path/joinrels.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.6 1997/09/08 02:24:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.7 1997/09/08 21:45:00 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,19 +31,19 @@ bool _use_right_sided_plans_ = false; #endif -static List *find_clause_joins(Query * root, Rel * outer_rel, List * joininfo_list); -static List *find_clauseless_joins(Rel * outer_rel, List * inner_rels); -static Rel *init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo); +static List *find_clause_joins(Query *root, Rel *outer_rel, List *joininfo_list); +static List *find_clauseless_joins(Rel *outer_rel, List *inner_rels); +static Rel *init_join_rel(Rel *outer_rel, Rel *inner_rel, JInfo *joininfo); static List * -new_join_tlist(List * tlist, List * other_relids, +new_join_tlist(List *tlist, List *other_relids, int first_resdomno); -static List *new_joininfo_list(List * joininfo_list, List * join_relids); -static void add_superrels(Rel * rel, Rel * super_rel); -static bool nonoverlap_rels(Rel * rel1, Rel * rel2); -static bool nonoverlap_sets(List * s1, List * s2); +static List *new_joininfo_list(List *joininfo_list, List *join_relids); +static void add_superrels(Rel *rel, Rel *super_rel); +static bool nonoverlap_rels(Rel *rel1, Rel *rel2); +static bool nonoverlap_sets(List *s1, List *s2); static void -set_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel, - JInfo * jinfo); +set_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel, + JInfo *jinfo); /* * find-join-rels-- @@ -59,7 +59,7 @@ set_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel, * Returns a list of rel nodes corresponding to the new join relations. */ List * -find_join_rels(Query * root, List * outer_rels) +find_join_rels(Query *root, List *outer_rels) { List *joins = NIL; List *join_list = NIL; @@ -97,7 +97,7 @@ find_join_rels(Query * root, List * outer_rels) * Returns a list of new join relations. */ static List * -find_clause_joins(Query * root, Rel * outer_rel, List * joininfo_list) +find_clause_joins(Query *root, Rel *outer_rel, List *joininfo_list) { List *join_list = NIL; List *i = NIL; @@ -158,7 +158,7 @@ find_clause_joins(Query * root, Rel * outer_rel, List * joininfo_list) * Returns a list of new join relations. */ static List * -find_clauseless_joins(Rel * outer_rel, List * inner_rels) +find_clauseless_joins(Rel *outer_rel, List *inner_rels) { Rel *inner_rel; List *t_list = NIL; @@ -193,7 +193,7 @@ find_clauseless_joins(Rel * outer_rel, List * inner_rels) * 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; @@ -273,8 +273,8 @@ init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo) * 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; @@ -323,7 +323,7 @@ new_join_tlist(List * tlist, * 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; @@ -387,7 +387,7 @@ new_joininfo_list(List * joininfo_list, List * join_relids) * Modifies the joininfo field of appropriate rel nodes. */ void -add_new_joininfos(Query * root, List * joinrels, List * outerrels) +add_new_joininfos(Query *root, List *joinrels, List *outerrels) { List *xjoinrel = NIL; List *xrelid = NIL; @@ -487,7 +487,7 @@ add_new_joininfos(Query * root, List * joinrels, List * outerrels) * Returns the list of final join relations. */ List * -final_join_rels(List * join_rel_list) +final_join_rels(List *join_rel_list) { List *xrel = NIL; List *temp = NIL; @@ -533,7 +533,7 @@ final_join_rels(List * join_rel_list) * 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); } @@ -548,13 +548,13 @@ add_superrels(Rel * rel, Rel * 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; @@ -569,7 +569,7 @@ nonoverlap_sets(List * s1, List * s2) } static void -set_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel, JInfo * jinfo) +set_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel, JInfo *jinfo) { int ntuples; float selec; diff --git a/src/backend/optimizer/path/joinutils.c b/src/backend/optimizer/path/joinutils.c index 1e297eee07..2c08c77b09 100644 --- a/src/backend/optimizer/path/joinutils.c +++ b/src/backend/optimizer/path/joinutils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.3 1997/09/08 02:24:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.4 1997/09/08 21:45:01 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,18 +27,18 @@ static int -match_pathkey_joinkeys(List * pathkey, List * joinkeys, +match_pathkey_joinkeys(List *pathkey, List *joinkeys, int which_subkey); static bool -every_func(List * joinkeys, List * pathkey, +every_func(List *joinkeys, List *pathkey, int which_subkey); static List * -new_join_pathkey(List * subkeys, - List * considered_subkeys, List * join_rel_tlist, - List * joinclauses); +new_join_pathkey(List *subkeys, + List *considered_subkeys, List *join_rel_tlist, + List *joinclauses); static List * -new_matching_subkeys(Var * subkey, List * considered_subkeys, - List * join_rel_tlist, List * joinclauses); +new_matching_subkeys(Var *subkey, List *considered_subkeys, + List *join_rel_tlist, List *joinclauses); /**************************************************************************** * KEY COMPARISONS @@ -74,11 +74,11 @@ new_matching_subkeys(Var * subkey, List * considered_subkeys, * in matchedJoinClausesPtr. - ay 11/94 */ List * -match_pathkeys_joinkeys(List * pathkeys, - List * joinkeys, - List * joinclauses, +match_pathkeys_joinkeys(List *pathkeys, + List *joinkeys, + List *joinclauses, int which_subkey, - List ** matchedJoinClausesPtr) + List **matchedJoinClausesPtr) { List *matched_joinkeys = NIL; List *matched_joinclauses = NIL; @@ -127,8 +127,8 @@ match_pathkeys_joinkeys(List * pathkeys, * outer or inner subkey matches any subkey of 'pathkey'. */ static int -match_pathkey_joinkeys(List * pathkey, - List * joinkeys, +match_pathkey_joinkeys(List *pathkey, + List *joinkeys, int which_subkey) { Var *path_subkey; @@ -175,7 +175,7 @@ match_pathkey_joinkeys(List * pathkey, * Returns the matching path node if one exists, nil otherwise. */ static bool -every_func(List * joinkeys, List * pathkey, int which_subkey) +every_func(List *joinkeys, List *pathkey, int which_subkey) { JoinKey *xjoinkey; Var *temp; @@ -212,9 +212,9 @@ every_func(List * joinkeys, List * pathkey, int which_subkey) * find the cheapest path that matches the join keys */ Path * -match_paths_joinkeys(List * joinkeys, - PathOrder * ordering, - List * paths, +match_paths_joinkeys(List *joinkeys, + PathOrder *ordering, + List *paths, int which_subkey) { Path *matched_path = NULL; @@ -264,8 +264,8 @@ match_paths_joinkeys(List * joinkeys, * [I've no idea why they have to be list of lists. Should be fixed. -ay 12/94] */ List * -extract_path_keys(List * joinkeys, - List * tlist, +extract_path_keys(List *joinkeys, + List *tlist, int which_subkey) { List *pathkeys = NIL; @@ -326,9 +326,9 @@ extract_path_keys(List * joinkeys, * */ List * -new_join_pathkeys(List * outer_pathkeys, - List * join_rel_tlist, - List * joinclauses) +new_join_pathkeys(List *outer_pathkeys, + List *join_rel_tlist, + List *joinclauses) { List *outer_pathkey = NIL; List *t_list = NIL; @@ -366,10 +366,10 @@ new_join_pathkeys(List * outer_pathkeys, * */ static List * -new_join_pathkey(List * subkeys, - List * considered_subkeys, - List * join_rel_tlist, - List * joinclauses) +new_join_pathkey(List *subkeys, + List *considered_subkeys, + List *join_rel_tlist, + List *joinclauses) { List *t_list = NIL; Var *subkey; @@ -426,10 +426,10 @@ new_join_pathkey(List * subkeys, * */ static List * -new_matching_subkeys(Var * subkey, - List * considered_subkeys, - List * join_rel_tlist, - List * joinclauses) +new_matching_subkeys(Var *subkey, + List *considered_subkeys, + List *join_rel_tlist, + List *joinclauses) { Expr *joinclause = NULL; List *t_list = NIL; diff --git a/src/backend/optimizer/path/mergeutils.c b/src/backend/optimizer/path/mergeutils.c index be5cc79d8d..9210326877 100644 --- a/src/backend/optimizer/path/mergeutils.c +++ b/src/backend/optimizer/path/mergeutils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.3 1997/09/08 02:24:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.4 1997/09/08 21:45:02 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -34,7 +34,7 @@ * */ List * -group_clauses_by_order(List * clauseinfo_list, +group_clauses_by_order(List *clauseinfo_list, int inner_relid) { List *mergeinfo_list = NIL; @@ -106,7 +106,7 @@ group_clauses_by_order(List * clauseinfo_list, * */ MInfo * -match_order_mergeinfo(PathOrder * ordering, List * mergeinfo_list) +match_order_mergeinfo(PathOrder *ordering, List *mergeinfo_list) { MergeOrder *xmergeorder; List *xmergeinfo = NIL; diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c index 7b2da6c182..60d36ae349 100644 --- a/src/backend/optimizer/path/orindxpath.c +++ b/src/backend/optimizer/path/orindxpath.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.3 1997/09/08 02:24:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.4 1997/09/08 21:45:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -32,12 +32,12 @@ static void -best_or_subclause_indices(Query * root, Rel * rel, List * subclauses, - List * indices, List * examined_indexids, Cost subcost, List * selectivities, - List ** indexids, Cost * cost, List ** selecs); +best_or_subclause_indices(Query *root, Rel *rel, List *subclauses, +List *indices, List *examined_indexids, Cost subcost, List *selectivities, + List **indexids, Cost *cost, List **selecs); static void -best_or_subclause_index(Query * root, Rel * rel, Expr * subclause, - List * indices, int *indexid, Cost * cost, Cost * selec); +best_or_subclause_index(Query *root, Rel *rel, Expr *subclause, + List *indices, int *indexid, Cost *cost, Cost *selec); /* @@ -51,8 +51,8 @@ best_or_subclause_index(Query * root, Rel * rel, Expr * subclause, * */ List * -create_or_index_paths(Query * root, - Rel * rel, List * clauses) +create_or_index_paths(Query *root, + Rel *rel, List *clauses) { List *t_list = NIL; @@ -158,16 +158,16 @@ create_or_index_paths(Query * root, * 'cost' is a flonum, and 's' is a flonum. */ static void -best_or_subclause_indices(Query * root, - Rel * rel, - List * subclauses, - List * indices, - List * examined_indexids, +best_or_subclause_indices(Query *root, + Rel *rel, + List *subclauses, + List *indices, + List *examined_indexids, Cost subcost, - List * selectivities, - List ** indexids, /* return value */ - Cost * cost, /* return value */ - List ** selecs) /* return value */ + List *selectivities, + List **indexids, /* return value */ + Cost *cost, /* return value */ + List **selecs) /* return value */ { if (subclauses == NIL) { @@ -213,13 +213,13 @@ best_or_subclause_indices(Query * root, * */ static void -best_or_subclause_index(Query * root, - Rel * rel, - Expr * subclause, - List * indices, +best_or_subclause_index(Query *root, + Rel *rel, + Expr *subclause, + List *indices, int *retIndexid, /* return value */ - Cost * retCost, /* return value */ - Cost * retSelec) /* return value */ + Cost *retCost, /* return value */ + Cost *retSelec) /* return value */ { if (indices != NIL) { diff --git a/src/backend/optimizer/path/predmig.c b/src/backend/optimizer/path/predmig.c index 75c131a244..3ee98d0b14 100644 --- a/src/backend/optimizer/path/predmig.c +++ b/src/backend/optimizer/path/predmig.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.5 1997/09/08 20:56:03 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.6 1997/09/08 21:45:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -56,7 +56,7 @@ static void xfunc_predmig(JoinPath pathnode, Stream streamroot, - Stream laststream, bool * progressp); + Stream laststream, bool *progressp); static bool xfunc_series_llel(Stream stream); static bool xfunc_llel_chains(Stream root, Stream bottom); static Stream xfunc_complete_stream(Stream stream); @@ -78,7 +78,7 @@ static int xfunc_stream_compare(void *arg1, void *arg2); static bool xfunc_check_stream(Stream node); static bool xfunc_in_stream(Stream node, Stream stream); -/* ----------------- MAIN FUNCTIONS ------------------------ */ +/* ----------------- MAIN FUNCTIONS ------------------------ */ /* ** xfunc_do_predmig ** wrapper for Predicate Migration. It calls xfunc_predmig until no @@ -120,7 +120,7 @@ xfunc_predmig(JoinPath pathnode,/* root of the join tree */ Stream laststream,/* for recursive calls -- these are the * root of the stream under construction, * and the lowest node created so far */ - bool * progressp) + bool *progressp) { Stream newstream; @@ -410,7 +410,7 @@ xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath) ** the same groupcost and groupsel (since they're in the same group!) */ static void -xfunc_form_groups(Query * queryInfo, Stream root, Stream bottom) +xfunc_form_groups(Query *queryInfo, Stream root, Stream bottom) { Stream temp, parent; @@ -495,7 +495,7 @@ xfunc_form_groups(Query * queryInfo, Stream root, Stream bottom) } -/* ------------------- UTILITY FUNCTIONS ------------------------- */ +/* ------------------- UTILITY FUNCTIONS ------------------------- */ /* ** xfunc_free_stream -- @@ -765,7 +765,7 @@ xfunc_stream_compare(void *arg1, void *arg2) } } -/* ------------------ DEBUGGING ROUTINES ---------------------------- */ +/* ------------------ DEBUGGING ROUTINES ---------------------------- */ /* ** Make sure all pointers in stream make sense. Make sure no joins are diff --git a/src/backend/optimizer/path/prune.c b/src/backend/optimizer/path/prune.c index 209644c247..d6064ab8e6 100644 --- a/src/backend/optimizer/path/prune.c +++ b/src/backend/optimizer/path/prune.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.5 1997/09/08 02:24:27 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.6 1997/09/08 21:45:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -24,7 +24,7 @@ #include "utils/elog.h" -static List *prune_joinrel(Rel * rel, List * other_rels); +static List *prune_joinrel(Rel *rel, List *other_rels); /* * prune-joinrels-- @@ -35,7 +35,7 @@ static List *prune_joinrel(Rel * rel, List * other_rels); * */ List * -prune_joinrels(List * rel_list) +prune_joinrels(List *rel_list) { List *temp_list = NIL; @@ -60,7 +60,7 @@ prune_joinrels(List * rel_list) * */ static List * -prune_joinrel(Rel * rel, List * other_rels) +prune_joinrel(Rel *rel, List *other_rels) { List *i = NIL; List *t_list = NIL; @@ -97,7 +97,7 @@ prune_joinrel(Rel * rel, List * other_rels) * */ void -prune_rel_paths(List * rel_list) +prune_rel_paths(List *rel_list) { List *x = NIL; List *y = NIL; @@ -140,7 +140,7 @@ prune_rel_paths(List * rel_list) * */ Path * -prune_rel_path(Rel * rel, Path * unorderedpath) +prune_rel_path(Rel *rel, Path *unorderedpath) { Path *cheapest = set_cheapest(rel, rel->pathlist); @@ -171,7 +171,7 @@ prune_rel_path(Rel * rel, Path * unorderedpath) * Returns one pruned rel node list */ List * -merge_joinrels(List * rel_list1, List * rel_list2) +merge_joinrels(List *rel_list1, List *rel_list2) { List *xrel = NIL; @@ -197,7 +197,7 @@ merge_joinrels(List * rel_list1, List * rel_list2) * Returns a new list of rel nodes */ List * -prune_oldrels(List * old_rels) +prune_oldrels(List *old_rels) { Rel *rel; List *joininfo_list, diff --git a/src/backend/optimizer/path/xfunc.c b/src/backend/optimizer/path/xfunc.c index 061a2996c8..39d4131979 100644 --- a/src/backend/optimizer/path/xfunc.c +++ b/src/backend/optimizer/path/xfunc.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.5 1997/09/08 02:24:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.6 1997/09/08 21:45:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -47,8 +47,8 @@ /* local funcs */ static int -xfunc_card_unreferenced(Query * queryInfo, - Expr * clause, Relid referenced); +xfunc_card_unreferenced(Query *queryInfo, + Expr *clause, Relid referenced); */ @@ -146,11 +146,11 @@ xfunc_trypullup(Rel rel) ** XFUNC_JOINPRD if a secondary join predicate is to be pulled up */ int -xfunc_shouldpull(Query * queryInfo, +xfunc_shouldpull(Query *queryInfo, Path childpath, JoinPath parentpath, int whichchild, - CInfo * maxcinfopt) /* Out: pointer to clause to + CInfo *maxcinfopt) /* Out: pointer to clause to * pullup */ { LispValue clauselist, @@ -231,8 +231,8 @@ xfunc_shouldpull(Query * queryInfo, || (!is_join(childpath) && (whichchild == INNER) && IsA(parentpath, JoinPath) - && !IsA(parentpath, HashPath) - && !IsA(parentpath, MergePath))))) + &&!IsA(parentpath, HashPath) + &&!IsA(parentpath, MergePath))))) { *maxcinfopt = maxcinfo; @@ -267,7 +267,7 @@ xfunc_shouldpull(Query * queryInfo, ** Now returns a pointer to the new pulled-up CInfo. -- JMH, 11/18/92 */ CInfo -xfunc_pullup(Query * queryInfo, +xfunc_pullup(Query *queryInfo, Path childpath, JoinPath parentpath, CInfo cinfo, /* clause to pull up */ @@ -360,7 +360,7 @@ xfunc_pullup(Query * queryInfo, ** calculate (selectivity-1)/cost. */ Cost -xfunc_rank(Query * queryInfo, LispValue clause) +xfunc_rank(Query *queryInfo, LispValue clause) { Cost selec = compute_clause_selec(queryInfo, clause, LispNil); Cost cost = xfunc_expense(queryInfo, clause); @@ -379,7 +379,7 @@ xfunc_rank(Query * queryInfo, LispValue clause) ** referenced in the clause. */ Cost -xfunc_expense(Query * queryInfo, clause) +xfunc_expense(Query *queryInfo, clause) LispValue clause; { Cost cost = xfunc_local_expense(clause); @@ -400,7 +400,7 @@ LispValue clause; ** Find global expense of a join clause */ Cost -xfunc_join_expense(Query * queryInfo, JoinPath path, int whichchild) +xfunc_join_expense(Query *queryInfo, JoinPath path, int whichchild) { LispValue primjoinclause = xfunc_primary_join(path); @@ -435,7 +435,7 @@ xfunc_local_expense(LispValue clause) LispValue tmpclause; /* First handle the base case */ - if (IsA(clause, Const) || IsA(clause, Var) || IsA(clause, Param)) + if (IsA(clause, Const) ||IsA(clause, Var) ||IsA(clause, Param)) return (0); /* now other stuff */ else if (IsA(clause, Iter)) @@ -519,7 +519,7 @@ xfunc_func_expense(LispValue node, LispValue args) LispValue tmpplan; List planlist; - if (IsA(node, Oper) || get_func_planlist((Func) node) == LispNil) + if (IsA(node, Oper) ||get_func_planlist((Func) node) == LispNil) { Oid *argOidVect; /* vector of argtypes */ char *pq_src; /* text of PQ function */ @@ -735,7 +735,7 @@ exit: ** for joins). */ static Count -xfunc_card_unreferenced(Query * queryInfo, +xfunc_card_unreferenced(Query *queryInfo, LispValue clause, Relid referenced) { Relid unreferenced, @@ -763,7 +763,7 @@ xfunc_card_unreferenced(Query * queryInfo, ** multiple together cardinalities of a list relations. */ Count -xfunc_card_product(Query * queryInfo, Relid relids) +xfunc_card_product(Query *queryInfo, Relid relids) { LispValue cinfonode; LispValue temp; @@ -813,7 +813,7 @@ xfunc_find_references(LispValue clause) /* Base cases */ if (IsA(clause, Var)) return (lispCons(lfirst(get_varid((Var) clause)), LispNil)); - else if (IsA(clause, Const) || IsA(clause, Param)) + else if (IsA(clause, Const) ||IsA(clause, Param)) return ((List) LispNil); /* recursion */ @@ -929,7 +929,7 @@ xfunc_primary_join(JoinPath pathnode) ** get the expensive function costs of the path */ Cost -xfunc_get_path_cost(Query * queryInfo, Path pathnode) +xfunc_get_path_cost(Query *queryInfo, Path pathnode) { Cost cost = 0; LispValue tmplist; @@ -1048,7 +1048,7 @@ xfunc_total_path_cost(JoinPath pathnode) } else if (IsA(pathnode, HashPath)) { - HashPath hashnode = (HashPath) pathnode; + HashPath hashnode = (HashPath) pathnode; cost += cost_hashjoin(get_path_cost((Path) get_outerjoinpath(hashnode)), get_path_cost((Path) get_innerjoinpath(hashnode)), @@ -1153,7 +1153,7 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */ TargetEntry *tle; /* tlist member corresponding to var */ - if (IsA(clause, Const) || IsA(clause, Param)) + if (IsA(clause, Const) ||IsA(clause, Param)) return; else if (IsA(clause, Var)) { @@ -1261,7 +1261,7 @@ xfunc_disjunct_sort(LispValue clause_list) ** arg1 and arg2 are really pointers to disjuncts */ int -xfunc_disjunct_compare(Query * queryInfo, void *arg1, void *arg2) +xfunc_disjunct_compare(Query *queryInfo, void *arg1, void *arg2) { LispValue disjunct1 = *(LispValue *) arg1; LispValue disjunct2 = *(LispValue *) arg2; @@ -1436,11 +1436,11 @@ xfunc_LispRemove(LispValue foo, List bar) ** Just like _copyRel, but doesn't copy the paths */ bool -xfunc_copyrel(Rel from, Rel * to) +xfunc_copyrel(Rel from, Rel *to) { Rel newnode; - Pointer(*alloc) () = palloc; + Pointer (*alloc) () = palloc; /* COPY_CHECKARGS() */ if (to == NULL) diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 310bb528f4..11d777e834 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.14 1997/09/08 20:56:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.15 1997/09/08 21:45:13 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -44,47 +44,47 @@ #define TEMP_SORT 1 #define TEMP_MATERIAL 2 -static List *switch_outer(List * clauses); -static Scan *create_scan_node(Path * best_path, List * tlist); -static Join *create_join_node(JoinPath * best_path, List * tlist); +static List *switch_outer(List *clauses); +static Scan *create_scan_node(Path *best_path, List *tlist); +static Join *create_join_node(JoinPath *best_path, List *tlist); static SeqScan * -create_seqscan_node(Path * best_path, List * tlist, - List * scan_clauses); +create_seqscan_node(Path *best_path, List *tlist, + List *scan_clauses); static IndexScan * -create_indexscan_node(IndexPath * best_path, List * tlist, - List * scan_clauses); +create_indexscan_node(IndexPath *best_path, List *tlist, + List *scan_clauses); static NestLoop * -create_nestloop_node(JoinPath * best_path, List * tlist, - List * clauses, Plan * outer_node, List * outer_tlist, - Plan * inner_node, List * inner_tlist); +create_nestloop_node(JoinPath *best_path, List *tlist, + List *clauses, Plan *outer_node, List *outer_tlist, + Plan *inner_node, List *inner_tlist); static MergeJoin * -create_mergejoin_node(MergePath * best_path, List * tlist, - List * clauses, Plan * outer_node, List * outer_tlist, - Plan * inner_node, List * inner_tlist); +create_mergejoin_node(MergePath *best_path, List *tlist, + List *clauses, Plan *outer_node, List *outer_tlist, + Plan *inner_node, List *inner_tlist); static HashJoin * -create_hashjoin_node(HashPath * best_path, List * tlist, - List * clauses, Plan * outer_node, List * outer_tlist, - Plan * inner_node, List * inner_tlist); -static Node *fix_indxqual_references(Node * clause, Path * index_path); +create_hashjoin_node(HashPath *best_path, List *tlist, + List *clauses, Plan *outer_node, List *outer_tlist, + Plan *inner_node, List *inner_tlist); +static Node *fix_indxqual_references(Node *clause, Path *index_path); static Temp * -make_temp(List * tlist, List * keys, Oid * operators, - Plan * plan_node, int temptype); +make_temp(List *tlist, List *keys, Oid *operators, + Plan *plan_node, int temptype); static IndexScan * -make_indexscan(List * qptlist, List * qpqual, Index scanrelid, - List * indxid, List * indxqual); +make_indexscan(List *qptlist, List *qpqual, Index scanrelid, + List *indxid, List *indxqual); static NestLoop * -make_nestloop(List * qptlist, List * qpqual, Plan * lefttree, - Plan * righttree); +make_nestloop(List *qptlist, List *qpqual, Plan *lefttree, + Plan *righttree); static HashJoin * -make_hashjoin(List * tlist, List * qpqual, - List * hashclauses, Plan * lefttree, Plan * righttree); -static Hash *make_hash(List * tlist, Var * hashkey, Plan * lefttree); +make_hashjoin(List *tlist, List *qpqual, + List *hashclauses, Plan *lefttree, Plan *righttree); +static Hash *make_hash(List *tlist, Var *hashkey, Plan *lefttree); static MergeJoin * -make_mergesort(List * tlist, List * qpqual, - List * mergeclauses, Oid opcode, Oid * rightorder, - Oid * leftorder, Plan * righttree, Plan * lefttree); +make_mergesort(List *tlist, List *qpqual, + List *mergeclauses, Oid opcode, Oid *rightorder, + Oid *leftorder, Plan *righttree, Plan *lefttree); static Material * -make_material(List * tlist, Oid tempid, Plan * lefttree, +make_material(List *tlist, Oid tempid, Plan *lefttree, int keycount); /* @@ -103,7 +103,7 @@ make_material(List * tlist, Oid tempid, Plan * lefttree, * Returns the optimal(?) access plan. */ Plan * -create_plan(Path * best_path) +create_plan(Path *best_path) { List *tlist; Plan *plan_node = (Plan *) NULL; @@ -167,7 +167,7 @@ create_plan(Path * best_path) * Returns the scan node. */ static Scan * -create_scan_node(Path * best_path, List * tlist) +create_scan_node(Path *best_path, List *tlist) { Scan *node = NULL; @@ -216,7 +216,7 @@ create_scan_node(Path * best_path, List * tlist) * Returns the join node. */ static Join * -create_join_node(JoinPath * best_path, List * tlist) +create_join_node(JoinPath *best_path, List *tlist) { Plan *outer_node; List *outer_tlist; @@ -298,7 +298,7 @@ create_join_node(JoinPath * best_path, List * tlist) * with restriction clauses 'scan-clauses' and targetlist 'tlist'. */ static SeqScan * -create_seqscan_node(Path * best_path, List * tlist, List * scan_clauses) +create_seqscan_node(Path *best_path, List *tlist, List *scan_clauses) { SeqScan *scan_node = (SeqScan *) NULL; Index scan_relid = -1; @@ -326,9 +326,9 @@ create_seqscan_node(Path * best_path, List * tlist, List * scan_clauses) * with restriction clauses 'scan-clauses' and targetlist 'tlist'. */ static IndexScan * -create_indexscan_node(IndexPath * best_path, - List * tlist, - List * scan_clauses) +create_indexscan_node(IndexPath *best_path, + List *tlist, + List *scan_clauses) { /* @@ -430,13 +430,13 @@ create_indexscan_node(IndexPath * best_path, *****************************************************************************/ static NestLoop * -create_nestloop_node(JoinPath * best_path, - List * tlist, - List * clauses, - Plan * outer_node, - List * outer_tlist, - Plan * inner_node, - List * inner_tlist) +create_nestloop_node(JoinPath *best_path, + List *tlist, + List *clauses, + Plan *outer_node, + List *outer_tlist, + Plan *inner_node, + List *inner_tlist) { NestLoop *join_node = (NestLoop *) NULL; @@ -512,13 +512,13 @@ create_nestloop_node(JoinPath * best_path, } static MergeJoin * -create_mergejoin_node(MergePath * best_path, - List * tlist, - List * clauses, - Plan * outer_node, - List * outer_tlist, - Plan * inner_node, - List * inner_tlist) +create_mergejoin_node(MergePath *best_path, + List *tlist, + List *clauses, + Plan *outer_node, + List *outer_tlist, + Plan *inner_node, + List *inner_tlist) { List *qpqual, *mergeclauses; @@ -609,13 +609,13 @@ create_mergejoin_node(MergePath * best_path, * these?? at runtime? what about a hash index? */ static HashJoin * -create_hashjoin_node(HashPath * best_path, - List * tlist, - List * clauses, - Plan * outer_node, - List * outer_tlist, - Plan * inner_node, - List * inner_tlist) +create_hashjoin_node(HashPath *best_path, + List *tlist, + List *clauses, + Plan *outer_node, + List *outer_tlist, + Plan *inner_node, + List *inner_tlist) { List *qpqual; List *hashclauses; @@ -663,7 +663,7 @@ create_hashjoin_node(HashPath * best_path, *****************************************************************************/ static Node * -fix_indxqual_references(Node * clause, Path * index_path) +fix_indxqual_references(Node *clause, Path *index_path) { Node *newclause; @@ -800,7 +800,7 @@ fix_indxqual_references(Node * clause, Path * index_path) * XXX Shouldn't the operator be commuted?! */ static List * -switch_outer(List * clauses) +switch_outer(List *clauses) { List *t_list = NIL; Expr *temp = NULL; @@ -844,7 +844,7 @@ switch_outer(List * clauses) * Returns the modified target list. */ static List * -set_temp_tlist_operators(List * tlist, List * pathkeys, Oid * operators) +set_temp_tlist_operators(List *tlist, List *pathkeys, Oid *operators) { Node *keys = NULL; int keyno = 1; @@ -892,10 +892,10 @@ set_temp_tlist_operators(List * tlist, List * pathkeys, Oid * operators) * 'temptype' indicates which operation(sort or hash) to perform */ static Temp * -make_temp(List * tlist, - List * keys, - Oid * operators, - Plan * plan_node, +make_temp(List *tlist, + List *keys, + Oid *operators, + Plan *plan_node, int temptype) { List *temp_tlist; @@ -936,10 +936,10 @@ make_temp(List * tlist, SeqScan * -make_seqscan(List * qptlist, - List * qpqual, +make_seqscan(List *qptlist, + List *qpqual, Index scanrelid, - Plan * lefttree) + Plan *lefttree) { SeqScan *node = makeNode(SeqScan); Plan *plan = &node->plan; @@ -957,11 +957,11 @@ make_seqscan(List * qptlist, } static IndexScan * -make_indexscan(List * qptlist, - List * qpqual, +make_indexscan(List *qptlist, + List *qpqual, Index scanrelid, - List * indxid, - List * indxqual) + List *indxid, + List *indxqual) { IndexScan *node = makeNode(IndexScan); Plan *plan = &node->scan.plan; @@ -982,10 +982,10 @@ make_indexscan(List * qptlist, static NestLoop * -make_nestloop(List * qptlist, - List * qpqual, - Plan * lefttree, - Plan * righttree) +make_nestloop(List *qptlist, + List *qpqual, + Plan *lefttree, + Plan *righttree) { NestLoop *node = makeNode(NestLoop); Plan *plan = &node->join; @@ -1002,11 +1002,11 @@ make_nestloop(List * qptlist, } static HashJoin * -make_hashjoin(List * tlist, - List * qpqual, - List * hashclauses, - Plan * lefttree, - Plan * righttree) +make_hashjoin(List *tlist, + List *qpqual, + List *hashclauses, + Plan *lefttree, + Plan *righttree) { HashJoin *node = makeNode(HashJoin); Plan *plan = &node->join; @@ -1027,7 +1027,7 @@ make_hashjoin(List * tlist, } static Hash * -make_hash(List * tlist, Var * hashkey, Plan * lefttree) +make_hash(List *tlist, Var *hashkey, Plan *lefttree) { Hash *node = makeNode(Hash); Plan *plan = &node->plan; @@ -1047,14 +1047,14 @@ make_hash(List * tlist, Var * hashkey, Plan * lefttree) } static MergeJoin * -make_mergesort(List * tlist, - List * qpqual, - List * mergeclauses, +make_mergesort(List *tlist, + List *qpqual, + List *mergeclauses, Oid opcode, - Oid * rightorder, - Oid * leftorder, - Plan * righttree, - Plan * lefttree) + Oid *rightorder, + Oid *leftorder, + Plan *righttree, + Plan *lefttree) { MergeJoin *node = makeNode(MergeJoin); Plan *plan = &node->join; @@ -1074,7 +1074,7 @@ make_mergesort(List * tlist, } Sort * -make_sort(List * tlist, Oid tempid, Plan * lefttree, int keycount) +make_sort(List *tlist, Oid tempid, Plan *lefttree, int keycount) { Sort *node = makeNode(Sort); Plan *plan = &node->plan; @@ -1092,9 +1092,9 @@ make_sort(List * tlist, Oid tempid, Plan * lefttree, int keycount) } static Material * -make_material(List * tlist, +make_material(List *tlist, Oid tempid, - Plan * lefttree, + Plan *lefttree, int keycount) { Material *node = makeNode(Material); @@ -1113,7 +1113,7 @@ make_material(List * tlist, } Agg * -make_agg(List * tlist, int nagg, Aggreg **aggs) +make_agg(List *tlist, int nagg, Aggreg **aggs) { Agg *node = makeNode(Agg); @@ -1130,11 +1130,11 @@ make_agg(List * tlist, int nagg, Aggreg **aggs) } Group * -make_group(List * tlist, +make_group(List *tlist, bool tuplePerGroup, int ngrp, AttrNumber *grpColIdx, - Sort * lefttree) + Sort *lefttree) { Group *node = makeNode(Group); @@ -1160,7 +1160,7 @@ make_group(List * tlist, */ Unique * -make_unique(List * tlist, Plan * lefttree, char *uniqueAttr) +make_unique(List *tlist, Plan *lefttree, char *uniqueAttr) { Unique *node = makeNode(Unique); Plan *plan = &node->plan; @@ -1183,7 +1183,7 @@ make_unique(List * tlist, Plan * lefttree, char *uniqueAttr) } List * -generate_fjoin(List * tlist) +generate_fjoin(List *tlist) { #if 0 List tlistP; diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index ebc2324d7f..d7edd0aaea 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.7 1997/09/08 02:24:36 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.8 1997/09/08 21:45:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -35,14 +35,14 @@ extern int Quiet; -static void add_clause_to_rels(Query * root, List * clause); +static void add_clause_to_rels(Query *root, List *clause); static void -add_join_clause_info_to_rels(Query * root, CInfo * clauseinfo, - List * join_relids); -static void add_vars_to_rels(Query * root, List * vars, List * join_relids); +add_join_clause_info_to_rels(Query *root, CInfo *clauseinfo, + List *join_relids); +static void add_vars_to_rels(Query *root, List *vars, List *join_relids); -static MergeOrder *mergesortop(Expr * clause); -static Oid hashjoinop(Expr * clause); +static MergeOrder *mergesortop(Expr *clause); +static Oid hashjoinop(Expr *clause); /***************************************************************************** @@ -61,7 +61,7 @@ static Oid hashjoinop(Expr * clause); * Returns nothing. */ void -initialize_base_rels_list(Query * root, List * tlist) +initialize_base_rels_list(Query *root, List *tlist) { List *tlist_vars = NIL; List *l = NIL; @@ -98,7 +98,7 @@ initialize_base_rels_list(Query * root, List * tlist) * into a join. */ void -add_missing_vars_to_base_rels(Query * root, List * tlist) +add_missing_vars_to_base_rels(Query *root, List *tlist) { List *l; int varno; @@ -145,7 +145,7 @@ add_missing_vars_to_base_rels(Query * root, List * tlist) * Returns nothing of interest. */ void -initialize_base_rels_jinfo(Query * root, List * clauses) +initialize_base_rels_jinfo(Query *root, List *clauses) { List *clause; @@ -166,7 +166,7 @@ initialize_base_rels_jinfo(Query * root, List * clauses) * Returns nothing of interest. */ static void -add_clause_to_rels(Query * root, List * clause) +add_clause_to_rels(Query *root, List *clause) { List *relids; List *vars; @@ -259,7 +259,7 @@ add_clause_to_rels(Query * root, List * clause) * */ static void -add_join_clause_info_to_rels(Query * root, CInfo * clauseinfo, List * join_relids) +add_join_clause_info_to_rels(Query *root, CInfo *clauseinfo, List *join_relids) { List *join_relid; @@ -300,7 +300,7 @@ add_join_clause_info_to_rels(Query * root, CInfo * clauseinfo, List * join_relid * Returns nothing. */ static void -add_vars_to_rels(Query * root, List * vars, List * join_relids) +add_vars_to_rels(Query *root, List *vars, List *join_relids) { Var *var; List *temp = NIL; @@ -334,7 +334,7 @@ add_vars_to_rels(Query * root, List * vars, List * join_relids) * Returns nothing. */ void -initialize_join_clause_info(List * rel_list) +initialize_join_clause_info(List *rel_list) { List *x, *y, @@ -387,7 +387,7 @@ initialize_join_clause_info(List * rel_list) * a mergesortable operator. */ static MergeOrder * -mergesortop(Expr * clause) +mergesortop(Expr *clause) { Oid leftOp, rightOp; @@ -421,7 +421,7 @@ mergesortop(Expr * clause) * a hashjoinable operator. */ static Oid -hashjoinop(Expr * clause) +hashjoinop(Expr *clause) { return (op_hashjoinable(((Oper *) clause->oper)->opno, (get_leftop(clause))->vartype, diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index 029b34a24e..55cd710f42 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.6 1997/09/08 02:24:37 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.7 1997/09/08 21:45:24 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -38,12 +38,12 @@ #include "utils/mcxt.h" #include "utils/lsyscache.h" -static Plan *subplanner(Query * root, List * flat_tlist, List * qual); -static Result *make_result(List * tlist, Node * resconstantqual, Plan * subplan); +static Plan *subplanner(Query *root, List *flat_tlist, List *qual); +static Result *make_result(List *tlist, Node *resconstantqual, Plan *subplan); static Plan * -make_groupPlan(List ** tlist, bool tuplePerGroup, - List * groupClause, Plan * subplan); +make_groupPlan(List **tlist, bool tuplePerGroup, + List *groupClause, Plan *subplan); /* * query_planner-- @@ -63,10 +63,10 @@ make_groupPlan(List ** tlist, bool tuplePerGroup, * Returns a query plan. */ Plan * -query_planner(Query * root, +query_planner(Query *root, int command_type, - List * tlist, - List * qual) + List *tlist, + List *qual) { List *constant_qual = NIL; List *flattened_tlist = NIL; @@ -278,9 +278,9 @@ query_planner(Query * root, * */ static Plan * -subplanner(Query * root, - List * flat_tlist, - List * qual) +subplanner(Query *root, + List *flat_tlist, + List *qual) { Rel *final_relation; List *final_relation_list; @@ -354,9 +354,9 @@ subplanner(Query * root, *****************************************************************************/ static Result * -make_result(List * tlist, - Node * resconstantqual, - Plan * subplan) +make_result(List *tlist, + Node *resconstantqual, + Plan *subplan) { Result *node = makeNode(Result); Plan *plan = &node->plan; @@ -378,10 +378,10 @@ make_result(List * tlist, *****************************************************************************/ static Plan * -make_groupPlan(List ** tlist, +make_groupPlan(List **tlist, bool tuplePerGroup, - List * groupClause, - Plan * subplan) + List *groupClause, + Plan *subplan) { List *sort_tlist; List *sl, diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 72352646b7..3fbc28cb88 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.8 1997/09/08 02:24:38 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.9 1997/09/08 21:45:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -47,9 +47,9 @@ #include "executor/executor.h" -static Plan *make_sortplan(List * tlist, List * sortcls, Plan * plannode); -static Plan *init_query_planner(Query * parse); -static Existential *make_existential(Plan * left, Plan * right); +static Plan *make_sortplan(List *tlist, List *sortcls, Plan *plannode); +static Plan *init_query_planner(Query *parse); +static Existential *make_existential(Plan *left, Plan *right); /***************************************************************************** * @@ -69,7 +69,7 @@ static Existential *make_existential(Plan * left, Plan * right); * */ Plan * -planner(Query * parse) +planner(Query *parse) { List *tlist = parse->targetList; List *rangetable = parse->rtable; @@ -143,7 +143,7 @@ planner(Query * parse) * sortops: (sortop1 sortop2 sortop3 ...) */ static Plan * -make_sortplan(List * tlist, List * sortcls, Plan * plannode) +make_sortplan(List *tlist, List *sortcls, Plan *plannode) { Plan *sortplan = (Plan *) NULL; List *temp_tlist = NIL; @@ -204,7 +204,7 @@ make_sortplan(List * tlist, List * sortcls, Plan * plannode) * */ static Plan * -init_query_planner(Query * root) +init_query_planner(Query *root) { List *primary_qual; List *existential_qual; @@ -254,7 +254,7 @@ init_query_planner(Query * root) * the left and right subtree slots. */ static Existential * -make_existential(Plan * left, Plan * right) +make_existential(Plan *left, Plan *right) { Existential *node = makeNode(Existential); @@ -273,7 +273,7 @@ make_existential(Plan * left, Plan * right) * type he claims. */ void -pg_checkretval(Oid rettype, QueryTreeList * queryTreeList) +pg_checkretval(Oid rettype, QueryTreeList *queryTreeList) { Query *parse; List *tlist; @@ -399,6 +399,7 @@ pg_checkretval(Oid rettype, QueryTreeList * queryTreeList) tletype = (Oid) ((Param *) thenode)->paramtype; else if (IsA(thenode, Expr)) tletype = Expr; + else if (IsA(thenode, LispList)) { thenode = lfirst(thenode); diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index bc4e8cdbe6..b6afa5fcb9 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.7 1997/09/08 20:56:16 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.8 1997/09/08 21:45:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -33,20 +33,20 @@ #include "optimizer/var.h" #include "optimizer/tlist.h" -static void set_join_tlist_references(Join * join); -static void set_tempscan_tlist_references(SeqScan * tempscan); -static void set_temp_tlist_references(Temp * temp); +static void set_join_tlist_references(Join *join); +static void set_tempscan_tlist_references(SeqScan *tempscan); +static void set_temp_tlist_references(Temp *temp); static List * -replace_clause_joinvar_refs(Expr * clause, - List * outer_tlist, List * inner_tlist); +replace_clause_joinvar_refs(Expr *clause, + List *outer_tlist, List *inner_tlist); static List * -replace_subclause_joinvar_refs(List * clauses, - List * outer_tlist, List * inner_tlist); -static Var *replace_joinvar_refs(Var * var, List * outer_tlist, List * inner_tlist); -static List *tlist_temp_references(Oid tempid, List * tlist); -static void replace_result_clause(List * clause, List * subplanTargetList); -static bool OperandIsInner(Node * opnd, int inner_relid); -static void replace_agg_clause(Node * expr, List * targetlist); +replace_subclause_joinvar_refs(List *clauses, + List *outer_tlist, List *inner_tlist); +static Var *replace_joinvar_refs(Var *var, List *outer_tlist, List *inner_tlist); +static List *tlist_temp_references(Oid tempid, List *tlist); +static void replace_result_clause(List *clause, List *subplanTargetList); +static bool OperandIsInner(Node *opnd, int inner_relid); +static void replace_agg_clause(Node *expr, List *targetlist); /***************************************************************************** * @@ -66,7 +66,7 @@ static void replace_agg_clause(Node * expr, List * targetlist); * */ void -set_tlist_references(Plan * plan) +set_tlist_references(Plan *plan) { if (plan == NULL) return; @@ -75,7 +75,7 @@ set_tlist_references(Plan * plan) { set_join_tlist_references((Join *) plan); } - else if (IsA(plan, SeqScan) && plan->lefttree && + else if (IsA(plan, SeqScan) &&plan->lefttree && IsA_Temp(plan->lefttree)) { set_tempscan_tlist_references((SeqScan *) plan); @@ -120,7 +120,7 @@ set_tlist_references(Plan * plan) * */ static void -set_join_tlist_references(Join * join) +set_join_tlist_references(Join *join) { Plan *outer = ((Plan *) join)->lefttree; Plan *inner = ((Plan *) join)->righttree; @@ -165,7 +165,7 @@ set_join_tlist_references(Join * join) * */ static void -set_tempscan_tlist_references(SeqScan * tempscan) +set_tempscan_tlist_references(SeqScan *tempscan) { Temp *temp = (Temp *) ((Plan *) tempscan)->lefttree; @@ -187,7 +187,7 @@ set_tempscan_tlist_references(SeqScan * tempscan) * */ static void -set_temp_tlist_references(Temp * temp) +set_temp_tlist_references(Temp *temp) { Plan *source = ((Plan *) temp)->lefttree; @@ -218,9 +218,9 @@ set_temp_tlist_references(Temp * temp) * */ List * -join_references(List * clauses, - List * outer_tlist, - List * inner_tlist) +join_references(List *clauses, + List *outer_tlist, + List *inner_tlist) { return (replace_subclause_joinvar_refs(clauses, outer_tlist, @@ -244,8 +244,8 @@ join_references(List * clauses, * */ List * -index_outerjoin_references(List * inner_indxqual, - List * outer_tlist, +index_outerjoin_references(List *inner_indxqual, + List *outer_tlist, Index inner_relid) { List *t_list = NIL; @@ -307,9 +307,9 @@ index_outerjoin_references(List * inner_indxqual, * */ static List * -replace_clause_joinvar_refs(Expr * clause, - List * outer_tlist, - List * inner_tlist) +replace_clause_joinvar_refs(Expr *clause, + List *outer_tlist, + List *inner_tlist) { List *temp = NULL; @@ -402,9 +402,9 @@ replace_clause_joinvar_refs(Expr * clause, } static List * -replace_subclause_joinvar_refs(List * clauses, - List * outer_tlist, - List * inner_tlist) +replace_subclause_joinvar_refs(List *clauses, + List *outer_tlist, + List *inner_tlist) { List *t_list = NIL; List *temp = NIL; @@ -421,7 +421,7 @@ replace_subclause_joinvar_refs(List * clauses, } static Var * -replace_joinvar_refs(Var * var, List * outer_tlist, List * inner_tlist) +replace_joinvar_refs(Var *var, List *outer_tlist, List *inner_tlist) { Resdom *outer_resdom = (Resdom *) NULL; @@ -468,7 +468,7 @@ replace_joinvar_refs(Var * var, List * outer_tlist, List * inner_tlist) */ static List * tlist_temp_references(Oid tempid, - List * tlist) + List *tlist) { List *t_list = NIL; TargetEntry *temp = (TargetEntry *) NULL; @@ -511,7 +511,7 @@ tlist_temp_references(Oid tempid, * fields.... */ void -set_result_tlist_references(Result * resultNode) +set_result_tlist_references(Result *resultNode) { Plan *subplan; List *resultTargetList; @@ -560,8 +560,8 @@ set_result_tlist_references(Result * resultNode) * */ static void -replace_result_clause(List * clause, - List * subplanTargetList) /* target list of the +replace_result_clause(List *clause, + List *subplanTargetList) /* target list of the * subplan */ { List *t; @@ -631,7 +631,7 @@ replace_result_clause(List * clause, subClause = (List *) get_rightop((Expr *) clause); replace_result_clause(subClause, subplanTargetList); } - else if (IsA(clause, Param) || IsA(clause, Const)) + else if (IsA(clause, Param) ||IsA(clause, Const)) { /* do nothing! */ } @@ -646,8 +646,8 @@ replace_result_clause(List * clause, } static - bool -OperandIsInner(Node * opnd, int inner_relid) +bool +OperandIsInner(Node *opnd, int inner_relid) { /* @@ -720,7 +720,7 @@ set_agg_agglist_references(Agg *aggNode) } static void -replace_agg_clause(Node * clause, List * subplanTargetList) +replace_agg_clause(Node *clause, List *subplanTargetList) { List *t; TargetEntry *subplanVar; @@ -789,7 +789,7 @@ replace_agg_clause(Node * clause, List * subplanTargetList) if (right != (Node *) NULL) replace_agg_clause(right, subplanTargetList); } - else if (IsA(clause, Param) || IsA(clause, Const)) + else if (IsA(clause, Param) ||IsA(clause, Const)) { /* do nothing! */ } diff --git a/src/backend/optimizer/prep/archive.c b/src/backend/optimizer/prep/archive.c index 64a1b1c84d..d053bd61a3 100644 --- a/src/backend/optimizer/prep/archive.c +++ b/src/backend/optimizer/prep/archive.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Attic/archive.c,v 1.3 1997/09/08 02:24:41 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Attic/archive.c,v 1.4 1997/09/08 21:45:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -26,7 +26,7 @@ #include "commands/creatinh.h" void -plan_archive(List * rt) +plan_archive(List *rt) { List *rtitem; RangeTblEntry *rte; diff --git a/src/backend/optimizer/prep/prepqual.c b/src/backend/optimizer/prep/prepqual.c index 47a44d0196..b8313f56cb 100644 --- a/src/backend/optimizer/prep/prepqual.c +++ b/src/backend/optimizer/prep/prepqual.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.5 1997/09/08 02:24:42 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.6 1997/09/08 21:45:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -24,17 +24,17 @@ #include "utils/lsyscache.h" -static Expr *pull_args(Expr * qual); -static List *pull_ors(List * orlist); -static List *pull_ands(List * andlist); -static Expr *find_nots(Expr * qual); -static Expr *push_nots(Expr * qual); -static Expr *normalize(Expr * qual); -static List *or_normalize(List * orlist); -static List *distribute_args(List * item, List * args); -static List *qualcleanup(Expr * qual); -static List *remove_ands(Expr * qual); -static List *remove_duplicates(List * list); +static Expr *pull_args(Expr *qual); +static List *pull_ors(List *orlist); +static List *pull_ands(List *andlist); +static Expr *find_nots(Expr *qual); +static Expr *push_nots(Expr *qual); +static Expr *normalize(Expr *qual); +static List *or_normalize(List *orlist); +static List *distribute_args(List *item, List *args); +static List *qualcleanup(Expr *qual); +static List *remove_ands(Expr *qual); +static List *remove_duplicates(List *list); /* * preprocess-qualification-- @@ -48,7 +48,7 @@ static List *remove_duplicates(List * list); * normal form (see cnfify() below ) */ List * -preprocess_qualification(Expr * qual, List * tlist, List ** existentialQualPtr) +preprocess_qualification(Expr *qual, List *tlist, List **existentialQualPtr) { List *cnf_qual = cnfify(qual, true); @@ -101,7 +101,7 @@ preprocess_qualification(Expr * qual, List * tlist, List ** existentialQualPtr) * */ List * -cnfify(Expr * qual, bool removeAndFlag) +cnfify(Expr *qual, bool removeAndFlag) { Expr *newqual = NULL; @@ -134,7 +134,7 @@ cnfify(Expr * qual, bool removeAndFlag) * */ static Expr * -pull_args(Expr * qual) +pull_args(Expr *qual) { if (qual == NULL) return (NULL); @@ -182,7 +182,7 @@ pull_args(Expr * qual) * Returns the modified list. */ static List * -pull_ors(List * orlist) +pull_ors(List *orlist) { if (orlist == NIL) return (NIL); @@ -208,7 +208,7 @@ pull_ors(List * orlist) * Returns the modified list. */ static List * -pull_ands(List * andlist) +pull_ands(List *andlist) { if (andlist == NIL) return (NIL); @@ -237,7 +237,7 @@ pull_ands(List * andlist) * */ static Expr * -find_nots(Expr * qual) +find_nots(Expr *qual) { if (qual == NULL) return (NULL); @@ -286,7 +286,7 @@ find_nots(Expr * qual) * */ static Expr * -push_nots(Expr * qual) +push_nots(Expr *qual) { if (qual == NULL) return (NULL); @@ -373,7 +373,7 @@ push_nots(Expr * qual) * */ static Expr * -normalize(Expr * qual) +normalize(Expr *qual) { if (qual == NULL) return (NULL); @@ -438,7 +438,7 @@ normalize(Expr * qual) * */ static List * -or_normalize(List * orlist) +or_normalize(List *orlist) { List *distributable = NIL; List *new_orlist = NIL; @@ -477,7 +477,7 @@ or_normalize(List * orlist) * */ static List * -distribute_args(List * item, List * args) +distribute_args(List *item, List *args) { List *or_list = NIL; List *n_list = NIL; @@ -507,7 +507,7 @@ distribute_args(List * item, List * args) * */ static List * -qualcleanup(Expr * qual) +qualcleanup(Expr *qual) { if (qual == NULL) return (NIL); @@ -568,7 +568,7 @@ qualcleanup(Expr * qual) * MODIFIES: qual */ static List * -remove_ands(Expr * qual) +remove_ands(Expr *qual) { List *t_list = NIL; @@ -621,7 +621,7 @@ remove_ands(Expr * qual) */ #ifdef NOT_USED static List * -update_relations(List * tlist) +update_relations(List *tlist) { return (NIL); } @@ -635,7 +635,7 @@ update_relations(List * tlist) *****************************************************************************/ static List * -remove_duplicates(List * list) +remove_duplicates(List *list) { List *i; List *j; diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index 550dad8f94..0010c69d6a 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.4 1997/09/08 02:24:44 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.5 1997/09/08 21:45:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -34,11 +34,11 @@ #include "optimizer/tlist.h" static List * -expand_targetlist(List * tlist, Oid relid, int command_type, +expand_targetlist(List *tlist, Oid relid, int command_type, Index result_relation); static List * -replace_matching_resname(List * new_tlist, - List * old_tlist); +replace_matching_resname(List *new_tlist, + List *old_tlist); static List * new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type); @@ -55,10 +55,10 @@ new_relation_targetlist(Oid relid, Index rt_index, * Returns the new targetlist. */ List * -preprocess_targetlist(List * tlist, +preprocess_targetlist(List *tlist, int command_type, Index result_relation, - List * range_table) + List *range_table) { List *expanded_tlist = NIL; Oid relid = InvalidOid; @@ -144,7 +144,7 @@ preprocess_targetlist(List * tlist, * Returns the expanded target list, sorted in resno order. */ static List * -expand_targetlist(List * tlist, +expand_targetlist(List *tlist, Oid relid, int command_type, Index result_relation) @@ -178,7 +178,7 @@ expand_targetlist(List * tlist, static List * -replace_matching_resname(List * new_tlist, List * old_tlist) +replace_matching_resname(List *new_tlist, List *old_tlist) { List *temp, *i; diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 39e539b223..aac995901f 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.5 1997/09/08 02:24:47 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.6 1997/09/08 21:45:37 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -35,21 +35,21 @@ #include "optimizer/prep.h" static List * -plan_union_query(List * relids, Index rt_index, - RangeTblEntry * rt_entry, Query * parse, UnionFlag flag, - List ** union_rtentriesPtr); +plan_union_query(List *relids, Index rt_index, + RangeTblEntry *rt_entry, Query *parse, UnionFlag flag, + List **union_rtentriesPtr); static RangeTblEntry * new_rangetable_entry(Oid new_relid, - RangeTblEntry * old_entry); + RangeTblEntry *old_entry); static Query * -subst_rangetable(Query * root, Index index, - RangeTblEntry * new_entry); +subst_rangetable(Query *root, Index index, + RangeTblEntry *new_entry); static void fix_parsetree_attnums(Index rt_index, Oid old_relid, - Oid new_relid, Query * parsetree); + Oid new_relid, Query *parsetree); static Append * -make_append(List * unionplans, Index rt_index, - List * union_rt_entries, List * tlist); +make_append(List *unionplans, Index rt_index, + List *union_rt_entries, List *tlist); /* @@ -59,8 +59,8 @@ make_append(List * unionplans, Index rt_index, * lists. */ List * -find_all_inheritors(List * unexamined_relids, - List * examined_relids) +find_all_inheritors(List *unexamined_relids, + List *examined_relids) { List *new_inheritors = NIL; List *new_examined_relids = NIL; @@ -103,7 +103,7 @@ find_all_inheritors(List * unexamined_relids, * Returns a rangetable index., Returns -1 if no matches */ int -first_matching_rt_entry(List * rangetable, UnionFlag flag) +first_matching_rt_entry(List *rangetable, UnionFlag flag) { int count = 0; List *temp = NIL; @@ -143,7 +143,7 @@ first_matching_rt_entry(List * rangetable, UnionFlag flag) */ Append * plan_union_queries(Index rt_index, - Query * parse, + Query *parse, UnionFlag flag) { List *rangetable = parse->rtable; @@ -226,12 +226,12 @@ plan_union_queries(Index rt_index, * in union_rtentries. */ static List * -plan_union_query(List * relids, +plan_union_query(List *relids, Index rt_index, - RangeTblEntry * rt_entry, - Query * root, + RangeTblEntry *rt_entry, + Query *root, UnionFlag flag, - List ** union_rtentriesPtr) + List **union_rtentriesPtr) { List *i; List *union_plans = NIL; @@ -286,7 +286,7 @@ plan_union_query(List * relids, * Returns a copy of 'old-entry' with the parameters substituted. */ static RangeTblEntry * -new_rangetable_entry(Oid new_relid, RangeTblEntry * old_entry) +new_rangetable_entry(Oid new_relid, RangeTblEntry *old_entry) { RangeTblEntry *new_entry = copyObject(old_entry); @@ -308,7 +308,7 @@ new_rangetable_entry(Oid new_relid, RangeTblEntry * old_entry) * Returns a new copy of 'root'. */ static Query * -subst_rangetable(Query * root, Index index, RangeTblEntry * new_entry) +subst_rangetable(Query *root, Index index, RangeTblEntry *new_entry) { Query *new_root = copyObject(root); List *temp = NIL; @@ -325,7 +325,7 @@ static void fix_parsetree_attnums_nodes(Index rt_index, Oid old_relid, Oid new_relid, - Node * node) + Node *node) { if (node == NULL) return; @@ -396,7 +396,7 @@ static void fix_parsetree_attnums(Index rt_index, Oid old_relid, Oid new_relid, - Query * parsetree) + Query *parsetree) { if (old_relid == new_relid) return; @@ -408,10 +408,10 @@ fix_parsetree_attnums(Index rt_index, } static Append * -make_append(List * unionplans, +make_append(List *unionplans, Index rt_index, - List * union_rt_entries, - List * tlist) + List *union_rt_entries, + List *tlist) { Append *node = makeNode(Append); diff --git a/src/backend/optimizer/util/clauseinfo.c b/src/backend/optimizer/util/clauseinfo.c index 09ea9ae898..3dfa5de4f9 100644 --- a/src/backend/optimizer/util/clauseinfo.c +++ b/src/backend/optimizer/util/clauseinfo.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.5 1997/09/08 02:24:48 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.6 1997/09/08 21:45:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,7 +27,7 @@ * */ bool -valid_or_clause(CInfo * clauseinfo) +valid_or_clause(CInfo *clauseinfo) { if (clauseinfo != NULL && !single_node((Node *) clauseinfo->clause) && @@ -45,7 +45,7 @@ valid_or_clause(CInfo * clauseinfo) * */ List * -get_actual_clauses(List * clauseinfo_list) +get_actual_clauses(List *clauseinfo_list) { List *temp = NIL; List *result = NIL; @@ -85,10 +85,10 @@ get_actual_clauses(List * clauseinfo_list) * */ void -get_relattvals(List * clauseinfo_list, - List ** attnos, - List ** values, - List ** flags) +get_relattvals(List *clauseinfo_list, + List **attnos, + List **values, + List **flags) { List *result1 = NIL; List *result2 = NIL; @@ -132,10 +132,10 @@ get_relattvals(List * clauseinfo_list, */ void get_joinvars(Oid relid, - List * clauseinfo_list, - List ** attnos, - List ** values, - List ** flags) + List *clauseinfo_list, + List **attnos, + List **values, + List **flags) { List *result1 = NIL; List *result2 = NIL; @@ -174,7 +174,7 @@ get_joinvars(Oid relid, * */ List * -get_opnos(List * clauseinfo_list) +get_opnos(List *clauseinfo_list) { CInfo *temp = (CInfo *) NULL; List *result = NIL; diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 520b745667..177466ee83 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.10 1997/09/08 20:56:19 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.11 1997/09/08 21:45:47 momjian Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -34,11 +34,11 @@ #include "optimizer/internal.h" #include "optimizer/var.h" -static bool agg_clause(Node * clause); +static bool agg_clause(Node *clause); Expr * -make_clause(int type, Node * oper, List * args) +make_clause(int type, Node *oper, List *args) { if (type == AND_EXPR || type == OR_EXPR || type == NOT_EXPR || type == OP_EXPR || type == FUNC_EXPR) @@ -79,11 +79,11 @@ make_clause(int type, Node * oper, List * args) * - ay 10/94.] */ bool -is_opclause(Node * clause) +is_opclause(Node *clause) { return - (clause != NULL && - nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OP_EXPR); + (clause != NULL && + nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OP_EXPR); } /* @@ -93,7 +93,7 @@ is_opclause(Node * clause) * */ Expr * -make_opclause(Oper * op, Var * leftop, Var * rightop) +make_opclause(Oper *op, Var *leftop, Var *rightop) { Expr *expr = makeNode(Expr); @@ -112,7 +112,7 @@ make_opclause(Oper * op, Var * leftop, Var * rightop) * NB: it is assumed (for now) that all expr must be Var nodes */ Var * -get_leftop(Expr * clause) +get_leftop(Expr *clause) { if (clause->args != NULL) return (lfirst(clause->args)); @@ -127,7 +127,7 @@ get_leftop(Expr * clause) * */ Var * -get_rightop(Expr * clause) +get_rightop(Expr *clause) { if (clause->args != NULL && lnext(clause->args) != NULL) return (lfirst(lnext(clause->args))); @@ -140,7 +140,7 @@ get_rightop(Expr * clause) *****************************************************************************/ static bool -agg_clause(Node * clause) +agg_clause(Node *clause) { return (clause != NULL && nodeTag(clause) == T_Aggreg); @@ -157,11 +157,11 @@ agg_clause(Node * clause) * */ bool -is_funcclause(Node * clause) +is_funcclause(Node *clause) { return - (clause != NULL && - nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == FUNC_EXPR); + (clause != NULL && + nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == FUNC_EXPR); } /* @@ -172,7 +172,7 @@ is_funcclause(Node * clause) * */ Expr * -make_funcclause(Func * func, List * funcargs) +make_funcclause(Func *func, List *funcargs) { Expr *expr = makeNode(Expr); @@ -194,11 +194,11 @@ make_funcclause(Func * func, List * funcargs) * */ bool -or_clause(Node * clause) +or_clause(Node *clause) { return - (clause != NULL && - nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OR_EXPR); + (clause != NULL && + nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OR_EXPR); } /* @@ -208,7 +208,7 @@ or_clause(Node * clause) * */ Expr * -make_orclause(List * orclauses) +make_orclause(List *orclauses) { Expr *expr = makeNode(Expr); @@ -230,10 +230,10 @@ make_orclause(List * orclauses) * */ bool -not_clause(Node * clause) +not_clause(Node *clause) { return - (clause != NULL && + (clause != NULL && nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == NOT_EXPR); } @@ -244,7 +244,7 @@ not_clause(Node * clause) * */ Expr * -make_notclause(Expr * notclause) +make_notclause(Expr *notclause) { Expr *expr = makeNode(Expr); @@ -262,7 +262,7 @@ make_notclause(Expr * notclause) * */ Expr * -get_notclausearg(Expr * notclause) +get_notclausearg(Expr *notclause) { return (lfirst(notclause->args)); } @@ -279,10 +279,10 @@ get_notclausearg(Expr * notclause) * */ bool -and_clause(Node * clause) +and_clause(Node *clause) { return - (clause != NULL && + (clause != NULL && nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == AND_EXPR); } @@ -293,7 +293,7 @@ and_clause(Node * clause) * */ Expr * -make_andclause(List * andclauses) +make_andclause(List *andclauses) { Expr *expr = makeNode(Expr); @@ -321,7 +321,7 @@ make_andclause(List * andclauses) * */ List * -pull_constant_clauses(List * quals, List ** constantQual) +pull_constant_clauses(List *quals, List **constantQual) { List *q; List *constqual = NIL; @@ -356,7 +356,7 @@ pull_constant_clauses(List * quals, List ** constantQual) * */ void -clause_relids_vars(Node * clause, List ** relids, List ** vars) +clause_relids_vars(Node *clause, List **relids, List **vars) { List *clvars = pull_var_clause(clause); List *var_list = NIL; @@ -396,7 +396,7 @@ clause_relids_vars(Node * clause, List ** relids, List ** vars) * Returns the number of different relations referenced in 'clause'. */ int -NumRelids(Node * clause) +NumRelids(Node *clause) { List *vars = pull_var_clause(clause); List *i = NIL; @@ -423,7 +423,7 @@ NumRelids(Node * clause) * */ bool -contains_not(Node * clause) +contains_not(Node *clause) { if (single_node(clause)) return (false); @@ -452,7 +452,7 @@ contains_not(Node * clause) * */ bool -join_clause_p(Node * clause) +join_clause_p(Node *clause) { Node *leftop, *rightop; @@ -467,7 +467,7 @@ join_clause_p(Node * clause) * One side of the clause (i.e. left or right operands) must either be * a var node ... */ - if (IsA(leftop, Var) || IsA(rightop, Var)) + if (IsA(leftop, Var) ||IsA(rightop, Var)) return true; /* @@ -486,7 +486,7 @@ join_clause_p(Node * clause) * */ bool -qual_clause_p(Node * clause) +qual_clause_p(Node *clause) { if (!is_opclause(clause)) return false; @@ -512,7 +512,7 @@ qual_clause_p(Node * clause) * */ void -fix_opid(Node * clause) +fix_opid(Node *clause) { if (clause == NULL || single_node(clause)) { @@ -560,7 +560,7 @@ fix_opid(Node * clause) * */ List * -fix_opids(List * clauses) +fix_opids(List *clauses) { List *clause; @@ -595,10 +595,10 @@ fix_opids(List * clauses) * */ void -get_relattval(Node * clause, +get_relattval(Node *clause, int *relid, AttrNumber *attno, - Datum * constval, + Datum *constval, int *flag) { Var *left = get_leftop((Expr *) clause); @@ -628,7 +628,7 @@ get_relattval(Node * clause, } #ifdef INDEXSCAN_PATCH } - else if (is_opclause(clause) && IsA(left, Var) && IsA(right, Param)) + else if (is_opclause(clause) && IsA(left, Var) &&IsA(right, Param)) { /* Function parameter used as index scan arg. DZ - 27-8-1996 */ *relid = left->varno; @@ -691,7 +691,7 @@ get_relattval(Node * clause, } #ifdef INDEXSCAN_PATCH } - else if (is_opclause(clause) && IsA(right, Var) && IsA(left, Param)) + else if (is_opclause(clause) && IsA(right, Var) &&IsA(left, Param)) { /* ...And here... - vadim 01/22/97 */ *relid = right->varno; @@ -726,7 +726,7 @@ get_relattval(Node * clause, * */ void -get_rels_atts(Node * clause, +get_rels_atts(Node *clause, int *relid1, AttrNumber *attno1, int *relid2, @@ -736,9 +736,9 @@ get_rels_atts(Node * clause, Var *right = get_rightop((Expr *) clause); bool var_left = (IsA(left, Var)); bool var_right = (IsA(right, Var)); - bool varexpr_left = (bool) ((IsA(left, Func) || IsA(left, Oper)) && + bool varexpr_left = (bool) ((IsA(left, Func) ||IsA(left, Oper)) && contain_var_clause((Node *) left)); - bool varexpr_right = (bool) ((IsA(right, Func) || IsA(right, Oper)) && + bool varexpr_right = (bool) ((IsA(right, Func) ||IsA(right, Oper)) && contain_var_clause((Node *) right)); if (is_opclause(clause)) @@ -780,7 +780,7 @@ get_rels_atts(Node * clause, } void -CommuteClause(Node * clause) +CommuteClause(Node *clause) { Node *temp; Oper *commu; diff --git a/src/backend/optimizer/util/indexnode.c b/src/backend/optimizer/util/indexnode.c index 9714038a8b..0c4b370db1 100644 --- a/src/backend/optimizer/util/indexnode.c +++ b/src/backend/optimizer/util/indexnode.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.4 1997/09/08 02:24:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.5 1997/09/08 21:45:48 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -24,7 +24,7 @@ #include "optimizer/pathnode.h" /* where the decls go */ -static List *find_secondary_index(Query * root, Oid relid); +static List *find_secondary_index(Query *root, Oid relid); /* * find-relation-indices-- @@ -33,7 +33,7 @@ static List *find_secondary_index(Query * root, Oid relid); * */ List * -find_relation_indices(Query * root, Rel * rel) +find_relation_indices(Query *root, Rel *rel) { if (rel->indexed) { @@ -57,7 +57,7 @@ find_relation_indices(Query * root, Rel * rel) * */ static List * -find_secondary_index(Query * root, Oid relid) +find_secondary_index(Query *root, Oid relid) { IdxInfoRetval indexinfo; List *indexes = NIL; diff --git a/src/backend/optimizer/util/internal.c b/src/backend/optimizer/util/internal.c index 31fe034dbb..258f745a81 100644 --- a/src/backend/optimizer/util/internal.c +++ b/src/backend/optimizer/util/internal.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/internal.c,v 1.5 1997/09/08 02:24:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/internal.c,v 1.6 1997/09/08 21:45:49 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -39,7 +39,7 @@ /* the following should probably be moved elsewhere -ay */ TargetEntry * -MakeTLE(Resdom * resdom, Node * expr) +MakeTLE(Resdom *resdom, Node *expr) { TargetEntry *rt = makeNode(TargetEntry); @@ -49,7 +49,7 @@ MakeTLE(Resdom * resdom, Node * expr) } Var * -get_expr(TargetEntry * tle) +get_expr(TargetEntry *tle) { Assert(tle != NULL); Assert(tle->expr != NULL); diff --git a/src/backend/optimizer/util/joininfo.c b/src/backend/optimizer/util/joininfo.c index 3f4f990a76..03ec95db61 100644 --- a/src/backend/optimizer/util/joininfo.c +++ b/src/backend/optimizer/util/joininfo.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.4 1997/09/08 02:24:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.5 1997/09/08 21:45:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -36,7 +36,7 @@ * */ JInfo * -joininfo_member(List * join_relids, List * joininfo_list) +joininfo_member(List *join_relids, List *joininfo_list) { List *i = NIL; List *other_rels = NIL; @@ -62,7 +62,7 @@ joininfo_member(List * join_relids, List * joininfo_list) * */ JInfo * -find_joininfo_node(Rel * this_rel, List * join_relids) +find_joininfo_node(Rel *this_rel, List *join_relids) { JInfo *joininfo = joininfo_member(join_relids, this_rel->joininfo); @@ -89,7 +89,7 @@ find_joininfo_node(Rel * this_rel, List * join_relids) * */ Var * -other_join_clause_var(Var * var, Expr * clause) +other_join_clause_var(Var *var, Expr *clause) { Var *retval; Var *l, diff --git a/src/backend/optimizer/util/keys.c b/src/backend/optimizer/util/keys.c index 82d8c6010b..2699ec98b3 100644 --- a/src/backend/optimizer/util/keys.c +++ b/src/backend/optimizer/util/keys.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.4 1997/09/08 02:24:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.5 1997/09/08 21:45:51 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,8 +22,8 @@ #include "optimizer/tlist.h" -static Expr *matching2_tlvar(int var, List * tlist, bool(*test) ()); -static bool equal_indexkey_var(int index_key, Var * var); +static Expr *matching2_tlvar(int var, List *tlist, bool (*test) ()); +static bool equal_indexkey_var(int index_key, Var *var); /* * 1. index key @@ -54,7 +54,7 @@ static bool equal_indexkey_var(int index_key, Var * var); * */ bool -match_indexkey_operand(int indexkey, Var * operand, Rel * rel) +match_indexkey_operand(int indexkey, Var *operand, Rel *rel) { if (IsA(operand, Var) && (lfirsti(rel->relids) == operand->varno) && @@ -71,7 +71,7 @@ match_indexkey_operand(int indexkey, Var * operand, Rel * rel) * */ static bool -equal_indexkey_var(int index_key, Var * var) +equal_indexkey_var(int index_key, Var *var) { if (index_key == var->varattno) return (true); @@ -86,7 +86,7 @@ equal_indexkey_var(int index_key, Var * var) * */ Var * -extract_subkey(JoinKey * jk, int which_subkey) +extract_subkey(JoinKey *jk, int which_subkey) { Var *retval; @@ -118,7 +118,7 @@ extract_subkey(JoinKey * jk, int which_subkey) * */ bool -samekeys(List * keys1, List * keys2) +samekeys(List *keys1, List *keys2) { bool allmember = true; List *key1, @@ -153,7 +153,7 @@ samekeys(List * keys1, List * keys2) * They should be merged. */ static Expr * -matching2_tlvar(int var, List * tlist, bool(*test) ()) +matching2_tlvar(int var, List *tlist, bool (*test) ()) { TargetEntry *tlentry = NULL; @@ -179,7 +179,7 @@ matching2_tlvar(int var, List * tlist, bool(*test) ()) List * -collect_index_pathkeys(int *index_keys, List * tlist) +collect_index_pathkeys(int *index_keys, List *tlist) { List *retval = NIL; diff --git a/src/backend/optimizer/util/ordering.c b/src/backend/optimizer/util/ordering.c index f14d376218..855f2f7274 100644 --- a/src/backend/optimizer/util/ordering.c +++ b/src/backend/optimizer/util/ordering.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.5 1997/09/08 02:24:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.6 1997/09/08 21:45:52 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,7 +18,7 @@ #include "optimizer/internal.h" #include "optimizer/ordering.h" -static bool equal_sortops_order(Oid * ordering1, Oid * ordering2); +static bool equal_sortops_order(Oid *ordering1, Oid *ordering2); /* * equal-path-path-ordering-- @@ -26,8 +26,8 @@ static bool equal_sortops_order(Oid * ordering1, Oid * ordering2); * */ bool -equal_path_path_ordering(PathOrder * path_ordering1, - PathOrder * path_ordering2) +equal_path_path_ordering(PathOrder *path_ordering1, + PathOrder *path_ordering2) { if (path_ordering1 == path_ordering2) return true; @@ -77,8 +77,8 @@ equal_path_path_ordering(PathOrder * path_ordering1, * */ bool -equal_path_merge_ordering(Oid * path_ordering, - MergeOrder * merge_ordering) +equal_path_merge_ordering(Oid *path_ordering, + MergeOrder *merge_ordering) { if (path_ordering == NULL || merge_ordering == NULL) return (false); @@ -96,8 +96,8 @@ equal_path_merge_ordering(Oid * path_ordering, * */ bool -equal_merge_merge_ordering(MergeOrder * merge_ordering1, - MergeOrder * merge_ordering2) +equal_merge_merge_ordering(MergeOrder *merge_ordering1, + MergeOrder *merge_ordering2) { return (equal(merge_ordering1, merge_ordering2)); } @@ -111,7 +111,7 @@ equal_merge_merge_ordering(MergeOrder * merge_ordering1, * Returns true iff the sort operators are in the same order. */ static bool -equal_sortops_order(Oid * ordering1, Oid * ordering2) +equal_sortops_order(Oid *ordering1, Oid *ordering2) { int i = 0; diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index f6242e852a..61cd7be84c 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.5 1997/09/08 02:24:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.6 1997/09/08 21:45:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -29,7 +29,7 @@ #include "parser/parsetree.h" /* for getrelid() */ -static Path *better_path(Path * new_path, List * unique_paths, bool * noOther); +static Path *better_path(Path *new_path, List *unique_paths, bool *noOther); /***************************************************************************** @@ -42,7 +42,7 @@ static Path *better_path(Path * new_path, List * unique_paths, bool * noOther); * */ bool -path_is_cheaper(Path * path1, Path * path2) +path_is_cheaper(Path *path1, Path *path2) { Cost cost1 = path1->path_cost; Cost cost2 = path2->path_cost; @@ -62,7 +62,7 @@ path_is_cheaper(Path * path1, Path * path2) * */ Path * -set_cheapest(Rel * parent_rel, List * pathlist) +set_cheapest(Rel *parent_rel, List *pathlist) { List *p; Path *cheapest_so_far; @@ -101,7 +101,7 @@ set_cheapest(Rel * parent_rel, List * pathlist) * */ List * -add_pathlist(Rel * parent_rel, List * unique_paths, List * new_paths) +add_pathlist(Rel *parent_rel, List *unique_paths, List *new_paths) { List *x; Path *new_path; @@ -154,7 +154,7 @@ add_pathlist(Rel * parent_rel, List * unique_paths, List * new_paths) * */ static Path * -better_path(Path * new_path, List * unique_paths, bool * noOther) +better_path(Path *new_path, List *unique_paths, bool *noOther) { Path *old_path = (Path *) NULL; Path *path = (Path *) NULL; @@ -208,7 +208,7 @@ better_path(Path * new_path, List * unique_paths, bool * noOther) * */ Path * -create_seqscan_path(Rel * rel) +create_seqscan_path(Rel *rel) { int relid = 0; @@ -258,10 +258,10 @@ create_seqscan_path(Rel * rel) * */ IndexPath * -create_index_path(Query * root, - Rel * rel, - Rel * index, - List * restriction_clauses, +create_index_path(Query *root, + Rel *rel, + Rel *index, + List *restriction_clauses, bool is_join_scan) { IndexPath *pathnode = makeNode(IndexPath); @@ -418,11 +418,11 @@ create_index_path(Query * root, * */ JoinPath * -create_nestloop_path(Rel * joinrel, - Rel * outer_rel, - Path * outer_path, - Path * inner_path, - List * keys) +create_nestloop_path(Rel *joinrel, + Rel *outer_rel, + Path *outer_path, + Path *inner_path, + List *keys) { JoinPath *pathnode = makeNode(JoinPath); @@ -495,18 +495,18 @@ create_nestloop_path(Rel * joinrel, * */ MergePath * -create_mergesort_path(Rel * joinrel, +create_mergesort_path(Rel *joinrel, int outersize, int innersize, int outerwidth, int innerwidth, - Path * outer_path, - Path * inner_path, - List * keys, - MergeOrder * order, - List * mergeclauses, - List * outersortkeys, - List * innersortkeys) + Path *outer_path, + Path *inner_path, + List *keys, + MergeOrder *order, + List *mergeclauses, + List *outersortkeys, + List *innersortkeys) { MergePath *pathnode = makeNode(MergePath); @@ -561,18 +561,18 @@ create_mergesort_path(Rel * joinrel, * */ HashPath * -create_hashjoin_path(Rel * joinrel, +create_hashjoin_path(Rel *joinrel, int outersize, int innersize, int outerwidth, int innerwidth, - Path * outer_path, - Path * inner_path, - List * keys, + Path *outer_path, + Path *inner_path, + List *keys, Oid operator, - List * hashclauses, - List * outerkeys, - List * innerkeys) + List *hashclauses, + List *outerkeys, + List *innerkeys) { HashPath *pathnode = makeNode(HashPath); diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 0957775df0..826a0e7b8e 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.8 1997/09/08 02:25:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.9 1997/09/08 21:45:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -56,8 +56,8 @@ IndexSelectivity(Oid indexrelid, Oid indrelid, int32 nIndexKeys, * number of tuples */ void -relation_info(Query * root, Index relid, - bool * hasindex, int *pages, int *tuples) +relation_info(Query *root, Index relid, + bool *hasindex, int *pages, int *tuples) { HeapTuple relationTuple; Form_pg_class relation; @@ -101,7 +101,7 @@ relation_info(Query * root, Index relid, * */ bool -index_info(Query * root, bool first, int relid, IdxInfoRetval * info) +index_info(Query *root, bool first, int relid, IdxInfoRetval *info) { register i; HeapTuple indexTuple, @@ -246,12 +246,12 @@ index_info(Query * root, bool first, int relid, IdxInfoRetval * info) */ void index_selectivity(Oid indid, - Oid * classes, - List * opnos, + Oid *classes, + List *opnos, Oid relid, - List * attnos, - List * values, - List * flags, + List *attnos, + List *values, + List *flags, int32 nkeys, float *idxPages, float *idxSelec) @@ -355,7 +355,7 @@ restriction_selectivity(Oid functionObjectId, elog(WARN, "RestrictionClauseSelectivity: bad value %lf", *result); - return ((Cost) * result); + return ((Cost) *result); } /* @@ -394,7 +394,7 @@ join_selectivity(Oid functionObjectId, elog(WARN, "JoinClauseSelectivity: bad value %lf", *result); - return ((Cost) * result); + return ((Cost) *result); } /* diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index 98f3de9439..dc242e531e 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.3 1997/09/08 02:25:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.4 1997/09/08 21:45:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -28,7 +28,7 @@ * */ Rel * -get_base_rel(Query * root, int relid) +get_base_rel(Query *root, int relid) { List *relids; Rel *rel; @@ -101,7 +101,7 @@ get_base_rel(Query * root, int relid) * */ Rel * -get_join_rel(Query * root, List * relid) +get_join_rel(Query *root, List *relid) { return rel_member(relid, root->join_relation_list_); } @@ -115,7 +115,7 @@ get_join_rel(Query * root, List * relid) * */ Rel * -rel_member(List * relid, List * rels) +rel_member(List *relid, List *rels) { List *temp = NIL; List *temprelid = NIL; diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index d9307e6d5b..089633033b 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.6 1997/09/08 02:25:03 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.7 1997/09/08 21:45:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -28,7 +28,7 @@ #include "nodes/makefuncs.h" #include "parser/catalog_utils.h" -static Node *flatten_tlistentry(Node * tlistentry, List * flat_tlist); +static Node *flatten_tlistentry(Node *tlistentry, List *flat_tlist); /***************************************************************************** * ---------- RELATION node target list routines ---------- @@ -45,7 +45,7 @@ static Node *flatten_tlistentry(Node * tlistentry, List * flat_tlist); * targetlist = valid sequence */ TargetEntry * -tlistentry_member(Var * var, List * targetlist) +tlistentry_member(Var *var, List *targetlist) { if (var) { @@ -70,7 +70,7 @@ tlistentry_member(Var * var, List * targetlist) * */ Expr * -matching_tlvar(Var * var, List * targetlist) +matching_tlvar(Var *var, List *targetlist) { TargetEntry *tlentry; @@ -94,7 +94,7 @@ matching_tlvar(Var * var, List * targetlist) * CREATES: new var-node iff no matching var-node exists in targetlist */ void -add_tl_element(Rel * rel, Var * var) +add_tl_element(Rel *rel, Var *var) { Expr *oldvar = (Expr *) NULL; @@ -130,7 +130,7 @@ add_tl_element(Rel * rel, Var * var) * CREATES: new targetlist entry (always). */ TargetEntry * -create_tl_element(Var * var, int resdomno) +create_tl_element(Var *var, int resdomno) { TargetEntry *tlelement = makeNode(TargetEntry); @@ -153,7 +153,7 @@ create_tl_element(Var * var, int resdomno) * */ List * -get_actual_tlist(List * tlist) +get_actual_tlist(List *tlist) { /* @@ -200,7 +200,7 @@ get_actual_tlist(List * tlist) * */ Resdom * -tlist_member(Var * var, List * tlist) +tlist_member(Var *var, List *tlist) { List *i = NIL; TargetEntry *temp_tle = (TargetEntry *) NULL; @@ -230,7 +230,7 @@ tlist_member(Var * var, List * tlist) * Routine to get the resdom out of a targetlist. */ Resdom * -tlist_resdom(List * tlist, Resdom * resnode) +tlist_resdom(List *tlist, Resdom *resnode) { Resdom *resdom = (Resdom *) NULL; List *i = NIL; @@ -265,7 +265,7 @@ tlist_resdom(List * tlist, Resdom * resnode) * varoattno. Also, nested attnos are long gone. - ay 2/95] */ TargetEntry * -match_varid(Var * test_var, List * tlist) +match_varid(Var *test_var, List *tlist) { List *tl; Oid type_var; @@ -311,7 +311,7 @@ match_varid(Var * test_var, List * tlist) * */ List * -new_unsorted_tlist(List * targetlist) +new_unsorted_tlist(List *targetlist) { List *new_targetlist = (List *) copyObject((Node *) targetlist); List *x = NIL; @@ -339,7 +339,7 @@ new_unsorted_tlist(List * targetlist) * */ List * -copy_vars(List * target, List * source) +copy_vars(List *target, List *source) { List *result = NIL; List *src = NIL; @@ -367,7 +367,7 @@ copy_vars(List * target, List * source) * */ List * -flatten_tlist(List * tlist) +flatten_tlist(List *tlist) { int last_resdomno = 1; List *new_tlist = NIL; @@ -423,7 +423,7 @@ flatten_tlist(List * tlist) * */ List * -flatten_tlist_vars(List * full_tlist, List * flat_tlist) +flatten_tlist_vars(List *full_tlist, List *flat_tlist) { List *x = NIL; List *result = NIL; @@ -454,7 +454,7 @@ flatten_tlist_vars(List * full_tlist, List * flat_tlist) * */ static Node * -flatten_tlistentry(Node * tlistentry, List * flat_tlist) +flatten_tlistentry(Node *tlistentry, List *flat_tlist) { if (tlistentry == NULL) { @@ -544,7 +544,7 @@ flatten_tlistentry(Node * tlistentry, List * flat_tlist) TargetEntry * -MakeTLE(Resdom * resdom, Node * expr) +MakeTLE(Resdom *resdom, Node *expr) { TargetEntry *rt = makeNode(TargetEntry); @@ -554,7 +554,7 @@ MakeTLE(Resdom * resdom, Node * expr) } Var * -get_expr(TargetEntry * tle) +get_expr(TargetEntry *tle) { Assert(tle != NULL); Assert(tle->expr != NULL); @@ -574,7 +574,7 @@ get_expr(TargetEntry * tle) */ #ifdef NOT_USED void -AddGroupAttrToTlist(List * tlist, List * grpCl) +AddGroupAttrToTlist(List *tlist, List *grpCl) { List *gl; int last_resdomno = length(tlist) + 1; @@ -606,7 +606,7 @@ AddGroupAttrToTlist(List * tlist, List * grpCl) /* was ExecTargetListLength() in execQual.c, moved here to reduce dependencies on the executor module */ int -exec_tlist_length(List * targetlist) +exec_tlist_length(List *targetlist) { int len; List *tl; diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c index e01720aa2e..2f7c080910 100644 --- a/src/backend/optimizer/util/var.c +++ b/src/backend/optimizer/util/var.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.5 1997/09/08 02:25:07 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.6 1997/09/08 21:45:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -35,7 +35,7 @@ * (though it currently is, see primnodes.h) */ List * -pull_varnos(Node * me) +pull_varnos(Node *me) { List *i, *result = NIL; @@ -75,7 +75,7 @@ pull_varnos(Node * me) * Returns true if any varnode found. */ bool -contain_var_clause(Node * clause) +contain_var_clause(Node *clause) { if (clause == NULL) return FALSE; @@ -144,7 +144,7 @@ contain_var_clause(Node * clause) * Returns list of varnodes found. */ List * -pull_var_clause(Node * clause) +pull_var_clause(Node *clause) { List *retval = NIL; @@ -204,9 +204,9 @@ pull_var_clause(Node * clause) * Returns t iff two var nodes correspond to the same attribute. */ bool -var_equal(Var * var1, Var * var2) +var_equal(Var *var1, Var *var2) { - if (IsA(var1, Var) && IsA(var2, Var) && + if (IsA(var1, Var) &&IsA(var2, Var) && (((Var *) var1)->varno == ((Var *) var2)->varno) && (((Var *) var1)->vartype == ((Var *) var2)->vartype) && (((Var *) var1)->varattno == ((Var *) var2)->varattno)) diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 21af940209..9e5f83071f 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.41 1997/09/08 20:56:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.42 1997/09/08 21:46:00 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -44,54 +44,54 @@ #include "port-protos.h" /* strdup() */ /* convert the parse tree into a query tree */ -static Query *transformStmt(ParseState * pstate, Node * stmt); - -static Query *transformDeleteStmt(ParseState * pstate, DeleteStmt * stmt); -static Query *transformInsertStmt(ParseState * pstate, AppendStmt *stmt); -static Query *transformIndexStmt(ParseState * pstate, IndexStmt * stmt); -static Query *transformExtendStmt(ParseState * pstate, ExtendStmt * stmt); -static Query *transformRuleStmt(ParseState * query, RuleStmt * stmt); -static Query *transformSelectStmt(ParseState * pstate, RetrieveStmt * stmt); -static Query *transformUpdateStmt(ParseState * pstate, ReplaceStmt * stmt); -static Query *transformCursorStmt(ParseState * pstate, CursorStmt * stmt); -static Node *handleNestedDots(ParseState * pstate, Attr *attr, int *curr_resno); +static Query *transformStmt(ParseState *pstate, Node *stmt); + +static Query *transformDeleteStmt(ParseState *pstate, DeleteStmt *stmt); +static Query *transformInsertStmt(ParseState *pstate, AppendStmt *stmt); +static Query *transformIndexStmt(ParseState *pstate, IndexStmt *stmt); +static Query *transformExtendStmt(ParseState *pstate, ExtendStmt *stmt); +static Query *transformRuleStmt(ParseState *query, RuleStmt *stmt); +static Query *transformSelectStmt(ParseState *pstate, RetrieveStmt *stmt); +static Query *transformUpdateStmt(ParseState *pstate, ReplaceStmt *stmt); +static Query *transformCursorStmt(ParseState *pstate, CursorStmt *stmt); +static Node *handleNestedDots(ParseState *pstate, Attr *attr, int *curr_resno); #define EXPR_COLUMN_FIRST 1 #define EXPR_RELATION_FIRST 2 -static Node *transformExpr(ParseState * pstate, Node * expr, int precedence); -static Node *transformIdent(ParseState * pstate, Node * expr, int precedence); - -static void makeRangeTable(ParseState * pstate, char *relname, List * frmList); -static List *expandAllTables(ParseState * pstate); -static char *figureColname(Node * expr, Node * resval); -static List *makeTargetNames(ParseState * pstate, List * cols); -static List *transformTargetList(ParseState * pstate, List * targetlist); +static Node *transformExpr(ParseState *pstate, Node *expr, int precedence); +static Node *transformIdent(ParseState *pstate, Node *expr, int precedence); + +static void makeRangeTable(ParseState *pstate, char *relname, List *frmList); +static List *expandAllTables(ParseState *pstate); +static char *figureColname(Node *expr, Node *resval); +static List *makeTargetNames(ParseState *pstate, List *cols); +static List *transformTargetList(ParseState *pstate, List *targetlist); static TargetEntry * -make_targetlist_expr(ParseState * pstate, - char *colname, Node * expr, - List * arrayRef); +make_targetlist_expr(ParseState *pstate, + char *colname, Node *expr, + List *arrayRef); static bool inWhereClause = false; -static Node *transformWhereClause(ParseState * pstate, Node * a_expr); +static Node *transformWhereClause(ParseState *pstate, Node *a_expr); static List * -transformGroupClause(ParseState * pstate, List * grouplist, - List * targetlist); +transformGroupClause(ParseState *pstate, List *grouplist, + List *targetlist); static List * -transformSortClause(ParseState * pstate, - List * orderlist, List * targetlist, +transformSortClause(ParseState *pstate, + List *orderlist, List *targetlist, char *uniqueFlag); -static void parseFromClause(ParseState * pstate, List * frmList); +static void parseFromClause(ParseState *pstate, List *frmList); static Node * -ParseFunc(ParseState * pstate, char *funcname, - List * fargs, int *curr_resno); +ParseFunc(ParseState *pstate, char *funcname, + List *fargs, int *curr_resno); static List *setup_tlist(char *attname, Oid relid); static List *setup_base_tlist(Oid typeid); static void -make_arguments(int nargs, List * fargs, Oid * input_typeids, - Oid * function_typeids); -static void AddAggToParseState(ParseState * pstate, Aggreg *aggreg); -static void finalizeAggregates(ParseState * pstate, Query * qry); -static void parseCheckAggregates(ParseState * pstate, Query * qry); +make_arguments(int nargs, List *fargs, Oid *input_typeids, + Oid *function_typeids); +static void AddAggToParseState(ParseState *pstate, Aggreg *aggreg); +static void finalizeAggregates(ParseState *pstate, Query *qry); +static void parseCheckAggregates(ParseState *pstate, Query *qry); static ParseState *makeParseState(void); /***************************************************************************** @@ -135,7 +135,7 @@ makeParseState(void) * CALLER is responsible for freeing the QueryTreeList* returned */ QueryTreeList * -parse_analyze(List * pl) +parse_analyze(List *pl) { QueryTreeList *result; ParseState *pstate; @@ -166,7 +166,7 @@ parse_analyze(List * pl) * into a Query tree. */ static Query * -transformStmt(ParseState * pstate, Node * parseTree) +transformStmt(ParseState *pstate, Node *parseTree) { Query *result = NULL; @@ -271,7 +271,7 @@ transformStmt(ParseState * pstate, Node * parseTree) * transforms a Delete Statement */ static Query * -transformDeleteStmt(ParseState * pstate, DeleteStmt * stmt) +transformDeleteStmt(ParseState *pstate, DeleteStmt *stmt) { Query *qry = makeNode(Query); @@ -300,7 +300,7 @@ transformDeleteStmt(ParseState * pstate, DeleteStmt * stmt) * transform an Insert Statement */ static Query * -transformInsertStmt(ParseState * pstate, AppendStmt *stmt) +transformInsertStmt(ParseState *pstate, AppendStmt *stmt) { Query *qry = makeNode(Query); /* make a new query tree */ @@ -335,7 +335,7 @@ transformInsertStmt(ParseState * pstate, AppendStmt *stmt) * transforms the qualification of the index statement */ static Query * -transformIndexStmt(ParseState * pstate, IndexStmt * stmt) +transformIndexStmt(ParseState *pstate, IndexStmt *stmt) { Query *q; @@ -357,7 +357,7 @@ transformIndexStmt(ParseState * pstate, IndexStmt * stmt) * */ static Query * -transformExtendStmt(ParseState * pstate, ExtendStmt * stmt) +transformExtendStmt(ParseState *pstate, ExtendStmt *stmt) { Query *q; @@ -378,7 +378,7 @@ transformExtendStmt(ParseState * pstate, ExtendStmt * stmt) * trees which is transformed into a list of query trees. */ static Query * -transformRuleStmt(ParseState * pstate, RuleStmt * stmt) +transformRuleStmt(ParseState *pstate, RuleStmt *stmt) { Query *q; List *actions; @@ -426,7 +426,7 @@ transformRuleStmt(ParseState * pstate, RuleStmt * stmt) * */ static Query * -transformSelectStmt(ParseState * pstate, RetrieveStmt * stmt) +transformSelectStmt(ParseState *pstate, RetrieveStmt *stmt) { Query *qry = makeNode(Query); @@ -478,7 +478,7 @@ transformSelectStmt(ParseState * pstate, RetrieveStmt * stmt) * */ static Query * -transformUpdateStmt(ParseState * pstate, ReplaceStmt * stmt) +transformUpdateStmt(ParseState *pstate, ReplaceStmt *stmt) { Query *qry = makeNode(Query); @@ -513,7 +513,7 @@ transformUpdateStmt(ParseState * pstate, ReplaceStmt * stmt) * */ static Query * -transformCursorStmt(ParseState * pstate, CursorStmt * stmt) +transformCursorStmt(ParseState *pstate, CursorStmt *stmt) { Query *qry = makeNode(Query); @@ -571,7 +571,7 @@ transformCursorStmt(ParseState * pstate, CursorStmt * stmt) * here. */ static Node * -transformExpr(ParseState * pstate, Node * expr, int precedence) +transformExpr(ParseState *pstate, Node *expr, int precedence) { Node *result = NULL; @@ -791,7 +791,7 @@ transformExpr(ParseState * pstate, Node * expr, int precedence) } static Node * -transformIdent(ParseState * pstate, Node * expr, int precedence) +transformIdent(ParseState *pstate, Node *expr, int precedence) { Ident *ident = (Ident *) expr; RangeTblEntry *rte; @@ -856,7 +856,7 @@ transformIdent(ParseState * pstate, Node * expr, int precedence) * */ static void -parseFromClause(ParseState * pstate, List * frmList) +parseFromClause(ParseState *pstate, List *frmList) { List *fl; @@ -893,7 +893,7 @@ parseFromClause(ParseState * pstate, List * frmList) * from-clause. */ static void -makeRangeTable(ParseState * pstate, char *relname, List * frmList) +makeRangeTable(ParseState *pstate, char *relname, List *frmList) { RangeTblEntry *rte; @@ -919,7 +919,7 @@ makeRangeTable(ParseState * pstate, char *relname, List * frmList) * returns the Oid of the type of the expression. (Used for typechecking.) */ Oid -exprType(Node * expr) +exprType(Node *expr) { Oid type = (Oid) 0; @@ -967,7 +967,7 @@ exprType(Node * expr) * relations in the range table) */ static List * -expandAllTables(ParseState * pstate) +expandAllTables(ParseState *pstate) { List *target = NIL; List *legit_rtable = NIL; @@ -1033,7 +1033,7 @@ expandAllTables(ParseState * pstate) * */ static char * -figureColname(Node * expr, Node * resval) +figureColname(Node *expr, Node *resval) { switch (nodeTag(expr)) { @@ -1067,7 +1067,7 @@ figureColname(Node * expr, Node * resval) * (used exclusively for inserts) */ static List * -makeTargetNames(ParseState * pstate, List * cols) +makeTargetNames(ParseState *pstate, List *cols) { List *tl = NULL; @@ -1110,7 +1110,7 @@ makeTargetNames(ParseState * pstate, List * cols) * turns a list of ResTarget's into a list of TargetEntry's */ static List * -transformTargetList(ParseState * pstate, List * targetlist) +transformTargetList(ParseState *pstate, List *targetlist) { List *p_target = NIL; List *tail_p_target = NIL; @@ -1397,10 +1397,10 @@ transformTargetList(ParseState * pstate, List * targetlist) * arrayRef is a list of transformed A_Indices */ static TargetEntry * -make_targetlist_expr(ParseState * pstate, +make_targetlist_expr(ParseState *pstate, char *colname, - Node * expr, - List * arrayRef) + Node *expr, + List *arrayRef) { Oid type_id, attrtype; @@ -1607,7 +1607,7 @@ make_targetlist_expr(ParseState * pstate, * */ static Node * -transformWhereClause(ParseState * pstate, Node * a_expr) +transformWhereClause(ParseState *pstate, Node *a_expr) { Node *qual; @@ -1639,7 +1639,7 @@ transformWhereClause(ParseState * pstate, Node * a_expr) * */ static TargetEntry * -find_targetlist_entry(ParseState * pstate, SortGroupBy * sortgroupby, List * tlist) +find_targetlist_entry(ParseState *pstate, SortGroupBy *sortgroupby, List *tlist) { List *i; int real_rtable_pos = 0, @@ -1716,7 +1716,7 @@ any_ordering_op(int restype) * */ static List * -transformGroupClause(ParseState * pstate, List * grouplist, List * targetlist) +transformGroupClause(ParseState *pstate, List *grouplist, List *targetlist) { List *glist = NIL, *gl = NIL; @@ -1756,8 +1756,8 @@ transformGroupClause(ParseState * pstate, List * grouplist, List * targetlist) * */ static List * -transformSortClause(ParseState * pstate, - List * orderlist, List * targetlist, +transformSortClause(ParseState *pstate, + List *orderlist, List *targetlist, char *uniqueFlag) { List *sortlist = NIL; @@ -1872,7 +1872,7 @@ transformSortClause(ParseState * pstate, ** a tree with of Iter and Func nodes. */ static Node * -handleNestedDots(ParseState * pstate, Attr *attr, int *curr_resno) +handleNestedDots(ParseState *pstate, Attr *attr, int *curr_resno) { List *mutator_iter; Node *retval = NULL; @@ -1915,9 +1915,9 @@ handleNestedDots(ParseState * pstate, Attr *attr, int *curr_resno) */ static void make_arguments(int nargs, - List * fargs, - Oid * input_typeids, - Oid * function_typeids) + List *fargs, + Oid *input_typeids, + Oid *function_typeids) { /* @@ -2016,10 +2016,10 @@ setup_base_tlist(Oid typeid) * This routine returns NULL if it can't handle the projection (eg. sets). */ static Node * -ParseComplexProjection(ParseState * pstate, +ParseComplexProjection(ParseState *pstate, char *funcname, - Node * first_arg, - bool * attisset) + Node *first_arg, + bool *attisset) { Oid argtype; Oid argrelid; @@ -2174,7 +2174,7 @@ ParseComplexProjection(ParseState * pstate, } static Node * -ParseFunc(ParseState * pstate, char *funcname, List * fargs, int *curr_resno) +ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno) { Oid rettype = (Oid) 0; Oid argrelid = (Oid) 0; @@ -2524,7 +2524,7 @@ ParseFunc(ParseState * pstate, char *funcname, List * fargs, int *curr_resno) * SIDE EFFECT: aggno in target list entry will be modified */ static void -AddAggToParseState(ParseState * pstate, Aggreg *aggreg) +AddAggToParseState(ParseState *pstate, Aggreg *aggreg) { List *ag; int i; @@ -2562,7 +2562,7 @@ AddAggToParseState(ParseState * pstate, Aggreg *aggreg) * are used in the proper place. */ static void -finalizeAggregates(ParseState * pstate, Query * qry) +finalizeAggregates(ParseState *pstate, Query *qry) { List *l; int i; @@ -2584,7 +2584,7 @@ finalizeAggregates(ParseState * pstate, Query * qry) * Returns true if any aggregate found. */ static bool -contain_agg_clause(Node * clause) +contain_agg_clause(Node *clause) { if (clause == NULL) return FALSE; @@ -2642,12 +2642,12 @@ contain_agg_clause(Node * clause) * returns true if the expression does not contain non-group columns. */ static bool -exprIsAggOrGroupCol(Node * expr, List * groupClause) +exprIsAggOrGroupCol(Node *expr, List *groupClause) { List *gl; if (expr == NULL || IsA(expr, Const) || - IsA(expr, Param) || IsA(expr, Aggreg)) + IsA(expr, Param) ||IsA(expr, Aggreg)) return TRUE; foreach(gl, groupClause) @@ -2676,12 +2676,12 @@ exprIsAggOrGroupCol(Node * expr, List * groupClause) * returns true if the TargetEntry is Agg or GroupCol. */ static bool -tleIsAggOrGroupCol(TargetEntry * tle, List * groupClause) +tleIsAggOrGroupCol(TargetEntry *tle, List *groupClause) { Node *expr = tle->expr; List *gl; - if (expr == NULL || IsA(expr, Const) || IsA(expr, Param)) + if (expr == NULL || IsA(expr, Const) ||IsA(expr, Param)) return TRUE; foreach(gl, groupClause) @@ -2719,7 +2719,7 @@ tleIsAggOrGroupCol(TargetEntry * tle, List * groupClause) * here when the target list and the qualifications are finalized. */ static void -parseCheckAggregates(ParseState * pstate, Query * qry) +parseCheckAggregates(ParseState *pstate, Query *qry) { List *tl; diff --git a/src/backend/parser/catalog_utils.c b/src/backend/parser/catalog_utils.c index 967bf08101..db92e15522 100644 --- a/src/backend/parser/catalog_utils.c +++ b/src/backend/parser/catalog_utils.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.24 1997/09/08 02:25:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.25 1997/09/08 21:46:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -121,7 +121,7 @@ typedef struct _InhPaths int nsupers; /* number of superclasses */ Oid self; /* this class */ Oid *supervec; /* vector of superclasses */ -} InhPaths; +} InhPaths; /* * This structure holds a list of possible functions or operators that @@ -133,9 +133,9 @@ typedef struct _CandidateList struct _CandidateList *next; } *CandidateList; -static Oid **argtype_inherit(int nargs, Oid * oid_array); -static Oid **genxprod(InhPaths * arginh, int nargs); -static int findsupers(Oid relid, Oid ** supervec); +static Oid **argtype_inherit(int nargs, Oid *oid_array); +static Oid **genxprod(InhPaths *arginh, int nargs); +static int findsupers(Oid relid, Oid **supervec); static bool check_typeid(Oid id); static char *instr1(TypeTupleForm tp, char *string, int typlen); static void op_error(char *op, Oid arg1, Oid arg2); @@ -308,7 +308,7 @@ static int binary_oper_get_candidates(char *opname, Oid leftTypeId, Oid rightTypeId, - CandidateList * candidates) + CandidateList *candidates) { CandidateList current_candidate; Relation pg_operator_desc; @@ -624,7 +624,7 @@ oper(char *op, Oid arg1, Oid arg2, bool noWarnings) static int unary_oper_get_candidates(char *op, Oid typeId, - CandidateList * candidates, + CandidateList *candidates, char rightleft) { CandidateList current_candidate; @@ -641,10 +641,10 @@ unary_oper_get_candidates(char *op, *candidates = NULL; - fmgr_info(NameEqualRegProcedure, (func_ptr *) & opKey[0].sk_func, + fmgr_info(NameEqualRegProcedure, (func_ptr *) &opKey[0].sk_func, &opKey[0].sk_nargs); opKey[0].sk_argument = NameGetDatum(op); - fmgr_info(CharacterEqualRegProcedure, (func_ptr *) & opKey[1].sk_func, + fmgr_info(CharacterEqualRegProcedure, (func_ptr *) &opKey[1].sk_func, &opKey[1].sk_nargs); opKey[1].sk_argument = CharGetDatum(rightleft); @@ -954,7 +954,7 @@ GetArrayElementType(Oid typearray) if (type_struct_array->typelem == InvalidOid) { elog(WARN, "GetArrayElementType: type %s is not an array", - (Name) & (type_struct_array->typname.data[0])); + (Name) &(type_struct_array->typname.data[0])); } return (type_struct_array->typelem); @@ -1061,7 +1061,7 @@ func_get_candidates(char *funcname, int nargs) * can input_typeids be coerced to func_typeids? */ static bool -can_coerce(int nargs, Oid * input_typeids, Oid * func_typeids) +can_coerce(int nargs, Oid *input_typeids, Oid *func_typeids) { int i; Type tp; @@ -1101,9 +1101,9 @@ can_coerce(int nargs, Oid * input_typeids, Oid * func_typeids) */ static int match_argtypes(int nargs, - Oid * input_typeids, + Oid *input_typeids, CandidateList function_typeids, - CandidateList * candidates) /* return value */ + CandidateList *candidates) /* return value */ { CandidateList current_candidate; CandidateList matching_candidate; @@ -1139,7 +1139,7 @@ match_argtypes(int nargs, */ static Oid * func_select_candidate(int nargs, - Oid * input_typeids, + Oid *input_typeids, CandidateList candidates) { /* XXX no conflict resolution implemeneted yet */ @@ -1149,11 +1149,11 @@ func_select_candidate(int nargs, bool func_get_detail(char *funcname, int nargs, - Oid * oid_array, - Oid * funcid, /* return value */ - Oid * rettype, /* return value */ - bool * retset, /* return value */ - Oid ** true_typeids) /* return value */ + Oid *oid_array, + Oid *funcid, /* return value */ + Oid *rettype, /* return value */ + bool *retset, /* return value */ + Oid **true_typeids) /* return value */ { Oid **input_typeid_vector; Oid *current_input_typeids; @@ -1292,7 +1292,7 @@ func_get_detail(char *funcname, * catalogs. */ static Oid ** -argtype_inherit(int nargs, Oid * oid_array) +argtype_inherit(int nargs, Oid *oid_array) { Oid relid; int i; @@ -1328,10 +1328,10 @@ argtype_inherit(int nargs, Oid * oid_array) typedef struct _SuperQE { Oid sqe_relid; -} SuperQE; +} SuperQE; static int -findsupers(Oid relid, Oid ** supervec) +findsupers(Oid relid, Oid **supervec) { Oid *relidvec; Relation inhrel; @@ -1452,7 +1452,7 @@ findsupers(Oid relid, Oid ** supervec) } static Oid ** -genxprod(InhPaths * arginh, int nargs) +genxprod(InhPaths *arginh, int nargs) { int nanswers; Oid **result, @@ -1657,7 +1657,7 @@ op_error(char *op, Oid arg1, Oid arg2) * argument types */ void -func_error(char *caller, char *funcname, int nargs, Oid * argtypes) +func_error(char *caller, char *funcname, int nargs, Oid *argtypes) { char p[(NAMEDATALEN + 2) * MAXFMGRARGS], *ptr; diff --git a/src/backend/parser/dbcommands.c b/src/backend/parser/dbcommands.c index e0add78124..c39fa49404 100644 --- a/src/backend/parser/dbcommands.c +++ b/src/backend/parser/dbcommands.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.8 1997/09/08 02:25:16 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.9 1997/09/08 21:46:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -37,7 +37,7 @@ /* non-export function prototypes */ static void check_permissions(char *command, char *dbname, - Oid * dbIdP, Oid * userIdP); + Oid *dbIdP, Oid *userIdP); static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel); static void stop_vacuum(char *dbname); @@ -161,8 +161,8 @@ get_pg_dbtup(char *command, char *dbname, Relation dbrel) static void check_permissions(char *command, char *dbname, - Oid * dbIdP, - Oid * userIdP) + Oid *dbIdP, + Oid *userIdP) { Relation dbrel; HeapTuple dbtup, diff --git a/src/backend/parser/parse_query.c b/src/backend/parser/parse_query.c index f9670431f3..088fe180f1 100644 --- a/src/backend/parser/parse_query.c +++ b/src/backend/parser/parse_query.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.20 1997/09/08 02:25:18 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.21 1997/09/08 21:46:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -39,7 +39,7 @@ #include "nodes/makefuncs.h" static void -checkTargetTypes(ParseState * pstate, char *target_colname, +checkTargetTypes(ParseState *pstate, char *target_colname, char *refname, char *colname); Oid *param_type_info; @@ -47,7 +47,7 @@ int pfunc_num_args; /* given refname, return a pointer to the range table entry */ RangeTblEntry * -refnameRangeTableEntry(List * rtable, char *refname) +refnameRangeTableEntry(List *rtable, char *refname) { List *temp; @@ -63,7 +63,7 @@ refnameRangeTableEntry(List * rtable, char *refname) /* given refname, return id of variable; position starts with 1 */ int -refnameRangeTablePosn(List * rtable, char *refname) +refnameRangeTablePosn(List *rtable, char *refname) { int index; List *temp; @@ -84,7 +84,7 @@ refnameRangeTablePosn(List * rtable, char *refname) * returns range entry if found, else NULL */ RangeTblEntry * -colnameRangeTableEntry(ParseState * pstate, char *colname) +colnameRangeTableEntry(ParseState *pstate, char *colname) { List *et; List *rtable; @@ -124,11 +124,11 @@ colnameRangeTableEntry(ParseState * pstate, char *colname) * if pstate null */ RangeTblEntry * -addRangeTableEntry(ParseState * pstate, +addRangeTableEntry(ParseState *pstate, char *relname, char *refname, bool inh, bool inFromCl, - TimeRange * timeRange) + TimeRange *timeRange) { Relation relation; RangeTblEntry *rte = makeNode(RangeTblEntry); @@ -180,7 +180,7 @@ addRangeTableEntry(ParseState * pstate, * assumes reldesc caching works */ List * -expandAll(ParseState * pstate, char *relname, char *refname, int *this_resno) +expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno) { Relation rdesc; List *te_tail = NIL, @@ -305,7 +305,7 @@ makeTimeRange(char *datestring1, } static void -disallow_setop(char *op, Type optype, Node * operand) +disallow_setop(char *op, Type optype, Node *operand) { if (operand == NULL) return; @@ -321,7 +321,7 @@ disallow_setop(char *op, Type optype, Node * operand) static Node * make_operand(char *opname, - Node * tree, + Node *tree, Oid orig_typeId, Oid true_typeId) { @@ -374,7 +374,7 @@ make_operand(char *opname, Expr * -make_op(char *opname, Node * ltree, Node * rtree) +make_op(char *opname, Node *ltree, Node *rtree) { Oid ltypeId, rtypeId; @@ -525,7 +525,7 @@ find_atttype(Oid relid, char *attrname) Var * -make_var(ParseState * pstate, char *refname, char *attrname, Oid * type_id) +make_var(ParseState *pstate, char *refname, char *attrname, Oid *type_id) { Var *varnode; int vnum, @@ -568,8 +568,8 @@ make_var(ParseState * pstate, char *refname, char *attrname, Oid * type_id) * indirection is a list of A_Indices */ ArrayRef * -make_array_ref(Node * expr, - List * indirection) +make_array_ref(Node *expr, + List *indirection) { Oid typearray; HeapTuple type_tuple; @@ -596,7 +596,7 @@ make_array_ref(Node * expr, if (type_struct_array->typelem == InvalidOid) { elog(WARN, "make_array_ref: type %s is not an array", - (Name) & (type_struct_array->typname.data[0])); + (Name) &(type_struct_array->typname.data[0])); } /* get the type tuple for the element type */ @@ -650,10 +650,10 @@ make_array_ref(Node * expr, } ArrayRef * -make_array_set(Expr * target_expr, - List * upperIndexpr, - List * lowerIndexpr, - Expr * expr) +make_array_set(Expr *target_expr, + List *upperIndexpr, + List *lowerIndexpr, + Expr *expr) { Oid typearray; HeapTuple type_tuple; @@ -678,7 +678,7 @@ make_array_set(Expr * target_expr, if (type_struct_array->typelem == InvalidOid) { elog(WARN, "make_array_ref: type %s is not an array", - (Name) & (type_struct_array->typname.data[0])); + (Name) &(type_struct_array->typname.data[0])); } /* get the type tuple for the element type */ type_tuple = SearchSysCacheTuple(TYPOID, @@ -724,7 +724,7 @@ make_array_set(Expr * target_expr, * eventually, produces a "const" lisp-struct as per nodedefs.cl */ Const * -make_const(Value * value) +make_const(Value *value) { Type tp; Datum val; @@ -786,7 +786,7 @@ make_const(Value * value) * used in postquel functions */ void -param_type_init(Oid * typev, int nargs) +param_type_init(Oid *typev, int nargs) { pfunc_num_args = nargs; param_type_info = typev; @@ -805,7 +805,7 @@ param_type(int t) * use column names from insert */ void -handleTargetColname(ParseState * pstate, char **resname, +handleTargetColname(ParseState *pstate, char **resname, char *refname, char *colname) { if (pstate->p_is_insert) @@ -829,7 +829,7 @@ handleTargetColname(ParseState * pstate, char **resname, * checks value and target column types */ static void -checkTargetTypes(ParseState * pstate, char *target_colname, +checkTargetTypes(ParseState *pstate, char *target_colname, char *refname, char *colname) { Oid attrtype_id, diff --git a/src/backend/parser/parser.c b/src/backend/parser/parser.c index 3ca419dd6b..598b595064 100644 --- a/src/backend/parser/parser.c +++ b/src/backend/parser/parser.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.24 1997/09/08 02:25:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.25 1997/09/08 21:46:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -37,7 +37,7 @@ #include "optimizer/clauses.h" void init_io(); /* from scan.l */ -void parser_init(Oid * typev, int nargs); /* from gram.y */ +void parser_init(Oid *typev, int nargs); /* from gram.y */ int yyparse(); /* from gram.c */ char *parseString; /* the char* which holds the string to be @@ -58,7 +58,7 @@ static void define_sets(); * CALLER is responsible for free'ing the list returned */ QueryTreeList * -parser(char *str, Oid * typev, int nargs) +parser(char *str, Oid *typev, int nargs) { QueryTreeList *queryList; int yyresult; @@ -112,7 +112,7 @@ parser(char *str, Oid * typev, int nargs) #ifdef SETS_FIXED static void -fixupsets(Query * parse) +fixupsets(Query *parse) { if (parse == NULL) return; @@ -129,7 +129,7 @@ fixupsets(Query * parse) * the set, and store the OID of the new set in the Const instead. */ static void -define_sets(Node * clause) +define_sets(Node *clause) { Oid setoid; Type t = type("oid"); @@ -210,7 +210,7 @@ define_sets(Node * clause) */ Node * -parser_typecast(Value * expr, TypeName * typename, int typlen) +parser_typecast(Value *expr, TypeName *typename, int typlen) { /* check for passing non-ints */ Const *adt; @@ -347,7 +347,7 @@ parser_typecast(Value * expr, TypeName * typename, int typlen) } Node * -parser_typecast2(Node * expr, Oid exprType, Type tp, int typlen) +parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen) { /* check for passing non-ints */ Const *adt; @@ -486,7 +486,7 @@ parser_typecast2(Node * expr, Oid exprType, Type tp, int typlen) } Aggreg * -ParseAgg(char *aggname, Oid basetype, Node * target) +ParseAgg(char *aggname, Oid basetype, Node *target) { Oid fintype; Oid vartype; diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index d6c53d2ee2..eb35b294f8 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.56 1997/09/08 20:56:38 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.57 1997/09/08 21:46:16 momjian Exp $ * * NOTES * @@ -156,7 +156,7 @@ static int MultiplexedBackendPort; */ static void pmdaemonize(void); static void -ConnStartup(Port * port, int *status, +ConnStartup(Port *port, int *status, char *errormsg, const int errormsg_len); static int ConnCreate(int serverFd, int *newFdP); static void reset_shared(short port); @@ -164,12 +164,12 @@ static void pmdie(SIGNAL_ARGS); static void reaper(SIGNAL_ARGS); static void dumpstatus(SIGNAL_ARGS); static void CleanupProc(int pid, int exitstatus); -static int DoExec(StartupInfo * packet, int portFd); +static int DoExec(StartupInfo *packet, int portFd); static void ExitPostmaster(int status); static void usage(const char *); static int ServerLoop(void); -static int BackendStartup(StartupInfo * packet, Port * port, int *pidPtr); -static void send_error_reply(Port * port, const char *errormsg); +static int BackendStartup(StartupInfo *packet, Port *port, int *pidPtr); +static void send_error_reply(Port *port, const char *errormsg); extern char *optarg; extern int optind, @@ -178,7 +178,7 @@ extern int optind, static void -checkDataDir(const char *DataDir, bool * DataDirOK) +checkDataDir(const char *DataDir, bool *DataDirOK) { if (DataDir == NULL) { @@ -686,7 +686,7 @@ ServerLoop(void) */ static void -ConnStartup(Port * port, int *status, +ConnStartup(Port *port, int *status, char *errormsg, const int errormsg_len) { MsgType msgType; @@ -791,7 +791,7 @@ ConnStartup(Port * port, int *status, */ static void -send_error_reply(Port * port, const char *errormsg) +send_error_reply(Port *port, const char *errormsg) { int rc; /* return code from sendto */ char *reply; @@ -1040,8 +1040,8 @@ CleanupProc(int pid, * */ static int -BackendStartup(StartupInfo * packet, /* client's startup packet */ - Port * port, +BackendStartup(StartupInfo *packet, /* client's startup packet */ + Port *port, int *pidPtr) { Backend *bn; /* for backend cleanup */ @@ -1173,7 +1173,7 @@ split_opts(char **argv, int *argcp, char *s) * If execv() fails, return status. */ static int -DoExec(StartupInfo * packet, int portFd) +DoExec(StartupInfo *packet, int portFd) { char execbuf[MAXPATHLEN]; char portbuf[ARGV_SIZE]; diff --git a/src/backend/regex/engine.c b/src/backend/regex/engine.c index 1d86dcc7bd..a16ae18b0d 100644 --- a/src/backend/regex/engine.c +++ b/src/backend/regex/engine.c @@ -120,7 +120,7 @@ extern "C" #define NNONCHAR (CODEMAX-CHAR_MAX) #ifdef REDEBUG static void - print(struct match * m, char *caption, states st, int ch, FILE * d); + print(struct match * m, char *caption, states st, int ch, FILE *d); #endif #ifdef REDEBUG static void diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c index da4f2020ce..d9b3198024 100644 --- a/src/backend/regex/regcomp.c +++ b/src/backend/regex/regcomp.c @@ -90,9 +90,9 @@ extern "C" static int p_simp_re(struct parse * p, int starordinary); static int p_count(struct parse * p); static void p_bracket(struct parse * p); - static void p_b_term(struct parse * p, cset * cs); - static void p_b_cclass(struct parse * p, cset * cs); - static void p_b_eclass(struct parse * p, cset * cs); + static void p_b_term(struct parse * p, cset *cs); + static void p_b_cclass(struct parse * p, cset *cs); + static void p_b_eclass(struct parse * p, cset *cs); static char p_b_symbol(struct parse * p); static char p_b_coll_elem(struct parse * p, int endc); static char othercase(int ch); @@ -102,13 +102,13 @@ extern "C" static void repeat(struct parse * p, sopno start, int from, int to); static int seterr(struct parse * p, int e); static cset *allocset(struct parse * p); - static void freeset(struct parse * p, cset * cs); - static int freezeset(struct parse * p, cset * cs); - static int firstch(struct parse * p, cset * cs); - static int nch(struct parse * p, cset * cs); - static void mcadd(struct parse * p, cset * cs, char *cp); - static void mcinvert(struct parse * p, cset * cs); - static void mccase(struct parse * p, cset * cs); + static void freeset(struct parse * p, cset *cs); + static int freezeset(struct parse * p, cset *cs); + static int firstch(struct parse * p, cset *cs); + static int nch(struct parse * p, cset *cs); + static void mcadd(struct parse * p, cset *cs, char *cp); + static void mcinvert(struct parse * p, cset *cs); + static void mccase(struct parse * p, cset *cs); static int isinsets(struct re_guts * g, int c); static int samesets(struct re_guts * g, int c1, int c2); static void categorize(struct parse * p, struct re_guts * g); @@ -1501,7 +1501,7 @@ register struct re_guts *g; - dupl - emit a duplicate of a bunch of sops == static sopno dupl(register struct parse *p, sopno start, sopno finish); */ -static sopno /* start of duplicate */ +static sopno /* start of duplicate */ dupl(p, start, finish) register struct parse *p; sopno start; /* from here */ @@ -1752,7 +1752,7 @@ register struct re_guts *g; - pluscount - count + nesting == static sopno pluscount(register struct parse *p, register struct re_guts *g); */ -static sopno /* nesting depth */ +static sopno /* nesting depth */ pluscount(p, g) struct parse *p; register struct re_guts *g; diff --git a/src/backend/regex/regerror.c b/src/backend/regex/regerror.c index d5f9255983..430814d2d0 100644 --- a/src/backend/regex/regerror.c +++ b/src/backend/regex/regerror.c @@ -60,7 +60,7 @@ extern "C" #endif /* === regerror.c === */ - static char *regatoi(const regex_t * preg, char *localbuf); + static char *regatoi(const regex_t *preg, char *localbuf); #ifdef __cplusplus } diff --git a/src/backend/rewrite/locks.c b/src/backend/rewrite/locks.c index 6a62e8ddee..d446da653c 100644 --- a/src/backend/rewrite/locks.c +++ b/src/backend/rewrite/locks.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.4 1997/09/08 02:28:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.5 1997/09/08 21:46:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,7 +27,7 @@ * otherwise, we return false */ static bool -nodeThisLockWasTriggered(Node * node, int varno, AttrNumber attnum) +nodeThisLockWasTriggered(Node *node, int varno, AttrNumber attnum) { if (node == NULL) return FALSE; @@ -85,7 +85,7 @@ nodeThisLockWasTriggered(Node * node, int varno, AttrNumber attnum) static bool thisLockWasTriggered(int varno, AttrNumber attnum, - Query * parsetree) + Query *parsetree) { return (nodeThisLockWasTriggered(parsetree->qual, varno, attnum) || @@ -99,9 +99,9 @@ thisLockWasTriggered(int varno, */ List * matchLocks(CmdType event, - RuleLock * rulelocks, + RuleLock *rulelocks, int varno, - Query * parsetree) + Query *parsetree) { List *real_locks = NIL; int nlocks; diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index c849d7edab..33fad4925a 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.5 1997/09/08 02:28:16 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.6 1997/09/08 21:46:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -147,8 +147,8 @@ static void ValidateRule(int event_type, char *eobj_string, char *eslot_string, - Node * event_qual, - List ** action, + Node *event_qual, + List **action, int is_instead, Oid event_attype) { @@ -186,7 +186,7 @@ ValidateRule(int event_type, } void -DefineQueryRewrite(RuleStmt * stmt) +DefineQueryRewrite(RuleStmt *stmt) { CmdType event_type = stmt->event; Attr *event_obj = stmt->object; diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index af15f6b717..d6dc95e387 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.5 1997/09/08 02:28:17 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.6 1997/09/08 21:46:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -30,12 +30,12 @@ #include "access/heapam.h" static void -ApplyRetrieveRule(Query * parsetree, RewriteRule * rule, +ApplyRetrieveRule(Query *parsetree, RewriteRule *rule, int rt_index, int relation_level, int *modified); static List * -fireRules(Query * parsetree, int rt_index, CmdType event, - bool * instead_flag, List * locks, List ** qual_products); -static List *deepRewriteQuery(Query * parsetree); +fireRules(Query *parsetree, int rt_index, CmdType event, + bool *instead_flag, List *locks, List **qual_products); +static List *deepRewriteQuery(Query *parsetree); /* * gatherRewriteMeta - @@ -44,12 +44,12 @@ static List *deepRewriteQuery(Query * parsetree); * maintain semantic validity */ static RewriteInfo * -gatherRewriteMeta(Query * parsetree, - Query * rule_action, - Node * rule_qual, +gatherRewriteMeta(Query *parsetree, + Query *rule_action, + Node *rule_qual, int rt_index, CmdType event, - bool * instead_flag) + bool *instead_flag) { RewriteInfo *info; int rt_length; @@ -110,7 +110,7 @@ gatherRewriteMeta(Query * parsetree, } static List * -OptimizeRIRRules(List * locks) +OptimizeRIRRules(List *locks) { List *attr_level = NIL, *i; @@ -133,7 +133,7 @@ OptimizeRIRRules(List * locks) * excess semantically queasy queries aren't processed */ static List * -orderRules(List * locks) +orderRules(List *locks) { List *regular = NIL, *i; @@ -152,7 +152,7 @@ orderRules(List * locks) } static int -AllRetrieve(List * actions) +AllRetrieve(List *actions) { List *n; @@ -172,10 +172,10 @@ AllRetrieve(List * actions) } static List * -FireRetrieveRulesAtQuery(Query * parsetree, +FireRetrieveRulesAtQuery(Query *parsetree, int rt_index, Relation relation, - bool * instead_flag, + bool *instead_flag, int rule_flag) { List *i, @@ -242,8 +242,8 @@ FireRetrieveRulesAtQuery(Query * parsetree, * side effect: parsetree's rtable field might be changed */ static void -ApplyRetrieveRule(Query * parsetree, - RewriteRule * rule, +ApplyRetrieveRule(Query *parsetree, + RewriteRule *rule, int rt_index, int relation_level, int *modified) @@ -310,9 +310,9 @@ ApplyRetrieveRule(Query * parsetree, } static List * -ProcessRetrieveQuery(Query * parsetree, - List * rtable, - bool * instead_flag, +ProcessRetrieveQuery(Query *parsetree, + List *rtable, + bool *instead_flag, bool rule) { List *rt; @@ -377,9 +377,9 @@ ProcessRetrieveQuery(Query * parsetree, } static Query * -CopyAndAddQual(Query * parsetree, - List * actions, - Node * rule_qual, +CopyAndAddQual(Query *parsetree, + List *actions, + Node *rule_qual, int rt_index, CmdType event) { @@ -419,12 +419,12 @@ CopyAndAddQual(Query * parsetree, * */ static List * -fireRules(Query * parsetree, +fireRules(Query *parsetree, int rt_index, CmdType event, - bool * instead_flag, - List * locks, - List ** qual_products) + bool *instead_flag, + List *locks, + List **qual_products) { RewriteInfo *info; List *results = NIL; @@ -536,7 +536,7 @@ fireRules(Query * parsetree, } static List * -RewriteQuery(Query * parsetree, bool * instead_flag, List ** qual_products) +RewriteQuery(Query *parsetree, bool *instead_flag, List **qual_products) { CmdType event; List *product_queries = NIL; @@ -621,7 +621,7 @@ static int numQueryRewriteInvoked = 0; * queries */ List * -QueryRewrite(Query * parsetree) +QueryRewrite(Query *parsetree) { numQueryRewriteInvoked = 0; @@ -636,7 +636,7 @@ QueryRewrite(Query * parsetree) * rewrites the query and apply the rules again on the queries rewritten */ static List * -deepRewriteQuery(Query * parsetree) +deepRewriteQuery(Query *parsetree) { List *n; List *rewritten = NIL; diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index 8e6b7a21ba..513733fde6 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.6 1997/09/08 02:28:18 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.7 1997/09/08 21:46:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -28,12 +28,12 @@ #include "nodes/plannodes.h" #include "optimizer/clauses.h" -static void ResolveNew(RewriteInfo * info, List * targetlist, Node ** node); +static void ResolveNew(RewriteInfo *info, List *targetlist, Node **node); void -OffsetVarNodes(Node * node, int offset) +OffsetVarNodes(Node *node, int offset) { if (node == NULL) return; @@ -78,7 +78,7 @@ OffsetVarNodes(Node * node, int offset) } void -ChangeVarNodes(Node * node, int old_varno, int new_varno) +ChangeVarNodes(Node *node, int old_varno, int new_varno) { if (node == NULL) return; @@ -126,7 +126,7 @@ ChangeVarNodes(Node * node, int old_varno, int new_varno) } void -AddQual(Query * parsetree, Node * qual) +AddQual(Query *parsetree, Node *qual) { Node *copy, *old; @@ -144,7 +144,7 @@ AddQual(Query * parsetree, Node * qual) } void -AddNotQual(Query * parsetree, Node * qual) +AddNotQual(Query *parsetree, Node *qual) { Node *copy; @@ -170,7 +170,7 @@ make_null(Oid type) } void -FixResdomTypes(List * tlist) +FixResdomTypes(List *tlist) { List *i; @@ -189,7 +189,7 @@ FixResdomTypes(List * tlist) } static Node * -FindMatchingNew(List * tlist, int attno) +FindMatchingNew(List *tlist, int attno) { List *i; @@ -206,7 +206,7 @@ FindMatchingNew(List * tlist, int attno) } static Node * -FindMatchingTLEntry(List * tlist, char *e_attname) +FindMatchingTLEntry(List *tlist, char *e_attname) { List *i; @@ -223,7 +223,7 @@ FindMatchingTLEntry(List * tlist, char *e_attname) } static void -ResolveNew(RewriteInfo * info, List * targetlist, Node ** nodePtr) +ResolveNew(RewriteInfo *info, List *targetlist, Node **nodePtr) { Node *node = *nodePtr; @@ -272,7 +272,7 @@ ResolveNew(RewriteInfo * info, List * targetlist, Node ** nodePtr) foreach(l, (List *) node) { - ResolveNew(info, targetlist, (Node **) & (lfirst(l))); + ResolveNew(info, targetlist, (Node **) &(lfirst(l))); } break; } @@ -283,17 +283,17 @@ ResolveNew(RewriteInfo * info, List * targetlist, Node ** nodePtr) } void -FixNew(RewriteInfo * info, Query * parsetree) +FixNew(RewriteInfo *info, Query *parsetree) { ResolveNew(info, parsetree->targetList, - (Node **) & (info->rule_action->targetList)); + (Node **) &(info->rule_action->targetList)); ResolveNew(info, parsetree->targetList, &info->rule_action->qual); } static void -nodeHandleRIRAttributeRule(Node ** nodePtr, - List * rtable, - List * targetlist, +nodeHandleRIRAttributeRule(Node **nodePtr, + List *rtable, + List *targetlist, int rt_index, int attr_num, int *modified, @@ -387,9 +387,9 @@ nodeHandleRIRAttributeRule(Node ** nodePtr, * do instead retrieve (attribute = expression) w/qual' */ void -HandleRIRAttributeRule(Query * parsetree, - List * rtable, - List * targetlist, +HandleRIRAttributeRule(Query *parsetree, + List *rtable, + List *targetlist, int rt_index, int attr_num, int *modified, @@ -404,9 +404,9 @@ HandleRIRAttributeRule(Query * parsetree, static void -nodeHandleViewRule(Node ** nodePtr, - List * rtable, - List * targetlist, +nodeHandleViewRule(Node **nodePtr, + List *rtable, + List *targetlist, int rt_index, int *modified) { @@ -477,9 +477,9 @@ nodeHandleViewRule(Node ** nodePtr, } void -HandleViewRule(Query * parsetree, - List * rtable, - List * targetlist, +HandleViewRule(Query *parsetree, + List *rtable, + List *targetlist, int rt_index, int *modified) { diff --git a/src/backend/rewrite/rewriteSupport.c b/src/backend/rewrite/rewriteSupport.c index b9059e9dca..19423dc998 100644 --- a/src/backend/rewrite/rewriteSupport.c +++ b/src/backend/rewrite/rewriteSupport.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.8 1997/09/08 02:28:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.9 1997/09/08 21:46:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -38,7 +38,7 @@ */ #ifdef NOT_USED static Node * -RuleIdGetActionInfo(Oid ruleoid, bool * instead_flag, Query ** parseTrees) +RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees) { HeapTuple ruletuple; char *ruleaction = NULL; @@ -169,8 +169,8 @@ prs2_addToRelation(Oid relid, CmdType event_type, AttrNumber attno, bool isInstead, - Node * qual, - List * actions) + Node *qual, + List *actions) { Relation relation; RewriteRule *thisRule; diff --git a/src/backend/storage/buffer/buf_table.c b/src/backend/storage/buffer/buf_table.c index b384963101..7fa9ab380e 100644 --- a/src/backend/storage/buffer/buf_table.c +++ b/src/backend/storage/buffer/buf_table.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.7 1997/09/08 20:56:41 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.8 1997/09/08 21:46:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -40,7 +40,7 @@ typedef struct lookup { BufferTag key; Buffer id; -} LookupEnt; +} LookupEnt; /* * Initialize shmem hash table for mapping buffers @@ -74,7 +74,7 @@ InitBufTable() } BufferDesc * -BufTableLookup(BufferTag * tagPtr) +BufTableLookup(BufferTag *tagPtr) { LookupEnt *result; bool found; diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index cdd4909cad..7acc70342c 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.22 1997/09/08 20:56:44 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.23 1997/09/08 21:46:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -93,7 +93,7 @@ ReadBufferWithBufferLock(Relation relation, BlockNumber blockNum, bool bufferLockHeld); static BufferDesc * BufferAlloc(Relation reln, BlockNumber blockNum, - bool * foundPtr, bool bufferLockHeld); + bool *foundPtr, bool bufferLockHeld); static int FlushBuffer(Buffer buffer, bool release); static void BufferSync(void); static int BufferReplace(BufferDesc *bufHdr, bool bufferLockHeld); @@ -354,7 +354,7 @@ ReadBufferWithBufferLock(Relation reln, static BufferDesc * BufferAlloc(Relation reln, BlockNumber blockNum, - bool * foundPtr, + bool *foundPtr, bool bufferLockHeld) { BufferDesc *buf, @@ -1154,7 +1154,7 @@ long NDirectFileRead; /* some I/O's are direct file access. long NDirectFileWrite; /* e.g., I/O in psort and hashjoin. */ void -PrintBufferUsage(FILE * statfp) +PrintBufferUsage(FILE *statfp) { float hitrate; float localhitrate; diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c index 3916abc2a7..480dee7a7c 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.10 1997/09/08 02:28:34 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.11 1997/09/08 21:46:52 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -63,7 +63,7 @@ static int nextFreeLocalBuf = 0; * allocate a local buffer. We do round robin allocation for now. */ BufferDesc * -LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool * foundPtr) +LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr) { int i; BufferDesc *bufHdr = (BufferDesc *) NULL; diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index aa09bbdfb6..beb0170afe 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -6,7 +6,7 @@ * Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Id: fd.c,v 1.24 1997/09/08 02:28:38 momjian Exp $ + * $Id: fd.c,v 1.25 1997/09/08 21:46:54 momjian Exp $ * * NOTES: * @@ -111,7 +111,7 @@ typedef struct vfd char *fileName; int fileFlags; int fileMode; -} Vfd; +} Vfd; /* * Virtual File Descriptor array pointer and size. This grows as @@ -883,7 +883,7 @@ TryAgain: * AllocateFile()? */ void -FreeFile(FILE * file) +FreeFile(FILE *file) { DO_DB(elog(DEBUG, "FreeFile: Allocated %d.", allocatedFiles)); diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c index af59de7cca..856ca13508 100644 --- a/src/backend/storage/ipc/ipc.c +++ b/src/backend/storage/ipc/ipc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.13 1997/09/08 02:28:44 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.14 1997/09/08 21:46:59 momjian Exp $ * * NOTES * @@ -73,7 +73,7 @@ typedef struct _PrivateMemStruct { int id; char *memptr; -} PrivateMem; +} PrivateMem; PrivateMem IpcPrivateMem[16]; @@ -668,11 +668,11 @@ AttachSLockMemory(IPCKey key) slockM = (struct ipcdummy *) IpcMemoryAttach(SLockMemoryId); if (slockM == IpcMemAttachFailed) elog(FATAL, "AttachSLockMemory: could not attach segment"); - FreeSLockPP = (SLock **) & (slockM->free); + FreeSLockPP = (SLock **) &(slockM->free); UnusedSLockIP = (int *) &(slockM->unused); - SLockMemoryLock = (slock_t *) & (slockM->memlock); + SLockMemoryLock = (slock_t *) &(slockM->memlock); S_INIT_LOCK(SLockMemoryLock); - SLockArray = (SLock *) & (slockM->slocks[0]); + SLockArray = (SLock *) &(slockM->slocks[0]); return; } diff --git a/src/backend/storage/ipc/s_lock.c b/src/backend/storage/ipc/s_lock.c index 3f75c5bc79..82551f8b96 100644 --- a/src/backend/storage/ipc/s_lock.c +++ b/src/backend/storage/ipc/s_lock.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.23 1997/09/08 02:28:51 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.24 1997/09/08 21:47:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -50,24 +50,24 @@ * slock_t is defined as a struct mutex. */ void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { mutex_lock(lock); } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { mutex_unlock(lock); } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { mutex_init(lock); } /* S_LOCK_FREE should return 1 if lock is free; 0 if lock is locked */ int -S_LOCK_FREE(slock_t * lock) +S_LOCK_FREE(slock_t *lock) { /* For Mach, we have to delve inside the entrails of `struct mutex'. Ick! */ return (lock->lock == 0); @@ -88,7 +88,7 @@ S_LOCK_FREE(slock_t * lock) * for the R3000 chips out there. */ void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { /* spin_lock(lock); */ while (!acquire_lock(lock)) @@ -96,20 +96,20 @@ S_LOCK(slock_t * lock) } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { release_lock(lock); } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { init_lock(lock); } /* S_LOCK_FREE should return 1 if lock is free; 0 if lock is locked */ int -S_LOCK_FREE(slock_t * lock) +S_LOCK_FREE(slock_t *lock) { return (stat_lock(lock) == UNLOCKED); } @@ -127,26 +127,26 @@ S_LOCK_FREE(slock_t * lock) #if defined(__alpha__) || defined(__alpha) void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { while (msem_lock(lock, MSEM_IF_NOWAIT) < 0) ; } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { msem_unlock(lock, 0); } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { msem_init(lock, MSEM_UNLOCKED); } int -S_LOCK_FREE(slock_t * lock) +S_LOCK_FREE(slock_t *lock) { return (lock->msem_state ? 0 : 1); } @@ -161,23 +161,23 @@ S_LOCK_FREE(slock_t * lock) defined(sparc_solaris) /* for xxxxx_solaris, this is defined in port/.../tas.s */ -static int tas(slock_t * lock); +static int tas(slock_t *lock); void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { while (tas(lock)) ; } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { *lock = 0; } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { S_UNLOCK(lock); } @@ -194,20 +194,20 @@ S_INIT_LOCK(slock_t * lock) #if defined(aix) void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { while (cs((int *) lock, 0, 1)) ; } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { *lock = 0; } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { S_UNLOCK(lock); } @@ -229,29 +229,29 @@ S_INIT_LOCK(slock_t * lock) */ static slock_t clear_lock = {-1, -1, -1, -1}; -static int tas(slock_t * lock); +static int tas(slock_t *lock); void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { while (tas(lock)) ; } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { *lock = clear_lock; /* struct assignment */ } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { S_UNLOCK(lock); } int -S_LOCK_FREE(slock_t * lock) +S_LOCK_FREE(slock_t *lock) { register int *lock_word = (int *) (((long) lock + 15) & ~15); @@ -266,22 +266,22 @@ S_LOCK_FREE(slock_t * lock) #if defined(sun3) -static int tas(slock_t * lock); +static int tas(slock_t *lock); void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { while (tas(lock)); } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { *lock = 0; } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { S_UNLOCK(lock); } @@ -320,7 +320,7 @@ tas_dummy() #define asm(x) __asm__(x) #endif -static int tas(slock_t * lock); +static int tas(slock_t *lock); static int tas_dummy() @@ -386,7 +386,7 @@ S_INIT_LOCK(unsigned char *addr) #if defined(NEED_I386_TAS_ASM) void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { slock_t res; @@ -397,13 +397,13 @@ __asm__("xchgb %0,%1": "=q"(res), "=m"(*lock):"0"(0x1)); } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { *lock = 0; } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { S_UNLOCK(lock); } @@ -414,7 +414,7 @@ S_INIT_LOCK(slock_t * lock) #if defined(__alpha__) && defined(linux) void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { slock_t res; @@ -437,14 +437,14 @@ __asm__(" ldq $0, %0 \n\ } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { __asm__("mb"); *lock = 0; } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { S_UNLOCK(lock); } @@ -454,7 +454,7 @@ S_INIT_LOCK(slock_t * lock) #if defined(linux) && defined(sparc) void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { slock_t res; @@ -467,13 +467,13 @@ S_LOCK(slock_t * lock) } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { *lock = 0; } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { S_UNLOCK(lock); } @@ -502,20 +502,20 @@ success: \n\ } void -S_LOCK(slock_t * lock) +S_LOCK(slock_t *lock) { while (tas(lock)) ; } void -S_UNLOCK(slock_t * lock) +S_UNLOCK(slock_t *lock) { *lock = 0; } void -S_INIT_LOCK(slock_t * lock) +S_INIT_LOCK(slock_t *lock) { S_UNLOCK(lock); } diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index 5a1af74584..a83dc9b11c 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.12 1997/09/08 02:28:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.13 1997/09/08 21:47:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -342,7 +342,7 @@ HTAB * ShmemInitHash(char *name, /* table string name for binding */ long init_size, /* initial size */ long max_size, /* max size of the table */ - HASHCTL * infoP, /* info about key and bucket size */ + HASHCTL *infoP, /* info about key and bucket size */ int hash_flags) /* info about infoP */ { bool found; @@ -400,7 +400,7 @@ ShmemInitHash(char *name, /* table string name for binding */ * locationPtr. */ bool -ShmemPIDLookup(int pid, SHMEM_OFFSET * locationPtr) +ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr) { BindingEnt *result, item; @@ -497,7 +497,7 @@ ShmemPIDDestroy(int pid) * initialized). */ long * -ShmemInitStruct(char *name, unsigned long size, bool * foundPtr) +ShmemInitStruct(char *name, unsigned long size, bool *foundPtr) { BindingEnt *result, item; diff --git a/src/backend/storage/ipc/shmqueue.c b/src/backend/storage/ipc/shmqueue.c index d4cf06f171..caba5ff637 100644 --- a/src/backend/storage/ipc/shmqueue.c +++ b/src/backend/storage/ipc/shmqueue.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.5 1997/09/08 02:28:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.6 1997/09/08 21:47:10 momjian Exp $ * * NOTES * @@ -39,7 +39,7 @@ * to itself */ void -SHMQueueInit(SHM_QUEUE * queue) +SHMQueueInit(SHM_QUEUE *queue) { Assert(SHM_PTR_VALID(queue)); (queue)->prev = (queue)->next = MAKE_OFFSET(queue); @@ -51,7 +51,7 @@ SHMQueueInit(SHM_QUEUE * queue) */ #ifdef NOT_USED bool -SHMQueueIsDetached(SHM_QUEUE * queue) +SHMQueueIsDetached(SHM_QUEUE *queue) { Assert(SHM_PTR_VALID(queue)); return ((queue)->prev == INVALID_OFFSET); @@ -63,7 +63,7 @@ SHMQueueIsDetached(SHM_QUEUE * queue) * SHMQueueElemInit -- clear an element's links */ void -SHMQueueElemInit(SHM_QUEUE * queue) +SHMQueueElemInit(SHM_QUEUE *queue) { Assert(SHM_PTR_VALID(queue)); (queue)->prev = (queue)->next = INVALID_OFFSET; @@ -74,7 +74,7 @@ SHMQueueElemInit(SHM_QUEUE * queue) * close the links */ void -SHMQueueDelete(SHM_QUEUE * queue) +SHMQueueDelete(SHM_QUEUE *queue) { SHM_QUEUE *nextElem = (SHM_QUEUE *) MAKE_PTR((queue)->next); SHM_QUEUE *prevElem = (SHM_QUEUE *) MAKE_PTR((queue)->prev); @@ -97,7 +97,7 @@ SHMQueueDelete(SHM_QUEUE * queue) #ifdef SHMQUEUE_DEBUG void -dumpQ(SHM_QUEUE * q, char *s) +dumpQ(SHM_QUEUE *q, char *s) { char elem[16]; char buf[1024]; @@ -152,7 +152,7 @@ dumpQ(SHM_QUEUE * q, char *s) */ #ifdef NOT_USED void -SHMQueueInsertHD(SHM_QUEUE * queue, SHM_QUEUE * elem) +SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem) { SHM_QUEUE *prevPtr = (SHM_QUEUE *) MAKE_PTR((queue)->prev); SHMEM_OFFSET elemOffset = MAKE_OFFSET(elem); @@ -177,7 +177,7 @@ SHMQueueInsertHD(SHM_QUEUE * queue, SHM_QUEUE * elem) #endif void -SHMQueueInsertTL(SHM_QUEUE * queue, SHM_QUEUE * elem) +SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem) { SHM_QUEUE *nextPtr = (SHM_QUEUE *) MAKE_PTR((queue)->next); SHMEM_OFFSET elemOffset = MAKE_OFFSET(elem); @@ -222,7 +222,7 @@ SHMQueueInsertTL(SHM_QUEUE * queue, SHM_QUEUE * elem) * next. */ void -SHMQueueFirst(SHM_QUEUE * queue, Pointer * nextPtrPtr, SHM_QUEUE * nextQueue) +SHMQueueFirst(SHM_QUEUE *queue, Pointer *nextPtrPtr, SHM_QUEUE *nextQueue) { SHM_QUEUE *elemPtr = (SHM_QUEUE *) MAKE_PTR((queue)->next); @@ -243,7 +243,7 @@ SHMQueueFirst(SHM_QUEUE * queue, Pointer * nextPtrPtr, SHM_QUEUE * nextQueue) * SHMQueueEmpty -- TRUE if queue head is only element, FALSE otherwise */ bool -SHMQueueEmpty(SHM_QUEUE * queue) +SHMQueueEmpty(SHM_QUEUE *queue) { Assert(SHM_PTR_VALID(queue)); diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index 368b2675bd..6bdf5a9f52 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.7 1997/09/08 02:29:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.8 1997/09/08 21:47:15 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -59,9 +59,9 @@ IpcSemaphoreId SharedInvalidationSemaphore; SISeg *shmInvalBuffer; extern BackendId MyBackendId; -static void CleanupInvalidationState(int status, SISeg * segInOutP); -static BackendId SIAssignBackendId(SISeg * segInOutP, BackendTag backendTag); -static int SIGetNumEntries(SISeg * segP); +static void CleanupInvalidationState(int status, SISeg *segInOutP); +static BackendId SIAssignBackendId(SISeg *segInOutP, BackendTag backendTag); +static int SIGetNumEntries(SISeg *segP); /************************************************************************/ /* SISetActiveProcess(segP, backendId) set the backend status active */ @@ -69,7 +69,7 @@ static int SIGetNumEntries(SISeg * segP); /************************************************************************/ /* XXX I suspect that the segP parameter is extraneous. -hirohama */ static void -SISetActiveProcess(SISeg * segInOutP, BackendId backendId) +SISetActiveProcess(SISeg *segInOutP, BackendId backendId) { /* mark all messages as read */ @@ -83,7 +83,7 @@ SISetActiveProcess(SISeg * segInOutP, BackendId backendId) /* SIBackendInit() initializes a backend to operate on the buffer */ /****************************************************************************/ int -SIBackendInit(SISeg * segInOutP) +SIBackendInit(SISeg *segInOutP) { LRelId LtCreateRelId(); TransactionId LMITransactionIdCopy(); @@ -109,7 +109,7 @@ SIBackendInit(SISeg * segInOutP) * ---------------- */ static BackendId -SIAssignBackendId(SISeg * segInOutP, BackendTag backendTag) +SIAssignBackendId(SISeg *segInOutP, BackendTag backendTag) { Index index; ProcState *stateP; @@ -180,7 +180,7 @@ SIAssignBackendId(SISeg * segInOutP, BackendTag backendTag) /* should be called only by the postmaster when a backend died */ /************************************************************************/ static void -SISetDeadProcess(SISeg * segP, int backendId) +SISetDeadProcess(SISeg *segP, int backendId) { /* XXX call me.... */ @@ -197,7 +197,7 @@ SISetDeadProcess(SISeg * segP, int backendId) */ static void CleanupInvalidationState(int status, /* XXX */ - SISeg * segInOutP) /* XXX style */ + SISeg *segInOutP) /* XXX style */ { Assert(PointerIsValid(segInOutP)); @@ -237,7 +237,7 @@ SIComputeSize(int *segSize) /* SISetStartEntrySection(segP, offset) - sets the offset */ /************************************************************************/ static void -SISetStartEntrySection(SISeg * segP, Offset offset) +SISetStartEntrySection(SISeg *segP, Offset offset) { segP->startEntrySection = offset; } @@ -246,7 +246,7 @@ SISetStartEntrySection(SISeg * segP, Offset offset) /* SIGetStartEntrySection(segP) - returnss the offset */ /************************************************************************/ static Offset -SIGetStartEntrySection(SISeg * segP) +SIGetStartEntrySection(SISeg *segP) { return (segP->startEntrySection); } @@ -256,7 +256,7 @@ SIGetStartEntrySection(SISeg * segP) /* SISetEndEntrySection(segP, offset) - sets the offset */ /************************************************************************/ static void -SISetEndEntrySection(SISeg * segP, Offset offset) +SISetEndEntrySection(SISeg *segP, Offset offset) { segP->endEntrySection = offset; } @@ -265,7 +265,7 @@ SISetEndEntrySection(SISeg * segP, Offset offset) /* SISetEndEntryChain(segP, offset) - sets the offset */ /************************************************************************/ static void -SISetEndEntryChain(SISeg * segP, Offset offset) +SISetEndEntryChain(SISeg *segP, Offset offset) { segP->endEntryChain = offset; } @@ -274,7 +274,7 @@ SISetEndEntryChain(SISeg * segP, Offset offset) /* SIGetEndEntryChain(segP) - returnss the offset */ /************************************************************************/ static Offset -SIGetEndEntryChain(SISeg * segP) +SIGetEndEntryChain(SISeg *segP) { return (segP->endEntryChain); } @@ -283,7 +283,7 @@ SIGetEndEntryChain(SISeg * segP) /* SISetStartEntryChain(segP, offset) - sets the offset */ /************************************************************************/ static void -SISetStartEntryChain(SISeg * segP, Offset offset) +SISetStartEntryChain(SISeg *segP, Offset offset) { segP->startEntryChain = offset; } @@ -292,7 +292,7 @@ SISetStartEntryChain(SISeg * segP, Offset offset) /* SIGetStartEntryChain(segP) - returns the offset */ /************************************************************************/ static Offset -SIGetStartEntryChain(SISeg * segP) +SIGetStartEntryChain(SISeg *segP) { return (segP->startEntryChain); } @@ -301,7 +301,7 @@ SIGetStartEntryChain(SISeg * segP) /* SISetNumEntries(segP, num) sets the current nuber of entries */ /************************************************************************/ static bool -SISetNumEntries(SISeg * segP, int num) +SISetNumEntries(SISeg *segP, int num) { if (num <= MAXNUMMESSAGES) { @@ -318,7 +318,7 @@ SISetNumEntries(SISeg * segP, int num) /* SIGetNumEntries(segP) - returns the current nuber of entries */ /************************************************************************/ static int -SIGetNumEntries(SISeg * segP) +SIGetNumEntries(SISeg *segP) { return (segP->numEntries); } @@ -328,7 +328,7 @@ SIGetNumEntries(SISeg * segP) /* SISetMaxNumEntries(segP, num) sets the maximal number of entries */ /************************************************************************/ static bool -SISetMaxNumEntries(SISeg * segP, int num) +SISetMaxNumEntries(SISeg *segP, int num) { if (num <= MAXNUMMESSAGES) { @@ -346,7 +346,7 @@ SISetMaxNumEntries(SISeg * segP, int num) /* SIGetProcStateLimit(segP, i) returns the limit of read messages */ /************************************************************************/ static int -SIGetProcStateLimit(SISeg * segP, int i) +SIGetProcStateLimit(SISeg *segP, int i) { return (segP->procState[i].limit); } @@ -355,7 +355,7 @@ SIGetProcStateLimit(SISeg * segP, int i) /* SIIncNumEntries(segP, num) increments the current nuber of entries */ /************************************************************************/ static bool -SIIncNumEntries(SISeg * segP, int num) +SIIncNumEntries(SISeg *segP, int num) { if ((segP->numEntries + num) <= MAXNUMMESSAGES) { @@ -372,7 +372,7 @@ SIIncNumEntries(SISeg * segP, int num) /* SIDecNumEntries(segP, num) decrements the current nuber of entries */ /************************************************************************/ static bool -SIDecNumEntries(SISeg * segP, int num) +SIDecNumEntries(SISeg *segP, int num) { if ((segP->numEntries - num) >= 0) { @@ -389,7 +389,7 @@ SIDecNumEntries(SISeg * segP, int num) /* SISetStartFreeSpace(segP, offset) - sets the offset */ /************************************************************************/ static void -SISetStartFreeSpace(SISeg * segP, Offset offset) +SISetStartFreeSpace(SISeg *segP, Offset offset) { segP->startFreeSpace = offset; } @@ -398,7 +398,7 @@ SISetStartFreeSpace(SISeg * segP, Offset offset) /* SIGetStartFreeSpace(segP) - returns the offset */ /************************************************************************/ static Offset -SIGetStartFreeSpace(SISeg * segP) +SIGetStartFreeSpace(SISeg *segP) { return (segP->startFreeSpace); } @@ -409,7 +409,7 @@ SIGetStartFreeSpace(SISeg * segP) /* SIGetFirstDataEntry(segP) returns first data entry */ /************************************************************************/ static SISegEntry * -SIGetFirstDataEntry(SISeg * segP) +SIGetFirstDataEntry(SISeg *segP) { SISegEntry *eP; Offset startChain; @@ -430,7 +430,7 @@ SIGetFirstDataEntry(SISeg * segP) /* SIGetLastDataEntry(segP) returns last data entry in the chain */ /************************************************************************/ static SISegEntry * -SIGetLastDataEntry(SISeg * segP) +SIGetLastDataEntry(SISeg *segP) { SISegEntry *eP; Offset endChain; @@ -450,7 +450,7 @@ SIGetLastDataEntry(SISeg * segP) /* SIGetNextDataEntry(segP, offset) returns next data entry */ /************************************************************************/ static SISegEntry * -SIGetNextDataEntry(SISeg * segP, Offset offset) +SIGetNextDataEntry(SISeg *segP, Offset offset) { SISegEntry *eP; @@ -468,7 +468,7 @@ SIGetNextDataEntry(SISeg * segP, Offset offset) /* SIGetNthDataEntry(segP, n) returns the n-th data entry in chain */ /************************************************************************/ static SISegEntry * -SIGetNthDataEntry(SISeg * segP, +SIGetNthDataEntry(SISeg *segP, int n) /* must range from 1 to MaxMessages */ { SISegEntry *eP; @@ -491,7 +491,7 @@ SIGetNthDataEntry(SISeg * segP, /* SIEntryOffset(segP, entryP) returns the offset for an pointer */ /************************************************************************/ static Offset -SIEntryOffset(SISeg * segP, SISegEntry * entryP) +SIEntryOffset(SISeg *segP, SISegEntry *entryP) { /* relative to B !! */ return ((Offset) ((Pointer) entryP - @@ -504,7 +504,7 @@ SIEntryOffset(SISeg * segP, SISegEntry * entryP) /* SISetDataEntry(segP, data) - sets a message in the segemnt */ /************************************************************************/ bool -SISetDataEntry(SISeg * segP, SharedInvalidData * data) +SISetDataEntry(SISeg *segP, SharedInvalidData *data) { Offset offsetToNewData; SISegEntry *eP, @@ -543,7 +543,7 @@ SISetDataEntry(SISeg * segP, SharedInvalidData * data) /* SIDecProcLimit(segP, num) decrements all process limits */ /************************************************************************/ static void -SIDecProcLimit(SISeg * segP, int num) +SIDecProcLimit(SISeg *segP, int num) { int i; @@ -568,7 +568,7 @@ SIDecProcLimit(SISeg * segP, int num) /* SIDelDataEntry(segP) - free the FIRST entry */ /************************************************************************/ bool -SIDelDataEntry(SISeg * segP) +SIDelDataEntry(SISeg *segP) { SISegEntry *e1P; @@ -600,7 +600,7 @@ SIDelDataEntry(SISeg * segP) /* invalid */ /************************************************************************/ void -SISetProcStateInvalid(SISeg * segP) +SISetProcStateInvalid(SISeg *segP) { int i; @@ -625,7 +625,7 @@ SISetProcStateInvalid(SISeg * segP) /* and executes function */ /************************************************************************/ void -SIReadEntryData(SISeg * segP, +SIReadEntryData(SISeg *segP, int backendId, void (*invalFunction) (), void (*resetFunction) ()) @@ -673,7 +673,7 @@ SIReadEntryData(SISeg * segP, /* SIDelExpiredDataEntries (segP) - removes irrelevant messages */ /************************************************************************/ void -SIDelExpiredDataEntries(SISeg * segP) +SIDelExpiredDataEntries(SISeg *segP) { int min, i, @@ -709,7 +709,7 @@ SIDelExpiredDataEntries(SISeg * segP) /* SISegInit(segP) - initializes the segment */ /************************************************************************/ static void -SISegInit(SISeg * segP) +SISegInit(SISeg *segP) { SISegOffsets *oP; int segSize, diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c index 38cf0b4799..f31f7e208f 100644 --- a/src/backend/storage/large_object/inv_api.c +++ b/src/backend/storage/large_object/inv_api.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.16 1997/09/08 20:56:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.17 1997/09/08 21:47:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -64,14 +64,14 @@ /* non-export function prototypes */ static HeapTuple -inv_newtuple(LargeObjectDesc * obj_desc, Buffer buffer, +inv_newtuple(LargeObjectDesc *obj_desc, Buffer buffer, Page page, char *dbuf, int nwrite); -static HeapTuple inv_fetchtup(LargeObjectDesc * obj_desc, Buffer *bufP); -static int inv_wrnew(LargeObjectDesc * obj_desc, char *buf, int nbytes); +static HeapTuple inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *bufP); +static int inv_wrnew(LargeObjectDesc *obj_desc, char *buf, int nbytes); static int -inv_wrold(LargeObjectDesc * obj_desc, char *dbuf, int nbytes, +inv_wrold(LargeObjectDesc *obj_desc, char *dbuf, int nbytes, HeapTuple htup, Buffer buffer); -static void inv_indextup(LargeObjectDesc * obj_desc, HeapTuple htup); +static void inv_indextup(LargeObjectDesc *obj_desc, HeapTuple htup); static int _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln); /* @@ -267,7 +267,7 @@ inv_open(Oid lobjId, int flags) * Closes an existing large object descriptor. */ void -inv_close(LargeObjectDesc * obj_desc) +inv_close(LargeObjectDesc *obj_desc) { Assert(PointerIsValid(obj_desc)); @@ -313,7 +313,7 @@ inv_destroy(Oid lobjId) */ #ifdef NOT_USED int -inv_stat(LargeObjectDesc * obj_desc, struct pgstat * stbuf) +inv_stat(LargeObjectDesc *obj_desc, struct pgstat * stbuf) { Assert(PointerIsValid(obj_desc)); Assert(stbuf != NULL); @@ -346,7 +346,7 @@ inv_stat(LargeObjectDesc * obj_desc, struct pgstat * stbuf) #endif int -inv_seek(LargeObjectDesc * obj_desc, int offset, int whence) +inv_seek(LargeObjectDesc *obj_desc, int offset, int whence) { int oldOffset; Datum d; @@ -423,7 +423,7 @@ inv_seek(LargeObjectDesc * obj_desc, int offset, int whence) } int -inv_tell(LargeObjectDesc * obj_desc) +inv_tell(LargeObjectDesc *obj_desc) { Assert(PointerIsValid(obj_desc)); @@ -431,7 +431,7 @@ inv_tell(LargeObjectDesc * obj_desc) } int -inv_read(LargeObjectDesc * obj_desc, char *buf, int nbytes) +inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes) { HeapTuple htup; Buffer b; @@ -495,7 +495,7 @@ inv_read(LargeObjectDesc * obj_desc, char *buf, int nbytes) } int -inv_write(LargeObjectDesc * obj_desc, char *buf, int nbytes) +inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes) { HeapTuple htup; Buffer b; @@ -576,7 +576,7 @@ inv_write(LargeObjectDesc * obj_desc, char *buf, int nbytes) * such tuple exists. */ static HeapTuple -inv_fetchtup(LargeObjectDesc * obj_desc, Buffer *bufP) +inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *bufP) { HeapTuple htup; RetrieveIndexResult res; @@ -691,7 +691,7 @@ inv_fetchtup(LargeObjectDesc * obj_desc, Buffer *bufP) * number of bytes actually written to the new tuple. */ static int -inv_wrnew(LargeObjectDesc * obj_desc, char *buf, int nbytes) +inv_wrnew(LargeObjectDesc *obj_desc, char *buf, int nbytes) { Relation hr; HeapTuple ntup; @@ -762,7 +762,7 @@ inv_wrnew(LargeObjectDesc * obj_desc, char *buf, int nbytes) } static int -inv_wrold(LargeObjectDesc * obj_desc, +inv_wrold(LargeObjectDesc *obj_desc, char *dbuf, int nbytes, HeapTuple htup, @@ -939,7 +939,7 @@ inv_wrold(LargeObjectDesc * obj_desc, } static HeapTuple -inv_newtuple(LargeObjectDesc * obj_desc, +inv_newtuple(LargeObjectDesc *obj_desc, Buffer buffer, Page page, char *dbuf, @@ -1061,7 +1061,7 @@ inv_newtuple(LargeObjectDesc * obj_desc, } static void -inv_indextup(LargeObjectDesc * obj_desc, HeapTuple htup) +inv_indextup(LargeObjectDesc *obj_desc, HeapTuple htup) { InsertIndexResult res; Datum v[1]; diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c index 495a11f76a..c0367a992a 100644 --- a/src/backend/storage/lmgr/lmgr.c +++ b/src/backend/storage/lmgr/lmgr.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.7 1997/09/08 02:29:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.8 1997/09/08 21:47:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -48,7 +48,7 @@ #include "storage/bufmgr.h" #include "access/transam.h" /* for AmiTransactionId */ -static void LRelIdAssign(LRelId * lRelId, Oid dbId, Oid relId); +static void LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId); /* ---------------- * @@ -166,7 +166,7 @@ bool DatabaseIdIsMyDatabaseId(Oid databaseId) { return (bool) - (!OidIsValid(databaseId) || databaseId == MyDatabaseId); + (!OidIsValid(databaseId) || databaseId == MyDatabaseId); } #endif @@ -180,7 +180,7 @@ bool LRelIdContainsMyDatabaseId(LRelId lRelId) { return (bool) - (!OidIsValid(lRelId.dbId) || lRelId.dbId == MyDatabaseId); + (!OidIsValid(lRelId.dbId) || lRelId.dbId == MyDatabaseId); } #endif @@ -960,7 +960,7 @@ RelationUnsetLockForExtend(Relation relation) * Create an LRelid --- Why not just pass in a pointer to the storage? */ static void -LRelIdAssign(LRelId * lRelId, Oid dbId, Oid relId) +LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId) { lRelId->dbId = dbId; lRelId->relId = relId; diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index 3bcef3549c..dc6b7bd466 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.13 1997/09/08 02:29:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.14 1997/09/08 21:47:26 momjian Exp $ * * NOTES * Outside modules can create a lock table and acquire/release @@ -49,7 +49,7 @@ #include "access/transam.h" static int -WaitOnLock(LOCKTAB * ltable, LockTableId tableId, LOCK * lock, +Wait |