diff options
author | Bruce Momjian | 1998-01-24 22:50:57 +0000 |
---|---|---|
committer | Bruce Momjian | 1998-01-24 22:50:57 +0000 |
commit | f609fa43a812b7a6c8ffa9c788d17834cc8ca179 (patch) | |
tree | 265e80ab32f4ae05a0724bdf96031484e369422a | |
parent | fcf01a55aac61d76c39c6709ad8345b6aef4ef89 (diff) |
Fix prototypes so they don't look like function definitions.
82 files changed, 211 insertions, 421 deletions
diff --git a/src/include/access/genam.h b/src/include/access/genam.h index 54dc7753b2..7ef0a67424 100644 --- a/src/include/access/genam.h +++ b/src/include/access/genam.h @@ -25,31 +25,25 @@ extern Relation index_open(Oid relationId); extern Relation index_openr(char *relationName); extern void index_close(Relation relation); -extern InsertIndexResult -index_insert(Relation relation, +extern InsertIndexResult index_insert(Relation relation, Datum *datum, char *nulls, ItemPointer heap_t_ctid, Relation heapRel); extern void index_delete(Relation relation, ItemPointer indexItem); -extern IndexScanDesc -index_beginscan(Relation relation, bool scanFromEnd, +extern IndexScanDesc index_beginscan(Relation relation, bool scanFromEnd, uint16 numberOfKeys, ScanKey key); extern void index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key); extern void index_endscan(IndexScanDesc scan); -extern RetrieveIndexResult -index_getnext(IndexScanDesc scan, +extern RetrieveIndexResult index_getnext(IndexScanDesc scan, ScanDirection direction); -extern RegProcedure -index_getprocid(Relation irel, AttrNumber attnum, +extern RegProcedure index_getprocid(Relation irel, AttrNumber attnum, uint16 procnum); -extern Datum -GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc, +extern Datum GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc, int attOff, AttrNumber attrNums[], FuncIndexInfo *fInfo, bool *attNull, Buffer buffer); /* in genam.c */ -extern IndexScanDesc -RelationGetIndexScan(Relation relation, bool scanFromEnd, +extern IndexScanDesc RelationGetIndexScan(Relation relation, bool scanFromEnd, uint16 numberOfKeys, ScanKey key); extern void IndexScanMarkPosition(IndexScanDesc scan); extern void IndexScanRestorePosition(IndexScanDesc scan); diff --git a/src/include/access/gist.h b/src/include/access/gist.h index 15294ce06c..4c665aeaec 100644 --- a/src/include/access/gist.h +++ b/src/include/access/gist.h @@ -188,21 +188,18 @@ typedef struct intrange int flag; } INTRANGE; -extern void -gistbuild(Relation heap, +extern void gistbuild(Relation heap, Relation index, int natts, AttrNumber *attnum, IndexStrategy istrat, uint16 pint, Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo); -extern InsertIndexResult -gistinsert(Relation r, Datum *datum, +extern InsertIndexResult gistinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel); extern void _gistdump(Relation r); extern void gistfreestack(GISTSTACK *s); extern void initGISTstate(GISTSTATE *giststate, Relation index); -extern void -gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, +extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r, Page pg, OffsetNumber o, int b, bool l); extern StrategyNumber RelationGetGISTStrategy(Relation, AttrNumber, RegProcedure); diff --git a/src/include/access/gistscan.h b/src/include/access/gistscan.h index 071238bd17..e38b26d990 100644 --- a/src/include/access/gistscan.h +++ b/src/include/access/gistscan.h @@ -16,8 +16,7 @@ #include <storage/block.h> #include <utils/rel.h> -extern IndexScanDesc -gistbeginscan(Relation r, bool fromEnd, +extern IndexScanDesc gistbeginscan(Relation r, bool fromEnd, uint16 nkeys, ScanKey key); extern void gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key); extern void gistmarkpos(IndexScanDesc s); diff --git a/src/include/access/giststrat.h b/src/include/access/giststrat.h index 1007dd3ec2..f5e6e45d77 100644 --- a/src/include/access/giststrat.h +++ b/src/include/access/giststrat.h @@ -15,8 +15,7 @@ #include <access/strat.h> #include <utils/rel.h> -extern StrategyNumber -RelationGetGISTStrategy(Relation r, +extern StrategyNumber RelationGetGISTStrategy(Relation r, AttrNumber attnum, RegProcedure proc); #endif /* GISTSTRAT_H */ diff --git a/src/include/access/hash.h b/src/include/access/hash.h index dfb91936ca..0c7a7cab5c 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -248,16 +248,13 @@ typedef HashItemData *HashItem; /* public routines */ -extern void -hashbuild(Relation heap, Relation index, int natts, +extern void hashbuild(Relation heap, Relation index, int natts, AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo); -extern InsertIndexResult -hashinsert(Relation rel, Datum *datum, char *nulls, +extern InsertIndexResult hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel); extern char *hashgettuple(IndexScanDesc scan, ScanDirection dir); -extern char * -hashbeginscan(Relation rel, bool fromEnd, uint16 keysz, +extern char * hashbeginscan(Relation rel, bool fromEnd, uint16 keysz, ScanKey scankey); extern void hashrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey); extern void hashendscan(IndexScanDesc scan); @@ -288,11 +285,9 @@ extern InsertIndexResult _hash_doinsert(Relation rel, HashItem hitem); /* hashovfl.c */ extern Buffer _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf); extern Buffer _hash_freeovflpage(Relation rel, Buffer ovflbuf); -extern int32 -_hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum, +extern int32 _hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum, int32 nbits, int32 ndx); -extern void -_hash_squeezebucket(Relation rel, HashMetaPage metap, +extern void _hash_squeezebucket(Relation rel, HashMetaPage metap, Bucket bucket); @@ -302,8 +297,7 @@ extern Buffer _hash_getbuf(Relation rel, BlockNumber blkno, int access); extern void _hash_relbuf(Relation rel, Buffer buf, int access); extern void _hash_wrtbuf(Relation rel, Buffer buf); extern void _hash_wrtnorelbuf(Relation rel, Buffer buf); -extern Page -_hash_chgbufaccess(Relation rel, Buffer *bufp, int from_access, +extern Page _hash_chgbufaccess(Relation rel, Buffer *bufp, int from_access, int to_access); extern void _hash_pageinit(Page page, Size size); extern void _hash_pagedel(Relation rel, ItemPointer tid); @@ -317,19 +311,16 @@ extern void _hash_adjscans(Relation rel, ItemPointer tid); /* hashsearch.c */ -extern void -_hash_search(Relation rel, int keysz, ScanKey scankey, +extern void _hash_search(Relation rel, int keysz, ScanKey scankey, Buffer *bufP, HashMetaPage metap); extern RetrieveIndexResult _hash_next(IndexScanDesc scan, ScanDirection dir); extern RetrieveIndexResult _hash_first(IndexScanDesc scan, ScanDirection dir); -extern bool -_hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, +extern bool _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf); /* hashutil.c */ -extern ScanKey -_hash_mkscankey(Relation rel, IndexTuple itup, +extern ScanKey _hash_mkscankey(Relation rel, IndexTuple itup, HashMetaPage metap); extern void _hash_freeskey(ScanKey skey); extern bool _hash_checkqual(IndexScanDesc scan, IndexTuple itup); diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 17becd4e24..3f41b63a04 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -1,4 +1,4 @@ -/*------------------------------------------------------------------------- + *------------------------------------------------------------------------- * * heapam.h-- * POSTGRES heap access method definitions. @@ -121,26 +121,22 @@ extern void doinsert(Relation relation, HeapTuple tup); extern Relation heap_open(Oid relationId); extern Relation heap_openr(char *relationName); extern void heap_close(Relation relation); -extern HeapScanDesc -heap_beginscan(Relation relation, int atend, +extern HeapScanDesc heap_beginscan(Relation relation, int atend, bool seeself, unsigned nkeys, ScanKey key); extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key); extern void heap_endscan(HeapScanDesc sdesc); extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer *b); -extern HeapTuple -heap_fetch(Relation relation, bool seeself, ItemPointer tid, Buffer *b); +extern HeapTuple heap_fetch(Relation relation, bool seeself, ItemPointer tid, Buffer *b); extern Oid heap_insert(Relation relation, HeapTuple tup); extern int heap_delete(Relation relation, ItemPointer tid); -extern int -heap_replace(Relation relation, ItemPointer otid, +extern int heap_replace(Relation relation, ItemPointer otid, HeapTuple tup); extern void heap_markpos(HeapScanDesc sdesc); extern void heap_restrpos(HeapScanDesc sdesc); /* in common/heaptuple.c */ extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]); -extern void -DataFill(char *data, TupleDesc tupleDesc, +extern void DataFill(char *data, TupleDesc tupleDesc, Datum value[], char nulls[], uint16 *infomask, bits8 *bit); extern int heap_attisnull(HeapTuple tup, int attnum); @@ -150,11 +146,9 @@ extern Datum heap_getsysattr(HeapTuple tup, Buffer b, int attnum); extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc att, bool *isnull); extern HeapTuple heap_copytuple(HeapTuple tuple); -extern HeapTuple -heap_formtuple(TupleDesc tupleDescriptor, +extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor, Datum value[], char nulls[]); -extern HeapTuple -heap_modifytuple(HeapTuple tuple, Buffer buffer, +extern HeapTuple heap_modifytuple(HeapTuple tuple, Buffer buffer, Relation relation, Datum replValue[], char replNull[], char repl[]); HeapTuple heap_addheader(uint32 natts, int structlen, char *structure); @@ -163,8 +157,7 @@ extern void PrintHeapAccessStatistics(HeapAccessStatistics stats); extern void initam(void); /* hio.c */ -extern void -RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, +extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, HeapTuple tuple); extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); diff --git a/src/include/access/hio.h b/src/include/access/hio.h index 4e7d88eb32..4a4b70fb91 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -17,8 +17,7 @@ #include <utils/rel.h> -extern void -RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, +extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, HeapTuple tuple); extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); diff --git a/src/include/access/iqual.h b/src/include/access/iqual.h index e4d00d690b..e8c519e2f2 100644 --- a/src/include/access/iqual.h +++ b/src/include/access/iqual.h @@ -24,8 +24,7 @@ extern int NIndexTupleProcessed; -extern bool -index_keytest(IndexTuple tuple, TupleDesc tupdesc, +extern bool index_keytest(IndexTuple tuple, TupleDesc tupdesc, int scanKeySize, ScanKey key); #endif /* IQUAL_H */ diff --git a/src/include/access/istrat.h b/src/include/access/istrat.h index d552d43098..6437af071e 100644 --- a/src/include/access/istrat.h +++ b/src/include/access/istrat.h @@ -47,23 +47,18 @@ */ #define IndexStrategyIsValid(s) PointerIsValid(s) -extern StrategyMap -IndexStrategyGetStrategyMap(IndexStrategy indexStrategy, +extern StrategyMap IndexStrategyGetStrategyMap(IndexStrategy indexStrategy, StrategyNumber maxStrategyNum, AttrNumber attrNum); -extern Size -AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber, +extern Size AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber, StrategyNumber maxStrategyNumber); -extern StrategyNumber -RelationGetStrategy(Relation relation, +extern StrategyNumber RelationGetStrategy(Relation relation, AttrNumber attributeNumber, StrategyEvaluation evaluation, RegProcedure procedure); -extern bool -RelationInvokeStrategy(Relation relation, +extern bool RelationInvokeStrategy(Relation relation, StrategyEvaluation evaluation, AttrNumber attributeNumber, StrategyNumber strategy, Datum left, Datum right); -extern void -IndexSupportInitialize(IndexStrategy indexStrategy, +extern void IndexSupportInitialize(IndexStrategy indexStrategy, RegProcedure *indexSupport, Oid indexObjectId, Oid accessMethodObjectId, StrategyNumber maxStrategyNumber, StrategyNumber maxSupportNumber, AttrNumber maxAttributeNumber); diff --git a/src/include/access/itup.h b/src/include/access/itup.h index 0e78226f8f..78bbcac9bb 100644 --- a/src/include/access/itup.h +++ b/src/include/access/itup.h @@ -89,14 +89,11 @@ typedef struct PredInfo /* indextuple.h */ -extern IndexTuple -index_formtuple(TupleDesc tupleDescriptor, +extern IndexTuple index_formtuple(TupleDesc tupleDescriptor, Datum value[], char null[]); -extern Datum -index_getattr(IndexTuple tuple, AttrNumber attNum, +extern Datum index_getattr(IndexTuple tuple, AttrNumber attNum, TupleDesc tupDesc, bool *isNullOutP); -extern RetrieveIndexResult -FormRetrieveIndexResult(ItemPointer indexItemPointer, +extern RetrieveIndexResult FormRetrieveIndexResult(ItemPointer indexItemPointer, ItemPointer heapItemPointer); extern void CopyIndexTuple(IndexTuple source, IndexTuple *target); diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 0d7c441d4c..653417f281 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -213,13 +213,11 @@ typedef struct BTPageState /* * prototypes for functions in nbtinsert.c */ -extern InsertIndexResult -_bt_doinsert(Relation rel, BTItem btitem, +extern InsertIndexResult _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel); /* default is to allow duplicates */ -extern bool -_bt_itemcmp(Relation rel, Size keysz, BTItem item1, BTItem item2, +extern bool _bt_itemcmp(Relation rel, Size keysz, BTItem item1, BTItem item2, StrategyNumber strat); /* @@ -241,16 +239,13 @@ extern void _bt_pagedel(Relation rel, ItemPointer tid); */ extern bool BuildingBtree; /* in nbtree.c */ -extern void -btbuild(Relation heap, Relation index, int natts, +extern void btbuild(Relation heap, Relation index, int natts, AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo); -extern InsertIndexResult -btinsert(Relation rel, Datum *datum, char *nulls, +extern InsertIndexResult btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel); extern char *btgettuple(IndexScanDesc scan, ScanDirection dir); -extern char * -btbeginscan(Relation rel, bool fromEnd, uint16 keysz, +extern char * btbeginscan(Relation rel, bool fromEnd, uint16 keysz, ScanKey scankey); extern void btrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey); @@ -270,17 +265,13 @@ extern void _bt_adjscans(Relation rel, ItemPointer tid, int op); /* * prototypes for functions in nbtsearch.c */ -extern BTStack -_bt_search(Relation rel, int keysz, ScanKey scankey, +extern BTStack _bt_search(Relation rel, int keysz, ScanKey scankey, Buffer *bufP); -extern Buffer -_bt_moveright(Relation rel, Buffer buf, int keysz, +extern Buffer _bt_moveright(Relation rel, Buffer buf, int keysz, ScanKey scankey, int access); -extern bool -_bt_skeycmp(Relation rel, Size keysz, ScanKey scankey, +extern bool _bt_skeycmp(Relation rel, Size keysz, ScanKey scankey, Page page, ItemId itemid, StrategyNumber strat); -extern OffsetNumber -_bt_binsrch(Relation rel, Buffer buf, int keysz, +extern OffsetNumber _bt_binsrch(Relation rel, Buffer buf, int keysz, ScanKey scankey, int srchtype); extern RetrieveIndexResult _bt_next(IndexScanDesc scan, ScanDirection dir); extern RetrieveIndexResult _bt_first(IndexScanDesc scan, ScanDirection dir); @@ -289,11 +280,9 @@ extern bool _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir); /* * prototypes for functions in nbtstrat.c */ -extern StrategyNumber -_bt_getstrat(Relation rel, AttrNumber attno, +extern StrategyNumber _bt_getstrat(Relation rel, AttrNumber attno, RegProcedure proc); -extern bool -_bt_invokestrat(Relation rel, AttrNumber attno, +extern bool _bt_invokestrat(Relation rel, AttrNumber attno, StrategyNumber strat, Datum left, Datum right); /* diff --git a/src/include/access/rtree.h b/src/include/access/rtree.h index 0cd3470a8c..76cc60cc08 100644 --- a/src/include/access/rtree.h +++ b/src/include/access/rtree.h @@ -114,34 +114,29 @@ extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir); * RTree code. * Defined in access/index-rtree/ */ -extern InsertIndexResult -rtinsert(Relation r, Datum *datum, char *nulls, +extern InsertIndexResult rtinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel); extern char *rtdelete(Relation r, ItemPointer tid); extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir); -extern IndexScanDesc -rtbeginscan(Relation r, bool fromEnd, uint16 nkeys, +extern IndexScanDesc rtbeginscan(Relation r, bool fromEnd, uint16 nkeys, ScanKey key); extern void rtendscan(IndexScanDesc s); extern void rtmarkpos(IndexScanDesc s); extern void rtrestrpos(IndexScanDesc s); extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key); -extern void -rtbuild(Relation heap, Relation index, int natts, +extern void rtbuild(Relation heap, Relation index, int natts, AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo); extern void _rtdump(Relation r); /* rtscan.c */ -extern void -rtadjscans(Relation r, int op, BlockNumber blkno, +extern void rtadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum); /* rtstrat.h */ -extern RegProcedure -RTMapOperator(Relation r, AttrNumber attnum, +extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum, RegProcedure proc); #endif /* RTREE_H */ diff --git a/src/include/access/rtstrat.h b/src/include/access/rtstrat.h index 75c07c7fee..1bdae46737 100644 --- a/src/include/access/rtstrat.h +++ b/src/include/access/rtstrat.h @@ -16,8 +16,7 @@ #include <utils/rel.h> #include <access/attnum.h> -extern RegProcedure -RTMapOperator(Relation r, AttrNumber attnum, +extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum, RegProcedure proc); #endif /* RTSTRAT_H */ diff --git a/src/include/access/skey.h b/src/include/access/skey.h index e6e45d4135..71be72b203 100644 --- a/src/include/access/skey.h +++ b/src/include/access/skey.h @@ -46,8 +46,7 @@ typedef ScanKeyData *ScanKey; * prototypes for functions in access/common/scankey.c */ extern void ScanKeyEntrySetIllegal(ScanKey entry); -extern void -ScanKeyEntryInitialize(ScanKey entry, bits16 flags, +extern void ScanKeyEntryInitialize(ScanKey entry, bits16 flags, AttrNumber attributeNumber, RegProcedure procedure, Datum argument); #endif /* SKEY_H */ diff --git a/src/include/access/transam.h b/src/include/access/transam.h index 8213921dc1..da7c1e41c6 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -130,14 +130,11 @@ extern void TransactionIdAbort(TransactionId transactionId); /* in transam/transsup.c */ extern void AmiTransactionOverride(bool flag); -extern void -TransComputeBlockNumber(Relation relation, +extern void TransComputeBlockNumber(Relation relation, TransactionId transactionId, BlockNumber *blockNumberOutP); -extern XidStatus -TransBlockNumberGetXidStatus(Relation relation, +extern XidStatus TransBlockNumberGetXidStatus(Relation relation, BlockNumber blockNumber, TransactionId xid, bool *failP); -extern void -TransBlockNumberSetXidStatus(Relation relation, +extern void TransBlockNumberSetXidStatus(Relation relation, BlockNumber blockNumber, TransactionId xid, XidStatus xstatus, bool *failP); diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h index 05002becd2..83fb5c535d 100644 --- a/src/include/access/tupdesc.h +++ b/src/include/access/tupdesc.h @@ -65,8 +65,7 @@ extern TupleDesc CreateTupleDescCopyConstr(TupleDesc tupdesc); extern void FreeTupleDesc(TupleDesc tupdesc); -extern bool -TupleDescInitEntry(TupleDesc desc, +extern bool TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, char *attributeName, char *typeName, diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/bootstrap.h index 37cfccdfe7..8594540e4e 100644 --- a/src/include/bootstrap/bootstrap.h +++ b/src/include/bootstrap/bootstrap.h @@ -33,8 +33,7 @@ extern int numattr; extern int DebugMode; extern int BootstrapMain(int ac, char *av[]); -extern void -index_register(char *heap, +extern void index_register(char *heap, char *ind, int natts, AttrNumber *attnos, diff --git a/src/include/c.h b/src/include/c.h index 28697b0bbb..859927efbc 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -732,8 +732,7 @@ extern Exception BadArg; extern Exception BadState; /* in utils/error/assert.c */ -extern int -ExceptionalCondition(char *conditionName, +extern int ExceptionalCondition(char *conditionName, Exception *exceptionP, char *details, char *fileName, int lineNumber); diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index b80ad42ca1..ef515a9c59 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -17,8 +17,7 @@ extern Relation heap_create(char *relname, TupleDesc att); -extern Oid -heap_create_with_catalog(char relname[], TupleDesc tupdesc); +extern Oid heap_create_with_catalog(char relname[], TupleDesc tupdesc); extern void heap_destroy_with_catalog(char relname[]); extern void heap_destroy(Relation r); diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h index e1548a6b67..5e237e38e2 100644 --- a/src/include/catalog/index.h +++ b/src/include/catalog/index.h @@ -18,19 +18,15 @@ #include <access/itup.h> #include <access/funcindex.h> -extern Form_pg_am - AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId); +extern Form_pg_am AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId); -extern void - UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate); +extern void UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate); -extern void -InitIndexStrategy(int numatts, +extern void InitIndexStrategy(int numatts, Relation indexRelation, Oid accessMethodObjectId); -extern void -index_create(char *heapRelationName, +extern void index_create(char *heapRelationName, char *indexRelationName, FuncIndexInfo *funcInfo, List *attributeList, @@ -46,20 +42,17 @@ index_create(char *heapRelationName, extern void index_destroy(Oid indexId); -extern void -FormIndexDatum(int numberOfAttributes, +extern void FormIndexDatum(int numberOfAttributes, AttrNumber attributeNumber[], HeapTuple heapTuple, TupleDesc heapDescriptor, Buffer buffer, Datum *datum, char *nullv, FuncIndexInfoPtr fInfo); extern void UpdateStats(Oid relid, long reltuples, bool hasindex); -extern void -FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot, +extern void FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot, TupleDesc tupdesc, Buffer buffer); -extern void -index_build(Relation heapRelation, Relation indexRelation, +extern void index_build(Relation heapRelation, Relation indexRelation, int numberOfAttributes, AttrNumber attributeNumber[], uint16 parameterCount, Datum *parameter, FuncIndexInfo *funcInfo, PredInfo *predInfo); diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index 10a730f095..d20d3a653a 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -66,25 +66,21 @@ extern char *IndexedCatalogNames[]; */ extern void CatalogOpenIndices(int nIndices, char *names[], Relation idescs[]); extern void CatalogCloseIndices(int nIndices, Relation *idescs); -extern void -CatalogIndexInsert(Relation *idescs, +extern void CatalogIndexInsert(Relation *idescs, int nIndices, Relation heapRelation, HeapTuple heapTuple); extern bool CatalogHasIndex(char *catName, Oid catId); -extern HeapTuple -AttributeNameIndexScan(Relation heapRelation, +extern HeapTuple AttributeNameIndexScan(Relation heapRelation, Oid relid, char *attname); -extern HeapTuple -AttributeNumIndexScan(Relation heapRelation, +extern HeapTuple AttributeNumIndexScan(Relation heapRelation, Oid relid, AttrNumber attnum); extern HeapTuple ProcedureOidIndexScan(Relation heapRelation, Oid procId); -extern HeapTuple -ProcedureNameIndexScan(Relation heapRelation, +extern HeapTuple ProcedureNameIndexScan(Relation heapRelation, char *procName, int nargs, Oid *argTypes); extern HeapTuple ProcedureSrcIndexScan(Relation heapRelation, text *procSrc); extern HeapTuple TypeOidIndexScan(Relation heapRelation, Oid typeId); diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h index 1116e5f3fa..2c79a18997 100644 --- a/src/include/catalog/pg_aggregate.h +++ b/src/include/catalog/pg_aggregate.h @@ -129,8 +129,7 @@ DATA(insert OID = 0 ( count PGUID - int4inc - 0 0 23 23 _null_ 0 )); /* * prototypes for functions in pg_aggregate.c */ -extern void -AggregateCreate(char *aggName, +extern void AggregateCreate(char *aggName, char *aggtransfn1Name, char *aggtransfn2Name, char *aggfinalfnName, @@ -139,8 +138,7 @@ AggregateCreate(char *aggName, char *aggtransfn2typeName, char *agginitval1, char *agginitval2); -extern char * -AggNameGetInitVal(char *aggName, Oid basetype, +extern char * AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull); #endif /* PG_AGGREGATE_H */ diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index e64cad174f..49be00c7be 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -652,8 +652,7 @@ DATA(insert OID = 1585 ( "/" PGUID 0 b t f 1186 1186 1186 0 0 0 0 timespan /* * function prototypes */ -extern void -OperatorCreate(char *operatorName, +extern void OperatorCreate(char *operatorName, char *leftTypeName, char *rightTypeName, char *procedureName, diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index e994ba8aa7..163001fb66 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -2054,8 +2054,7 @@ DESCR("sequence current value"); /* * prototypes for functions pg_proc.c */ -extern Oid -ProcedureCreate(char *procedureName, +extern Oid ProcedureCreate(char *procedureName, bool returnsSet, char *returnTypeName, char *languageName, diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index 5bb860acdb..e2681fb346 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -372,8 +372,7 @@ DESCR("limited-range ISO-format date and time"); */ extern Oid TypeGet(char *typeName, bool *defined); extern Oid TypeShellMake(char *typeName); -extern Oid -TypeCreate(char *typeName, +extern Oid TypeCreate(char *typeName, Oid relationOid, int16 internalSize, int16 externalSize, diff --git a/src/include/commands/command.h b/src/include/commands/command.h index aabb9df81d..18ec1ba81c 100644 --- a/src/include/commands/command.h +++ b/src/include/commands/command.h @@ -26,8 +26,7 @@ extern MemoryContext PortalExecutorHeapMemory; * BadArg if forward invalid. * "WARN" if portal not found. */ -extern void -PerformPortalFetch(char *name, bool forward, int count, +extern void PerformPortalFetch(char *name, bool forward, int count, char *tag, CommandDest dest); /* @@ -42,8 +41,7 @@ extern void PortalCleanup(Portal portal); * PerformAddAttribute -- * Performs the POSTQUEL function ADD. */ -extern void -PerformAddAttribute(char *relationName, char *userName, +extern void PerformAddAttribute(char *relationName, char *userName, bool inh, ColumnDef *colDef); #endif /* COMMAND_H */ diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index 4d9a80ec39..476d521e56 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -19,8 +19,7 @@ /* * prototypes in defind.c */ -extern void -DefineIndex(char *heapRelationName, +extern void DefineIndex(char *heapRelationName, char *indexRelationName, char *accessMethodName, List *attributeList, @@ -28,8 +27,7 @@ DefineIndex(char *heapRelationName, bool unique, Expr *predicate, List *rangetable); -extern void -ExtendIndex(char *indexRelationName, +extern void ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable); extern void RemoveIndex(char *name); @@ -47,8 +45,7 @@ extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest); * prototypes in remove.c */ extern void RemoveFunction(char *functionName, int nargs, List *argNameList); -extern void -RemoveOperator(char *operatorName, +extern void RemoveOperator(char *operatorName, char *typeName1, char *typeName2); extern void RemoveType(char *typeName); extern void RemoveAggregate(char *aggName, char *aggType); diff --git a/src/include/commands/rename.h b/src/include/commands/rename.h index 3866cfeba1..42cb4686e8 100644 --- a/src/include/commands/rename.h +++ b/src/include/commands/rename.h @@ -13,14 +13,12 @@ #ifndef RENAME_H #define RENAME_H -extern void -renameatt(char *relname, +extern void renameatt(char *relname, char *oldattname, char *newattname, char *userName, int recurse); -extern void -renamerel(char *oldrelname, +extern void renamerel(char *oldrelname, char *newrelname); #endif /* RENAME_H */ diff --git a/src/include/executor/execdesc.h b/src/include/executor/execdesc.h index c9d5e31fba..1e9bace3e7 100644 --- a/src/include/executor/execdesc.h +++ b/src/include/executor/execdesc.h @@ -33,8 +33,7 @@ typedef struct QueryDesc } QueryDesc; /* in pquery.c */ -extern QueryDesc * -CreateQueryDesc(Query *parsetree, Plan *plantree, +extern QueryDesc * CreateQueryDesc(Query *parsetree, Plan *plantree, CommandDest dest); #endif /* EXECDESC_H */ diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index c0ce0fad70..f74f7f4410 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -18,12 +18,10 @@ #include "nodes/primnodes.h" #include "utils/syscache.h" -extern Datum -ProjectAttribute(TupleDesc TD, TargetEntry *tlist, +extern Datum ProjectAttribute(TupleDesc TD, TargetEntry *tlist, HeapTuple tup, bool *isnullP); -extern Datum -postquel_function(Func *funcNode, char **args, +extern Datum postquel_function(Func *funcNode, char **args, bool *isNull, bool *isDone); #endif /* FUNCTIONS_H */ diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h index 424641c25d..1af61dbb31 100644 --- a/src/include/executor/nodeHash.h +++ b/src/include/executor/nodeHash.h @@ -26,15 +26,12 @@ extern bool ExecInitHash(Hash *node, EState *estate, Plan *parent); extern int ExecCountSlotsHash(Hash *node); extern void ExecEndHash(Hash *node); extern HashJoinTable ExecHashTableCreate(Hash *node); -extern void -ExecHashTableInsert(HashJoinTable hashtable, ExprContext *econtext, +extern void ExecHashTableInsert(HashJoinTable hashtable, ExprContext *econtext, Var *hashkey, File *batches); extern void ExecHashTableDestroy(HashJoinTable hashtable); -extern int -ExecHashGetBucket(HashJoinTable hashtable, ExprContext *econtext, +extern int ExecHashGetBucket(HashJoinTable hashtable, ExprContext *econtext, Var *hashkey); -extern HeapTuple -ExecScanHashBucket(HashJoinState *hjstate, HashBucket bucket, +extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate, HashBucket bucket, HeapTuple curtuple, List *hjclauses, ExprContext *econtext); extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples); diff --git a/src/include/executor/nodeHashjoin.h b/src/include/executor/nodeHashjoin.h index 12da194993..af082222b8 100644 --- a/src/include/executor/nodeHashjoin.h +++ b/src/include/executor/nodeHashjoin.h @@ -21,8 +21,7 @@ extern TupleTableSlot *ExecHashJoin(HashJoin *node); extern bool ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent); extern int ExecCountSlotsHashJoin(HashJoin *node); extern void ExecEndHashJoin(HashJoin *node); -extern char * -ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer, +extern char * ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer, File file, char *position); diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index 91986ac8df..ef8b268faa 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -78,8 +78,7 @@ extern void *SPI_prepare(char *src, int nargs, Oid * argtypes); extern void *SPI_saveplan(void *plan); extern HeapTuple SPI_copytuple(HeapTuple tuple); -extern HeapTuple -SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, +extern HeapTuple SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum, Datum * Values, char *Nulls); extern int SPI_fnumber(TupleDesc tupdesc, char *fname); extern char *SPI_fname(TupleDesc tupdesc, int fnumber); diff --git a/src/include/lib/qsort.h b/src/include/lib/qsort.h index 6675a948df..9abb8e7528 100644 --- a/src/include/lib/qsort.h +++ b/src/include/lib/qsort.h @@ -14,8 +14,7 @@ #define QSORT_H -extern void -pg_qsort(void *bot, +extern void pg_qsort(void *bot, size_t nmemb, size_t size, int (*compar) (void *, void *)); diff --git a/src/include/libpq/hba.h b/src/include/libpq/hba.h index 0e0563b41d..ca7fe08ea0 100644 --- a/src/include/libpq/hba.h +++ b/src/include/libpq/hba.h @@ -42,8 +42,7 @@ enum Userauth Password }; -extern int -hba_recvauth(const Port *port, const char database[], const char user[], +extern int hba_recvauth(const Port *port, const char database[], const char user[], const char DataDir[]); void find_hba_entry(const char DataDir[], const struct in_addr ip_addr, diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 5ce058a282..416fb5e343 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -35,15 +35,13 @@ extern void be_portalpush(PortalEntry *entry); extern PortalEntry *be_portalpop(void); extern PortalEntry *be_currentportal(void); extern PortalEntry *be_newportal(void); -extern void -be_typeinit(PortalEntry *entry, TupleDesc attrs, +extern void be_typeinit(PortalEntry *entry, TupleDesc attrs, int natts); extern void be_printtup(HeapTuple tuple, TupleDesc typeinfo); /* in be-pqexec.c */ -extern char * -PQfn(int fnid, int *result_buf, int result_len, int result_is_int, +extern char * PQfn(int fnid, int *result_buf, int result_len, int result_is_int, PQArgBlock *args, int nargs); extern char *PQexec(char *query); extern int pqtest_PQexec(char *q); diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h index 897ccbc784..b720443a73 100644 --- a/src/include/libpq/libpq.h +++ b/src/include/libpq/libpq.h @@ -179,11 +179,9 @@ extern int PQninstancesGroup(PortalBuffer *portal, int group_index); extern int PQnfieldsGroup(PortalBuffer *portal, int group_index); extern int PQfnumberGroup(PortalBuffer *portal, int group_index, char *field_name); extern char *PQfnameGroup(PortalBuffer *portal, int group_index, int field_number); -extern int -PQftypeGroup(PortalBuffer *portal, int group_index, +extern int PQftypeGroup(PortalBuffer *portal, int group_index, int field_number); -extern int -PQfsizeGroup(PortalBuffer *portal, int group_index, +extern int PQfsizeGroup(PortalBuffer *portal, int group_index, int field_number); extern GroupBuffer *PQgroup(PortalBuffer *portal, int tuple_index); extern int PQgetgroup(PortalBuffer *portal, int tuple_index); @@ -250,8 +248,7 @@ extern int pq_sendoob(char *msg, int len); extern int pq_recvoob(char *msgPtr, int *lenPtr); extern int pq_getinaddr(struct sockaddr_in * sin, char *host, int port); extern int pq_getinserv(struct sockaddr_in * sin, char *host, char *serv); -extern int -pq_connect(char *dbname, char *user, char *args, char *hostName, +extern int pq_connect(char *dbname, char *user, char *args, char *hostName, char *debugTty, char *execFile, short portName); extern int StreamOpen(char *hostName, short portName, Port *port); extern void pq_regoob(void (*fptr) ()); diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index e701f44df5..0c86513513 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -164,8 +164,7 @@ int pqPutByte(int, FILE *); * prototypes for functions in pqpacket.c */ extern int PacketReceive(Port *port, PacketBuf *buf, char nonBlocking); -extern int -PacketSend(Port *port, PacketBuf *buf, +extern int PacketSend(Port *port, PacketBuf *buf, PacketLen len, char nonBlocking); /* extern PacketBuf* StartupInfo2PacketBuf(StartupInfo*); */ diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h index 1b9e3f0cc0..5d1537cfe7 100644 --- a/src/include/nodes/makefuncs.h +++ b/src/include/nodes/makefuncs.h @@ -16,23 +16,20 @@ #include <nodes/primnodes.h> #include <utils/fcache.h> -extern Oper * -makeOper(Oid opno, +extern Oper * makeOper(Oid opno, Oid opid, Oid opresulttype, int opsize, FunctionCachePtr op_fcache); -extern Var * -makeVar(Index varno, +extern Var * makeVar(Index varno, AttrNumber varattno, Oid vartype, Index varlevelsup, Index varnoold, AttrNumber varoattno); -extern Resdom * -makeResdom(AttrNumber resno, +extern Resdom * makeResdom(AttrNumber resno, Oid restype, int reslen, char *resname, @@ -40,8 +37,7 @@ makeResdom(AttrNumber resno, Oid reskeyop, int resjunk); -extern Const * -makeConst(Oid consttype, +extern Const * makeConst(Oid consttype, Size constlen, Datum constvalue, bool constisnull, diff --git a/src/include/nodes/print.h b/src/include/nodes/print.h index 234a5e2279..eaa3c1264e 100644 --- a/src/include/nodes/print.h +++ b/src/include/nodes/print.h @@ -26,8 +26,7 @@ extern void print_expr(Node *expr, List *rtable); extern void print_keys(List *keys, List *rtable); extern void print_tl(List *tlist, List *rtable); extern void print_slot(TupleTableSlot *slot); -extern void -print_plan_recursive(Plan *p, Query *parsetree, +extern void print_plan_recursive(Plan *p, Query *parsetree, int indentLevel, char *label); extern void print_plan(Plan *p, Query *parsetree); diff --git a/src/include/optimizer/clauseinfo.h b/src/include/optimizer/clauseinfo.h index 6bd1c8ae8c..05382f888c 100644 --- a/src/include/optimizer/clauseinfo.h +++ b/src/include/optimizer/clauseinfo.h @@ -18,11 +18,9 @@ extern bool valid_or_clause(CInfo *clauseinfo); extern List *get_actual_clauses(List *clauseinfo_list); -extern void -get_relattvals(List *clauseinfo_list, List **attnos, +extern void get_relattvals(List *clauseinfo_list, List **attnos, List **values, List **flags); -extern void -get_joinvars(Oid relid, List *clauseinfo_list, +extern void get_joinvars(Oid relid, List *clauseinfo_list, List **attnos, List **values, List **flags); extern List *get_opnos(List *clauseinfo_list); diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h index 6c37ffce3b..5f6eade391 100644 --- a/src/include/optimizer/clauses.h +++ b/src/include/optimizer/clauses.h @@ -42,11 +42,9 @@ extern bool join_clause_p(Node *clause); extern bool qual_clause_p(Node *clause); extern void fix_opid(Node *clause); extern List *fix_opids(List *clauses); -extern void -get_relattval(Node *clause, int *relid, +extern void get_relattval(Node *clause, int *relid, AttrNumber *attno, Datum *constval, int *flag); -extern void -get_rels_atts(Node *clause, int *relid1, +extern void get_rels_atts(Node *clause, int *relid1, AttrNumber *attno1, int *relid2, AttrNumber *attno2); extern void CommuteClause(Node *clause); diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 9c8f57bfb2..6b041badca 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -31,20 +31,16 @@ extern bool _enable_mergesort_; extern bool _enable_hashjoin_; extern Cost cost_seqscan(int relid, int relpages, int reltuples); -extern Cost -cost_index(Oid indexid, int expected_indexpages, Cost selec, +extern Cost cost_index(Oid indexid, int expected_indexpages, Cost selec, int relpages, int reltuples, int indexpages, int indextuples, bool is_injoin); extern Cost cost_sort(List *keys, int tuples, int width, bool noread); -extern Cost -cost_nestloop(Cost outercost, Cost innercost, int outertuples, +extern Cost cost_nestloop(Cost outercost, Cost innercost, int outertuples, int innertuples, int outerpages, bool is_indexjoin); -extern Cost -cost_mergesort(Cost outercost, Cost innercost, +extern Cost cost_mergesort(Cost outercost, Cost innercost, List *outersortkeys, List *innersortkeys, int outersize, int innersize, int outerwidth, int innerwidth); -extern Cost -cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys, +extern Cost cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys, List *innerkeys, int outersize, int innersize, int outerwidth, int innerwidth); extern int compute_rel_size(Rel *rel); @@ -60,8 +56,7 @@ extern void set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity extern Cost product_selec(List *clauseinfo_list); extern void set_rest_relselec(Query *root, List *rel_list); extern void set_rest_selec(Query *root, List *clauseinfo_list); -extern Cost -compute_clause_selec(Query *root, +extern Cost compute_clause_selec(Query *root, Node *clause, List *or_selectivities); #endif /* COST_H */ diff --git a/src/include/optimizer/ordering.h b/src/include/optimizer/ordering.h index 365e695d87..a458da23a5 100644 --- a/src/include/optimizer/ordering.h +++ b/src/include/optimizer/ordering.h @@ -15,14 +15,11 @@ #include <nodes/relation.h> -extern bool -equal_path_path_ordering(PathOrder *path_ordering1, +extern bool equal_path_path_ordering(PathOrder *path_ordering1, PathOrder *path_ordering2); -extern bool -equal_path_merge_ordering(Oid *path_ordering, +extern bool equal_path_merge_ordering(Oid *path_ordering, MergeOrder *merge_ordering); -extern bool -equal_merge_merge_ordering(MergeOrder *merge_ordering1, +extern bool equal_merge_merge_ordering(MergeOrder *merge_ordering1, MergeOrder *merge_ordering2); #endif /* ORDERING_H */ diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h index 4cd79b9f42..db6d4a27b1 100644 --- a/src/include/optimizer/pathnode.h +++ b/src/include/optimizer/pathnode.h @@ -22,24 +22,19 @@ */ extern bool path_is_cheaper(Path *path1, Path *path2); extern Path *set_cheapest(Rel *parent_rel, List *pathlist); -extern List * -add_pathlist(Rel *parent_rel, List *unique_paths, +extern List * add_pathlist(Rel *parent_rel, List *unique_paths, List *new_paths); extern Path *create_seqscan_path(Rel *rel); -extern IndexPath * -create_index_path(Query *root, Rel *rel, Rel *index, +extern IndexPath * create_index_path(Query *root, Rel *rel, Rel *index, List *restriction_clauses, bool is_join_scan); -extern JoinPath * -create_nestloop_path(Rel *joinrel, Rel *outer_rel, +extern JoinPath * create_nestloop_path(Rel *joinrel, Rel *outer_rel, Path *outer_path, Path *inner_path, List *keys); -extern MergePath * -create_mergesort_path(Rel *joinrel, int outersize, +extern MergePath * create_mergesort_path(Rel *joinrel, int outersize, int innersize, int outerwidth, int innerwidth, Path *outer_path, Path *inner_path, List *keys, MergeOrder *order, List *mergeclauses, List *outersortkeys, List *innersortkeys); -extern HashPath * -create_hashjoin_path(Rel *joinrel, int outersize, +extern HashPath * create_hashjoin_path(Rel *joinrel, int outersize, int innersize, int outerwidth, int innerwidth, Path *outer_path, Path *inner_path, List *keys, Oid operator, List *hashclauses, List *outerkeys, List *innerkeys); diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index 46a3aad990..87025667d7 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -27,8 +27,7 @@ extern List *find_paths(Query *root, List *rels); * indxpath.h * routines to generate index paths */ -extern List * -find_index_paths(Query *root, Rel *rel, List *indices, +extern List * find_index_paths(Query *root, Rel *rel, List *indices, List *clauseinfo_list, List *joininfo_list); @@ -48,37 +47,30 @@ extern List *create_or_index_paths(Query *root, Rel *rel, List *clauses); * hashutils.h * routines to deal with hash keys and clauses */ -extern List * -group_clauses_by_hashop(List *clauseinfo_list, +extern List * group_clauses_by_hashop(List *clauseinfo_list, int inner_relid); /* * joinutils.h * generic join method key/clause routines */ -extern List * -match_pathkeys_joinkeys(List *pathkeys, +extern List * match_pathkeys_joinkeys(List *pathkeys, List *joinkeys, List *joinclauses, int which_subkey, List **matchedJoinClausesPtr); -extern List * -extract_path_keys(List *joinkeys, List *tlist, +extern List * extract_path_keys(List *joinkeys, List *tlist, int which_subkey); -extern Path * -match_paths_joinkeys(List *joinkeys, PathOrder *ordering, +extern Path * match_paths_joinkeys(List *joinkeys, PathOrder *ordering, List *paths, int which_subkey); -extern List * -new_join_pathkeys(List *outer_pathkeys, +extern List * new_join_pathkeys(List *outer_pathkeys, List *join_rel_tlist, List *joinclauses); /* * mergeutils.h * routines to deal with merge keys and clauses */ -extern List * -group_clauses_by_order(List *clauseinfo_list, +extern List * group_clauses_by_order(List *clauseinfo_list, int inner_relid); -extern MInfo * -match_order_mergeinfo(PathOrder *ordering, +extern MInfo * match_order_mergeinfo(PathOrder *ordering, List *mergeinfo_list); /* diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h index 70e770c35d..1e093266bc 100644 --- a/src/include/optimizer/plancat.h +++ b/src/include/optimizer/plancat.h @@ -34,31 +34,26 @@ typedef struct IdxInfoRetval } IdxInfoRetval; -extern void -relation_info(Query *root, +extern void relation_info(Query *root, Oid relid, bool *hashindex, int *pages, int *tuples); -extern bool -index_info(Query *root, +extern bool index_info(Query *root, bool first, int relid, IdxInfoRetval *info); -extern Cost -restriction_selectivity(Oid functionObjectId, +extern Cost restriction_selectivity(Oid functionObjectId, Oid operatorObjectId, Oid relationObjectId, AttrNumber attributeNumber, char *constValue, int32 constFlag); -extern void -index_selectivity(Oid indid, Oid *classes, List *opnos, +extern void index_selectivity(Oid indid, Oid *classes, List *opnos, Oid relid, List *attnos, List *values, List *flags, int32 nkeys, float *idxPages, float *idxSelec); -extern Cost -join_selectivity(Oid functionObjectId, Oid operatorObjectId, +extern Cost join_selectivity(Oid functionObjectId, Oid operatorObjectId, Oid relationObjectId1, AttrNumber attributeNumber1, Oid relationObjectId2, AttrNumber attributeNumber2); diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h index cbdb0c5532..8d7e39fbee 100644 --- a/src/include/optimizer/tlist.h +++ b/src/include/optimizer/tlist.h @@ -33,8 +33,7 @@ extern TargetEntry *match_varid(Var *test_var, List *tlist); extern List *new_unsorted_tlist(List *targetlist); extern List *copy_vars(List *target, List *source); extern List *flatten_tlist(List *tlist); -extern List * -flatten_tlist_vars(List *full_tlist, +extern List * flatten_tlist_vars(List *full_tlist, List *flat_tlist); #endif /* TLIST_H */ diff --git a/src/include/optimizer/xfunc.h b/src/include/optimizer/xfunc.h index ffd1746e09..9dd9d41a57 100644 --- a/src/include/optimizer/xfunc.h +++ b/src/include/optimizer/xfunc.h @@ -50,11 +50,9 @@ extern int XfuncMode; /* defined in tcop/postgres.c */ /* function prototypes from planner/path/xfunc.c */ extern void xfunc_trypullup(Rel *rel); -extern int -xfunc_shouldpull(Path *childpath, JoinPath *parentpath, +extern int xfunc_shouldpull(Path *childpath, JoinPath *parentpath, int whichchild, CInfo *maxcinfopt); -extern CInfo * -xfunc_pullup(Path *childpath, JoinPath *parentpath, CInfo *cinfo, +extern CInfo * xfunc_pullup(Path *childpath, JoinPath *parentpath, CInfo *cinfo, int whichchild, int clausetype); extern Cost xfunc_rank(Expr *clause); extern Cost xfunc_expense(Query *queryInfo, Expr *clause); diff --git a/src/include/rewrite/locks.h b/src/include/rewrite/locks.h index dd3e6c3cd5..0cefda3d7e 100644 --- a/src/include/rewrite/locks.h +++ b/src/include/rewrite/locks.h @@ -17,8 +17,7 @@ #include "nodes/parsenodes.h" #include "rewrite/prs2lock.h" -extern List * -matchLocks(CmdType event, RuleLock *rulelocks, int varno, +extern List * matchLocks(CmdType event, RuleLock *rulelocks, int varno, Query *parsetree); #endif /* LOCKS_H */ diff --git a/src/include/rewrite/rewriteSupport.h b/src/include/rewrite/rewriteSupport.h index 54c9c30686..6027a723f2 100644 --- a/src/include/rewrite/rewriteSupport.h +++ b/src/include/rewrite/rewriteSupport.h @@ -18,8 +18,7 @@ extern int IsDefinedRewriteRule(char *ruleName); -extern void -prs2_addToRelation(Oid relid, Oid ruleId, CmdType event_type, +extern void prs2_addToRelation(Oid relid, Oid ruleId, CmdType event_type, AttrNumber attno, bool isInstead, Node *qual, List *actions); extern void prs2_deleteFromRelation(Oid relid, Oid ruleId); diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index 1feb2d7b29..4c1cfa4dcc 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -227,8 +227,7 @@ extern long *LocalRefCount; extern BufferDesc *LocalBufferDescriptors; extern int NLocBuffer; -extern BufferDesc * -LocalBufferAlloc(Relation reln, BlockNumber blockNum, +extern BufferDesc * LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr); extern int WriteLocalBuffer(Buffer buffer, bool release); extern int FlushLocalBuffer(Buffer buffer, bool release); diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index 62342c55be..f0c27c5707 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -75,14 +75,12 @@ extern int ShowPinTrace; /* * prototypes for functions in bufmgr.c */ -extern Buffer -RelationGetBufferWithBuffer(Relation relation, +extern Buffer RelationGetBufferWithBuffer(Relation relation, BlockNumber blockNumber, Buffer buffer); extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum); extern int WriteBuffer(Buffer buffer); extern int WriteNoReleaseBuffer(Buffer buffer); -extern Buffer -ReleaseAndReadBuffer(Buffer buffer, Relation relation, +extern Buffer ReleaseAndReadBuffer(Buffer buffer, Relation relation, BlockNumber blockNum); extern void InitBufferPool(IPCKey key); diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index 360b4a68d4..d3754d08eb 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -287,8 +287,7 @@ typedef enum */ extern void PageInit(Page page, Size pageSize, Size specialSize); -extern OffsetNumber -PageAddItem(Page page, Item item, Size size, +extern OffsetNumber PageAddItem(Page page, Item item, Size size, OffsetNumber offsetNumber, ItemIdFlags flags); extern Page PageGetTempPage(Page page, Size specialSize); extern void PageRestoreTempPage(Page tempPage, Page oldPage); diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h index 9f8dbb12e7..6e8e775ecf 100644 --- a/src/include/storage/ipc.h +++ b/src/include/storage/ipc.h @@ -75,8 +75,7 @@ extern void exitpg(int code); extern void quasi_exitpg(void); extern int on_exitpg(void (*function) (), caddr_t arg); -extern IpcSemaphoreId -IpcSemaphoreCreate(IpcSemaphoreKey semKey, +extern IpcSemaphoreId IpcSemaphoreCreate(IpcSemaphoreKey semKey, int semNum, int permission, int semStartValue, int removeOnExit, int *status); extern void IpcSemaphoreKill(IpcSemaphoreKey key); @@ -84,8 +83,7 @@ extern void IpcSemaphoreLock(IpcSemaphoreId semId, int sem, int lock); extern void IpcSemaphoreUnlock(IpcSemaphoreId semId, int sem, int lock); extern int IpcSemaphoreGetCount(IpcSemaphoreId semId, int sem); extern int IpcSemaphoreGetValue(IpcSemaphoreId semId, int sem); -extern IpcMemoryId -IpcMemoryCreate(IpcMemoryKey memKey, uint32 size, +extern IpcMemoryId IpcMemoryCreate(IpcMemoryKey memKey, uint32 size, int permission); extern IpcMemoryId IpcMemoryIdGet(IpcMemoryKey memKey, uint32 size); extern char *IpcMemoryAttach(IpcMemoryId memId); diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index ea4aa15626..a0e24cbebb 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -49,22 +49,17 @@ extern void RelationSetLockForWrite(Relation relation); extern void RelationUnsetLockForWrite(Relation relation); /* used in vaccum.c */ -extern void -RelationSetLockForWritePage(Relation relation, +extern void RelationSetLockForWritePage(Relation relation, ItemPointer itemPointer); /* used in nbtpage.c, hashpage.c */ -extern void -RelationSetSingleWLockPage(Relation relation, +extern void RelationSetSingleWLockPage(Relation relation, ItemPointer itemPointer); -extern void -RelationUnsetSingleWLockPage(Relation relation, +extern void RelationUnsetSingleWLockPage(Relation relation, ItemPointer itemPointer); -extern void -RelationSetSingleRLockPage(Relation relation, +extern void RelationSetSingleRLockPage(Relation relation, ItemPointer itemPointer); -extern void -RelationUnsetSingleRLockPage(Relation relation, +extern void RelationUnsetSingleRLockPage(Relation relation, ItemPointer itemPointer); extern void RelationSetRIntentLock(Relation relation); extern void RelationUnsetRIntentLock(Relation relation); @@ -73,8 +68,7 @@ extern void RelationUnsetWIntentLock(Relation relation); /* single.c */ extern bool SingleLockReln(LockInfo linfo, LOCKT lockt, int action); -extern bool -SingleLockPage(LockInfo linfo, ItemPointer tidPtr, +extern bool SingleLockPage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt, int action); /* proc.c */ diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 0d5654d762..871ac974a1 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -204,12 +204,10 @@ extern SPINLOCK LockMgrLock; */ extern void InitLocks(void); extern void LockDisable(int status); -extern LockTableId -LockTabInit(char *tabName, MASK *conflictsP, int *prioP, +extern LockTableId LockTabInit(char *tabName, MASK *conflictsP, int *prioP, int ntypes); extern bool LockAcquire(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt); -extern int -LockResolveConflicts(LOCKTAB *ltable, LOCK *lock, LOCKT lockt, +extern int LockResolveConflicts(LOCKTAB *ltable, LOCK *lock, LOCKT lockt, TransactionId xid); extern bool LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt); extern void GrantLock(LOCK *lock, LOCKT lockt); diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h index 61d91e100a..98bc81e93e 100644 --- a/src/include/storage/shmem.h +++ b/src/include/storage/shmem.h @@ -64,13 +64,11 @@ extern void ShmemCreate(unsigned int key, unsigned int size); extern int InitShmem(unsigned int key, unsigned int size); extern long *ShmemAlloc(unsigned long size); extern int ShmemIsValid(unsigned long addr); -extern HTAB * -ShmemInitHash(char *name, long init_size, long max_size, +extern HTAB * ShmemInitHash(char *name, long init_size, long max_size, HASHCTL *infoP, int hash_flags); extern bool ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr); extern SHMEM_OFFSET ShmemPIDDestroy(int pid); -extern long * -ShmemInitStruct(char *name, unsigned long size, +extern long * ShmemInitStruct(char *name, unsigned long size, bool *foundPtr); extern bool TransactionIdIsInProgress(TransactionId xid); @@ -100,8 +98,7 @@ extern void SHMQueueInit(SHM_QUEUE *queue); extern void SHMQueueElemInit(SHM_QUEUE *queue); extern void SHMQueueDelete(SHM_QUEUE *queue); extern void SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem); -extern void -SHMQueueFirst(SHM_QUEUE *queue, Pointer *nextPtrPtr, +extern void SHMQueueFirst(SHM_QUEUE *queue, Pointer *nextPtrPtr, SHM_QUEUE *nextQueue); extern bool SHMQueueEmpty(SHM_QUEUE *queue); diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h index a3526082f1..80a7fefd38 100644 --- a/src/include/storage/sinval.h +++ b/src/include/storage/sinval.h @@ -21,8 +21,7 @@ extern SPINLOCK SInvalLock; extern void CreateSharedInvalidationState(IPCKey key); extern void AttachSharedInvalidationState(IPCKey key); extern void InitSharedInvalidationState(void); -extern void -RegisterSharedInvalid(int cacheId, Index hashIndex, +extern void RegisterSharedInvalid(int cacheId, Index hashIndex, ItemPointer pointer); extern void InvalidateSharedInvalid(void (*invalFunction) (), void (*resetFunction) ()); diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h index 90b330de42..8cccba475f 100644 --- a/src/include/storage/sinvaladt.h +++ b/src/include/storage/sinvaladt.h @@ -125,8 +125,7 @@ extern int SISegmentInit(bool killExistingSegment, IPCKey key); extern bool SISetDataEntry(SISeg *segP, SharedInvalidData *data); extern void SISetProcStateInvalid(SISeg *segP); extern bool SIDelDataEntry(SISeg *segP); -extern void -SIReadEntryData(SISeg *segP, int backendId, +extern void SIReadEntryData(SISeg *segP, int backendId, void (*invalFunction) (), void (*resetFunction) ()); extern void SIDelExpiredDataEntries(SISeg *segP); diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h index 2d8cfe4414..01c3296ca3 100644 --- a/src/include/storage/smgr.h +++ b/src/include/storage/smgr.h @@ -28,17 +28,13 @@ extern int smgrunlink(int16 which, Relation reln); extern int smgrextend(int16 which, Relation reln, char *buffer); extern int smgropen(int16 which, Relation reln); extern int smgrclose(int16 which, Relation reln); -extern int -smgrread(int16 which, Relation reln, BlockNumber blocknum, +extern int smgrread(int16 which, Relation reln, BlockNumber blocknum, char *buffer); -extern int -smgrwrite(int16 which, Relation reln, BlockNumber blocknum, +extern int smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer); -extern int -smgrflush(int16 which, Relation reln, BlockNumber blocknum, +extern int smgrflush(int16 which, Relation reln, BlockNumber blocknum, char *buffer); -extern int -smgrblindwrt(int16 which, char *dbname, char *relname, Oid dbid, +extern int smgrblindwrt(int16 which, char *dbname, char *relname, Oid dbid, Oid relid, BlockNumber blkno, char *buffer); extern int smgrnblocks(int16 which, Relation reln); extern int smgrtruncate(int16 which, Relation reln, int nblocks); @@ -59,8 +55,7 @@ extern int mdclose(Relation reln); extern int mdread(Relation reln, BlockNumber blocknum, char *buffer); extern int mdwrite(Relation reln, BlockNumber blocknum, char *buffer); extern int mdflush(Relation reln, BlockNumber blocknum, char *buffer); -extern int -mdblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid, +extern int mdblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid, BlockNumber blkno, char *buffer); extern int mdnblocks(Relation reln); extern int mdtruncate(Relation reln, int nblocks); @@ -80,8 +75,7 @@ extern int mmclose(Relation reln); extern int mmread(Relation reln, BlockNumber blocknum, char *buffer); extern int mmwrite(Relation reln, BlockNumber blocknum, char *buffer); extern int mmflush(Relation reln, BlockNumber blocknum, char *buffer); -extern int -mmblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid, +extern int mmblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid, BlockNumber blkno, char *buffer); extern int mmnblocks(Relation reln); extern int mmcommit(void); diff --git a/src/include/tcop/dest.h b/src/include/tcop/dest.h index a3c058ff28..1ce0c10766 100644 --- a/src/include/tcop/dest.h +++ b/src/include/tcop/dest.h @@ -70,8 +70,7 @@ extern void EndCommand(char *commandTag, CommandDest dest); extern void SendCopyBegin(void); extern void ReceiveCopyBegin(void); extern void NullCommand(CommandDest dest); -extern void -BeginCommand(char *pname, int operation, TupleDesc attinfo, +extern void BeginCommand(char *pname, int operation, TupleDesc attinfo, bool isIntoRel, bool isIntoPortal, char *tag, CommandDest dest); extern void UpdateCommandInfo(int operation, Oid lastoid, uint32 tuples); diff --git a/src/include/tcop/pquery.h b/src/include/tcop/pquery.h index b1f0e1f068..175bedb8cc 100644 --- a/src/include/tcop/pquery.h +++ b/src/include/tcop/pquery.h @@ -23,13 +23,11 @@ extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree, extern EState *CreateExecutorState(void); -extern void -ProcessPortal(char *portalName, Query *parseTree, +extern void ProcessPortal(char *portalName, Query *parseTree, Plan *plan, EState *state, TupleDesc attinfo, CommandDest dest); -extern void -ProcessQuery(Query *parsetree, Plan *plan, char *argv[], +extern void ProcessQuery(Query *parsetree, Plan *plan, char *argv[], Oid *typev, int nargs, CommandDest dest); #endif /* pqueryIncluded */ diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index 62af78733e..45ed950d2c 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -22,12 +22,10 @@ #include <parser/parse_node.h> #ifndef BOOTSTRAP_INCLUDE -extern List * -pg_parse_and_plan(char *query_string, Oid *typev, int nargs, +extern List * pg_parse_and_plan(char *query_string, Oid *typev, int nargs, QueryTreeList **queryListP, CommandDest dest); extern void pg_exec_query(char *query_string, char **argv, Oid *typev, int nargs); -extern void -pg_exec_query_dest(char *query_string, char **argv, Oid *typev, +extern void pg_exec_query_dest(char *query_string, char **argv, Oid *typev, int nargs, CommandDest dest); #endif /* BOOTSTRAP_HEADER */ diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index 92a47cbec0..b921036b9b 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -141,8 +141,7 @@ extern Acl *aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg); extern char *aclmakepriv(char *old_privlist, char new_priv); extern char *aclmakeuser(char *user_type, char *user); -extern ChangeACLStmt * -makeAclStmt(char *privs, List *rel_list, char *grantee, +extern ChangeACLStmt * makeAclStmt(char *privs, List *rel_list, char *grantee, char grant_or_revoke); /* @@ -164,11 +163,9 @@ extern char *get_groname(AclId grosysid); extern int32 pg_aclcheck(char *relname, char *usename, AclMode mode); extern int32 pg_ownercheck(char *usename, char *value, int cacheid); -extern int32 -pg_func_ownercheck(char *usename, char *funcname, +extern int32 pg_func_ownercheck(char *usename, char *funcname, int nargs, Oid *arglist); -extern int32 -pg_aggr_ownercheck(char *usename, char *aggname, +extern int32 pg_aggr_ownercheck(char *usename, char *aggname, Oid basetypeID); #endif /* ACL_H */ diff --git a/src/include/utils/array.h b/src/include/utils/array.h index c7faa837be..53850ef60b 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -117,22 +117,17 @@ typedef struct extern char *array_in(char *string, Oid element_type); extern char *array_out(ArrayType *v, Oid element_type); extern char *array_dims(ArrayType *v, bool *isNull); -extern Datum -array_ref(ArrayType *array, int n, int indx[], int reftype, +extern Datum array_ref(ArrayType *array, int n, int indx[], int reftype, int elmlen, int arraylen, bool *isNull); -extern Datum -array_clip(ArrayType *array, int n, int upperIndx[], +extern Datum array_clip(ArrayType *array, int n, int upperIndx[], int lowerIndx[], int reftype, int len, bool *isNull); -extern char * -array_set(ArrayType *array, int n, int indx[], char *dataPtr, +extern char * array_set(ArrayType *array, int n, int indx[], char *dataPtr, int reftype, int elmlen, int arraylen, bool *isNull); -extern char * -array_assgn(ArrayType *array, int n, int upperIndx[], +extern char * array_assgn(ArrayType *array, int n, int upperIndx[], int lowerIndx[], ArrayType *newArr, int reftype, int len, bool *isNull); extern int array_eq(ArrayType *array1, ArrayType *array2); -extern int -_LOtransfer(char **destfd, int size, int nitems, char **srcfd, +extern int _LOtransfer(char **destfd, int size, int nitems, char **srcfd, int isSrcLO, int isDestLO); extern char *_array_newLO(int *fd, int flag); @@ -156,14 +151,11 @@ extern int next_tuple(int n, int curr[], int span[]); /* * prototypes for functions defined in chunk.c */ -extern char * -_ChunkArray(int fd, FILE *afd, int ndim, int dim[], int baseSize, +extern char * _ChunkArray(int fd, FILE *afd, int ndim, int dim[], int baseSize, int *nbytes, char *chunkfile); -extern int -_ReadChunkArray(int st[], int endp[], int bsize, int fp, +extern int _ReadChunkArray(int st[], int endp[], int bsize, int fp, char *destfp, ArrayType *array, int isDestLO, bool *isNull); -extern struct varlena * -_ReadChunkArray1El(int st[], int bsize, int fp, +extern struct varlena * _ReadChunkArray1El(int st[], int bsize, int fp, ArrayType *array, bool *isNull); diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index 066674d4e5..58d86be4c4 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -63,18 +63,14 @@ typedef struct catcache extern struct catcache *Caches; extern GlobalMemory CacheCxt; -extern void -CatalogCacheIdInvalidate(int cacheId, Index hashIndex, +extern void CatalogCacheIdInvalidate(int cacheId, Index hashIndex, ItemPointer pointer); extern void ResetSystemCache(void); -extern CatCache * -InitSysCache(char *relname, char *indname, int id, int nkeys, +extern CatCache * InitSysCache(char *relname, char *indname, int id, int nkeys, int key[], HeapTuple (*iScanfuncP) ()); -extern HeapTuple -SearchSysCache(struct catcache * cache, Datum v1, Datum v2, +extern HeapTuple SearchSysCache(struct catcache * cache, Datum v1, Datum v2, Datum v3, Datum v4); -extern void -RelationInvalidateCatalogCacheTuple(Relation relation, +extern void RelationInvalidateCatalogCacheTuple(Relation relation, HeapTuple tuple, void (*function) ()); #endif /* CATCACHE_H */ diff --git a/src/include/utils/datum.h b/src/include/utils/datum.h index ff80eacef0..7de4a217e3 100644 --- a/src/include/utils/datum.h +++ b/src/include/utils/datum.h @@ -57,8 +57,7 @@ extern void datumFree(Datum value, Oid type, bool byVal, Size len); * return true if thwo datums are equal, false otherwise. * XXX : See comments in the code for restrictions! */ -extern bool -datumIsEqual(Datum value1, Datum value2, Oid type, +extern bool datumIsEqual(Datum value1, Datum value2, Oid type, bool byVal, Size len); #endif /* DATUM_H */ diff --git a/src/include/utils/dt.h b/src/include/utils/dt.h index 4e2c574564..71ec26ab46 100644 --- a/src/include/utils/dt.h +++ b/src/include/utils/dt.h @@ -320,19 +320,15 @@ extern int date2j(int year, int month, int day); extern double time2t(const int hour, const int min, const double sec); -extern int -ParseDateTime(char *timestr, char *lowstr, +extern int ParseDateTime(char *timestr, char *lowstr, char *field[], int ftype[], int maxfields, int *numfields); -extern int -DecodeDateTime(char *field[], int ftype[], +extern int DecodeDateTime(char *field[], int ftype[], int nf, int *dtype, struct tm * tm, double *fsec, int *tzp); -extern int -DecodeTimeOnly(char *field[], int ftype[], int nf, +extern int DecodeTimeOnly(char *field[], int ftype[], int nf, int *dtype, struct tm * tm, double *fsec); -extern int -DecodeDateDelta(char *field[], int ftype[], +extern int DecodeDateDelta(char *field[], int ftype[], int nf, int *dtype, struct tm * tm, double *fsec); extern int EncodeDateOnly(struct tm * tm, int style, char *str); diff --git a/src/include/utils/exc.h b/src/include/utils/exc.h index c09d9374e4..b0ef4f8143 100644 --- a/src/include/utils/exc.h +++ b/src/include/utils/exc.h @@ -78,8 +78,7 @@ typedef void ExcProc (Exception *, ExcDetail, ExcData, ExcMessage); * prototypes for functions in exc.c */ extern void EnableExceptionHandling(bool on); -extern void -ExcRaise(Exception *excP, +extern void ExcRaise(Exception *excP, ExcDetail detail, ExcData data, ExcMessage message); @@ -88,8 +87,7 @@ ExcRaise(Exception *excP, /* * prototypes for functions in excabort.c */ -extern void -ExcAbort(const Exception *excP, ExcDetail detail, ExcData data, +extern void ExcAbort(const Exception *excP, ExcDetail detail, ExcData data, ExcMessage message); #endif /* EXC_H */ diff --git a/src/include/utils/fcache2.h b/src/include/utils/fcache2.h index 390586464c..25733d5afa 100644 --- a/src/include/utils/fcache2.h +++ b/src/include/utils/fcache2.h @@ -15,7 +15,6 @@ #include <nodes/execnodes.h> -extern void - setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext); +extern void setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext); #endif /* FCACHE2_H */ diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 43bea7161d..fb19360aff 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -340,11 +340,9 @@ extern double *circle_area(CIRCLE *circle); extern double circle_dt(CIRCLE *circle1, CIRCLE *circle2); /* geo_selfuncs.c */ -extern float64 -areasel(Oid opid, Oid relid, AttrNumber attno, +extern float64 areasel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag); -extern float64 -areajoinsel(Oid opid, Oid relid, AttrNumber attno, +extern float64 areajoinsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag); #endif /* GEO_DECLS_H */ diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h index 1828a1c039..af52b7d880 100644 --- a/src/include/utils/hsearch.h +++ b/src/include/utils/hsearch.h @@ -133,8 +133,7 @@ typedef enum extern HTAB *hash_create(int nelem, HASHCTL *info, int flags); extern void hash_destroy(HTAB *hashp); extern void hash_stats(char *where, HTAB *hashp); -extern long * -hash_search(HTAB *hashp, char *keyPtr, HASHACTION action, +extern long * hash_search(HTAB *hashp, char *keyPtr, HASHACTION action, bool *foundPtr); extern long *hash_seq(HTAB *hashp); diff --git a/src/include/utils/lselect.h b/src/include/utils/lselect.h index 4c85dea656..b2328aaa9b 100644 --- a/src/include/utils/lselect.h +++ b/src/include/utils/lselect.h @@ -39,14 +39,11 @@ typedef struct } LeftistContextData; typedef LeftistContextData *LeftistContext; -extern struct leftist * -lmerge(struct leftist * pt, struct leftist * qt, +extern struct leftist * lmerge(struct leftist * pt, struct leftist * qt, LeftistContext context); -extern HeapTuple -gettuple(struct leftist ** treep, short *devnum, +extern HeapTuple gettuple(struct leftist ** treep, short *devnum, LeftistContext context); -extern void -puttuple(struct leftist ** treep, HeapTuple newtuple, short devnum, +extern void puttuple(struct leftist ** treep, HeapTuple newtuple, short devnum, LeftistContext context); extern int tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context); diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 8991d7053b..76e4bb594f 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -24,8 +24,7 @@ extern bool get_attisset(Oid relid, char *attname); extern int get_atttypmod(Oid relid, AttrNumber attnum); extern RegProcedure get_opcode(Oid opid); extern char *get_opname(Oid opid); -extern bool -op_mergesortable(Oid opid, Oid ltype, Oid rtype, +extern bool op_mergesortable(Oid opid, Oid ltype, Oid rtype, Oid *leftOp, Oid *rightOp); extern Oid op_hashjoinable(Oid opid, Oid ltype, Oid rtype); extern Oid get_commutator(Oid opid); diff --git a/src/include/utils/mcxt.h b/src/include/utils/mcxt.h index d71ff1810a..f1fab062e2 100644 --- a/src/include/utils/mcxt.h +++ b/src/include/utils/mcxt.h @@ -39,8 +39,7 @@ extern MemoryContext TopMemoryContext; */ extern void EnableMemoryContext(bool on); extern Pointer MemoryContextAlloc(MemoryContext context, Size size); -extern Pointer -MemoryContextRealloc(MemoryContext context, +extern Pointer MemoryContextRealloc(MemoryContext context, Pointer pointer, Size size); extern void MemoryContextFree(MemoryContext context, Pointer pointer); diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index 60fedeccc5..19db1c4c83 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -233,8 +233,7 @@ extern void AllocSetReset(AllocSet set); extern bool AllocSetContains(AllocSet set, AllocPointer pointer); extern AllocPointer AllocSetAlloc(AllocSet set, Size size); extern void AllocSetFree(AllocSet set, AllocPointer pointer); -extern AllocPointer -AllocSetRealloc(AllocSet set, AllocPointer pointer, +extern AllocPointer AllocSetRealloc(AllocSet set, AllocPointer pointer, Size size); extern void AllocSetDump(AllocSet set); diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index ad61db5cfe..d5f5d007f6 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -68,8 +68,7 @@ extern void AtEOXact_portals(void); extern void EnablePortalManager(bool on); extern Portal GetPortalByName(char *name); extern Portal BlankPortalAssignName(char *name); -extern void -PortalSetQuery(Portal portal, QueryDesc *queryDesc, +extern void PortalSetQuery(Portal portal, QueryDesc *queryDesc, TupleDesc attinfo, EState *state, void (*cleanup) (Portal portal)); extern QueryDesc *PortalGetQueryDesc(Portal portal); diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index fdfde6e585..92dd93ab22 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -186,8 +186,7 @@ typedef Relation *RelationPtr; extern IndexStrategy RelationGetIndexStrategy(Relation relation); -extern void -RelationSetIndexSupport(Relation relation, IndexStrategy strategy, +extern void RelationSetIndexSupport(Relation relation, IndexStrategy strategy, RegProcedure *support); #endif /* REL_H */ diff --git a/src/include/utils/rel2.h b/src/include/utils/rel2.h index 681c916824..593ae364d5 100644 --- a/src/include/utils/rel2.h +++ b/src/include/utils/rel2.h @@ -17,8 +17,7 @@ extern IndexStrategy RelationGetIndexStrategy(Relation relation); -extern void -RelationSetIndexSupport(Relation relation, IndexStrategy strategy, +extern void RelationSetIndexSupport(Relation relation, IndexStrategy strategy, RegProcedure *support); #endif /* TMP_REL2_H */ diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index 07714f5170..56c6bb0d54 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -26,8 +26,7 @@ extern void RelationClose(Relation relation); extern void RelationForgetRelation(Oid rid); extern void RelationIdInvalidateRelationCacheByRelationId(Oid relationId); -extern void - RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId); +extern void RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId); extern void RelationCacheInvalidate(bool onlyFlushReferenceCountZero); diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 1ffe506fa2..30554fd39f 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -79,14 +79,11 @@ struct cachedesc extern void zerocaches(void); extern void InitCatalogCache(void); -extern HeapTuple -SearchSysCacheTuple(int cacheId, Datum key1, Datum key2, +extern HeapTuple SearchSysCacheTuple(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4); -extern int32 -SearchSysCacheStruct(int cacheId, char *returnStruct, +extern int32 SearchSysCacheStruct(int cacheId, char *returnStruct, Datum key1, Datum key2, Datum key3, Datum key4); -extern void * -SearchSysCacheGetAttribute(int cacheId, +extern void * SearchSysCacheGetAttribute(int cacheId, AttrNumber attributeNumber, Datum key1, Datum key2, |