diff options
author | Tom Lane | 2019-05-22 17:04:48 +0000 |
---|---|---|
committer | Tom Lane | 2019-05-22 17:04:48 +0000 |
commit | 8255c7a5eeba8f1a38b7a431c04909bde4f5e67d (patch) | |
tree | 50b5b32eaf388701b2714244a10fb23f8d4a2c7c /src/backend | |
parent | be76af171cdb3e7465c4ef234af403f97ad79b7b (diff) |
Phase 2 pgindent run for v12.
Switch to 2.1 version of pg_bsd_indent. This formats
multiline function declarations "correctly", that is with
additional lines of parameter declarations indented to match
where the first line's left parenthesis is.
Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com
Diffstat (limited to 'src/backend')
271 files changed, 2717 insertions, 2717 deletions
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c index aba234c0af8..ae7b729edd9 100644 --- a/src/backend/access/brin/brin.c +++ b/src/backend/access/brin/brin.c @@ -67,13 +67,13 @@ typedef struct BrinOpaque #define BRIN_ALL_BLOCKRANGES InvalidBlockNumber static BrinBuildState *initialize_brin_buildstate(Relation idxRel, - BrinRevmap *revmap, BlockNumber pagesPerRange); + BrinRevmap *revmap, BlockNumber pagesPerRange); static void terminate_brin_buildstate(BrinBuildState *state); static void brinsummarize(Relation index, Relation heapRel, BlockNumber pageRange, - bool include_partial, double *numSummarized, double *numExisting); + bool include_partial, double *numSummarized, double *numExisting); static void form_and_insert_tuple(BrinBuildState *state); static void union_tuples(BrinDesc *bdesc, BrinMemTuple *a, - BrinTuple *b); + BrinTuple *b); static void brin_vacuum_scan(Relation idxrel, BufferAccessStrategy strategy); diff --git a/src/backend/access/brin/brin_inclusion.c b/src/backend/access/brin/brin_inclusion.c index 60f857f02df..332a854af6a 100644 --- a/src/backend/access/brin/brin_inclusion.c +++ b/src/backend/access/brin/brin_inclusion.c @@ -82,9 +82,9 @@ typedef struct InclusionOpaque } InclusionOpaque; static FmgrInfo *inclusion_get_procinfo(BrinDesc *bdesc, uint16 attno, - uint16 procnum); + uint16 procnum); static FmgrInfo *inclusion_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno, - Oid subtype, uint16 strategynum); + Oid subtype, uint16 strategynum); /* diff --git a/src/backend/access/brin/brin_minmax.c b/src/backend/access/brin/brin_minmax.c index a10c2062314..ad0d18ed39f 100644 --- a/src/backend/access/brin/brin_minmax.c +++ b/src/backend/access/brin/brin_minmax.c @@ -30,7 +30,7 @@ typedef struct MinmaxOpaque } MinmaxOpaque; static FmgrInfo *minmax_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno, - Oid subtype, uint16 strategynum); + Oid subtype, uint16 strategynum); Datum diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c index fcc468ced99..f907b4bc297 100644 --- a/src/backend/access/brin/brin_pageops.c +++ b/src/backend/access/brin/brin_pageops.c @@ -34,7 +34,7 @@ MAXALIGN(sizeof(BrinSpecialSpace)))) static Buffer brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz, - bool *extended); + bool *extended); static Size br_page_get_freespace(Page page); static void brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer); diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c index 1bf36d6f5cd..e2bfbf8a680 100644 --- a/src/backend/access/brin/brin_revmap.c +++ b/src/backend/access/brin/brin_revmap.c @@ -57,10 +57,10 @@ struct BrinRevmap static BlockNumber revmap_get_blkno(BrinRevmap *revmap, - BlockNumber heapBlk); + BlockNumber heapBlk); static Buffer revmap_get_buffer(BrinRevmap *revmap, BlockNumber heapBlk); static BlockNumber revmap_extend_and_get_blkno(BrinRevmap *revmap, - BlockNumber heapBlk); + BlockNumber heapBlk); static void revmap_physical_extend(BrinRevmap *revmap); /* diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c index a5bc6f5749f..5abb472ee45 100644 --- a/src/backend/access/brin/brin_tuple.c +++ b/src/backend/access/brin/brin_tuple.c @@ -40,8 +40,8 @@ static inline void brin_deconstruct_tuple(BrinDesc *brdesc, - char *tp, bits8 *nullbits, bool nulls, - Datum *values, bool *allnulls, bool *hasnulls); + char *tp, bits8 *nullbits, bool nulls, + Datum *values, bool *allnulls, bool *hasnulls); /* diff --git a/src/backend/access/common/printtup.c b/src/backend/access/common/printtup.c index 44add482d3e..24d6cd02492 100644 --- a/src/backend/access/common/printtup.c +++ b/src/backend/access/common/printtup.c @@ -25,7 +25,7 @@ static void printtup_startup(DestReceiver *self, int operation, - TupleDesc typeinfo); + TupleDesc typeinfo); static bool printtup(TupleTableSlot *slot, DestReceiver *self); static bool printtup_20(TupleTableSlot *slot, DestReceiver *self); static bool printtup_internal_20(TupleTableSlot *slot, DestReceiver *self); @@ -33,9 +33,9 @@ static void printtup_shutdown(DestReceiver *self); static void printtup_destroy(DestReceiver *self); static void SendRowDescriptionCols_2(StringInfo buf, TupleDesc typeinfo, - List *targetlist, int16 *formats); + List *targetlist, int16 *formats); static void SendRowDescriptionCols_3(StringInfo buf, TupleDesc typeinfo, - List *targetlist, int16 *formats); + List *targetlist, int16 *formats); /* ---------------------------------------------------------------- * printtup / debugtup support diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index cfbabb52650..4d0d24be0ba 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -475,7 +475,7 @@ static bool need_initialization = true; static void initialize_reloptions(void); static void parse_one_reloption(relopt_value *option, char *text_str, - int text_len, bool validate); + int text_len, bool validate); /* * initialize_reloptions diff --git a/src/backend/access/gin/ginbtree.c b/src/backend/access/gin/ginbtree.c index 9f82eef8c39..11a8ed7bbc2 100644 --- a/src/backend/access/gin/ginbtree.c +++ b/src/backend/access/gin/ginbtree.c @@ -24,10 +24,10 @@ static void ginFindParents(GinBtree btree, GinBtreeStack *stack); static bool ginPlaceToPage(GinBtree btree, GinBtreeStack *stack, - void *insertdata, BlockNumber updateblkno, - Buffer childbuf, GinStatsData *buildStats); + void *insertdata, BlockNumber updateblkno, + Buffer childbuf, GinStatsData *buildStats); static void ginFinishSplit(GinBtree btree, GinBtreeStack *stack, - bool freestack, GinStatsData *buildStats); + bool freestack, GinStatsData *buildStats); /* * Lock buffer by needed method for search. diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c index fb085c7dd84..57c3b830d85 100644 --- a/src/backend/access/gin/gindatapage.c +++ b/src/backend/access/gin/gindatapage.c @@ -104,20 +104,20 @@ typedef struct static ItemPointer dataLeafPageGetUncompressed(Page page, int *nitems); static void dataSplitPageInternal(GinBtree btree, Buffer origbuf, - GinBtreeStack *stack, - void *insertdata, BlockNumber updateblkno, - Page *newlpage, Page *newrpage); + GinBtreeStack *stack, + void *insertdata, BlockNumber updateblkno, + Page *newlpage, Page *newrpage); static disassembledLeaf *disassembleLeaf(Page page); static bool leafRepackItems(disassembledLeaf *leaf, ItemPointer remaining); static bool addItemsToLeaf(disassembledLeaf *leaf, ItemPointer newItems, - int nNewItems); + int nNewItems); static void computeLeafRecompressWALData(disassembledLeaf *leaf); static void dataPlaceToPageLeafRecompress(Buffer buf, disassembledLeaf *leaf); static void dataPlaceToPageLeafSplit(disassembledLeaf *leaf, - ItemPointerData lbound, ItemPointerData rbound, - Page lpage, Page rpage); + ItemPointerData lbound, ItemPointerData rbound, + Page lpage, Page rpage); /* * Read TIDs from leaf data page to single uncompressed array. The TIDs are diff --git a/src/backend/access/gin/ginentrypage.c b/src/backend/access/gin/ginentrypage.c index 1f5ba33d512..b87ff26f9c4 100644 --- a/src/backend/access/gin/ginentrypage.c +++ b/src/backend/access/gin/ginentrypage.c @@ -21,10 +21,10 @@ #include "utils/rel.h" static void entrySplitPage(GinBtree btree, Buffer origbuf, - GinBtreeStack *stack, - GinBtreeEntryInsertData *insertData, - BlockNumber updateblkno, - Page *newlpage, Page *newrpage); + GinBtreeStack *stack, + GinBtreeEntryInsertData *insertData, + BlockNumber updateblkno, + Page *newlpage, Page *newrpage); /* * Form a tuple for entry tree. diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index d70a138f54d..45c00aaa87a 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -30,16 +30,16 @@ /* non-export function prototypes */ static void gistfixsplit(GISTInsertState *state, GISTSTATE *giststate); static bool gistinserttuple(GISTInsertState *state, GISTInsertStack *stack, - GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum); + GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum); static bool gistinserttuples(GISTInsertState *state, GISTInsertStack *stack, - GISTSTATE *giststate, - IndexTuple *tuples, int ntup, OffsetNumber oldoffnum, - Buffer leftchild, Buffer rightchild, - bool unlockbuf, bool unlockleftchild); + GISTSTATE *giststate, + IndexTuple *tuples, int ntup, OffsetNumber oldoffnum, + Buffer leftchild, Buffer rightchild, + bool unlockbuf, bool unlockleftchild); static void gistfinishsplit(GISTInsertState *state, GISTInsertStack *stack, - GISTSTATE *giststate, List *splitinfo, bool releasebuf); + GISTSTATE *giststate, List *splitinfo, bool releasebuf); static void gistprunepage(Relation rel, Page page, Buffer buffer, - Relation heapRel); + Relation heapRel); #define ROTATEDIST(d) do { \ diff --git a/src/backend/access/gist/gistbuild.c b/src/backend/access/gist/gistbuild.c index 8e81eda5176..ecef0ff0724 100644 --- a/src/backend/access/gist/gistbuild.c +++ b/src/backend/access/gist/gistbuild.c @@ -80,30 +80,30 @@ typedef struct static void gistInitBuffering(GISTBuildState *buildstate); static int calculatePagesPerBuffer(GISTBuildState *buildstate, int levelStep); static void gistBuildCallback(Relation index, - HeapTuple htup, - Datum *values, - bool *isnull, - bool tupleIsAlive, - void *state); + HeapTuple htup, + Datum *values, + bool *isnull, + bool tupleIsAlive, + void *state); static void gistBufferingBuildInsert(GISTBuildState *buildstate, - IndexTuple itup); + IndexTuple itup); static bool gistProcessItup(GISTBuildState *buildstate, IndexTuple itup, - BlockNumber startblkno, int startlevel); + BlockNumber startblkno, int startlevel); static BlockNumber gistbufferinginserttuples(GISTBuildState *buildstate, - Buffer buffer, int level, - IndexTuple *itup, int ntup, OffsetNumber oldoffnum, - BlockNumber parentblk, OffsetNumber downlinkoffnum); + Buffer buffer, int level, + IndexTuple *itup, int ntup, OffsetNumber oldoffnum, + BlockNumber parentblk, OffsetNumber downlinkoffnum); static Buffer gistBufferingFindCorrectParent(GISTBuildState *buildstate, - BlockNumber childblkno, int level, - BlockNumber *parentblk, - OffsetNumber *downlinkoffnum); + BlockNumber childblkno, int level, + BlockNumber *parentblk, + OffsetNumber *downlinkoffnum); static void gistProcessEmptyingQueue(GISTBuildState *buildstate); static void gistEmptyAllBuffers(GISTBuildState *buildstate); static int gistGetMaxLevel(Relation index); static void gistInitParentMap(GISTBuildState *buildstate); static void gistMemorizeParent(GISTBuildState *buildstate, BlockNumber child, - BlockNumber parent); + BlockNumber parent); static void gistMemorizeAllDownlinks(GISTBuildState *buildstate, Buffer parent); static BlockNumber gistGetParent(GISTBuildState *buildstate, BlockNumber child); diff --git a/src/backend/access/gist/gistbuildbuffers.c b/src/backend/access/gist/gistbuildbuffers.c index 4f2363e21e4..d71354140ed 100644 --- a/src/backend/access/gist/gistbuildbuffers.c +++ b/src/backend/access/gist/gistbuildbuffers.c @@ -25,15 +25,15 @@ static GISTNodeBufferPage *gistAllocateNewPageBuffer(GISTBuildBuffers *gfbb); static void gistAddLoadedBuffer(GISTBuildBuffers *gfbb, - GISTNodeBuffer *nodeBuffer); + GISTNodeBuffer *nodeBuffer); static void gistLoadNodeBuffer(GISTBuildBuffers *gfbb, - GISTNodeBuffer *nodeBuffer); + GISTNodeBuffer *nodeBuffer); static void gistUnloadNodeBuffer(GISTBuildBuffers *gfbb, - GISTNodeBuffer *nodeBuffer); + GISTNodeBuffer *nodeBuffer); static void gistPlaceItupToPage(GISTNodeBufferPage *pageBuffer, - IndexTuple item); + IndexTuple item); static void gistGetItupFromPage(GISTNodeBufferPage *pageBuffer, - IndexTuple *item); + IndexTuple *item); static long gistBuffersGetFreeBlock(GISTBuildBuffers *gfbb); static void gistBuffersReleaseBlock(GISTBuildBuffers *gfbb, long blocknum); diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index c9da2307be8..1826b51bbb4 100644 --- a/src/backend/access/gist/gistproc.c +++ b/src/backend/access/gist/gistproc.c @@ -27,9 +27,9 @@ static bool gist_box_leaf_consistent(BOX *key, BOX *query, - StrategyNumber strategy); + StrategyNumber strategy); static bool rtree_internal_consistent(BOX *key, BOX *query, - StrategyNumber strategy); + StrategyNumber strategy); /* Minimum accepted ratio of split */ #define LIMIT_RATIO 0.3 diff --git a/src/backend/access/gist/gistvacuum.c b/src/backend/access/gist/gistvacuum.c index e2029d842c0..4270226eee2 100644 --- a/src/backend/access/gist/gistvacuum.c +++ b/src/backend/access/gist/gistvacuum.c @@ -52,14 +52,14 @@ typedef struct } GistVacState; static void gistvacuumscan(IndexVacuumInfo *info, GistBulkDeleteResult *stats, - IndexBulkDeleteCallback callback, void *callback_state); + IndexBulkDeleteCallback callback, void *callback_state); static void gistvacuumpage(GistVacState *vstate, BlockNumber blkno, - BlockNumber orig_blkno); + BlockNumber orig_blkno); static void gistvacuum_delete_empty_pages(IndexVacuumInfo *info, - GistBulkDeleteResult *stats); + GistBulkDeleteResult *stats); static bool gistdeletepage(IndexVacuumInfo *info, GistBulkDeleteResult *stats, - Buffer buffer, OffsetNumber downlink, - Buffer leafBuffer); + Buffer buffer, OffsetNumber downlink, + Buffer leafBuffer); /* allocate the 'stats' struct that's kept over vacuum stages */ static GistBulkDeleteResult * diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c index 048e40e46fa..e9f2c84af1a 100644 --- a/src/backend/access/hash/hash.c +++ b/src/backend/access/hash/hash.c @@ -43,11 +43,11 @@ typedef struct } HashBuildState; static void hashbuildCallback(Relation index, - HeapTuple htup, - Datum *values, - bool *isnull, - bool tupleIsAlive, - void *state); + HeapTuple htup, + Datum *values, + bool *isnull, + bool tupleIsAlive, + void *state); /* diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c index e17f01718f2..5321762d5ea 100644 --- a/src/backend/access/hash/hashinsert.c +++ b/src/backend/access/hash/hashinsert.c @@ -24,7 +24,7 @@ #include "storage/predicate.h" static void _hash_vacuum_one_page(Relation rel, Relation hrel, - Buffer metabuf, Buffer buf); + Buffer metabuf, Buffer buf); /* * _hash_doinsert() -- Handle insertion of a single index tuple. diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c index b7adfdb826e..376ee2a63b5 100644 --- a/src/backend/access/hash/hashpage.c +++ b/src/backend/access/hash/hashpage.c @@ -37,14 +37,14 @@ static bool _hash_alloc_buckets(Relation rel, BlockNumber firstblock, - uint32 nblocks); + uint32 nblocks); static void _hash_splitbucket(Relation rel, Buffer metabuf, - Bucket obucket, Bucket nbucket, - Buffer obuf, - Buffer nbuf, - HTAB *htab, - uint32 maxbucket, - uint32 highmask, uint32 lowmask); + Bucket obucket, Bucket nbucket, + Buffer obuf, + Buffer nbuf, + HTAB *htab, + uint32 maxbucket, + uint32 highmask, uint32 lowmask); static void log_split_page(Relation rel, Buffer buf); diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c index 61c90e6bb78..79ae499198d 100644 --- a/src/backend/access/hash/hashsearch.c +++ b/src/backend/access/hash/hashsearch.c @@ -22,13 +22,13 @@ #include "storage/predicate.h" static bool _hash_readpage(IndexScanDesc scan, Buffer *bufP, - ScanDirection dir); -static int _hash_load_qualified_items(IndexScanDesc scan, Page page, - OffsetNumber offnum, ScanDirection dir); + ScanDirection dir); +static int _hash_load_qualified_items(IndexScanDesc scan, Page page, + OffsetNumber offnum, ScanDirection dir); static inline void _hash_saveitem(HashScanOpaque so, int itemIndex, - OffsetNumber offnum, IndexTuple itup); + OffsetNumber offnum, IndexTuple itup); static void _hash_readnext(IndexScanDesc scan, Buffer *bufp, - Page *pagep, HashPageOpaque *opaquep); + Page *pagep, HashPageOpaque *opaquep); /* * _hash_next() -- Get the next item in a scan. diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 723e153705d..6c342635e84 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -71,39 +71,39 @@ static HeapTuple heap_prepare_insert(Relation relation, HeapTuple tup, - TransactionId xid, CommandId cid, int options); + TransactionId xid, CommandId cid, int options); static XLogRecPtr log_heap_update(Relation reln, Buffer oldbuf, - Buffer newbuf, HeapTuple oldtup, - HeapTuple newtup, HeapTuple old_key_tup, - bool all_visible_cleared, bool new_all_visible_cleared); + Buffer newbuf, HeapTuple oldtup, + HeapTuple newtup, HeapTuple old_key_tup, + bool all_visible_cleared, bool new_all_visible_cleared); static Bitmapset *HeapDetermineModifiedColumns(Relation relation, - Bitmapset *interesting_cols, - HeapTuple oldtup, HeapTuple newtup); + Bitmapset *interesting_cols, + HeapTuple oldtup, HeapTuple newtup); static bool heap_acquire_tuplock(Relation relation, ItemPointer tid, - LockTupleMode mode, LockWaitPolicy wait_policy, - bool *have_tuple_lock); + LockTupleMode mode, LockWaitPolicy wait_policy, + bool *have_tuple_lock); static void compute_new_xmax_infomask(TransactionId xmax, uint16 old_infomask, - uint16 old_infomask2, TransactionId add_to_xmax, - LockTupleMode mode, bool is_update, - TransactionId *result_xmax, uint16 *result_infomask, - uint16 *result_infomask2); + uint16 old_infomask2, TransactionId add_to_xmax, + LockTupleMode mode, bool is_update, + TransactionId *result_xmax, uint16 *result_infomask, + uint16 *result_infomask2); static TM_Result heap_lock_updated_tuple(Relation rel, HeapTuple tuple, - ItemPointer ctid, TransactionId xid, - LockTupleMode mode); + ItemPointer ctid, TransactionId xid, + LockTupleMode mode); static void GetMultiXactIdHintBits(MultiXactId multi, uint16 *new_infomask, - uint16 *new_infomask2); + uint16 *new_infomask2); static TransactionId MultiXactIdGetUpdateXid(TransactionId xmax, - uint16 t_infomask); + uint16 t_infomask); static bool DoesMultiXactIdConflict(MultiXactId multi, uint16 infomask, - LockTupleMode lockmode); + LockTupleMode lockmode); static void MultiXactIdWait(MultiXactId multi, MultiXactStatus status, uint16 infomask, - Relation rel, ItemPointer ctid, XLTW_Oper oper, - int *remaining); + Relation rel, ItemPointer ctid, XLTW_Oper oper, + int *remaining); static bool ConditionalMultiXactIdWait(MultiXactId multi, MultiXactStatus status, - uint16 infomask, Relation rel, int *remaining); + uint16 infomask, Relation rel, int *remaining); static XLogRecPtr log_heap_new_cid(Relation relation, HeapTuple tup); static HeapTuple ExtractReplicaIdentity(Relation rel, HeapTuple tup, bool key_modified, - bool *copy); + bool *copy); /* diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c index 674c1d3a818..a4a28e88ec9 100644 --- a/src/backend/access/heap/heapam_handler.c +++ b/src/backend/access/heap/heapam_handler.c @@ -51,12 +51,12 @@ static void reform_and_rewrite_tuple(HeapTuple tuple, - Relation OldHeap, Relation NewHeap, - Datum *values, bool *isnull, RewriteState rwstate); + Relation OldHeap, Relation NewHeap, + Datum *values, bool *isnull, RewriteState rwstate); static bool SampleHeapTupleVisible(TableScanDesc scan, Buffer buffer, - HeapTuple tuple, - OffsetNumber tupoffset); + HeapTuple tuple, + OffsetNumber tupoffset); static BlockNumber heapam_scan_get_blocks_done(HeapScanDesc hscan); diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index 417a2bf8e6e..0efe3ce9995 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -43,13 +43,13 @@ typedef struct } PruneState; /* Local functions */ -static int heap_prune_chain(Relation relation, Buffer buffer, - OffsetNumber rootoffnum, - TransactionId OldestXmin, - PruneState *prstate); +static int heap_prune_chain(Relation relation, Buffer buffer, + OffsetNumber rootoffnum, + TransactionId OldestXmin, + PruneState *prstate); static void heap_prune_record_prunable(PruneState *prstate, TransactionId xid); static void heap_prune_record_redirect(PruneState *prstate, - OffsetNumber offnum, OffsetNumber rdoffnum); + OffsetNumber offnum, OffsetNumber rdoffnum); static void heap_prune_record_dead(PruneState *prstate, OffsetNumber offnum); static void heap_prune_record_unused(PruneState *prstate, OffsetNumber offnum); diff --git a/src/backend/access/heap/syncscan.c b/src/backend/access/heap/syncscan.c index c0a45dc75a9..b615940ed3e 100644 --- a/src/backend/access/heap/syncscan.c +++ b/src/backend/access/heap/syncscan.c @@ -116,7 +116,7 @@ static ss_scan_locations_t *scan_locations; /* prototypes for internal functions */ static BlockNumber ss_search(RelFileNode relfilenode, - BlockNumber location, bool set); + BlockNumber location, bool set); /* diff --git a/src/backend/access/heap/tuptoaster.c b/src/backend/access/heap/tuptoaster.c index e10715a7755..55d6e91d1c3 100644 --- a/src/backend/access/heap/tuptoaster.c +++ b/src/backend/access/heap/tuptoaster.c @@ -68,20 +68,20 @@ typedef struct toast_compress_header static void toast_delete_datum(Relation rel, Datum value, bool is_speculative); static Datum toast_save_datum(Relation rel, Datum value, - struct varlena *oldexternal, int options); + struct varlena *oldexternal, int options); static bool toastrel_valueid_exists(Relation toastrel, Oid valueid); static bool toastid_valueid_exists(Oid toastrelid, Oid valueid); static struct varlena *toast_fetch_datum(struct varlena *attr); static struct varlena *toast_fetch_datum_slice(struct varlena *attr, - int32 sliceoffset, int32 length); + int32 sliceoffset, int32 length); static struct varlena *toast_decompress_datum(struct varlena *attr); static struct varlena *toast_decompress_datum_slice(struct varlena *attr, int32 slicelength); -static int toast_open_indexes(Relation toastrel, - LOCKMODE lock, - Relation **toastidxs, - int *num_indexes); +static int toast_open_indexes(Relation toastrel, + LOCKMODE lock, + Relation **toastidxs, + int *num_indexes); static void toast_close_indexes(Relation *toastidxs, int num_indexes, - LOCKMODE lock); + LOCKMODE lock); static void init_toast_snapshot(Snapshot toast_snapshot); diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 637e47c08ce..a3c4a1df3b4 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -151,30 +151,30 @@ static BufferAccessStrategy vac_strategy; /* non-export function prototypes */ static void lazy_scan_heap(Relation onerel, VacuumParams *params, - LVRelStats *vacrelstats, Relation *Irel, int nindexes, - bool aggressive); + LVRelStats *vacrelstats, Relation *Irel, int nindexes, + bool aggressive); static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats); static bool lazy_check_needs_freeze(Buffer buf, bool *hastup); static void lazy_vacuum_index(Relation indrel, - IndexBulkDeleteResult **stats, - LVRelStats *vacrelstats); + IndexBulkDeleteResult **stats, + LVRelStats *vacrelstats); static void lazy_cleanup_index(Relation indrel, - IndexBulkDeleteResult *stats, - LVRelStats *vacrelstats); -static int lazy_vacuum_page(Relation onerel, BlockNumber blkno, Buffer buffer, - int tupindex, LVRelStats *vacrelstats, Buffer *vmbuffer); + IndexBulkDeleteResult *stats, + LVRelStats *vacrelstats); +static int lazy_vacuum_page(Relation onerel, BlockNumber blkno, Buffer buffer, + int tupindex, LVRelStats *vacrelstats, Buffer *vmbuffer); static bool should_attempt_truncation(VacuumParams *params, - LVRelStats *vacrelstats); + LVRelStats *vacrelstats); static void lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats); static BlockNumber count_nondeletable_pages(Relation onerel, - LVRelStats *vacrelstats); + LVRelStats *vacrelstats); static void lazy_space_alloc(LVRelStats *vacrelstats, BlockNumber relblocks); static void lazy_record_dead_tuple(LVRelStats *vacrelstats, - ItemPointer itemptr); + ItemPointer itemptr); static bool lazy_tid_reaped(ItemPointer itemptr, void *state); static int vac_cmp_itemptr(const void *left, const void *right); static bool heap_page_is_all_visible(Relation rel, Buffer buf, - TransactionId *visibility_cutoff_xid, bool *all_frozen); + TransactionId *visibility_cutoff_xid, bool *all_frozen); /* diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 0fc9139badb..aefdd2916de 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -99,8 +99,8 @@ do { \ } while(0) static IndexScanDesc index_beginscan_internal(Relation indexRelation, - int nkeys, int norderbys, Snapshot snapshot, - ParallelIndexScanDesc pscan, bool temp_snap); + int nkeys, int norderbys, Snapshot snapshot, + ParallelIndexScanDesc pscan, bool temp_snap); /* ---------------------------------------------------------------- diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 36a570045ac..2eccc990236 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -32,29 +32,29 @@ static Buffer _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf); static TransactionId _bt_check_unique(Relation rel, BTInsertState insertstate, - Relation heapRel, - IndexUniqueCheck checkUnique, bool *is_unique, - uint32 *speculativeToken); + Relation heapRel, + IndexUniqueCheck checkUnique, bool *is_unique, + uint32 *speculativeToken); static OffsetNumber _bt_findinsertloc(Relation rel, - BTInsertState insertstate, - bool checkingunique, - BTStack stack, - Relation heapRel); + BTInsertState insertstate, + bool checkingunique, + BTStack stack, + Relation heapRel); static void _bt_stepright(Relation rel, BTInsertState insertstate, BTStack stack); static void _bt_insertonpg(Relation rel, BTScanInsert itup_key, - Buffer buf, - Buffer cbuf, - BTStack stack, - IndexTuple itup, - OffsetNumber newitemoff, - bool split_only_page); + Buffer buf, + Buffer cbuf, + BTStack stack, + IndexTuple itup, + OffsetNumber newitemoff, + bool split_only_page); static Buffer _bt_split(Relation rel, BTScanInsert itup_key, Buffer buf, - Buffer cbuf, OffsetNumber newitemoff, Size newitemsz, - IndexTuple newitem); + Buffer cbuf, OffsetNumber newitemoff, Size newitemsz, + IndexTuple newitem); static void _bt_insert_parent(Relation rel, Buffer buf, Buffer rbuf, - BTStack stack, bool is_root, bool is_only); + BTStack stack, bool is_root, bool is_only); static bool _bt_pgaddtup(Page page, Size itemsize, IndexTuple itup, - OffsetNumber itup_off); + OffsetNumber itup_off); static void _bt_vacuum_one_page(Relation rel, Buffer buffer, Relation heapRel); /* diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index e7c40cba973..de4d4efc46a 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -37,12 +37,12 @@ static void _bt_cachemetadata(Relation rel, BTMetaPageData *input); static BTMetaPageData *_bt_getmeta(Relation rel, Buffer metabuf); static bool _bt_mark_page_halfdead(Relation rel, Buffer buf, BTStack stack); static bool _bt_unlink_halfdead_page(Relation rel, Buffer leafbuf, - bool *rightsib_empty); + bool *rightsib_empty); static bool _bt_lock_branch_parent(Relation rel, BlockNumber child, - BTStack stack, Buffer *topparent, OffsetNumber *topoff, - BlockNumber *target, BlockNumber *rightsib); + BTStack stack, Buffer *topparent, OffsetNumber *topoff, + BlockNumber *target, BlockNumber *rightsib); static void _bt_log_reuse_page(Relation rel, BlockNumber blkno, - TransactionId latestRemovedXid); + TransactionId latestRemovedXid); /* * _bt_initmetapage() -- Fill a page buffer with a correct metapage image diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c index 02fb352b94a..85e54ac44b8 100644 --- a/src/backend/access/nbtree/nbtree.c +++ b/src/backend/access/nbtree/nbtree.c @@ -93,10 +93,10 @@ typedef struct BTParallelScanDescData *BTParallelScanDesc; static void btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, - IndexBulkDeleteCallback callback, void *callback_state, - BTCycleId cycleid, TransactionId *oldestBtpoXact); + IndexBulkDeleteCallback callback, void *callback_state, + BTCycleId cycleid, TransactionId *oldestBtpoXact); static void btvacuumpage(BTVacState *vstate, BlockNumber blkno, - BlockNumber orig_blkno); + BlockNumber orig_blkno); /* diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index dc42213ac6c..1f809c24a11 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -27,13 +27,13 @@ static void _bt_drop_lock_and_maybe_pin(IndexScanDesc scan, BTScanPos sp); static OffsetNumber _bt_binsrch(Relation rel, BTScanInsert key, Buffer buf); static bool _bt_readpage(IndexScanDesc scan, ScanDirection dir, - OffsetNumber offnum); + OffsetNumber offnum); static void _bt_saveitem(BTScanOpaque so, int itemIndex, - OffsetNumber offnum, IndexTuple itup); + OffsetNumber offnum, IndexTuple itup); static bool _bt_steppage(IndexScanDesc scan, ScanDirection dir); static bool _bt_readnextpage(IndexScanDesc scan, BlockNumber blkno, ScanDirection dir); static bool _bt_parallel_readpage(IndexScanDesc scan, BlockNumber blkno, - ScanDirection dir); + ScanDirection dir); static Buffer _bt_walk_left(Relation rel, Buffer buf, Snapshot snapshot); static bool _bt_endpoint(IndexScanDesc scan, ScanDirection dir); static inline void _bt_initialize_more_data(BTScanOpaque so, ScanDirection dir); diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index d6fa5742384..d0b9013caf4 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -273,34 +273,34 @@ typedef struct BTWriteState static double _bt_spools_heapscan(Relation heap, Relation index, - BTBuildState *buildstate, IndexInfo *indexInfo); + BTBuildState *buildstate, IndexInfo *indexInfo); static void _bt_spooldestroy(BTSpool *btspool); static void _bt_spool(BTSpool *btspool, ItemPointer self, - Datum *values, bool *isnull); + Datum *values, bool *isnull); static void _bt_leafbuild(BTSpool *btspool, BTSpool *btspool2); static void _bt_build_callback(Relation index, HeapTuple htup, Datum *values, - bool *isnull, bool tupleIsAlive, void *state); + bool *isnull, bool tupleIsAlive, void *state); static Page _bt_blnewpage(uint32 level); static BTPageState *_bt_pagestate(BTWriteState *wstate, uint32 level); static void _bt_slideleft(Page page); static void _bt_sortaddtup(Page page, Size itemsize, - IndexTuple itup, OffsetNumber itup_off); + IndexTuple itup, OffsetNumber itup_off); static void _bt_buildadd(BTWriteState *wstate, BTPageState *state, - IndexTuple itup); + IndexTuple itup); static void _bt_uppershutdown(BTWriteState *wstate, BTPageState *state); static void _bt_load(BTWriteState *wstate, - BTSpool *btspool, BTSpool *btspool2); + BTSpool *btspool, BTSpool *btspool2); static void _bt_begin_parallel(BTBuildState *buildstate, bool isconcurrent, - int request); + int request); static void _bt_end_parallel(BTLeader *btleader); static Size _bt_parallel_estimate_shared(Relation heap, Snapshot snapshot); static double _bt_parallel_heapscan(BTBuildState *buildstate, - bool *brokenhotchain); + bool *brokenhotchain); static void _bt_leader_participate_as_worker(BTBuildState *buildstate); static void _bt_parallel_scan_and_sort(BTSpool *btspool, BTSpool *btspool2, - BTShared *btshared, Sharedsort *sharedsort, - Sharedsort *sharedsort2, int sortmem, - bool progress); + BTShared *btshared, Sharedsort *sharedsort, + Sharedsort *sharedsort2, int sortmem, + bool progress); /* diff --git a/src/backend/access/nbtree/nbtsplitloc.c b/src/backend/access/nbtree/nbtsplitloc.c index d045fe0d10c..f43ec6774b4 100644 --- a/src/backend/access/nbtree/nbtsplitloc.c +++ b/src/backend/access/nbtree/nbtsplitloc.c @@ -65,25 +65,25 @@ typedef struct } FindSplitData; static void _bt_recsplitloc(FindSplitData *state, - OffsetNumber firstoldonright, bool newitemonleft, - int olddataitemstoleft, Size firstoldonrightsz); + OffsetNumber firstoldonright, bool newitemonleft, + int olddataitemstoleft, Size firstoldonrightsz); static void _bt_deltasortsplits(FindSplitData *state, double fillfactormult, - bool usemult); + bool usemult); static int _bt_splitcmp(const void *arg1, const void *arg2); static bool _bt_afternewitemoff(FindSplitData *state, OffsetNumber maxoff, - int leaffillfactor, bool *usemult); + int leaffillfactor, bool *usemult); static bool _bt_adjacenthtid(ItemPointer lowhtid, ItemPointer highhtid); static OffsetNumber _bt_bestsplitloc(FindSplitData *state, int perfectpenalty, - bool *newitemonleft); -static int _bt_strategy(FindSplitData *state, SplitPoint *leftpage, - SplitPoint *rightpage, FindSplitStrat *strategy); + bool *newitemonleft); +static int _bt_strategy(FindSplitData *state, SplitPoint *leftpage, + SplitPoint *rightpage, FindSplitStrat *strategy); static void _bt_interval_edges(FindSplitData *state, - SplitPoint **leftinterval, SplitPoint **rightinterval); + SplitPoint **leftinterval, SplitPoint **rightinterval); static inline int _bt_split_penalty(FindSplitData *state, SplitPoint *split); static inline IndexTuple _bt_split_lastleft(FindSplitData *state, - SplitPoint *split); + SplitPoint *split); static inline IndexTuple _bt_split_firstright(FindSplitData *state, - SplitPoint *split); + SplitPoint *split); /* diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index 1238d544cd3..431b8477e95 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -37,22 +37,22 @@ typedef struct BTSortArrayContext } BTSortArrayContext; static Datum _bt_find_extreme_element(IndexScanDesc scan, ScanKey skey, - StrategyNumber strat, - Datum *elems, int nelems); -static int _bt_sort_array_elements(IndexScanDesc scan, ScanKey skey, - bool reverse, - Datum *elems, int nelems); + StrategyNumber strat, + Datum *elems, int nelems); +static int _bt_sort_array_elements(IndexScanDesc scan, ScanKey skey, + bool reverse, + Datum *elems, int nelems); static int _bt_compare_array_elements(const void *a, const void *b, void *arg); static bool _bt_compare_scankey_args(IndexScanDesc scan, ScanKey op, - ScanKey leftarg, ScanKey rightarg, - bool *result); + ScanKey leftarg, ScanKey rightarg, + bool *result); static bool _bt_fix_scankey_strategy(ScanKey skey, int16 *indoption); static void _bt_mark_scankey_required(ScanKey skey); static bool _bt_check_rowcompare(ScanKey skey, - IndexTuple tuple, int tupnatts, TupleDesc tupdesc, - ScanDirection dir, bool *continuescan); -static int _bt_keep_natts(Relation rel, IndexTuple lastleft, - IndexTuple firstright, BTScanInsert itup_key); + IndexTuple tuple, int tupnatts, TupleDesc tupdesc, + ScanDirection dir, bool *continuescan); +static int _bt_keep_natts(Relation rel, IndexTuple lastleft, + IndexTuple firstright, BTScanInsert itup_key); /* diff --git a/src/backend/access/tablesample/bernoulli.c b/src/backend/access/tablesample/bernoulli.c index 42d373ab83b..5ff5bdbd533 100644 --- a/src/backend/access/tablesample/bernoulli.c +++ b/src/backend/access/tablesample/bernoulli.c @@ -43,19 +43,19 @@ typedef struct static void bernoulli_samplescangetsamplesize(PlannerInfo *root, - RelOptInfo *baserel, - List *paramexprs, - BlockNumber *pages, - double *tuples); + RelOptInfo *baserel, + List *paramexprs, + BlockNumber *pages, + double *tuples); static void bernoulli_initsamplescan(SampleScanState *node, - int eflags); + int eflags); static void bernoulli_beginsamplescan(SampleScanState *node, - Datum *params, - int nparams, - uint32 seed); + Datum *params, + int nparams, + uint32 seed); static OffsetNumber bernoulli_nextsampletuple(SampleScanState *node, - BlockNumber blockno, - OffsetNumber maxoffset); + BlockNumber blockno, + OffsetNumber maxoffset); /* diff --git a/src/backend/access/tablesample/system.c b/src/backend/access/tablesample/system.c index b1fb9b32015..4693c667b5d 100644 --- a/src/backend/access/tablesample/system.c +++ b/src/backend/access/tablesample/system.c @@ -45,20 +45,20 @@ typedef struct static void system_samplescangetsamplesize(PlannerInfo *root, - RelOptInfo *baserel, - List *paramexprs, - BlockNumber *pages, - double *tuples); + RelOptInfo *baserel, + List *paramexprs, + BlockNumber *pages, + double *tuples); static void system_initsamplescan(SampleScanState *node, - int eflags); + int eflags); static void system_beginsamplescan(SampleScanState *node, - Datum *params, - int nparams, - uint32 seed); + Datum *params, + int nparams, + uint32 seed); static BlockNumber system_nextsampleblock(SampleScanState *node, BlockNumber nblocks); static OffsetNumber system_nextsampletuple(SampleScanState *node, - BlockNumber blockno, - OffsetNumber maxoffset); + BlockNumber blockno, + OffsetNumber maxoffset); /* diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c index 3bd55fbdd33..47db7a8a88c 100644 --- a/src/backend/access/transam/clog.c +++ b/src/backend/access/transam/clog.c @@ -92,20 +92,20 @@ static int ZeroCLOGPage(int pageno, bool writeXlog); static bool CLOGPagePrecedes(int page1, int page2); static void WriteZeroPageXlogRec(int pageno); static void WriteTruncateXlogRec(int pageno, TransactionId oldestXact, - Oid oldestXidDb); + Oid oldestXidDb); static void TransactionIdSetPageStatus(TransactionId xid, int nsubxids, - TransactionId *subxids, XidStatus status, - XLogRecPtr lsn, int pageno, - bool all_xact_same_page); + TransactionId *subxids, XidStatus status, + XLogRecPtr lsn, int pageno, + bool all_xact_same_page); static void TransactionIdSetStatusBit(TransactionId xid, XidStatus status, - XLogRecPtr lsn, int slotno); + XLogRecPtr lsn, int slotno); static void set_status_by_pages(int nsubxids, TransactionId *subxids, - XidStatus status, XLogRecPtr lsn); + XidStatus status, XLogRecPtr lsn); static bool TransactionGroupUpdateXidStatus(TransactionId xid, - XidStatus status, XLogRecPtr lsn, int pageno); + XidStatus status, XLogRecPtr lsn, int pageno); static void TransactionIdSetPageStatusInternal(TransactionId xid, int nsubxids, - TransactionId *subxids, XidStatus status, - XLogRecPtr lsn, int pageno); + TransactionId *subxids, XidStatus status, + XLogRecPtr lsn, int pageno); /* diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c index 8162f884bd1..3316734e14f 100644 --- a/src/backend/access/transam/commit_ts.c +++ b/src/backend/access/transam/commit_ts.c @@ -103,10 +103,10 @@ CommitTimestampShared *commitTsShared; bool track_commit_timestamp; static void SetXidCommitTsInPage(TransactionId xid, int nsubxids, - TransactionId *subxids, TimestampTz ts, - RepOriginId nodeid, int pageno); + TransactionId *subxids, TimestampTz ts, + RepOriginId nodeid, int pageno); static void TransactionIdSetCommitTs(TransactionId xid, TimestampTz ts, - RepOriginId nodeid, int slotno); + RepOriginId nodeid, int slotno); static void error_commit_ts_disabled(void); static int ZeroCommitTsPage(int pageno, bool writeXlog); static bool CommitTsPagePrecedes(int page1, int page2); @@ -115,8 +115,8 @@ static void DeactivateCommitTs(void); static void WriteZeroPageXlogRec(int pageno); static void WriteTruncateXlogRec(int pageno, TransactionId oldestXid); static void WriteSetTimestampXlogRec(TransactionId mainxid, int nsubxids, - TransactionId *subxids, TimestampTz timestamp, - RepOriginId nodeid); + TransactionId *subxids, TimestampTz timestamp, + RepOriginId nodeid); /* * TransactionTreeSetCommitTsData diff --git a/src/backend/access/transam/generic_xlog.c b/src/backend/access/transam/generic_xlog.c index 5b00b7275bf..d2591601030 100644 --- a/src/backend/access/transam/generic_xlog.c +++ b/src/backend/access/transam/generic_xlog.c @@ -69,11 +69,11 @@ struct GenericXLogState }; static void writeFragment(PageData *pageData, OffsetNumber offset, - OffsetNumber len, const char *data); + OffsetNumber len, const char *data); static void computeRegionDelta(PageData *pageData, - const char *curpage, const char *targetpage, - int targetStart, int targetEnd, - int validStart, int validEnd); + const char *curpage, const char *targetpage, + int targetStart, int targetEnd, + int validStart, int validEnd); static void computeDelta(PageData *pageData, Page curpage, Page targetpage); static void applyPageRedo(Page page, const char *delta, Size deltaSize); diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index 763b9997071..4004468fa01 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -340,7 +340,7 @@ static MemoryContext MXactContext = NULL; /* internal MultiXactId management */ static void MultiXactIdSetOldestVisible(void); static void RecordNewMultiXact(MultiXactId multi, MultiXactOffset offset, - int nmembers, MultiXactMember *members); + int nmembers, MultiXactMember *members); static MultiXactId GetNewMultiXactId(int nmembers, MultiXactOffset *offset); /* MultiXact cache management */ @@ -348,7 +348,7 @@ static int mxactMemberComparator(const void *arg1, const void *arg2); static MultiXactId mXactCacheGetBySet(int nmembers, MultiXactMember *members); static int mXactCacheGetById(MultiXactId multi, MultiXactMember **members); static void mXactCachePut(MultiXactId multi, int nmembers, - MultiXactMember *members); + MultiXactMember *members); static char *mxstatus_to_string(MultiXactStatus status); @@ -358,17 +358,17 @@ static int ZeroMultiXactMemberPage(int pageno, bool writeXlog); static bool MultiXactOffsetPagePrecedes(int page1, int page2); static bool MultiXactMemberPagePrecedes(int page1, int page2); static bool MultiXactOffsetPrecedes(MultiXactOffset offset1, - MultiXactOffset offset2); + MultiXactOffset offset2); static void ExtendMultiXactOffset(MultiXactId multi); static void ExtendMultiXactMember(MultiXactOffset offset, int nmembers); static bool MultiXactOffsetWouldWrap(MultiXactOffset boundary, - MultiXactOffset start, uint32 distance); + MultiXactOffset start, uint32 distance); static bool SetOffsetVacuumLimit(bool is_startup); static bool find_multixact_start(MultiXactId multi, MultiXactOffset *result); static void WriteMZeroPageXlogRec(int pageno, uint8 info); static void WriteMTruncateXlogRec(Oid oldestMultiDB, - MultiXactId startOff, MultiXactId endOff, - MultiXactOffset startMemb, MultiXactOffset endMemb); + MultiXactId startOff, MultiXactId endOff, + MultiXactOffset startMemb, MultiXactOffset endMemb); /* diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index 974d42fc866..2dbc65b125b 100644 --- a/src/backend/access/transam/slru.c +++ b/src/backend/access/transam/slru.c @@ -129,12 +129,12 @@ static void SimpleLruWaitIO(SlruCtl ctl, int slotno); static void SlruInternalWritePage(SlruCtl ctl, int slotno, SlruFlush fdata); static bool SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno); static bool SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, - SlruFlush fdata); + SlruFlush fdata); static void SlruReportIOError(SlruCtl ctl, int pageno, TransactionId xid); static int SlruSelectLRUPage(SlruCtl ctl, int pageno); static bool SlruScanDirCbDeleteCutoff(SlruCtl ctl, char *filename, - int segpage, void *data); + int segpage, void *data); static void SlruInternalDeleteSegment(SlruCtl ctl, char *filename); /* diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 21e028283c1..5196d6181dd 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -202,31 +202,31 @@ static GlobalTransaction MyLockedGxact = NULL; static bool twophaseExitRegistered = false; static void RecordTransactionCommitPrepared(TransactionId xid, - int nchildren, - TransactionId *children, - int nrels, - RelFileNode *rels, - int ninvalmsgs, - SharedInvalidationMessage *invalmsgs, - bool initfileinval, - const char *gid); + int nchildren, + TransactionId *children, + int nrels, + RelFileNode *rels, + int ninvalmsgs, + SharedInvalidationMessage *invalmsgs, + bool initfileinval, + const char *gid); static void RecordTransactionAbortPrepared(TransactionId xid, - int nchildren, - TransactionId *children, - int nrels, - RelFileNode *rels, - const char *gid); + int nchildren, + TransactionId *children, + int nrels, + RelFileNode *rels, + const char *gid); static void ProcessRecords(char *bufptr, TransactionId xid, - const TwoPhaseCallback callbacks[]); + const TwoPhaseCallback callbacks[]); static void RemoveGXact(GlobalTransaction gxact); static void XlogReadTwoPhaseData(XLogRecPtr lsn, char **buf, int *len); static char *ProcessTwoPhaseBuffer(TransactionId xid, - XLogRecPtr prepare_start_lsn, - bool fromdisk, bool setParent, bool setNextXid); + XLogRecPtr prepare_start_lsn, + bool fromdisk, bool setParent, bool setNextXid); static void MarkAsPreparingGuts(GlobalTransaction gxact, TransactionId xid, - const char *gid, TimestampTz prepared_at, Oid owner, - Oid databaseid); + const char *gid, TimestampTz prepared_at, Oid owner, + Oid databaseid); static void RemoveTwoPhaseFile(TransactionId xid, bool giveWarning); static void RecreateTwoPhaseFile(TransactionId xid, void *content, int len); diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index b40da74e092..f1108ccc8b7 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -312,11 +312,11 @@ static void AtStart_Memory(void); static void AtStart_ResourceOwner(void); static void CallXactCallbacks(XactEvent event); static void CallSubXactCallbacks(SubXactEvent event, - SubTransactionId mySubid, - SubTransactionId parentSubid); + SubTransactionId mySubid, + SubTransactionId parentSubid); static void CleanupTransaction(void); static void CheckTransactionBlock(bool isTopLevel, bool throwError, - const char *stmtType); + const char *stmtType); static void CommitTransaction(void); static TransactionId RecordTransactionAbort(bool isSubXact); static void StartTransaction(void); diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index c7c9e91b6a4..1c7dd51b9f1 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -869,7 +869,7 @@ static void SetCurrentChunkStartTime(TimestampTz xtime); static void CheckRequiredParameterValues(void); static void XLogReportParameters(void); static void checkTimeLineSwitch(XLogRecPtr lsn, TimeLineID newTLI, - TimeLineID prevTLI); + TimeLineID prevTLI); static void LocalSetXLogInsertAllowed(void); static void CreateEndOfRecoveryRecord(void); static void CheckPointGuts(XLogRecPtr checkPointRedo, int flags); @@ -880,16 +880,16 @@ static void AdvanceXLInsertBuffer(XLogRecPtr upto, bool opportunistic); static bool XLogCheckpointNeeded(XLogSegNo new_segno); static void XLogWrite(XLogwrtRqst WriteRqst, bool flexible); static bool InstallXLogFileSegment(XLogSegNo *segno, char *tmppath, - bool find_free, XLogSegNo max_segno, - bool use_lock); -static int XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli, - int source, bool notfoundOk); + bool find_free, XLogSegNo max_segno, + bool use_lock); +static int XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli, + int source, bool notfoundOk); static int XLogFileReadAnyTLI(XLogSegNo segno, int emode, int source); -static int XLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr, - int reqLen, XLogRecPtr targetRecPtr, char *readBuf, - TimeLineID *readTLI); +static int XLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr, + int reqLen, XLogRecPtr targetRecPtr, char *readBuf, + TimeLineID *readTLI); static bool WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess, - bool fetching_ckpt, XLogRecPtr tliRecPtr); + bool fetching_ckpt, XLogRecPtr tliRecPtr); static int emode_for_corrupt_record(int emode, XLogRecPtr RecPtr); static void XLogFileClose(void); static void PreallocXlogFiles(XLogRecPtr endptr); @@ -901,10 +901,10 @@ static void ValidateXLOGDirectoryStructure(void); static void CleanupBackupHistory(void); static void UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force); static XLogRecord *ReadRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, - int emode, bool fetching_ckpt); + int emode, bool fetching_ckpt); static void CheckRecoveryConsistency(void); static XLogRecord *ReadCheckpointRecord(XLogReaderState *xlogreader, - XLogRecPtr RecPtr, int whichChkpti, bool report); + XLogRecPtr RecPtr, int whichChkpti, bool report); static bool rescanLatestTimeLine(void); static void WriteControlFile(void); static void ReadControlFile(void); @@ -918,19 +918,19 @@ static void xlog_outdesc(StringInfo buf, XLogReaderState *record); static void pg_start_backup_callback(int code, Datum arg); static void pg_stop_backup_callback(int code, Datum arg); static bool read_backup_label(XLogRecPtr *checkPointLoc, - bool *backupEndRequired, bool *backupFromStandby); + bool *backupEndRequired, bool *backupFromStandby); static bool read_tablespace_map(List **tablespaces); static void rm_redo_error_callback(void *arg); static int get_sync_bit(int method); static void CopyXLogRecordToWAL(int write_len, bool isLogSwitch, - XLogRecData *rdata, - XLogRecPtr StartPos, XLogRecPtr EndPos); + XLogRecData *rdata, + XLogRecPtr StartPos, XLogRecPtr EndPos); static void ReserveXLogInsertLocation(int size, XLogRecPtr *StartPos, - XLogRecPtr *EndPos, XLogRecPtr *PrevPtr); + XLogRecPtr *EndPos, XLogRecPtr *PrevPtr); static bool ReserveXLogSwitch(XLogRecPtr *StartPos, XLogRecPtr *EndPos, - XLogRecPtr *PrevPtr); + XLogRecPtr *PrevPtr); static XLogRecPtr WaitXLogInsertionsToFinish(XLogRecPtr upto); static char *GetXLogBuffer(XLogRecPtr ptr); static XLogRecPtr XLogBytePosToRecPtr(uint64 bytepos); diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c index 1c76dcfa0dc..d3c0a93a2e7 100644 --- a/src/backend/access/transam/xloginsert.c +++ b/src/backend/access/transam/xloginsert.c @@ -107,10 +107,10 @@ static bool begininsert_called = false; static MemoryContext xloginsert_cxt; static XLogRecData *XLogRecordAssemble(RmgrId rmid, uint8 info, - XLogRecPtr RedoRecPtr, bool doPageWrites, - XLogRecPtr *fpw_lsn); + XLogRecPtr RedoRecPtr, bool doPageWrites, + XLogRecPtr *fpw_lsn); static bool XLogCompressBackupBlock(char *page, uint16 hole_offset, - uint16 hole_length, char *dest, uint16 *dlen); + uint16 hole_length, char *dest, uint16 *dlen); /* * Begin constructing a WAL record. This must be called before the diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index 9196aa3aaef..88be7fe0223 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -32,11 +32,11 @@ static bool allocate_recordbuf(XLogReaderState *state, uint32 reclength); static bool ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr, - XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess); + XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess); static bool ValidXLogRecord(XLogReaderState *state, XLogRecord *record, - XLogRecPtr recptr); -static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr, - int reqLen); + XLogRecPtr recptr); +static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr, + int reqLen); static void report_invalid_record(XLogReaderState *state, const char *fmt,...) pg_attribute_printf(2, 3); static void ResetDecoder(XLogReaderState *state); diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index f0fdda1eb91..2797af35c3d 100644 --- a/src/backend/catalog/aclchk.c +++ b/src/backend/catalog/aclchk.c @@ -120,26 +120,26 @@ static List *objectNamesToOids(ObjectType objtype, List *objnames); static List *objectsInSchemaToOids(ObjectType objtype, List *nspnames); static List *getRelationsInNamespace(Oid namespaceId, char relkind); static void expand_col_privileges(List *colnames, Oid table_oid, - AclMode this_privileges, - AclMode *col_privileges, - int num_col_privileges); + AclMode this_privileges, + AclMode *col_privileges, + int num_col_privileges); static void expand_all_col_privileges(Oid table_oid, Form_pg_class classForm, - AclMode this_privileges, - AclMode *col_privileges, - int num_col_privileges); + AclMode this_privileges, + AclMode *col_privileges, + int num_col_privileges); static AclMode string_to_privilege(const char *privname); static const char *privilege_to_string(AclMode privilege); static AclMode restrict_and_check_grant(bool is_grant, AclMode avail_goptions, - bool all_privs, AclMode privileges, - Oid objectId, Oid grantorId, - ObjectType objtype, const char *objname, - AttrNumber att_number, const char *colname); + bool all_privs, AclMode privileges, + Oid objectId, Oid grantorId, + ObjectType objtype, const char *objname, + AttrNumber att_number, const char *colname); static AclMode pg_aclmask(ObjectType objtype, Oid table_oid, AttrNumber attnum, - Oid roleid, AclMode mask, AclMaskHow how); + Oid roleid, AclMode mask, AclMaskHow how); static void recordExtensionInitPriv(Oid objoid, Oid classoid, int objsubid, - Acl *new_acl); + Acl *new_acl); static void recordExtensionInitPrivWorker(Oid objoid, Oid classoid, int objsubid, - Acl *new_acl); + Acl *new_acl); #ifdef ACLDEBUG diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c index 7af1670c0d2..6315fc4b2fd 100644 --- a/src/backend/catalog/dependency.c +++ b/src/backend/catalog/dependency.c @@ -186,36 +186,36 @@ static const Oid object_classes[] = { static void findDependentObjects(const ObjectAddress *object, - int objflags, - int flags, - ObjectAddressStack *stack, - ObjectAddresses *targetObjects, - const ObjectAddresses *pendingObjects, - Relation *depRel); + int objflags, + int flags, + ObjectAddressStack *stack, + ObjectAddresses *targetObjects, + const ObjectAddresses *pendingObjects, + Relation *depRel); static void reportDependentObjects(const ObjectAddresses *targetObjects, - DropBehavior behavior, - int flags, - const ObjectAddress *origObject); + DropBehavior behavior, + int flags, + const ObjectAddress *origObject); static void deleteOneObject(const ObjectAddress *object, - Relation *depRel, int32 flags); + Relation *depRel, int32 flags); static void doDeletion(const ObjectAddress *object, int flags); static void AcquireDeletionLock(const ObjectAddress *object, int flags); static void ReleaseDeletionLock(const ObjectAddress *object); static bool find_expr_references_walker(Node *node, - find_expr_references_context *context); + find_expr_references_context *context); static void eliminate_duplicate_dependencies(ObjectAddresses *addrs); static int object_address_comparator(const void *a, const void *b); static void add_object_address(ObjectClass oclass, Oid objectId, int32 subId, - ObjectAddresses *addrs); -static void add_exact_object_address_extra(const ObjectAddress *object, - const ObjectAddressExtra *extra, ObjectAddresses *addrs); +static void add_exact_object_address_extra(const ObjectAddress *object, + const ObjectAddressExtra *extra, + ObjectAddresses *addrs); static bool object_address_present_add_flags(const ObjectAddress *object, - int flags, - ObjectAddresses *addrs); + int flags, + ObjectAddresses *addrs); static bool stack_address_present_add_flags(const ObjectAddress *object, - int flags, - ObjectAddressStack *stack); + int flags, + ObjectAddressStack *stack); static void DeleteInitPrivs(const ObjectAddress *object); diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 3c46c251071..86820eecfc7 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -94,37 +94,37 @@ Oid binary_upgrade_next_heap_pg_class_oid = InvalidOid; Oid binary_upgrade_next_toast_pg_class_oid = InvalidOid; static void AddNewRelationTuple(Relation pg_class_desc, - Relation new_rel_desc, - Oid new_rel_oid, - Oid new_type_oid, - Oid reloftype, - Oid relowner, - char relkind, - TransactionId relfrozenxid, - TransactionId relminmxid, - Datum relacl, - Datum reloptions); + Relation new_rel_desc, + Oid new_rel_oid, + Oid new_type_oid, + Oid reloftype, + Oid relowner, + char relkind, + TransactionId relfrozenxid, + TransactionId relminmxid, + Datum relacl, + Datum reloptions); static ObjectAddress AddNewRelationType(const char *typeName, - Oid typeNamespace, - Oid new_rel_oid, - char new_rel_kind, - Oid ownerid, - Oid new_row_type, - Oid new_array_type); + Oid typeNamespace, + Oid new_rel_oid, + char new_rel_kind, + Oid ownerid, + Oid new_row_type, + Oid new_array_type); static void RelationRemoveInheritance(Oid relid); -static Oid StoreRelCheck(Relation rel, const char *ccname, Node *expr, - bool is_validated, bool is_local, int inhcount, - bool is_no_inherit, bool is_internal); +static Oid StoreRelCheck(Relation rel, const char *ccname, Node *expr, + bool is_validated, bool is_local, int inhcount, + bool is_no_inherit, bool is_internal); static void StoreConstraints(Relation rel, List *cooked_constraints, - bool is_internal); + bool is_internal); static bool MergeWithExistingConstraint(Relation rel, const char *ccname, Node *expr, - bool allow_merge, bool is_local, - bool is_initially_valid, - bool is_no_inherit); + bool allow_merge, bool is_local, + bool is_initially_valid, + bool is_no_inherit); static void SetRelationNumChecks(Relation rel, int numchecks); static Node *cookConstraint(ParseState *pstate, - Node *raw_constraint, - char *relname); + Node *raw_constraint, + char *relname); static List *insert_ordered_unique_oid(List *list, Oid datum); diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index b7d1ac0923f..50c8bb9ce65 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -99,31 +99,31 @@ typedef struct /* non-export function prototypes */ static bool relationHasPrimaryKey(Relation rel); static TupleDesc ConstructTupleDescriptor(Relation heapRelation, - IndexInfo *indexInfo, - List *indexColNames, - Oid accessMethodObjectId, - Oid *collationObjectId, - Oid *classObjectId); + IndexInfo *indexInfo, + List *indexColNames, + Oid accessMethodObjectId, + Oid *collationObjectId, + Oid *classObjectId); static void InitializeAttributeOids(Relation indexRelation, - int numatts, Oid indexoid); + int numatts, Oid indexoid); static void AppendAttributeTuples(Relation indexRelation, int numatts); static void UpdateIndexRelation(Oid indexoid, Oid heapoid, - Oid parentIndexId, - IndexInfo *indexInfo, - Oid *collationOids, - Oid *classOids, - int16 *coloptions, - bool primary, - bool isexclusion, - bool immediate, - bool isvalid, - bool isready); + Oid parentIndexId, + IndexInfo *indexInfo, + Oid *collationOids, + Oid *classOids, + int16 *coloptions, + bool primary, + bool isexclusion, + bool immediate, + bool isvalid, + bool isready); static void index_update_stats(Relation rel, - bool hasindex, - double reltuples); + bool hasindex, + double reltuples); static void IndexCheckExclusion(Relation heapRelation, - Relation indexRelation, - IndexInfo *indexInfo); + Relation indexRelation, + IndexInfo *indexInfo); static bool validate_index_callback(ItemPointer itemptr, void *opaque); static bool ReindexIsCurrentlyProcessingIndex(Oid indexOid); static void SetReindexProcessing(Oid heapOid, Oid indexOid); diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c index cdd5006a72f..97b911679cf 100644 --- a/src/backend/catalog/namespace.c +++ b/src/backend/catalog/namespace.c @@ -198,7 +198,7 @@ static void RemoveTempRelations(Oid tempNamespaceId); static void RemoveTempRelationsCallback(int code, Datum arg); static void NamespaceCallback(Datum arg, int cacheid, uint32 hashvalue); static bool MatchNamedCall(HeapTuple proctup, int nargs, List *argnames, - int **argnumbers); + int **argnumbers); /* diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index 7a32ac1fb13..2235e5626fb 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -761,38 +761,38 @@ const ObjectAddress InvalidObjectAddress = }; static ObjectAddress get_object_address_unqualified(ObjectType objtype, - Value *strval, bool missing_ok); + Value *strval, bool missing_ok); static ObjectAddress get_relation_by_qualified_name(ObjectType objtype, - List *object, Relation *relp, - LOCKMODE lockmode, bool missing_ok); + List *object, Relation *relp, + LOCKMODE lockmode, bool missing_ok); static ObjectAddress get_object_address_relobject(ObjectType objtype, - List *object, Relation *relp, bool missing_ok); + List *object, Relation *relp, bool missing_ok); static ObjectAddress get_object_address_attribute(ObjectType objtype, - List *object, Relation *relp, - LOCKMODE lockmode, bool missing_ok); + List *object, Relation *relp, + LOCKMODE lockmode, bool missing_ok); static ObjectAddress get_object_address_attrdef(ObjectType objtype, - List *object, Relation *relp, LOCKMODE lockmode, - bool missing_ok); + List *object, Relation *relp, LOCKMODE lockmode, + bool missing_ok); static ObjectAddress get_object_address_type(ObjectType objtype, - TypeName *typename, bool missing_ok); + TypeName *typename, bool missing_ok); static ObjectAddress get_object_address_opcf(ObjectType objtype, List *object, - bool missing_ok); + bool missing_ok); static ObjectAddress get_object_address_opf_member(ObjectType objtype, - List *object, bool missing_ok); + List *object, bool missing_ok); static ObjectAddress get_object_address_usermapping(List *object, - bool missing_ok); + bool missing_ok); static ObjectAddress get_object_address_publication_rel(List *object, - Relation *relp, - bool missing_ok); + Relation *relp, + bool missing_ok); static ObjectAddress get_object_address_defacl(List *object, - bool missing_ok); + bool missing_ok); static const ObjectPropertyType *get_object_property_data(Oid class_id); static void getRelationDescription(StringInfo buffer, Oid relid); static void getOpFamilyDescription(StringInfo buffer, Oid opfid); static void getRelationTypeDescription(StringInfo buffer, Oid relid, - int32 objectSubId); + int32 objectSubId); static void getProcedureTypeDescription(StringInfo buffer, Oid procid); static void getConstraintTypeDescription(StringInfo buffer, Oid constroid); static void getOpFamilyIdentity(StringInfo buffer, Oid opfid, List **object); diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index da98c54391b..8134098fc17 100644 --- a/src/backend/catalog/partition.c +++ b/src/backend/catalog/partition.c @@ -35,7 +35,7 @@ static Oid get_partition_parent_worker(Relation inhRel, Oid relid); static void get_partition_ancestors_worker(Relation inhRel, Oid relid, - List **ancestors); + List **ancestors); /* * get_partition_parent diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c index 310d45266ff..7cab039dedc 100644 --- a/src/backend/catalog/pg_aggregate.c +++ b/src/backend/catalog/pg_aggregate.c @@ -34,9 +34,9 @@ #include "utils/syscache.h" -static Oid lookup_agg_function(List *fnName, int nargs, Oid *input_types, - Oid variadicArgType, - Oid *rettype); +static Oid lookup_agg_function(List *fnName, int nargs, Oid *input_types, + Oid variadicArgType, + Oid *rettype); /* diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index 0f9a12b35c2..bcaa26c9978 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -38,27 +38,27 @@ #include "utils/syscache.h" -static Oid OperatorGet(const char *operatorName, - Oid operatorNamespace, - Oid leftObjectId, - Oid rightObjectId, - bool *defined); - -static Oid OperatorLookup(List *operatorName, - Oid leftObjectId, - Oid rightObjectId, - bool *defined); - -static Oid OperatorShellMake(const char *operatorName, - Oid operatorNamespace, - Oid leftTypeId, - Oid rightTypeId); - -static Oid get_other_operator(List *otherOp, - Oid otherLeftTypeId, Oid otherRightTypeId, - const char *operatorName, Oid operatorNamespace, - Oid leftTypeId, Oid rightTypeId, - bool isCommutator); +static Oid OperatorGet(const char *operatorName, + Oid operatorNamespace, + Oid leftObjectId, + Oid rightObjectId, + bool *defined); + +static Oid OperatorLookup(List *operatorName, + Oid leftObjectId, + Oid rightObjectId, + bool *defined); + +static Oid OperatorShellMake(const char *operatorName, + Oid operatorNamespace, + Oid leftTypeId, + Oid rightTypeId); + +static Oid get_other_operator(List *otherOp, + Oid otherLeftTypeId, Oid otherRightTypeId, + const char *operatorName, Oid operatorNamespace, + Oid leftTypeId, Oid rightTypeId, + bool isCommutator); /* diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index 3487caf82f6..002584b9416 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -50,10 +50,10 @@ typedef struct } parse_error_callback_arg; static void sql_function_parse_error_callback(void *arg); -static int match_prosrc_to_query(const char *prosrc, const char *queryText, - int cursorpos); +static int match_prosrc_to_query(const char *prosrc, const char *queryText, + int cursorpos); static bool match_prosrc_to_literal(const char *prosrc, const char *literal, - int cursorpos, int *newcursorpos); + int cursorpos, int *newcursorpos); /* ---------------------------------------------------------------- diff --git a/src/backend/catalog/pg_shdepend.c b/src/backend/catalog/pg_shdepend.c index 4a9b4efb050..fb7f8ddefc9 100644 --- a/src/backend/catalog/pg_shdepend.c +++ b/src/backend/catalog/pg_shdepend.c @@ -84,23 +84,23 @@ typedef struct static void getOidListDiff(Oid *list1, int *nlist1, Oid *list2, int *nlist2); static Oid classIdGetDbId(Oid classId); static void shdepChangeDep(Relation sdepRel, - Oid classid, Oid objid, int32 objsubid, - Oid refclassid, Oid refobjid, - SharedDependencyType deptype); + Oid classid, Oid objid, int32 objsubid, + Oid refclassid, Oid refobjid, + SharedDependencyType deptype); static void shdepAddDependency(Relation sdepRel, - Oid classId, Oid objectId, int32 objsubId, - Oid refclassId, Oid refobjId, - SharedDependencyType deptype); + Oid classId, Oid objectId, int32 objsubId, + Oid refclassId, Oid refobjId, + SharedDependencyType deptype); static void shdepDropDependency(Relation sdepRel, - Oid classId, Oid objectId, int32 objsubId, - bool drop_subobjects, - Oid refclassId, Oid refobjId, - SharedDependencyType deptype); + Oid classId, Oid objectId, int32 objsubId, + bool drop_subobjects, + Oid refclassId, Oid refobjId, + SharedDependencyType deptype); static void storeObjectDescription(StringInfo descs, - SharedDependencyObjectType type, - ObjectAddress *object, - SharedDependencyType deptype, - int count); + SharedDependencyObjectType type, + ObjectAddress *object, + SharedDependencyType deptype, + int count); static bool isSharedObjectPinned(Oid classId, Oid objectId, Relation sdepRel); diff --git a/src/backend/catalog/toasting.c b/src/backend/catalog/toasting.c index cf20ddb4e92..de6282a6675 100644 --- a/src/backend/catalog/toasting.c +++ b/src/backend/catalog/toasting.c @@ -38,9 +38,9 @@ Oid binary_upgrade_next_toast_pg_type_oid = InvalidOid; static void CheckAndCreateToastTable(Oid relOid, Datum reloptions, - LOCKMODE lockmode, bool check); + LOCKMODE lockmode, bool check); static bool create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid, - Datum reloptions, LOCKMODE lockmode, bool check); + Datum reloptions, LOCKMODE lockmode, bool check); static bool needs_toast_table(Relation rel); diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index e0ec62c88c7..6cb545c1265 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -85,24 +85,24 @@ static BufferAccessStrategy vac_strategy; static void do_analyze_rel(Relation onerel, - VacuumParams *params, List *va_cols, - AcquireSampleRowsFunc acquirefunc, BlockNumber relpages, - bool inh, bool in_outer_xact, int elevel); + VacuumParams *params, List *va_cols, + AcquireSampleRowsFunc acquirefunc, BlockNumber relpages, + bool inh, bool in_outer_xact, int elevel); static void compute_index_stats(Relation onerel, double totalrows, - AnlIndexData *indexdata, int nindexes, - HeapTuple *rows, int numrows, - MemoryContext col_context); + AnlIndexData *indexdata, int nindexes, + HeapTuple *rows, int numrows, + MemoryContext col_context); static VacAttrStats *examine_attribute(Relation onerel, int attnum, - Node *index_expr); -static int acquire_sample_rows(Relation onerel, int elevel, - HeapTuple *rows, int targrows, - double *totalrows, double *totaldeadrows); + Node *index_expr); +static int acquire_sample_rows(Relation onerel, int elevel, + HeapTuple *rows, int targrows, + double *totalrows, double *totaldeadrows); static int compare_rows(const void *a, const void *b); -static int acquire_inherited_sample_rows(Relation onerel, int elevel, - HeapTuple *rows, int targrows, - double *totalrows, double *totaldeadrows); +static int acquire_inherited_sample_rows(Relation onerel, int elevel, + HeapTuple *rows, int targrows, + double *totalrows, double *totaldeadrows); static void update_attstats(Oid relid, bool inh, - int natts, VacAttrStats **vacattrstats); + int natts, VacAttrStats **vacattrstats); static Datum std_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull); static Datum ind_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull); @@ -1615,25 +1615,25 @@ typedef struct static void compute_trivial_stats(VacAttrStatsP stats, - AnalyzeAttrFetchFunc fetchfunc, - int samplerows, - double totalrows); + AnalyzeAttrFetchFunc fetchfunc, + int samplerows, + double totalrows); static void compute_distinct_stats(VacAttrStatsP stats, - AnalyzeAttrFetchFunc fetchfunc, - int samplerows, - double totalrows); + AnalyzeAttrFetchFunc fetchfunc, + int samplerows, + double totalrows); static void compute_scalar_stats(VacAttrStatsP stats, - AnalyzeAttrFetchFunc fetchfunc, - int samplerows, - double totalrows); + AnalyzeAttrFetchFunc fetchfunc, + int samplerows, + double totalrows); static int compare_scalars(const void *a, const void *b, void *arg); static int compare_mcvs(const void *a, const void *b); -static int analyze_mcv_list(int *mcv_counts, - int num_mcv, - double stadistinct, - double stanullfrac, - int samplerows, - double totalrows); +static int analyze_mcv_list(int *mcv_counts, + int num_mcv, + double stadistinct, + double stanullfrac, + int samplerows, + double totalrows); /* diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index 5a7ee0de4cf..738e6ec7e29 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -387,9 +387,9 @@ static void asyncQueueFillWarning(void); static bool SignalBackends(void); static void asyncQueueReadAllNotifications(void); static bool asyncQueueProcessPageEntries(volatile QueuePosition *current, - QueuePosition stop, - char *page_buffer, - Snapshot snapshot); + QueuePosition stop, + char *page_buffer, + Snapshot snapshot); static void asyncQueueAdvanceTail(void); static void ProcessIncomingNotify(void); static bool AsyncExistsPendingNotify(const char *channel, const char *payload); diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index cacc023619c..ebaec4f8dd9 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -70,8 +70,8 @@ typedef struct static void rebuild_relation(Relation OldHeap, Oid indexOid, bool verbose); static void copy_table_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, - bool verbose, bool *pSwapToastByContent, - TransactionId *pFreezeXid, MultiXactId *pCutoffMulti); + bool verbose, bool *pSwapToastByContent, + TransactionId *pFreezeXid, MultiXactId *pCutoffMulti); static List *get_tables_to_cluster(MemoryContext cluster_context); diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 5f81aa57d42..b00891ffd2b 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -354,13 +354,13 @@ static const char BinarySignature[11] = "PGCOPY\n\377\r\n\0"; /* non-export function prototypes */ static CopyState BeginCopy(ParseState *pstate, bool is_from, Relation rel, - RawStmt *raw_query, Oid queryRelId, List *attnamelist, - List *options); + RawStmt *raw_query, Oid queryRelId, List *attnamelist, + List *options); static void EndCopy(CopyState cstate); static void ClosePipeToProgram(CopyState cstate); static CopyState BeginCopyTo(ParseState *pstate, Relation rel, RawStmt *query, - Oid queryRelId, const char *filename, bool is_program, - List *attnamelist, List *options); + Oid queryRelId, const char *filename, bool is_program, + List *attnamelist, List *options); static void EndCopyTo(CopyState cstate); static uint64 DoCopyTo(CopyState cstate); static uint64 CopyTo(CopyState cstate); @@ -370,14 +370,14 @@ static bool CopyReadLineText(CopyState cstate); static int CopyReadAttributesText(CopyState cstate); static int CopyReadAttributesCSV(CopyState cstate); static Datum CopyReadBinaryAttribute(CopyState cstate, - int column_no, FmgrInfo *flinfo, - Oid typioparam, int32 typmod, - bool *isnull); + int column_no, FmgrInfo *flinfo, + Oid typioparam, int32 typmod, + bool *isnull); static void CopyAttributeOutText(CopyState cstate, char *string); static void CopyAttributeOutCSV(CopyState cstate, char *string, - bool use_quote, bool single_attr); + bool use_quote, bool single_attr); static List *CopyGetAttnums(TupleDesc tupDesc, Relation rel, - List *attnamelist); + List *attnamelist); static char *limit_printout_length(const char *str); /* Low-level communications functions */ @@ -388,8 +388,8 @@ static void CopySendData(CopyState cstate, const void *databuf, int datasize); static void CopySendString(CopyState cstate, const char *str); static void CopySendChar(CopyState cstate, char c); static void CopySendEndOfRow(CopyState cstate); -static int CopyGetData(CopyState cstate, void *databuf, - int minread, int maxread); +static int CopyGetData(CopyState cstate, void *databuf, + int minread, int maxread); static void CopySendInt32(CopyState cstate, int32 val); static bool CopyGetInt32(CopyState cstate, int32 *val); static void CopySendInt16(CopyState cstate, int16 val); diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 5015e5b3b60..15207bf75a1 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -82,11 +82,11 @@ static void createdb_failure_callback(int code, Datum arg); static void movedb(const char *dbname, const char *tblspcname); static void movedb_failure_callback(int code, Datum arg); static bool get_db_info(const char *name, LOCKMODE lockmode, - Oid *dbIdP, Oid *ownerIdP, - int *encodingP, bool *dbIsTemplateP, bool *dbAllowConnP, - Oid *dbLastSysOidP, TransactionId *dbFrozenXidP, - MultiXactId *dbMinMultiP, - Oid *dbTablespace, char **dbCollate, char **dbCtype); + Oid *dbIdP, Oid *ownerIdP, + int *encodingP, bool *dbIsTemplateP, bool *dbAllowConnP, + Oid *dbLastSysOidP, TransactionId *dbFrozenXidP, + MultiXactId *dbMinMultiP, + Oid *dbTablespace, char **dbCollate, char **dbCtype); static bool have_createdb_privilege(void); static void remove_dbtablespaces(Oid db_id); static bool check_db_file_conflict(Oid db_id); diff --git a/src/backend/commands/dropcmds.c b/src/backend/commands/dropcmds.c index f26a2f4779a..be7a40d5d2d 100644 --- a/src/backend/commands/dropcmds.c +++ b/src/backend/commands/dropcmds.c @@ -32,13 +32,13 @@ static void does_not_exist_skipping(ObjectType objtype, - Node *object); + Node *object); static bool owningrel_does_not_exist_skipping(List *object, - const char **msg, char **name); + const char **msg, char **name); static bool schema_does_not_exist_skipping(List *object, - const char **msg, char **name); + const char **msg, char **name); static bool type_in_list_does_not_exist_skipping(List *typenames, - const char **msg, char **name); + const char **msg, char **name); /* diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c index adb77d8f692..efef120c038 100644 --- a/src/backend/commands/event_trigger.c +++ b/src/backend/commands/event_trigger.c @@ -148,15 +148,15 @@ typedef struct SQLDropObject } SQLDropObject; static void AlterEventTriggerOwner_internal(Relation rel, - HeapTuple tup, - Oid newOwnerId); + HeapTuple tup, + Oid newOwnerId); static event_trigger_command_tag_check_result check_ddl_tag(const char *tag); static event_trigger_command_tag_check_result check_table_rewrite_ddl_tag( - const char *tag); + const char *tag); static void error_duplicate_filter_variable(const char *defname); static Datum filter_list_to_array(List *filterlist); -static Oid insert_event_trigger_tuple(const char *trigname, const char *eventname, - Oid evtOwner, Oid funcoid, List *tags); +static Oid insert_event_trigger_tuple(const char *trigname, const char *eventname, + Oid evtOwner, Oid funcoid, List *tags); static void validate_ddl_tags(const char *filtervar, List *taglist); static void validate_table_rewrite_tags(const char *filtervar, List *taglist); static void EventTriggerInvoke(List *fn_oid_list, EventTriggerData *trigdata); diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 039a87c1551..92969636b75 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -54,79 +54,79 @@ explain_get_index_name_hook_type explain_get_index_name_hook = NULL; #define X_NOWHITESPACE 4 static void ExplainOneQuery(Query *query, int cursorOptions, - IntoClause *into, ExplainState *es, - const char *queryString, ParamListInfo params, - QueryEnvironment *queryEnv); + IntoClause *into, ExplainState *es, + const char *queryString, ParamListInfo params, + QueryEnvironment *queryEnv); static void report_triggers(ResultRelInfo *rInfo, bool show_relname, - ExplainState *es); + ExplainState *es); static double elapsed_time(instr_time *starttime); static bool ExplainPreScanNode(PlanState *planstate, Bitmapset **rels_used); static void ExplainNode(PlanState *planstate, List *ancestors, - const char *relationship, const char *plan_name, - ExplainState *es); + const char *relationship, const char *plan_name, + ExplainState *es); static void show_plan_tlist(PlanState *planstate, List *ancestors, - ExplainState *es); + ExplainState *es); static void show_expression(Node *node, const char *qlabel, - PlanState *planstate, List *ancestors, - bool useprefix, ExplainState *es); + PlanState *planstate, List *ancestors, + bool useprefix, ExplainState *es); static void show_qual(List *qual, const char *qlabel, - PlanState *planstate, List *ancestors, - bool useprefix, ExplainState *es); + PlanState *planstate, List *ancestors, + bool useprefix, ExplainState *es); static void show_scan_qual(List *qual, const char *qlabel, - PlanState *planstate, List *ancestors, - ExplainState *es); + PlanState *planstate, List *ancestors, + ExplainState *es); static void show_upper_qual(List *qual, const char *qlabel, - PlanState *planstate, List *ancestors, - ExplainState *es); + PlanState *planstate, List *ancestors, + ExplainState *es); static void show_sort_keys(SortState *sortstate, List *ancestors, - ExplainState *es); + ExplainState *es); static void show_merge_append_keys(MergeAppendState *mstate, List *ancestors, - ExplainState *es); + ExplainState *es); static void show_agg_keys(AggState *astate, List *ancestors, - ExplainState *es); + ExplainState *es); static void show_grouping_sets(PlanState *planstate, Agg *agg, - List *ancestors, ExplainState *es); + List *ancestors, ExplainState *es); static void show_grouping_set_keys(PlanState *planstate, - Agg *aggnode, Sort *sortnode, - List *context, bool useprefix, - List *ancestors, ExplainState *es); + Agg *aggnode, Sort *sortnode, + List *context, bool useprefix, + List *ancestors, ExplainState *es); static void show_group_keys(GroupState *gstate, List *ancestors, - ExplainState *es); + ExplainState *es); static void show_sort_group_keys(PlanState *planstate, const char *qlabel, - int nkeys, AttrNumber *keycols, - Oid *sortOperators, Oid *collations, bool *nullsFirst, - List *ancestors, ExplainState *es); + int nkeys, AttrNumber *keycols, + Oid *sortOperators, Oid *collations, bool *nullsFirst, + List *ancestors, ExplainState *es); static void show_sortorder_options(StringInfo buf, Node *sortexpr, - Oid sortOperator, Oid collation, bool nullsFirst); + Oid sortOperator, Oid collation, bool nullsFirst); static void show_tablesample(TableSampleClause *tsc, PlanState *planstate, - List *ancestors, ExplainState *es); + List *ancestors, ExplainState *es); static void show_sort_info(SortState *sortstate, ExplainState *es); static void show_hash_info(HashState *hashstate, ExplainState *es); static void show_tidbitmap_info(BitmapHeapScanState *planstate, - ExplainState *es); + ExplainState *es); static void show_instrumentation_count(const char *qlabel, int which, - PlanState *planstate, ExplainState *es); + PlanState *planstate, ExplainState *es); static void show_foreignscan_info(ForeignScanState *fsstate, ExplainState *es); static void show_eval_params(Bitmapset *bms_params, ExplainState *es); static const char *explain_get_index_name(Oid indexId); static void show_buffer_usage(ExplainState *es, const BufferUsage *usage); static void ExplainIndexScanDetails(Oid indexid, ScanDirection indexorderdir, - ExplainState *es); + ExplainState *es); static void ExplainScanTarget(Scan *plan, ExplainState *es); static void ExplainModifyTarget(ModifyTable *plan, ExplainState *es); static void ExplainTargetRel(Plan *plan, Index rti, ExplainState *es); static void show_modifytable_info(ModifyTableState *mtstate, List *ancestors, - ExplainState *es); + ExplainState *es); static void ExplainMemberNodes(PlanState **planstates, int nsubnodes, - int nplans, List *ancestors, ExplainState *es); + int nplans, List *ancestors, ExplainState *es); static void ExplainSubPlans(List *plans, List *ancestors, - const char *relationship, ExplainState *es); + const char *relationship, ExplainState *es); static void ExplainCustomChildren(CustomScanState *css, - List *ancestors, ExplainState *es); + List *ancestors, ExplainState *es); static void ExplainProperty(const char *qlabel, const char *unit, - const char *value, bool numeric, ExplainState *es); + const char *value, bool numeric, ExplainState *es); static void ExplainDummyGroup(const char *objtype, const char *labelname, - ExplainState *es); + ExplainState *es); static void ExplainXMLTag(const char *tagname, int flags, ExplainState *es); static void ExplainJSONLineEnding(ExplainState *es); static void ExplainYAMLLineStarting(ExplainState *es); diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 300bb1261f7..59ca5cd5a9f 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -104,27 +104,27 @@ typedef struct ExtensionVersionInfo /* Local functions */ static List *find_update_path(List *evi_list, - ExtensionVersionInfo *evi_start, - ExtensionVersionInfo *evi_target, - bool reject_indirect, - bool reinitialize); -static Oid get_required_extension(char *reqExtensionName, - char *extensionName, - char *origSchemaName, - bool cascade, - List *parents, - bool is_create); + ExtensionVersionInfo *evi_start, + ExtensionVersionInfo *evi_target, + bool reject_indirect, + bool reinitialize); +static Oid get_required_extension(char *reqExtensionName, + char *extensionName, + char *origSchemaName, + bool cascade, + List *parents, + bool is_create); static void get_available_versions_for_extension(ExtensionControlFile *pcontrol, - Tuplestorestate *tupstore, - TupleDesc tupdesc); + Tuplestorestate *tupstore, + TupleDesc tupdesc); static Datum convert_requires_to_datum(List *requires); static void ApplyExtensionUpdates(Oid extensionOid, - ExtensionControlFile *pcontrol, - const char *initialVersion, - List *updateVersions, - char *origSchemaName, - bool cascade, - bool is_create); + ExtensionControlFile *pcontrol, + const char *initialVersion, + List *updateVersions, + char *origSchemaName, + bool cascade, + bool is_create); static char *read_whole_file(const char *filename, int *length); diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 62a4c4fb9be..40ea629ffe7 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -70,23 +70,23 @@ /* non-export function prototypes */ static void CheckPredicate(Expr *predicate); static void ComputeIndexAttrs(IndexInfo *indexInfo, - Oid *typeOidP, - Oid *collationOidP, - Oid *classOidP, - int16 *colOptionP, - List *attList, - List *exclusionOpNames, - Oid relId, - const char *accessMethodName, Oid accessMethodId, - bool amcanorder, - bool isconstraint); + Oid *typeOidP, + Oid *collationOidP, + Oid *classOidP, + int16 *colOptionP, + List *attList, + List *exclusionOpNames, + Oid relId, + const char *accessMethodName, Oid accessMethodId, + bool amcanorder, + bool isconstraint); static char *ChooseIndexName(const char *tabname, Oid namespaceId, - List *colnames, List *exclusionOpNames, - bool primary, bool isconstraint); + List *colnames, List *exclusionOpNames, + bool primary, bool isconstraint); static char *ChooseIndexNameAddition(List *colnames); static List *ChooseIndexColumnNames(List *indexElems); static void RangeVarCallbackForReindexIndex(const RangeVar *relation, - Oid relId, Oid oldRelId, void *arg); + Oid relId, Oid oldRelId, void *arg); static bool ReindexRelationConcurrently(Oid relationOid, int options); static void ReindexPartitionedIndex(Relation parentIdx); static void update_relispartition(Oid relationId, bool newval); diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c index 97cf0bc4add..417d595a7fd 100644 --- a/src/backend/commands/lockcmds.c +++ b/src/backend/commands/lockcmds.c @@ -31,7 +31,7 @@ static void LockTableRecurse(Oid reloid, LOCKMODE lockmode, bool nowait, Oid userid); static AclResult LockTableAclCheck(Oid relid, LOCKMODE lockmode, Oid userid); static void RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid, - Oid oldrelid, void *arg); + Oid oldrelid, void *arg); static void LockViewRecurse(Oid reloid, LOCKMODE lockmode, bool nowait, List *ancestor_views); /* diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index 99bf3c29f27..dc2940cd4eb 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -65,10 +65,10 @@ static bool transientrel_receive(TupleTableSlot *slot, DestReceiver *self); static void transientrel_shutdown(DestReceiver *self); static void transientrel_destroy(DestReceiver *self); static uint64 refresh_matview_datafill(DestReceiver *dest, Query *query, - const char *queryString); + const char *queryString); static char *make_temptable_name_n(char *tempname, int n); static void refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner, - int save_sec_context); + int save_sec_context); static void refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence); static bool is_usable_unique_index(Relation indexRel); static void OpenMatViewIncrementalMaintenance(void); diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index b8c7b9657f7..6a1ccdeb826 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -52,27 +52,27 @@ static void AlterOpFamilyAdd(AlterOpFamilyStmt *stmt, - Oid amoid, Oid opfamilyoid, - int maxOpNumber, int maxProcNumber, - List *items); + Oid amoid, Oid opfamilyoid, + int maxOpNumber, int maxProcNumber, + List *items); static void AlterOpFamilyDrop(AlterOpFamilyStmt *stmt, - Oid amoid, Oid opfamilyoid, - int maxOpNumber, int maxProcNumber, - List *items); + Oid amoid, Oid opfamilyoid, + int maxOpNumber, int maxProcNumber, + List *items); static void processTypesSpec(List *args, Oid *lefttype, Oid *righttype); static void assignOperTypes(OpFamilyMember *member, Oid amoid, Oid typeoid); static void assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid); static void addFamilyMember(List **list, OpFamilyMember *member, bool isProc); static void storeOperators(List *opfamilyname, Oid amoid, - Oid opfamilyoid, Oid opclassoid, - List *operators, bool isAdd); + Oid opfamilyoid, Oid opclassoid, + List *operators, bool isAdd); static void storeProcedures(List *opfamilyname, Oid amoid, - Oid opfamilyoid, Oid opclassoid, - List *procedures, bool isAdd); + Oid opfamilyoid, Oid opclassoid, + List *procedures, bool isAdd); static void dropOperators(List *opfamilyname, Oid amoid, Oid opfamilyoid, - List *operators); + List *operators); static void dropProcedures(List *opfamilyname, Oid amoid, Oid opfamilyoid, - List *procedures); + List *procedures); /* * OpFamilyCacheLookup diff --git a/src/backend/commands/policy.c b/src/backend/commands/policy.c index 6a85e143691..1df76623adb 100644 --- a/src/backend/commands/policy.c +++ b/src/backend/commands/policy.c @@ -48,7 +48,7 @@ #include "utils/syscache.h" static void RangeVarCallbackForPolicy(const RangeVar *rv, - Oid relid, Oid oldrelid, void *arg); + Oid relid, Oid oldrelid, void *arg); static char parse_policy_command(const char *cmd_name); static Datum *policy_role_list_to_array(List *roles, int *num_roles); diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c index fc231caf707..c278ee7318b 100644 --- a/src/backend/commands/prepare.c +++ b/src/backend/commands/prepare.c @@ -47,7 +47,7 @@ static HTAB *prepared_queries = NULL; static void InitQueryHashTable(void); static ParamListInfo EvaluateParams(PreparedStatement *pstmt, List *params, - const char *queryString, EState *estate); + const char *queryString, EState *estate); static Datum build_regtype_array(Oid *param_types, int num_params); /* diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index b7917618bff..343cd1dbb05 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -51,8 +51,8 @@ typedef struct } PLTemplate; static ObjectAddress create_proc_lang(const char *languageName, bool replace, - Oid languageOwner, Oid handlerOid, Oid inlineOid, - Oid valOid, bool trusted); + Oid languageOwner, Oid handlerOid, Oid inlineOid, + Oid valOid, bool trusted); static PLTemplate *find_language_template(const char *languageName); /* diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index 0d32f2d6e34..1ac1a71bd95 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -53,7 +53,7 @@ static List *OpenTableList(List *tables); static void CloseTableList(List *rels); static void PublicationAddTables(Oid pubid, List *rels, bool if_not_exists, - AlterPublicationStmt *stmt); + AlterPublicationStmt *stmt); static void PublicationDropTables(Oid pubid, List *rels, bool missing_ok); static void diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index e9add1b9873..0960b339cab 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -99,13 +99,13 @@ static Relation lock_and_open_sequence(SeqTable seq); static void create_seq_hashtable(void); static void init_sequence(Oid relid, SeqTable *p_elm, Relation *p_rel); static Form_pg_sequence_data read_seq_tuple(Relation rel, - Buffer *buf, HeapTuple seqdatatuple); + Buffer *buf, HeapTuple seqdatatuple); static void init_params(ParseState *pstate, List *options, bool for_identity, - bool isInit, - Form_pg_sequence seqform, - Form_pg_sequence_data seqdataform, - bool *need_seq_rewrite, - List **owned_by); + bool isInit, + Form_pg_sequence seqform, + Form_pg_sequence_data seqdataform, + bool *need_seq_rewrite, + List **owned_by); static void do_setval(Oid relid, int64 next, bool iscalled); static void process_owned_by(Relation seqrel, List *owned_by, bool for_identity); diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c index 95ec352abe6..217d3a4533a 100644 --- a/src/backend/commands/statscmds.c +++ b/src/backend/commands/statscmds.c @@ -36,7 +36,7 @@ static char *ChooseExtendedStatisticName(const char *name1, const char *name2, - const char *label, Oid namespaceid); + const char *label, Oid namespaceid); static char *ChooseExtendedStatisticNameAddition(List *exprs); diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 7fa8dcce614..602a8dbd1c3 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -302,196 +302,196 @@ struct DropRelationCallbackState static void truncate_check_rel(Oid relid, Form_pg_class reltuple); static void truncate_check_activity(Relation rel); static void RangeVarCallbackForTruncate(const RangeVar *relation, - Oid relId, Oid oldRelId, void *arg); + Oid relId, Oid oldRelId, void *arg); static List *MergeAttributes(List *schema, List *supers, char relpersistence, - bool is_partition, List **supconstr); + bool is_partition, List **supconstr); static bool MergeCheckConstraint(List *constraints, char *name, Node *expr); static void MergeAttributesIntoExisting(Relation child_rel, Relation parent_rel); static void MergeConstraintsIntoExisting(Relation child_rel, Relation parent_rel); static void StoreCatalogInheritance(Oid relationId, List *supers, - bool child_is_partition); + bool child_is_partition); static void StoreCatalogInheritance1(Oid relationId, Oid parentOid, - int32 seqNumber, Relation inhRelation, - bool child_is_partition); + int32 seqNumber, Relation inhRelation, + bool child_is_partition); static int findAttrByName(const char *attributeName, List *schema); static void AlterIndexNamespaces(Relation classRel, Relation rel, - Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved); + Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved); static void AlterSeqNamespaces(Relation classRel, Relation rel, - Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved, - LOCKMODE lockmode); + Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved, + LOCKMODE lockmode); static ObjectAddress ATExecAlterConstraint(Relation rel, AlterTableCmd *cmd, - bool recurse, bool recursing, LOCKMODE lockmode); + bool recurse, bool recursing, LOCKMODE lockmode); static ObjectAddress ATExecValidateConstraint(Relation rel, char *constrName, - bool recurse, bool recursing, LOCKMODE lockmode); -static int transformColumnNameList(Oid relId, List *colList, - int16 *attnums, Oid *atttypids); -static int transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid, - List **attnamelist, - int16 *attnums, Oid *atttypids, - Oid *opclasses); -static Oid transformFkeyCheckAttrs(Relation pkrel, - int numattrs, int16 *attnums, - Oid *opclasses); + bool recurse, bool recursing, LOCKMODE lockmode); +static int transformColumnNameList(Oid relId, List *colList, + int16 *attnums, Oid *atttypids); +static int transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid, + List **attnamelist, + int16 *attnums, Oid *atttypids, + Oid *opclasses); +static Oid transformFkeyCheckAttrs(Relation pkrel, + int numattrs, int16 *attnums, + Oid *opclasses); static void checkFkeyPermissions(Relation rel, int16 *attnums, int natts); static CoercionPathType findFkeyCast(Oid targetTypeId, Oid sourceTypeId, - Oid *funcid); + Oid *funcid); static void validateCheckConstraint(Relation rel, HeapTuple constrtup); static void validateForeignKeyConstraint(char *conname, - Relation rel, Relation pkrel, - Oid pkindOid, Oid constraintOid); + Relation rel, Relation pkrel, + Oid pkindOid, Oid constraintOid); static void ATController(AlterTableStmt *parsetree, - Relation rel, List *cmds, bool recurse, LOCKMODE lockmode); + Relation rel, List *cmds, bool recurse, LOCKMODE lockmode); static void ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, - bool recurse, bool recursing, LOCKMODE lockmode); + bool recurse, bool recursing, LOCKMODE lockmode); static void ATRewriteCatalogs(List **wqueue, LOCKMODE lockmode); static void ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, - AlterTableCmd *cmd, LOCKMODE lockmode); + AlterTableCmd *cmd, LOCKMODE lockmode); static void ATRewriteTables(AlterTableStmt *parsetree, - List **wqueue, LOCKMODE lockmode); + List **wqueue, LOCKMODE lockmode); static void ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode); static AlteredTableInfo *ATGetQueueEntry(List **wqueue, Relation rel); static void ATSimplePermissions(Relation rel, int allowed_targets); static void ATWrongRelkindError(Relation rel, int allowed_targets); static void ATSimpleRecursion(List **wqueue, Relation rel, - AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode); + AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode); static void ATTypedTableRecursion(List **wqueue, Relation rel, AlterTableCmd *cmd, - LOCKMODE lockmode); + LOCKMODE lockmode); static List *find_typed_table_dependencies(Oid typeOid, const char *typeName, - DropBehavior behavior); + DropBehavior behavior); static void ATPrepAddColumn(List **wqueue, Relation rel, bool recurse, bool recursing, - bool is_view, AlterTableCmd *cmd, LOCKMODE lockmode); + bool is_view, AlterTableCmd *cmd, LOCKMODE lockmode); static ObjectAddress ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, - Relation rel, ColumnDef *colDef, - bool recurse, bool recursing, - bool if_not_exists, LOCKMODE lockmode); + Relation rel, ColumnDef *colDef, + bool recurse, bool recursing, + bool if_not_exists, LOCKMODE lockmode); static bool check_for_column_name_collision(Relation rel, const char *colname, - bool if_not_exists); + bool if_not_exists); static void add_column_datatype_dependency(Oid relid, int32 attnum, Oid typid); static void add_column_collation_dependency(Oid relid, int32 attnum, Oid collid); static void ATPrepDropNotNull(Relation rel, bool recurse, bool recursing); static ObjectAddress ATExecDropNotNull(Relation rel, const char *colName, LOCKMODE lockmode); static void ATPrepSetNotNull(List **wqueue, Relation rel, - AlterTableCmd *cmd, bool recurse, bool recursing, - LOCKMODE lockmode); + AlterTableCmd *cmd, bool recurse, bool recursing, + LOCKMODE lockmode); static ObjectAddress ATExecSetNotNull(AlteredTableInfo *tab, Relation rel, - const char *colName, LOCKMODE lockmode); + const char *colName, LOCKMODE lockmode); static void ATExecCheckNotNull(AlteredTableInfo *tab, Relation rel, - const char *colName, LOCKMODE lockmode); + const char *colName, LOCKMODE lockmode); static bool NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr); static bool ConstraintImpliedByRelConstraint(Relation scanrel, - List *partConstraint, List *existedConstraints); + List *partConstraint, List *existedConstraints); static ObjectAddress ATExecColumnDefault(Relation rel, const char *colName, - Node *newDefault, LOCKMODE lockmode); + Node *newDefault, LOCKMODE lockmode); static ObjectAddress ATExecAddIdentity(Relation rel, const char *colName, - Node *def, LOCKMODE lockmode); + Node *def, LOCKMODE lockmode); static ObjectAddress ATExecSetIdentity(Relation rel, const char *colName, - Node *def, LOCKMODE lockmode); + Node *def, LOCKMODE lockmode); static ObjectAddress ATExecDropIdentity(Relation rel, const char *colName, bool missing_ok, LOCKMODE lockmode); static void ATPrepSetStatistics(Relation rel, const char *colName, int16 colNum, - Node *newValue, LOCKMODE lockmode); + Node *newValue, LOCKMODE lockmode); static ObjectAddress ATExecSetStatistics(Relation rel, const char *colName, int16 colNum, - Node *newValue, LOCKMODE lockmode); + Node *newValue, LOCKMODE lockmode); static ObjectAddress ATExecSetOptions(Relation rel, const char *colName, - Node *options, bool isReset, LOCKMODE lockmode); + Node *options, bool isReset, LOCKMODE lockmode); static ObjectAddress ATExecSetStorage(Relation rel, const char *colName, - Node *newValue, LOCKMODE lockmode); + Node *newValue, LOCKMODE lockmode); static void ATPrepDropColumn(List **wqueue, Relation rel, bool recurse, bool recursing, - AlterTableCmd *cmd, LOCKMODE lockmode); + AlterTableCmd *cmd, LOCKMODE lockmode); static ObjectAddress ATExecDropColumn(List **wqueue, Relation rel, const char *colName, - DropBehavior behavior, - bool recurse, bool recursing, - bool missing_ok, LOCKMODE lockmode); + DropBehavior behavior, + bool recurse, bool recursing, + bool missing_ok, LOCKMODE lockmode); static ObjectAddress ATExecAddIndex(AlteredTableInfo *tab, Relation rel, - IndexStmt *stmt, bool is_rebuild, LOCKMODE lockmode); + IndexStmt *stmt, bool is_rebuild, LOCKMODE lockmode); static ObjectAddress ATExecAddConstraint(List **wqueue, - AlteredTableInfo *tab, Relation rel, - Constraint *newConstraint, bool recurse, bool is_readd, - LOCKMODE lockmode); + AlteredTableInfo *tab, Relation rel, + Constraint *newConstraint, bool recurse, bool is_readd, + LOCKMODE lockmode); static char *ChooseForeignKeyConstraintNameAddition(List *colnames); static ObjectAddress ATExecAddIndexConstraint(AlteredTableInfo *tab, Relation rel, - IndexStmt *stmt, LOCKMODE lockmode); + IndexStmt *stmt, LOCKMODE lockmode); static ObjectAddress ATAddCheckConstraint(List **wqueue, - AlteredTableInfo *tab, Relation rel, - Constraint *constr, - bool recurse, bool recursing, bool is_readd, - LOCKMODE lockmode); + AlteredTableInfo *tab, Relation rel, + Constraint *constr, + bool recurse, bool recursing, bool is_readd, + LOCKMODE lockmode); static ObjectAddress ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, - Relation rel, Constraint *fkconstraint, Oid parentConstr, - bool recurse, bool recursing, - LOCKMODE lockmode); + Relation rel, Constraint *fkconstraint, Oid parentConstr, + bool recurse, bool recursing, + LOCKMODE lockmode); static ObjectAddress addFkRecurseReferenced(List **wqueue, Constraint *fkconstraint, - Relation rel, Relation pkrel, Oid indexOid, Oid parentConstr, - int numfks, int16 *pkattnum, int16 *fkattnum, - Oid *pfeqoperators, Oid *ppeqoperators, Oid *ffeqoperators, - bool old_check_ok); + Relation rel, Relation pkrel, Oid indexOid, Oid parentConstr, + int numfks, int16 *pkattnum, int16 *fkattnum, + Oid *pfeqoperators, Oid *ppeqoperators, Oid *ffeqoperators, + bool old_check_ok); static void addFkRecurseReferencing(List **wqueue, Constraint *fkconstraint, - Relation rel, Relation pkrel, Oid indexOid, Oid parentConstr, - int numfks, int16 *pkattnum, int16 *fkattnum, - Oid *pfeqoperators, Oid *ppeqoperators, Oid *ffeqoperators, - bool old_check_ok, LOCKMODE lockmode); + Relation rel, Relation pkrel, Oid indexOid, Oid parentConstr, + int numfks, int16 *pkattnum, int16 *fkattnum, + Oid *pfeqoperators, Oid *ppeqoperators, Oid *ffeqoperators, + bool old_check_ok, LOCKMODE lockmode); static void CloneForeignKeyConstraints(List **wqueue, Relation parentRel, - Relation partitionRel); + Relation partitionRel); static void CloneFkReferenced(Relation parentRel, Relation partitionRel); static void CloneFkReferencing(List **wqueue, Relation parentRel, - Relation partRel); + Relation partRel); static void createForeignKeyCheckTriggers(Oid myRelOid, Oid refRelOid, - Constraint *fkconstraint, Oid constraintOid, - Oid indexOid); + Constraint *fkconstraint, Oid constraintOid, + Oid indexOid); static void createForeignKeyActionTriggers(Relation rel, Oid refRelOid, - Constraint *fkconstraint, Oid constraintOid, - Oid indexOid); + Constraint *fkconstraint, Oid constraintOid, + Oid indexOid); static bool tryAttachPartitionForeignKey(ForeignKeyCacheInfo *fk, - Oid partRelid, - Oid parentConstrOid, int numfks, - AttrNumber *mapped_conkey, AttrNumber *confkey, - Oid *conpfeqop); + Oid partRelid, + Oid parentConstrOid, int numfks, + AttrNumber *mapped_conkey, AttrNumber *confkey, + Oid *conpfeqop); static void ATExecDropConstraint(Relation rel, const char *constrName, - DropBehavior behavior, - bool recurse, bool recursing, - bool missing_ok, LOCKMODE lockmode); + DropBehavior behavior, + bool recurse, bool recursing, + bool missing_ok, LOCKMODE lockmode); static void ATPrepAlterColumnType(List **wqueue, - AlteredTableInfo *tab, Relation rel, - bool recurse, bool recursing, - AlterTableCmd *cmd, LOCKMODE lockmode); + AlteredTableInfo *tab, Relation rel, + bool recurse, bool recursing, + AlterTableCmd *cmd, LOCKMODE lockmode); static bool ATColumnChangeRequiresRewrite(Node *expr, AttrNumber varattno); static ObjectAddress ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, - AlterTableCmd *cmd, LOCKMODE lockmode); + AlterTableCmd *cmd, LOCKMODE lockmode); static ObjectAddress ATExecAlterColumnGenericOptions(Relation rel, const char *colName, - List *options, LOCKMODE lockmode); + List *options, LOCKMODE lockmode); static void ATPostAlterTypeCleanup(List **wqueue, AlteredTableInfo *tab, - LOCKMODE lockmode); + LOCKMODE lockmode); static void ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid refRelId, - char *cmd, List **wqueue, LOCKMODE lockmode, - bool rewrite); + char *cmd, List **wqueue, LOCKMODE lockmode, + bool rewrite); static void RebuildConstraintComment(AlteredTableInfo *tab, int pass, - Oid objid, Relation rel, List *domname, - const char *conname); + Oid objid, Relation rel, List *domname, + const char *conname); static void TryReuseIndex(Oid oldId, IndexStmt *stmt); static void TryReuseForeignKey(Oid oldId, Constraint *con); static void change_owner_fix_column_acls(Oid relationOid, - Oid oldOwnerId, Oid newOwnerId); + Oid oldOwnerId, Oid newOwnerId); static void change_owner_recurse_to_sequences(Oid relationOid, - Oid newOwnerId, LOCKMODE lockmode); + Oid newOwnerId, LOCKMODE lockmode); static ObjectAddress ATExecClusterOn(Relation rel, const char *indexName, - LOCKMODE lockmode); + LOCKMODE lockmode); static void ATExecDropCluster(Relation rel, LOCKMODE lockmode); static bool ATPrepChangePersistence(Relation rel, bool toLogged); static void ATPrepSetTableSpace(AlteredTableInfo *tab, Relation rel, - const char *tablespacename, LOCKMODE lockmode); + const char *tablespacename, LOCKMODE lockmode); static void ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode); static void ATExecSetTableSpaceNoStorage(Relation rel, Oid newTableSpace); static void ATExecSetRelOptions(Relation rel, List *defList, - AlterTableType operation, - LOCKMODE lockmode); + AlterTableType operation, + LOCKMODE lockmode); static void ATExecEnableDisableTrigger(Relation rel, const char *trigname, - char fires_when, bool skip_system, LOCKMODE lockmode); + char fires_when, bool skip_system, LOCKMODE lockmode); static void ATExecEnableDisableRule(Relation rel, const char *rulename, - char fires_when, LOCKMODE lockmode); + char fires_when, LOCKMODE lockmode); static void ATPrepAddInherit(Relation child_rel); static ObjectAddress ATExecAddInherit(Relation child_rel, RangeVar *parent, LOCKMODE lockmode); static ObjectAddress ATExecDropInherit(Relation rel, RangeVar *parent, LOCKMODE lockmode); static void drop_parent_dependency(Oid relid, Oid refclassid, Oid refobjid, - DependencyType deptype); + DependencyType deptype); static ObjectAddress ATExecAddOf(Relation rel, const TypeName *ofTypename, LOCKMODE lockmode); static void ATExecDropOf(Relation rel, LOCKMODE lockmode); static void ATExecReplicaIdentity(Relation rel, ReplicaIdentityStmt *stmt, LOCKMODE lockmode); @@ -504,27 +504,27 @@ static void index_copy_data(Relation rel, RelFileNode newrnode); static const char *storage_name(char c); static void RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, - Oid oldRelOid, void *arg); + Oid oldRelOid, void *arg); static void RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, - Oid oldrelid, void *arg); + Oid oldrelid, void *arg); static PartitionSpec *transformPartitionSpec(Relation rel, PartitionSpec *partspec, char *strategy); static void ComputePartitionAttrs(ParseState *pstate, Relation rel, List *partParams, AttrNumber *partattrs, - List **partexprs, Oid *partopclass, Oid *partcollation, char strategy); + List **partexprs, Oid *partopclass, Oid *partcollation, char strategy); static void CreateInheritance(Relation child_rel, Relation parent_rel); static void RemoveInheritance(Relation child_rel, Relation parent_rel); static ObjectAddress ATExecAttachPartition(List **wqueue, Relation rel, - PartitionCmd *cmd); + PartitionCmd *cmd); static void AttachPartitionEnsureIndexes(Relation rel, Relation attachrel); static void QueuePartitionConstraintValidation(List **wqueue, Relation scanrel, - List *partConstraint, - bool validate_default); + List *partConstraint, + bool validate_default); static void CloneRowTriggersToPartition(Relation parent, Relation partition); static ObjectAddress ATExecDetachPartition(Relation rel, RangeVar *name); static ObjectAddress ATExecAttachPartitionIdx(List **wqueue, Relation rel, - RangeVar *name); + RangeVar *name); static void validatePartitionedIndex(Relation partedIdx, Relation partedTbl); static void refuseDupeIndexAttach(Relation parentIdx, Relation partIdx, - Relation partitionTbl); + Relation partitionTbl); static List *GetParentedForeignKeyRefs(Relation partition); static void ATDetachCheckNoForeignKeyRefs(Relation partition); diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 33df2ec0af3..87fab52d83f 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -91,7 +91,7 @@ char *temp_tablespaces = NULL; static void create_tablespace_directories(const char *location, - const Oid tablespaceoid); + const Oid tablespaceoid); static bool destroy_tablespace_directories(Oid tablespaceoid, bool redo); diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 209021a61a9..3132a13785b 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -83,26 +83,26 @@ static int MyTriggerDepth = 0; static void ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid); static void SetTriggerFlags(TriggerDesc *trigdesc, Trigger *trigger); static bool GetTupleForTrigger(EState *estate, - EPQState *epqstate, - ResultRelInfo *relinfo, - ItemPointer tid, - LockTupleMode lockmode, - TupleTableSlot *oldslot, - TupleTableSlot **newSlot); + EPQState *epqstate, + ResultRelInfo *relinfo, + ItemPointer tid, + LockTupleMode lockmode, + TupleTableSlot *oldslot, + TupleTableSlot **newSlot); static bool TriggerEnabled(EState *estate, ResultRelInfo *relinfo, - Trigger *trigger, TriggerEvent event, - Bitmapset *modifiedCols, - TupleTableSlot *oldslot, TupleTableSlot *newslot); + Trigger *trigger, TriggerEvent event, + Bitmapset *modifiedCols, + TupleTableSlot *oldslot, TupleTableSlot *newslot); static HeapTuple ExecCallTriggerFunc(TriggerData *trigdata, - int tgindx, - FmgrInfo *finfo, - Instrumentation *instr, - MemoryContext per_tuple_context); + int tgindx, + FmgrInfo *finfo, + Instrumentation *instr, + MemoryContext per_tuple_context); static void AfterTriggerSaveEvent(EState *estate, ResultRelInfo *relinfo, - int event, bool row_trigger, - TupleTableSlot *oldtup, TupleTableSlot *newtup, - List *recheckIndexes, Bitmapset *modifiedCols, - TransitionCaptureState *transition_capture); + int event, bool row_trigger, + TupleTableSlot *oldtup, TupleTableSlot *newtup, + List *recheckIndexes, Bitmapset *modifiedCols, + TransitionCaptureState *transition_capture); static void AfterTriggerEnlargeQueryState(void); static bool before_stmt_triggers_fired(Oid relid, CmdType cmdType); @@ -3843,21 +3843,21 @@ struct AfterTriggersTableData static AfterTriggersData afterTriggers; static void AfterTriggerExecute(EState *estate, - AfterTriggerEvent event, - ResultRelInfo *relInfo, - TriggerDesc *trigdesc, - FmgrInfo *finfo, - Instrumentation *instr, - MemoryContext per_tuple_context, - TupleTableSlot *trig_tuple_slot1, - TupleTableSlot *trig_tuple_slot2); + AfterTriggerEvent event, + ResultRelInfo *relInfo, + TriggerDesc *trigdesc, + FmgrInfo *finfo, + Instrumentation *instr, + MemoryContext per_tuple_context, + TupleTableSlot *trig_tuple_slot1, + TupleTableSlot *trig_tuple_slot2); static AfterTriggersTableData *GetAfterTriggersTableData(Oid relid, - CmdType cmdType); + CmdType cmdType); static void AfterTriggerFreeQuery(AfterTriggersQueryData *qs); static SetConstraintState SetConstraintStateCreate(int numalloc); static SetConstraintState SetConstraintStateCopy(SetConstraintState state); static SetConstraintState SetConstraintStateAddItem(SetConstraintState state, - Oid tgoid, bool tgisdeferred); + Oid tgoid, bool tgisdeferred); static void cancel_prior_stmt_triggers(Oid relid, CmdType cmdType, int tgevent); diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c index 8e5eec22b5e..11a7f29eafa 100644 --- a/src/backend/commands/tsearchcmds.c +++ b/src/backend/commands/tsearchcmds.c @@ -49,9 +49,9 @@ static void MakeConfigurationMapping(AlterTSConfigurationStmt *stmt, - HeapTuple tup, Relation relMap); + HeapTuple tup, Relation relMap); static void DropConfigurationMapping(AlterTSConfigurationStmt *stmt, - HeapTuple tup, Relation relMap); + HeapTuple tup, Relation relMap); /* --------------------- TS Parser commands ------------------------ */ diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 7e6bcc5239c..e9c8873ade9 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -87,7 +87,7 @@ typedef struct Oid binary_upgrade_next_array_pg_type_oid = InvalidOid; static void makeRangeConstructors(const char *name, Oid namespace, - Oid rangeOid, Oid subtype); + Oid rangeOid, Oid subtype); static Oid findTypeInputFunction(List *procname, Oid typeOid); static Oid findTypeOutputFunction(List *procname, Oid typeOid); static Oid findTypeReceiveFunction(List *procname, Oid typeOid); @@ -102,11 +102,11 @@ static void validateDomainConstraint(Oid domainoid, char *ccbin); static List *get_rels_with_domain(Oid domainOid, LOCKMODE lockmode); static void checkEnumOwner(HeapTuple tup); static char *domainAddConstraint(Oid domainOid, Oid domainNamespace, - Oid baseTypeOid, - int typMod, Constraint *constr, - const char *domainName, ObjectAddress *constrAddr); + Oid baseTypeOid, + int typMod, Constraint *constr, + const char *domainName, ObjectAddress *constrAddr); static Node *replace_domain_constraint_value(ParseState *pstate, - ColumnRef *cref); + ColumnRef *cref); /* diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 834094898df..ccc586d8e85 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -49,11 +49,11 @@ int Password_encryption = PASSWORD_TYPE_MD5; check_password_hook_type check_password_hook = NULL; static void AddRoleMems(const char *rolename, Oid roleid, - List *memberSpecs, List *memberIds, - Oid grantorId, bool admin_opt); + List *memberSpecs, List *memberIds, + Oid grantorId, bool admin_opt); static void DelRoleMems(const char *rolename, Oid roleid, - List *memberSpecs, List *memberIds, - bool admin_opt); + List *memberSpecs, List *memberIds, + bool admin_opt); /* Check if current user has createrole privileges */ diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index d69a73d13ed..e7b379dfda1 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -72,9 +72,9 @@ static BufferAccessStrategy vac_strategy; static List *expand_vacuum_rel(VacuumRelation *vrel, int options); static List *get_all_vacuum_rels(int options); static void vac_truncate_clog(TransactionId frozenXID, - MultiXactId minMulti, - TransactionId lastSaneFrozenXid, - MultiXactId lastSaneMinMulti); + MultiXactId minMulti, + TransactionId lastSaneFrozenXid, + MultiXactId lastSaneMinMulti); static bool vacuum_rel(Oid relid, RangeVar *relation, VacuumParams *params); static VacOptTernaryValue get_vacopt_ternary_value(DefElem *def); diff --git a/src/backend/executor/execCurrent.c b/src/backend/executor/execCurrent.c index fdb2c36246d..c7f909241b4 100644 --- a/src/backend/executor/execCurrent.c +++ b/src/backend/executor/execCurrent.c @@ -25,7 +25,7 @@ static char *fetch_cursor_param_value(ExprContext *econtext, int paramId); static ScanState *search_plan_tree(PlanState *node, Oid table_oid, - bool *pending_rescan); + bool *pending_rescan); /* diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c index 5d64471eeda..e4a6c20ed02 100644 --- a/src/backend/executor/execExpr.c +++ b/src/backend/executor/execExpr.c @@ -57,28 +57,28 @@ typedef struct LastAttnumInfo static void ExecReadyExpr(ExprState *state); static void ExecInitExprRec(Expr *node, ExprState *state, - Datum *resv, bool *resnull); + Datum *resv, bool *resnull); static void ExecInitFunc(ExprEvalStep *scratch, Expr *node, List *args, - Oid funcid, Oid inputcollid, - ExprState *state); + Oid funcid, Oid inputcollid, + ExprState *state); static void ExecInitExprSlots(ExprState *state, Node *node); static void ExecPushExprSlots(ExprState *state, LastAttnumInfo *info); static bool get_last_attnums_walker(Node *node, LastAttnumInfo *info); static void ExecComputeSlotInfo(ExprState *state, ExprEvalStep *op); static void ExecInitWholeRowVar(ExprEvalStep *scratch, Var *variable, - ExprState *state); + ExprState *state); static void ExecInitSubscriptingRef(ExprEvalStep *scratch, - SubscriptingRef *sbsref, - ExprState *state, - Datum *resv, bool *resnull); + SubscriptingRef *sbsref, + ExprState *state, + Datum *resv, bool *resnull); static bool isAssignmentIndirectionExpr(Expr *expr); static void ExecInitCoerceToDomain(ExprEvalStep *scratch, CoerceToDomain *ctest, - ExprState *state, - Datum *resv, bool *resnull); + ExprState *state, + Datum *resv, bool *resnull); static void ExecBuildAggTransCall(ExprState *state, AggState *aggstate, - ExprEvalStep *scratch, - FunctionCallInfo fcinfo, AggStatePerTrans pertrans, - int transno, int setno, int setoff, bool ishash); + ExprEvalStep *scratch, + FunctionCallInfo fcinfo, AggStatePerTrans pertrans, + int transno, int setno, int setoff, bool ishash); /* diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c index 612a88456eb..66a67c72b29 100644 --- a/src/backend/executor/execExprInterp.c +++ b/src/backend/executor/execExprInterp.c @@ -145,10 +145,10 @@ static void ExecInitInterpreter(void); static void CheckVarSlotCompatibility(TupleTableSlot *slot, int attnum, Oid vartype); static void CheckOpSlotCompatibility(ExprEvalStep *op, TupleTableSlot *slot); static TupleDesc get_cached_rowtype(Oid type_id, int32 typmod, - TupleDesc *cache_field, ExprContext *econtext); + TupleDesc *cache_field, ExprContext *econtext); static void ShutdownTupleDescRef(Datum arg); static void ExecEvalRowNullInt(ExprState *state, ExprEvalStep *op, - ExprContext *econtext, bool checkisnull); + ExprContext *econtext, bool checkisnull); /* fast-path evaluation functions */ static Datum ExecJustInnerVar(ExprState *state, ExprContext *econtext, bool *isnull); diff --git a/src/backend/executor/execIndexing.c b/src/backend/executor/execIndexing.c index 3b602bb8baf..c41c5f45e7e 100644 --- a/src/backend/executor/execIndexing.c +++ b/src/backend/executor/execIndexing.c @@ -125,17 +125,17 @@ typedef enum } CEOUC_WAIT_MODE; static bool check_exclusion_or_unique_constraint(Relation heap, Relation index, - IndexInfo *indexInfo, - ItemPointer tupleid, - Datum *values, bool *isnull, - EState *estate, bool newIndex, - CEOUC_WAIT_MODE waitMode, - bool errorOK, - ItemPointer conflictTid); + IndexInfo *indexInfo, + ItemPointer tupleid, + Datum *values, bool *isnull, + EState *estate, bool newIndex, + CEOUC_WAIT_MODE waitMode, + bool errorOK, + ItemPointer conflictTid); static bool index_recheck_constraint(Relation index, Oid *constr_procs, - Datum *existing_values, bool *existing_isnull, - Datum *new_values); + Datum *existing_values, bool *existing_isnull, + Datum *new_values); /* ---------------------------------------------------------------- * ExecOpenIndices diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 44e4a6d104c..e80abe1b8b3 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -81,25 +81,25 @@ static void CheckValidRowMarkRel(Relation rel, RowMarkType markType); static void ExecPostprocessPlan(EState *estate); static void ExecEndPlan(PlanState *planstate, EState *estate); static void ExecutePlan(EState *estate, PlanState *planstate, - bool use_parallel_mode, - CmdType operation, - bool sendTuples, - uint64 numberTuples, - ScanDirection direction, - DestReceiver *dest, - bool execute_once); + bool use_parallel_mode, + CmdType operation, + bool sendTuples, + uint64 numberTuples, + ScanDirection direction, + DestReceiver *dest, + bool execute_once); static bool ExecCheckRTEPerms(RangeTblEntry *rte); static bool ExecCheckRTEPermsModified(Oid relOid, Oid userid, - Bitmapset *modifiedCols, - AclMode requiredPerms); + Bitmapset *modifiedCols, + AclMode requiredPerms); static void ExecCheckXactReadOnly(PlannedStmt *plannedstmt); static char *ExecBuildSlotValueDescription(Oid reloid, - TupleTableSlot *slot, - TupleDesc tupdesc, - Bitmapset *modifiedCols, - int maxfieldlen); + TupleTableSlot *slot, + TupleDesc tupdesc, + Bitmapset *modifiedCols, + int maxfieldlen); static void EvalPlanQualStart(EPQState *epqstate, EState *parentestate, - Plan *planTree); + Plan *planTree); /* * Note that GetAllUpdatedColumns() also exists in commands/trigger.c. There does diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c index da9074c54c9..0ab9a9939c2 100644 --- a/src/backend/executor/execParallel.c +++ b/src/backend/executor/execParallel.c @@ -123,15 +123,15 @@ typedef struct ExecParallelInitializeDSMContext /* Helper functions that run in the parallel leader. */ static char *ExecSerializePlan(Plan *plan, EState *estate); static bool ExecParallelEstimate(PlanState *node, - ExecParallelEstimateContext *e); + ExecParallelEstimateContext *e); static bool ExecParallelInitializeDSM(PlanState *node, - ExecParallelInitializeDSMContext *d); + ExecParallelInitializeDSMContext *d); static shm_mq_handle **ExecParallelSetupTupleQueues(ParallelContext *pcxt, - bool reinitialize); + bool reinitialize); static bool ExecParallelReInitializeDSM(PlanState *planstate, - ParallelContext *pcxt); + ParallelContext *pcxt); static bool ExecParallelRetrieveInstrumentation(PlanState *planstate, - SharedExecutorInstrumentation *instrumentation); + SharedExecutorInstrumentation *instrumentation); /* Helper function that runs in the parallel worker. */ static DestReceiver *ExecParallelGetReceiver(dsm_segment *seg, shm_toc *toc); diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index 73ba298c5da..6f2b4d62b41 100644 --- a/src/backend/executor/execPartition.c +++ b/src/backend/executor/execPartition.c @@ -156,42 +156,42 @@ typedef struct SubplanResultRelHashElem static void ExecHashSubPlanResultRelsByOid(ModifyTableState *mtstate, - PartitionTupleRouting *proute); + PartitionTupleRouting *proute); static ResultRelInfo *ExecInitPartitionInfo(ModifyTableState *mtstate, - EState *estate, PartitionTupleRouting *proute, - PartitionDispatch dispatch, - ResultRelInfo *rootResultRelInfo, - int partidx); + EState *estate, PartitionTupleRouting *proute, + PartitionDispatch dispatch, + ResultRelInfo *rootResultRelInfo, + int partidx); static void ExecInitRoutingInfo(ModifyTableState *mtstate, - EState *estate, - PartitionTupleRouting *proute, - PartitionDispatch dispatch, - ResultRelInfo *partRelInfo, - int partidx); + EState *estate, + PartitionTupleRouting *proute, + PartitionDispatch dispatch, + ResultRelInfo *partRelInfo, + int partidx); static PartitionDispatch ExecInitPartitionDispatchInfo(EState *estate, - PartitionTupleRouting *proute, - Oid partoid, PartitionDispatch parent_pd, int partidx); + PartitionTupleRouting *proute, + Oid partoid, PartitionDispatch parent_pd, int partidx); static void FormPartitionKeyDatum(PartitionDispatch pd, - TupleTableSlot *slot, - EState *estate, - Datum *values, - bool *isnull); -static int get_partition_for_tuple(PartitionDispatch pd, Datum *values, - bool *isnull); + TupleTableSlot *slot, + EState *estate, + Datum *values, + bool *isnull); +static int get_partition_for_tuple(PartitionDispatch pd, Datum *values, + bool *isnull); static char *ExecBuildSlotPartitionKeyDescription(Relation rel, - Datum *values, - bool *isnull, - int maxfieldlen); + Datum *values, + bool *isnull, + int maxfieldlen); static List *adjust_partition_tlist(List *tlist, TupleConversionMap *map); static void ExecInitPruningContext(PartitionPruneContext *context, - List *pruning_steps, - PartitionDesc partdesc, - PartitionKey partkey, - PlanState *planstate); + List *pruning_steps, + PartitionDesc partdesc, + PartitionKey partkey, + PlanState *planstate); static void find_matching_subplans_recurse(PartitionPruningData *prunedata, - PartitionedRelPruningData *pprune, - bool initial_prune, - Bitmapset **validsubplans); + PartitionedRelPruningData *pprune, + bool initial_prune, + Bitmapset **validsubplans); /* diff --git a/src/backend/executor/execSRF.c b/src/backend/executor/execSRF.c index 265250186a1..c8a3efc3654 100644 --- a/src/backend/executor/execSRF.c +++ b/src/backend/executor/execSRF.c @@ -35,15 +35,15 @@ /* static function decls */ static void init_sexpr(Oid foid, Oid input_collation, Expr *node, - SetExprState *sexpr, PlanState *parent, - MemoryContext sexprCxt, bool allowSRF, bool needDescForSRF); + SetExprState *sexpr, PlanState *parent, + MemoryContext sexprCxt, bool allowSRF, bool needDescForSRF); static void ShutdownSetExpr(Datum arg); static void ExecEvalFuncArgs(FunctionCallInfo fcinfo, - List *argList, ExprContext *econtext); + List *argList, ExprContext *econtext); static void ExecPrepareTuplestoreResult(SetExprState *sexpr, - ExprContext *econtext, - Tuplestorestate *resultStore, - TupleDesc resultDesc); + ExprContext *econtext, + Tuplestorestate *resultStore, + TupleDesc resultDesc); static void tupledesc_match(TupleDesc dst_tupdesc, TupleDesc src_tupdesc); diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index ad13fd9a05b..3db43e6f8ac 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -70,13 +70,13 @@ static TupleDesc ExecTypeFromTLInternal(List *targetList, - bool skipjunk); + bool skipjunk); static pg_attribute_always_inline void slot_deform_heap_tuple(TupleTableSlot *slot, HeapTuple tuple, uint32 *offp, - int natts); + int natts); static inline void tts_buffer_heap_store_tuple(TupleTableSlot *slot, - HeapTuple tuple, - Buffer buffer, - bool transfer_pin); + HeapTuple tuple, + Buffer buffer, + bool transfer_pin); static void tts_heap_store_tuple(TupleTableSlot *slot, HeapTuple tuple, bool shouldFree); diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index b34f565bfe7..29a8a16f5f9 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -146,24 +146,24 @@ typedef struct SQLFunctionParseInfo /* non-export function prototypes */ static Node *sql_fn_param_ref(ParseState *pstate, ParamRef *pref); static Node *sql_fn_post_column_ref(ParseState *pstate, - ColumnRef *cref, Node *var); + ColumnRef *cref, Node *var); static Node *sql_fn_make_param(SQLFunctionParseInfoPtr pinfo, - int paramno, int location); + int paramno, int location); static Node *sql_fn_resolve_param_name(SQLFunctionParseInfoPtr pinfo, - const char *paramname, int location); + const char *paramname, int location); static List *init_execution_state(List *queryTree_list, - SQLFunctionCachePtr fcache, - bool lazyEvalOK); + SQLFunctionCachePtr fcache, + bool lazyEvalOK); static void init_sql_fcache(FmgrInfo *finfo, Oid collation, bool lazyEvalOK); static void postquel_start(execution_state *es, SQLFunctionCachePtr fcache); static bool postquel_getnext(execution_state *es, SQLFunctionCachePtr fcache); static void postquel_end(execution_state *es); static void postquel_sub_params(SQLFunctionCachePtr fcache, - FunctionCallInfo fcinfo); + FunctionCallInfo fcinfo); static Datum postquel_get_single_result(TupleTableSlot *slot, - FunctionCallInfo fcinfo, - SQLFunctionCachePtr fcache, - MemoryContext resultcontext); + FunctionCallInfo fcinfo, + SQLFunctionCachePtr fcache, + MemoryContext resultcontext); static void sql_exec_error_callback(void *arg); static void ShutdownSQLFunction(Datum arg); static void sqlfunction_startup(DestReceiver *self, int operation, TupleDesc typeinfo); diff --git a/src/backend/executor/instrument.c b/src/backend/executor/instrument.c index 46da055e766..bd36f8ee685 100644 --- a/src/backend/executor/instrument.c +++ b/src/backend/executor/instrument.c @@ -22,7 +22,7 @@ static BufferUsage save_pgBufferUsage; static void BufferUsageAdd(BufferUsage *dst, const BufferUsage *add); static void BufferUsageAccumDiff(BufferUsage *dst, - const BufferUsage *add, const BufferUsage *sub); + const BufferUsage *add, const BufferUsage *sub); /* Allocate new instrumentation structure(s) */ diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 43ab9fb3924..5b4a6029529 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -242,32 +242,32 @@ static void select_current_set(AggState *aggstate, int setno, bool is_hash); static void initialize_phase(AggState *aggstate, int newphase); static TupleTableSlot *fetch_input_tuple(AggState *aggstate); static void initialize_aggregates(AggState *aggstate, - AggStatePerGroup *pergroups, - int numReset); + AggStatePerGroup *pergroups, + int numReset); static void advance_transition_function(AggState *aggstate, - AggStatePerTrans pertrans, - AggStatePerGroup pergroupstate); + AggStatePerTrans pertrans, + AggStatePerGroup pergroupstate); static void advance_aggregates(AggState *aggstate); static void process_ordered_aggregate_single(AggState *aggstate, - AggStatePerTrans pertrans, - AggStatePerGroup pergroupstate); + AggStatePerTrans pertrans, + AggStatePerGroup pergroupstate); static void process_ordered_aggregate_multi(AggState *aggstate, - AggStatePerTrans pertrans, - AggStatePerGroup pergroupstate); + AggStatePerTrans pertrans, + AggStatePerGroup pergroupstate); static void finalize_aggregate(AggState *aggstate, - AggStatePerAgg peragg, - AggStatePerGroup pergroupstate, - Datum *resultVal, bool *resultIsNull); + AggStatePerAgg peragg, + AggStatePerGroup pergroupstate, + Datum *resultVal, bool *resultIsNull); static void finalize_partialaggregate(AggState *aggstate, - AggStatePerAgg peragg, - AggStatePerGroup pergroupstate, - Datum *resultVal, bool *resultIsNull); + AggStatePerAgg peragg, + AggStatePerGroup pergroupstate, + Datum *resultVal, bool *resultIsNull); static void prepare_projection_slot(AggState *aggstate, - TupleTableSlot *slot, - int currentSet); + TupleTableSlot *slot, + int currentSet); static void finalize_aggregates(AggState *aggstate, - AggStatePerAgg peragg, - AggStatePerGroup pergroup); + AggStatePerAgg peragg, + AggStatePerGroup pergroup); static TupleTableSlot *project_aggregates(AggState *aggstate); static Bitmapset *find_unaggregated_cols(AggState *aggstate); static bool find_unaggregated_cols_walker(Node *node, Bitmapset **colnos); @@ -279,19 +279,19 @@ static void agg_fill_hash_table(AggState *aggstate); static TupleTableSlot *agg_retrieve_hash_table(AggState *aggstate); static Datum GetAggInitVal(Datum textInitVal, Oid transtype); static void build_pertrans_for_aggref(AggStatePerTrans pertrans, - AggState *aggstate, EState *estate, - Aggref *aggref, Oid aggtransfn, Oid aggtranstype, - Oid aggserialfn, Oid aggdeserialfn, - Datum initValue, bool initValueIsNull, - Oid *inputTypes, int numArguments); -static int find_compatible_peragg(Aggref *newagg, AggState *aggstate, - int lastaggno, List **same_input_transnos); -static int find_compatible_pertrans(AggState *aggstate, Aggref *newagg, - bool shareable, - Oid aggtransfn, Oid aggtranstype, - Oid aggserialfn, Oid aggdeserialfn, - Datum initValue, bool initValueIsNull, - List *transnos); + AggState *aggstate, EState *estate, + Aggref *aggref, Oid aggtransfn, Oid aggtranstype, + Oid aggserialfn, Oid aggdeserialfn, + Datum initValue, bool initValueIsNull, + Oid *inputTypes, int numArguments); +static int find_compatible_peragg(Aggref *newagg, AggState *aggstate, + int lastaggno, List **same_input_transnos); +static int find_compatible_pertrans(AggState *aggstate, Aggref *newagg, + bool shareable, + Oid aggtransfn, Oid aggtranstype, + Oid aggserialfn, Oid aggdeserialfn, + Datum initValue, bool initValueIsNull, + List *transnos); /* diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c index a74b46c04f4..758b16dd357 100644 --- a/src/backend/executor/nodeBitmapHeapscan.c +++ b/src/backend/executor/nodeBitmapHeapscan.c @@ -55,14 +55,14 @@ static TupleTableSlot *BitmapHeapNext(BitmapHeapScanState *node); static inline void BitmapDoneInitializingSharedState( - ParallelBitmapHeapState *pstate); + ParallelBitmapHeapState *pstate); static inline void BitmapAdjustPrefetchIterator(BitmapHeapScanState *node, - TBMIterateResult *tbmres); + TBMIterateResult *tbmres); static inline void BitmapAdjustPrefetchTarget(BitmapHeapScanState *node); static inline void BitmapPrefetch(BitmapHeapScanState *node, - TableScanDesc scan); + TableScanDesc scan); static bool BitmapShouldInitializeSharedState( - ParallelBitmapHeapState *pstate); + ParallelBitmapHeapState *pstate); /* ---------------------------------------------------------------- diff --git a/src/backend/executor/nodeGatherMerge.c b/src/backend/executor/nodeGatherMerge.c index d2da5d3a951..6ef128e2aba 100644 --- a/src/backend/executor/nodeGatherMerge.c +++ b/src/backend/executor/nodeGatherMerge.c @@ -55,13 +55,13 @@ static TupleTableSlot *ExecGatherMerge(PlanState *pstate); static int32 heap_compare_slots(Datum a, Datum b, void *arg); static TupleTableSlot *gather_merge_getnext(GatherMergeState *gm_state); static HeapTuple gm_readnext_tuple(GatherMergeState *gm_state, int nreader, - bool nowait, bool *done); + bool nowait, bool *done); static void ExecShutdownGatherMergeWorkers(GatherMergeState *node); static void gather_merge_setup(GatherMergeState *gm_state); static void gather_merge_init(GatherMergeState *gm_state); static void gather_merge_clear_tuples(GatherMergeState *gm_state); static bool gather_merge_readnext(GatherMergeState *gm_state, int reader, - bool nowait); + bool nowait); static void load_tuple_array(GatherMergeState *gm_state, int reader); /* ---------------------------------------------------------------- diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index 64eec91f8b8..3c33ce74e04 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -48,35 +48,35 @@ static void ExecHashIncreaseNumBuckets(HashJoinTable hashtable); static void ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable); static void ExecParallelHashIncreaseNumBuckets(HashJoinTable hashtable); static void ExecHashBuildSkewHash(HashJoinTable hashtable, Hash *node, - int mcvsToUse); + int mcvsToUse); static void ExecHashSkewTableInsert(HashJoinTable hashtable, - TupleTableSlot *slot, - uint32 hashvalue, - int bucketNumber); + TupleTableSlot *slot, + uint32 hashvalue, + int bucketNumber); static void ExecHashRemoveNextSkewBucket(HashJoinTable hashtable); static void *dense_alloc(HashJoinTable hashtable, Size size); static HashJoinTuple ExecParallelHashTupleAlloc(HashJoinTable hashtable, - size_t size, - dsa_pointer *shared); + size_t size, + dsa_pointer *shared); static void MultiExecPrivateHash(HashState *node); static void MultiExecParallelHash(HashState *node); static inline HashJoinTuple ExecParallelHashFirstTuple(HashJoinTable table, - int bucketno); + int bucketno); static inline HashJoinTuple ExecParallelHashNextTuple(HashJoinTable table, - HashJoinTuple tuple); + HashJoinTuple tuple); static inline void ExecParallelHashPushTuple(dsa_pointer_atomic *head, - HashJoinTuple tuple, - dsa_pointer tuple_shared); + HashJoinTuple tuple, + dsa_pointer tuple_shared); static void ExecParallelHashJoinSetUpBatches(HashJoinTable hashtable, int nbatch); static void ExecParallelHashEnsureBatchAccessors(HashJoinTable hashtable); static void ExecParallelHashRepartitionFirst(HashJoinTable hashtable); static void ExecParallelHashRepartitionRest(HashJoinTable hashtable); static HashMemoryChunk ExecParallelHashPopChunkQueue(HashJoinTable table, - dsa_pointer *shared); + dsa_pointer *shared); static bool ExecParallelHashTuplePrealloc(HashJoinTable hashtable, - int batchno, - size_t size); + int batchno, + size_t size); static void ExecParallelHashMergeCounters(HashJoinTable hashtable); static void ExecParallelHashCloseBatchAccessors(HashJoinTable hashtable); diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 5ccdc1af2e8..8484a287e73 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -134,15 +134,15 @@ #define HJ_FILL_INNER(hjstate) ((hjstate)->hj_NullOuterTupleSlot != NULL) static TupleTableSlot *ExecHashJoinOuterGetTuple(PlanState *outerNode, - HashJoinState *hjstate, - uint32 *hashvalue); + HashJoinState *hjstate, + uint32 *hashvalue); static TupleTableSlot *ExecParallelHashJoinOuterGetTuple(PlanState *outerNode, - HashJoinState *hjstate, - uint32 *hashvalue); + HashJoinState *hjstate, + uint32 *hashvalue); static TupleTableSlot *ExecHashJoinGetSavedTuple(HashJoinState *hjstate, - BufFile *file, - uint32 *hashvalue, - TupleTableSlot *tupleSlot); + BufFile *file, + uint32 *hashvalue, + TupleTableSlot *tupleSlot); static bool ExecHashJoinNewBatch(HashJoinState *hjstate); static bool ExecParallelHashJoinNewBatch(HashJoinState *hjstate); static void ExecParallelHashJoinPartitionOuter(HashJoinState *node); diff --git a/src/backend/executor/nodeIndexonlyscan.c b/src/backend/executor/nodeIndexonlyscan.c index 5dce284fe73..ee5b1c493b7 100644 --- a/src/backend/executor/nodeIndexonlyscan.c +++ b/src/backend/executor/nodeIndexonlyscan.c @@ -47,7 +47,7 @@ static TupleTableSlot *IndexOnlyNext(IndexOnlyScanState *node); static void StoreIndexTuple(TupleTableSlot *slot, IndexTuple itup, - TupleDesc itupdesc); + TupleDesc itupdesc); /* ---------------------------------------------------------------- diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 73bfd424d98..ac7aa81f674 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -60,13 +60,13 @@ static TupleTableSlot *IndexNext(IndexScanState *node); static TupleTableSlot *IndexNextWithReorder(IndexScanState *node); static void EvalOrderByExpressions(IndexScanState *node, ExprContext *econtext); static bool IndexRecheck(IndexScanState *node, TupleTableSlot *slot); -static int cmp_orderbyvals(const Datum *adist, const bool *anulls, - const Datum *bdist, const bool *bnulls, - IndexScanState *node); -static int reorderqueue_cmp(const pairingheap_node *a, - const pairingheap_node *b, void *arg); +static int cmp_orderbyvals(const Datum *adist, const bool *anulls, + const Datum *bdist, const bool *bnulls, + IndexScanState *node); +static int reorderqueue_cmp(const pairingheap_node *a, + const pairingheap_node *b, void *arg); static void reorderqueue_push(IndexScanState *node, TupleTableSlot *slot, - Datum *orderbyvals, bool *orderbynulls); + Datum *orderbyvals, bool *orderbynulls); static HeapTuple reorderqueue_pop(IndexScanState *node); diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 8acdaf20573..3125e5c993d 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -59,22 +59,22 @@ static bool ExecOnConflictUpdate(ModifyTableState *mtstate, - ResultRelInfo *resultRelInfo, - ItemPointer conflictTid, - TupleTableSlot *planSlot, - TupleTableSlot *excludedSlot, - EState *estate, - bool canSetTag, - TupleTableSlot **returning); + ResultRelInfo *resultRelInfo, + ItemPointer conflictTid, + TupleTableSlot *planSlot, + TupleTableSlot *excludedSlot, + EState *estate, + bool canSetTag, + TupleTableSlot **returning); static TupleTableSlot *ExecPrepareTupleRouting(ModifyTableState *mtstate, - EState *estate, - PartitionTupleRouting *proute, - ResultRelInfo *targetRelInfo, - TupleTableSlot *slot); + EState *estate, + PartitionTupleRouting *proute, + ResultRelInfo *targetRelInfo, + TupleTableSlot *slot); static ResultRelInfo *getTargetResultRelInfo(ModifyTableState *node); static void ExecSetupChildParentMapForSubplan(ModifyTableState *mtstate); static TupleConversionMap *tupconv_map_for_subplan(ModifyTableState *node, - int whichplan); + int whichplan); /* * Verify that the tuples to be produced by INSERT or UPDATE match the diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c index 3662fcada8c..f6445e286ac 100644 --- a/src/backend/executor/nodeSubplan.c +++ b/src/backend/executor/nodeSubplan.c @@ -41,14 +41,14 @@ static Datum ExecHashSubPlan(SubPlanState *node, - ExprContext *econtext, - bool *isNull); + ExprContext *econtext, + bool *isNull); static Datum ExecScanSubPlan(SubPlanState *node, - ExprContext *econtext, - bool *isNull); + ExprContext *econtext, + bool *isNull); static void buildSubPlanHash(SubPlanState *node, ExprContext *econtext); static bool findPartialMatch(TupleHashTable hashtable, TupleTableSlot *slot, - FmgrInfo *eqfunctions); + FmgrInfo *eqfunctions); static bool slotAllNulls(TupleTableSlot *slot); static bool slotNoNulls(TupleTableSlot *slot); diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index b090828c01e..def00cd7c5f 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -158,43 +158,43 @@ typedef struct WindowStatePerAggData } WindowStatePerAggData; static void initialize_windowaggregate(WindowAggState *winstate, - WindowStatePerFunc perfuncstate, - WindowStatePerAgg peraggstate); + WindowStatePerFunc perfuncstate, + WindowStatePerAgg peraggstate); static void advance_windowaggregate(WindowAggState *winstate, - WindowStatePerFunc perfuncstate, - WindowStatePerAgg peraggstate); + WindowStatePerFunc perfuncstate, + WindowStatePerAgg peraggstate); static bool advance_windowaggregate_base(WindowAggState *winstate, - WindowStatePerFunc perfuncstate, - WindowStatePerAgg peraggstate); + WindowStatePerFunc perfuncstate, + WindowStatePerAgg peraggstate); static void finalize_windowaggregate(WindowAggState *winstate, - WindowStatePerFunc perfuncstate, - WindowStatePerAgg peraggstate, - Datum *result, bool *isnull); + WindowStatePerFunc perfuncstate, + WindowStatePerAgg peraggstate, + Datum *result, bool *isnull); static void eval_windowaggregates(WindowAggState *winstate); static void eval_windowfunction(WindowAggState *winstate, - WindowStatePerFunc perfuncstate, - Datum *result, bool *isnull); + WindowStatePerFunc perfuncstate, + Datum *result, bool *isnull); static void begin_partition(WindowAggState *winstate); static void spool_tuples(WindowAggState *winstate, int64 pos); static void release_partition(WindowAggState *winstate); -static int row_is_in_frame(WindowAggState *winstate, int64 pos, - TupleTableSlot *slot); +static int row_is_in_frame(WindowAggState *winstate, int64 pos, + TupleTableSlot *slot); static void update_frameheadpos(WindowAggState *winstate); static void update_frametailpos(WindowAggState *winstate); static void update_grouptailpos(WindowAggState *winstate); static WindowStatePerAggData *initialize_peragg(WindowAggState *winstate, - WindowFunc *wfunc, - WindowStatePerAgg peraggstate); + WindowFunc *wfunc, + WindowStatePerAgg peraggstate); static Datum GetAggInitVal(Datum textInitVal, Oid transtype); static bool are_peers(WindowAggState *winstate, TupleTableSlot *slot1, - TupleTableSlot *slot2); + TupleTableSlot *slot2); static bool window_gettupleslot(WindowObject winobj, int64 pos, - TupleTableSlot *slot); + TupleTableSlot *slot); /* diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 22d0fe5ac4f..8eedb613a18 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -52,26 +52,26 @@ static int _SPI_stack_depth = 0; /* allocated size of _SPI_stack */ static int _SPI_connected = -1; /* current stack index */ static Portal SPI_cursor_open_internal(const char *name, SPIPlanPtr plan, - ParamListInfo paramLI, bool read_only); + ParamListInfo paramLI, bool read_only); static void _SPI_prepare_plan(const char *src, SPIPlanPtr plan); static void _SPI_prepare_oneshot_plan(const char *src, SPIPlanPtr plan); -static int _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI, - Snapshot snapshot, Snapshot crosscheck_snapshot, - bool read_only, bool fire_triggers, uint64 tcount); +static int _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI, + Snapshot snapshot, Snapshot crosscheck_snapshot, + bool read_only, bool fire_triggers, uint64 tcount); static ParamListInfo _SPI_convert_params(int nargs, Oid *argtypes, - Datum *Values, const char *Nulls); + Datum *Values, const char *Nulls); static int _SPI_pquery(QueryDesc *queryDesc, bool fire_triggers, uint64 tcount); static void _SPI_error_callback(void *arg); static void _SPI_cursor_operation(Portal portal, - FetchDirection direction, long count, - DestReceiver *dest); + FetchDirection direction, long count, + DestReceiver *dest); static SPIPlanPtr _SPI_make_plan_non_temp(SPIPlanPtr plan); static SPIPlanPtr _SPI_save_plan(SPIPlanPtr plan); diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c index 1bb58e3e61a..30133634c70 100644 --- a/src/backend/jit/llvm/llvmjit_expr.c +++ b/src/backend/jit/llvm/llvmjit_expr.c @@ -57,12 +57,12 @@ typedef struct CompiledExprState static Datum ExecRunCompiledExpr(ExprState *state, ExprContext *econtext, bool *isNull); static LLVMValueRef BuildV1Call(LLVMJitContext *context, LLVMBuilderRef b, - LLVMModuleRef mod, FunctionCallInfo fcinfo, - LLVMValueRef *v_fcinfo_isnull); + LLVMModuleRef mod, FunctionCallInfo fcinfo, + LLVMValueRef *v_fcinfo_isnull); static void build_EvalXFunc(LLVMBuilderRef b, LLVMModuleRef mod, - const char *funcname, - LLVMValueRef v_state, LLVMValueRef v_econtext, - ExprEvalStep *op); + const char *funcname, + LLVMValueRef v_state, LLVMValueRef v_econtext, + ExprEvalStep *op); static LLVMValueRef create_LifetimeEnd(LLVMModuleRef mod); diff --git a/src/backend/lib/bloomfilter.c b/src/backend/lib/bloomfilter.c index d82420bd68c..859aac07b7d 100644 --- a/src/backend/lib/bloomfilter.c +++ b/src/backend/lib/bloomfilter.c @@ -54,7 +54,7 @@ struct bloom_filter static int my_bloom_power(uint64 target_bitset_bits); static int optimal_k(uint64 bitset_bits, int64 total_elems); static void k_hashes(bloom_filter *filter, uint32 *hashes, unsigned char *elem, - size_t len); + size_t len); static inline uint32 mod_m(uint32 a, uint64 m); /* diff --git a/src/backend/lib/dshash.c b/src/backend/lib/dshash.c index f095196fb67..24dd3722521 100644 --- a/src/backend/lib/dshash.c +++ b/src/backend/lib/dshash.c @@ -160,28 +160,28 @@ struct dshash_table hash_table->size_log2)]) static void delete_item(dshash_table *hash_table, - dshash_table_item *item); + dshash_table_item *item); static void resize(dshash_table *hash_table, size_t new_size); static inline void ensure_valid_bucket_pointers(dshash_table *hash_table); static inline dshash_table_item *find_in_bucket(dshash_table *hash_table, - const void *key, - dsa_pointer item_pointer); + const void *key, + dsa_pointer item_pointer); static void insert_item_into_bucket(dshash_table *hash_table, - dsa_pointer item_pointer, - dshash_table_item *item, - dsa_pointer *bucket); + dsa_pointer item_pointer, + dshash_table_item *item, + dsa_pointer *bucket); static dshash_table_item *insert_into_bucket(dshash_table *hash_table, - const void *key, - dsa_pointer *bucket); + const void *key, + dsa_pointer *bucket); static bool delete_key_from_bucket(dshash_table *hash_table, - const void *key, - dsa_pointer *bucket_head); + const void *key, + dsa_pointer *bucket_head); static bool delete_item_from_bucket(dshash_table *hash_table, - dshash_table_item *item, - dsa_pointer *bucket_head); + dshash_table_item *item, + dsa_pointer *bucket_head); static inline dshash_hash hash_key(dshash_table *hash_table, const void *key); static inline bool equal_keys(dshash_table *hash_table, - const void *a, const void *b); + const void *a, const void *b); #define PARTITION_LOCK(hash_table, i) \ (&(hash_table)->control->partitions[(i)].lock) diff --git a/src/backend/lib/integerset.c b/src/backend/lib/integerset.c index 9984fd55e80..6f8a03709ed 100644 --- a/src/backend/lib/integerset.c +++ b/src/backend/lib/integerset.c @@ -261,13 +261,13 @@ struct IntegerSet * Prototypes for internal functions. */ static void intset_update_upper(IntegerSet *intset, int level, - intset_node *new_node, uint64 new_node_item); + intset_node *new_node, uint64 new_node_item); static void intset_flush_buffered_values(IntegerSet *intset); -static int intset_binsrch_uint64(uint64 value, uint64 *arr, int arr_elems, - bool nextkey); -static int intset_binsrch_leaf(uint64 value, leaf_item *arr, int arr_elems, - bool nextkey); +static int intset_binsrch_uint64(uint64 value, uint64 *arr, int arr_elems, + bool nextkey); +static int intset_binsrch_leaf(uint64 value, leaf_item *arr, int arr_elems, + bool nextkey); static uint64 simple8b_encode(const uint64 *ints, int *num_encoded, uint64 base); static int simple8b_decode(uint64 codeword, uint64 *decoded, uint64 base); diff --git a/src/backend/lib/pairingheap.c b/src/backend/lib/pairingheap.c index 6ab3b77246e..bdaa3b1ad73 100644 --- a/src/backend/lib/pairingheap.c +++ b/src/backend/lib/pairingheap.c @@ -27,9 +27,9 @@ #include "lib/pairingheap.h" static pairingheap_node *merge(pairingheap *heap, pairingheap_node *a, - pairingheap_node *b); + pairingheap_node *b); static pairingheap_node *merge_children(pairingheap *heap, - pairingheap_node *children); + pairingheap_node *children); /* * pairingheap_allocate diff --git a/src/backend/libpq/auth-scram.c b/src/backend/libpq/auth-scram.c index 4c7b149570b..45811e155cc 100644 --- a/src/backend/libpq/auth-scram.c +++ b/src/backend/libpq/auth-scram.c @@ -162,7 +162,7 @@ static char *build_server_final_message(scram_state *state); static bool verify_client_proof(scram_state *state); static bool verify_final_nonce(scram_state *state); static void mock_scram_verifier(const char *username, int *iterations, - char **salt, uint8 *stored_key, uint8 *server_key); + char **salt, uint8 *stored_key, uint8 *server_key); static bool is_scram_printable(char *p); static char *sanitize_char(char c); static char *sanitize_str(const char *s); diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index caf3b71f9e1..a7763f3f605 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -45,7 +45,7 @@ *---------------------------------------------------------------- */ static void sendAuthRequest(Port *port, AuthRequest areq, const char *extradata, - int extralen); + int extralen); static void auth_failed(Port *port, int status, char *logdetail); static char *recv_password_packet(Port *port); @@ -93,8 +93,8 @@ static int auth_peer(hbaPort *port); #define PGSQL_PAM_SERVICE "postgresql" /* Service name passed to PAM */ static int CheckPAMAuth(Port *port, const char *user, const char *password); -static int pam_passwd_conv_proc(int num_msg, const struct pam_message **msg, - struct pam_response **resp, void *appdata_ptr); +static int pam_passwd_conv_proc(int num_msg, const struct pam_message **msg, + struct pam_response **resp, void *appdata_ptr); static struct pam_conv pam_passw_conv = { &pam_passwd_conv_proc, @@ -189,11 +189,11 @@ typedef SECURITY_STATUS (WINAPI * QUERY_SECURITY_CONTEXT_TOKEN_FN) ( PCtxtHandle, void **); static int pg_SSPI_recvauth(Port *port); -static int pg_SSPI_make_upn(char *accountname, - size_t accountnamesize, - char *domainname, - size_t domainnamesize, - bool update_accountname); +static int pg_SSPI_make_upn(char *accountname, + size_t accountnamesize, + char *domainname, + size_t domainnamesize, + bool update_accountname); #endif /*---------------------------------------------------------------- diff --git a/src/backend/libpq/be-gssapi-common.h b/src/backend/libpq/be-gssapi-common.h index f6e90ea3a7c..e0d0bfabd63 100644 --- a/src/backend/libpq/be-gssapi-common.h +++ b/src/backend/libpq/be-gssapi-common.h @@ -20,7 +20,7 @@ #include <gssapi/gssapi.h> #endif -void pg_GSS_error(int severity, const char *errmsg, - OM_uint32 maj_stat, OM_uint32 min_stat); +void pg_GSS_error(int severity, const char *errmsg, + OM_uint32 maj_stat, OM_uint32 min_stat); #endif /* BE_GSSAPI_COMMON_H */ diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 673066a4561..c97c811e63a 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -67,8 +67,8 @@ static bool SSL_initialized = false; static bool dummy_ssl_passwd_cb_called = false; static bool ssl_is_server_start; -static int ssl_protocol_version_to_openssl(int v, const char *guc_name, - int loglevel); +static int ssl_protocol_version_to_openssl(int v, const char *guc_name, + int loglevel); #ifndef SSL_CTX_set_min_proto_version static int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version); static int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version); diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 37d5ad44a54..52ac0d78f73 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -139,16 +139,16 @@ static const char *const UserAuthName[] = static MemoryContext tokenize_file(const char *filename, FILE *file, - List **tok_lines, int elevel); + List **tok_lines, int elevel); static List *tokenize_inc_file(List *tokens, const char *outer_filename, - const char *inc_filename, int elevel, char **err_msg); + const char *inc_filename, int elevel, char **err_msg); static bool parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline, - int elevel, char **err_msg); + int elevel, char **err_msg); static bool verify_option_list_length(List *options, const char *optionname, - List *masters, const char *mastername, int line_num); + List *masters, const char *mastername, int line_num); static ArrayType *gethba_options(HbaLine *hba); static void fill_hba_line(Tuplestorestate *tuple_store, TupleDesc tupdesc, - int lineno, HbaLine *hba, const char *err_msg); + int lineno, HbaLine *hba, const char *err_msg); static void fill_hba_view(Tuplestorestate *tuple_store, TupleDesc tupdesc); diff --git a/src/backend/libpq/ifaddr.c b/src/backend/libpq/ifaddr.c index 62cf758ca1c..3c8237798a3 100644 --- a/src/backend/libpq/ifaddr.c +++ b/src/backend/libpq/ifaddr.c @@ -32,14 +32,14 @@ #include "libpq/ifaddr.h" #include "port/pg_bswap.h" -static int range_sockaddr_AF_INET(const struct sockaddr_in *addr, - const struct sockaddr_in *netaddr, - const struct sockaddr_in *netmask); +static int range_sockaddr_AF_INET(const struct sockaddr_in *addr, + const struct sockaddr_in *netaddr, + const struct sockaddr_in *netmask); #ifdef HAVE_IPV6 -static int range_sockaddr_AF_INET6(const struct sockaddr_in6 *addr, - const struct sockaddr_in6 *netaddr, - const struct sockaddr_in6 *netmask); +static int range_sockaddr_AF_INET6(const struct sockaddr_in6 *addr, + const struct sockaddr_in6 *netaddr, + const struct sockaddr_in6 *netmask); #endif diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index 8ed30c011a6..05ae73f7db8 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -31,7 +31,7 @@ static bool fix_opfuncids_walker(Node *node, void *context); static bool planstate_walk_subplans(List *plans, bool (*walker) (), void *context); static bool planstate_walk_members(PlanState **planstates, int nplans, - bool (*walker) (), void *context); + bool (*walker) (), void *context); /* diff --git a/src/backend/nodes/tidbitmap.c b/src/backend/nodes/tidbitmap.c index 64ab0cfc0e2..9b913feb896 100644 --- a/src/backend/nodes/tidbitmap.c +++ b/src/backend/nodes/tidbitmap.c @@ -227,16 +227,16 @@ struct TBMSharedIterator /* Local function prototypes */ static void tbm_union_page(TIDBitmap *a, const PagetableEntry *bpage); static bool tbm_intersect_page(TIDBitmap *a, PagetableEntry *apage, - const TIDBitmap *b); + const TIDBitmap *b); static const PagetableEntry *tbm_find_pageentry(const TIDBitmap *tbm, - BlockNumber pageno); + BlockNumber pageno); static PagetableEntry *tbm_get_pageentry(TIDBitmap *tbm, BlockNumber pageno); static bool tbm_page_is_lossy(const TIDBitmap *tbm, BlockNumber pageno); static void tbm_mark_page_lossy(TIDBitmap *tbm, BlockNumber pageno); static void tbm_lossify(TIDBitmap *tbm); static int tbm_comparator(const void *left, const void *right); -static int tbm_shared_comparator(const void *left, const void *right, - void *arg); +static int tbm_shared_comparator(const void *left, const void *right, + void *arg); /* define hashtable mapping block numbers to PagetableEntry's */ #define SH_USE_NONDEFAULT_ALLOCATOR diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c index e07bab831e1..6c69c1c1478 100644 --- a/src/backend/optimizer/geqo/geqo_eval.c +++ b/src/backend/optimizer/geqo/geqo_eval.c @@ -40,9 +40,9 @@ typedef struct } Clump; static List *merge_clump(PlannerInfo *root, List *clumps, Clump *new_clump, - int num_gene, bool force); + int num_gene, bool force); static bool desirable_join(PlannerInfo *root, - RelOptInfo *outer_rel, RelOptInfo *inner_rel); + RelOptInfo *outer_rel, RelOptInfo *inner_rel); /* diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index af05bb7511e..b7723481b0e 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -75,71 +75,71 @@ static void set_base_rel_consider_startup(PlannerInfo *root); static void set_base_rel_sizes(PlannerInfo *root); static void set_base_rel_pathlists(PlannerInfo *root); static void set_rel_size(PlannerInfo *root, RelOptInfo *rel, - Index rti, RangeTblEntry *rte); + Index rti, RangeTblEntry *rte); static void set_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, - Index rti, RangeTblEntry *rte); + Index rti, RangeTblEntry *rte); static void set_plain_rel_size(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void create_plain_partial_paths(PlannerInfo *root, RelOptInfo *rel); static void set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_tablesample_rel_size(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_tablesample_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_foreign_size(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_foreign_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_append_rel_size(PlannerInfo *root, RelOptInfo *rel, - Index rti, RangeTblEntry *rte); + Index rti, RangeTblEntry *rte); static void set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, - Index rti, RangeTblEntry *rte); + Index rti, RangeTblEntry *rte); static void generate_orderedappend_paths(PlannerInfo *root, RelOptInfo *rel, - List *live_childrels, - List *all_child_pathkeys, - List *partitioned_rels); + List *live_childrels, + List *all_child_pathkeys, + List *partitioned_rels); static Path *get_cheapest_parameterized_child_path(PlannerInfo *root, - RelOptInfo *rel, - Relids required_outer); + RelOptInfo *rel, + Relids required_outer); static void accumulate_append_subpath(Path *path, - List **subpaths, List **special_subpaths); + List **subpaths, List **special_subpaths); static Path *get_singleton_append_subpath(Path *path); static void set_dummy_rel_pathlist(RelOptInfo *rel); static void set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, - Index rti, RangeTblEntry *rte); + Index rti, RangeTblEntry *rte); static void set_function_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_values_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_tablefunc_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_cte_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); -static void set_namedtuplestore_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte); +static void set_namedtuplestore_pathlist(PlannerInfo *root, RelOptInfo *rel, + RangeTblEntry *rte); static void set_result_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static void set_worktable_pathlist(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); static RelOptInfo *make_rel_from_joinlist(PlannerInfo *root, List *joinlist); static bool subquery_is_pushdown_safe(Query *subquery, Query *topquery, - pushdown_safety_info *safetyInfo); + pushdown_safety_info *safetyInfo); static bool recurse_pushdown_safe(Node *setOp, Query *topquery, - pushdown_safety_info *safetyInfo); + pushdown_safety_info *safetyInfo); static void check_output_expressions(Query *subquery, - pushdown_safety_info *safetyInfo); + pushdown_safety_info *safetyInfo); static void compare_tlist_datatypes(List *tlist, List *colTypes, - pushdown_safety_info *safetyInfo); + pushdown_safety_info *safetyInfo); static bool targetIsInAllPartitionLists(TargetEntry *tle, Query *query); static bool qual_is_pushdown_safe(Query *subquery, Index rti, Node *qual, - pushdown_safety_info *safetyInfo); + pushdown_safety_info *safetyInfo); static void subquery_push_qual(Query *subquery, - RangeTblEntry *rte, Index rti, Node *qual); + RangeTblEntry *rte, Index rti, Node *qual); static void recurse_push_qual(Node *setOp, Query *topquery, - RangeTblEntry *rte, Index rti, Node *qual); + RangeTblEntry *rte, Index rti, Node *qual); static void remove_unused_subquery_outputs(Query *subquery, RelOptInfo *rel); diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c index bfad6b79878..4bf777d82d3 100644 --- a/src/backend/optimizer/path/clausesel.c +++ b/src/backend/optimizer/path/clausesel.c @@ -42,9 +42,9 @@ typedef struct RangeQueryClause } RangeQueryClause; static void addRangeClause(RangeQueryClause **rqlist, Node *clause, - bool varonleft, bool isLTsel, Selectivity s2); + bool varonleft, bool isLTsel, Selectivity s2); static RelOptInfo *find_single_rel_for_clauses(PlannerInfo *root, - List *clauses); + List *clauses); /**************************************************************************** * ROUTINES TO COMPUTE SELECTIVITIES diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index afd32884a25..a2a9b1f7be6 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -147,32 +147,32 @@ typedef struct static List *extract_nonindex_conditions(List *qual_clauses, List *indexclauses); static MergeScanSelCache *cached_scansel(PlannerInfo *root, - RestrictInfo *rinfo, - PathKey *pathkey); + RestrictInfo *rinfo, + PathKey *pathkey); static void cost_rescan(PlannerInfo *root, Path *path, - Cost *rescan_startup_cost, Cost *rescan_total_cost); + Cost *rescan_startup_cost, Cost *rescan_total_cost); static bool cost_qual_eval_walker(Node *node, cost_qual_eval_context *context); static void get_restriction_qual_cost(PlannerInfo *root, RelOptInfo *baserel, - ParamPathInfo *param_info, - QualCost *qpqual_cost); + ParamPathInfo *param_info, + QualCost *qpqual_cost); static bool has_indexed_join_quals(NestPath *joinpath); static double approx_tuple_count(PlannerInfo *root, JoinPath *path, - List *quals); + List *quals); static double calc_joinrel_size_estimate(PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *outer_rel, - RelOptInfo *inner_rel, - double outer_rows, - double inner_rows, - SpecialJoinInfo *sjinfo, - List *restrictlist); + RelOptInfo *joinrel, + RelOptInfo *outer_rel, + RelOptInfo *inner_rel, + double outer_rows, + double inner_rows, + SpecialJoinInfo *sjinfo, + List *restrictlist); static Selectivity get_foreign_key_join_selectivity(PlannerInfo *root, - Relids outer_relids, - Relids inner_relids, - SpecialJoinInfo *sjinfo, - List **restrictlist); + Relids outer_relids, + Relids inner_relids, + SpecialJoinInfo *sjinfo, + List **restrictlist); static Cost append_nonpartial_cost(List *subpaths, int numpaths, - int parallel_workers); + int parallel_workers); static void set_rel_width(PlannerInfo *root, RelOptInfo *rel); static double relation_byte_size(double tuples, int width); static double page_size(double tuples, int width); diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c index 61b5b119b00..e9bd5eaff5c 100644 --- a/src/backend/optimizer/path/equivclass.c +++ b/src/backend/optimizer/path/equivclass.c @@ -33,37 +33,37 @@ static EquivalenceMember *add_eq_member(EquivalenceClass *ec, - Expr *expr, Relids relids, Relids nullable_relids, - bool is_child, Oid datatype); + Expr *expr, Relids relids, Relids nullable_relids, + bool is_child, Oid datatype); static void generate_base_implied_equalities_const(PlannerInfo *root, - EquivalenceClass *ec); + EquivalenceClass *ec); static void generate_base_implied_equalities_no_const(PlannerInfo *root, - EquivalenceClass *ec); + EquivalenceClass *ec); static void generate_base_implied_equalities_broken(PlannerInfo *root, - EquivalenceClass *ec); + EquivalenceClass *ec); static List *generate_join_implied_equalities_normal(PlannerInfo *root, - EquivalenceClass *ec, - Relids join_relids, - Relids outer_relids, - Relids inner_relids); + EquivalenceClass *ec, + Relids join_relids, + Relids outer_relids, + Relids inner_relids); static List *generate_join_implied_equalities_broken(PlannerInfo *root, - EquivalenceClass *ec, - Relids nominal_join_relids, - Relids outer_relids, - Relids nominal_inner_relids, - RelOptInfo *inner_rel); -static Oid select_equality_operator(EquivalenceClass *ec, - Oid lefttype, Oid righttype); + EquivalenceClass *ec, + Relids nominal_join_relids, + Relids outer_relids, + Relids nominal_inner_relids, + RelOptInfo *inner_rel); +static Oid select_equality_operator(EquivalenceClass *ec, + Oid lefttype, Oid righttype); static RestrictInfo *create_join_clause(PlannerInfo *root, - EquivalenceClass *ec, Oid opno, - EquivalenceMember *leftem, - EquivalenceMember *rightem, - EquivalenceClass *parent_ec); + EquivalenceClass *ec, Oid opno, + EquivalenceMember *leftem, + EquivalenceMember *rightem, + EquivalenceClass *parent_ec); static bool reconsider_outer_join_clause(PlannerInfo *root, - RestrictInfo *rinfo, - bool outer_on_left); + RestrictInfo *rinfo, + bool outer_on_left); static bool reconsider_full_join_clause(PlannerInfo *root, - RestrictInfo *rinfo); + RestrictInfo *rinfo); /* diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 3434219dbd1..c208e9bfb0b 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -75,120 +75,120 @@ typedef struct static void consider_index_join_clauses(PlannerInfo *root, RelOptInfo *rel, - IndexOptInfo *index, - IndexClauseSet *rclauseset, - IndexClauseSet *jclauseset, - IndexClauseSet *eclauseset, - List **bitindexpaths); + IndexOptInfo *index, + IndexClauseSet *rclauseset, + IndexClauseSet *jclauseset, + IndexClauseSet *eclauseset, + List **bitindexpaths); static void consider_index_join_outer_rels(PlannerInfo *root, RelOptInfo *rel, - IndexOptInfo *index, - IndexClauseSet *rclauseset, - IndexClauseSet *jclauseset, - IndexClauseSet *eclauseset, - List **bitindexpaths, - List *indexjoinclauses, - int considered_clauses, - List **considered_relids); + IndexOptInfo *index, + IndexClauseSet *rclauseset, + IndexClauseSet *jclauseset, + IndexClauseSet *eclauseset, + List **bitindexpaths, + List *indexjoinclauses, + int considered_clauses, + List **considered_relids); static void get_join_index_paths(PlannerInfo *root, RelOptInfo *rel, - IndexOptInfo *index, - IndexClauseSet *rclauseset, - IndexClauseSet *jclauseset, - IndexClauseSet *eclauseset, - List **bitindexpaths, - Relids relids, - List **considered_relids); + IndexOptInfo *index, + IndexClauseSet *rclauseset, + IndexClauseSet *jclauseset, + IndexClauseSet *eclauseset, + List **bitindexpaths, + Relids relids, + List **considered_relids); static bool eclass_already_used(EquivalenceClass *parent_ec, Relids oldrelids, - List *indexjoinclauses); + List *indexjoinclauses); static bool bms_equal_any(Relids relids, List *relids_list); static void get_index_paths(PlannerInfo *root, RelOptInfo *rel, - IndexOptInfo *index, IndexClauseSet *clauses, - List **bitindexpaths); + IndexOptInfo *index, IndexClauseSet *clauses, + List **bitindexpaths); static List *build_index_paths(PlannerInfo *root, RelOptInfo *rel, - IndexOptInfo *index, IndexClauseSet *clauses, - bool useful_predicate, - ScanTypeControl scantype, - bool *skip_nonnative_saop, - bool *skip_lower_saop); + IndexOptInfo *index, IndexClauseSet *clauses, + bool useful_predicate, + ScanTypeControl scantype, + bool *skip_nonnative_saop, + bool *skip_lower_saop); static List *build_paths_for_OR(PlannerInfo *root, RelOptInfo *rel, - List *clauses, List *other_clauses); + List *clauses, List *other_clauses); static List *generate_bitmap_or_paths(PlannerInfo *root, RelOptInfo *rel, - List *clauses, List *other_clauses); + List *clauses, List *other_clauses); static Path *choose_bitmap_and(PlannerInfo *root, RelOptInfo *rel, - List *paths); + List *paths); static int path_usage_comparator(const void *a, const void *b); static Cost bitmap_scan_cost_est(PlannerInfo *root, RelOptInfo *rel, - Path *ipath); + Path *ipath); static Cost bitmap_and_cost_est(PlannerInfo *root, RelOptInfo *rel, - List *paths); + List *paths); static PathClauseUsage *classify_index_clause_usage(Path *path, - List **clauselist); + List **clauselist); static Relids get_bitmap_tree_required_outer(Path *bitmapqual); static void find_indexpath_quals(Path *bitmapqual, List **quals, List **preds); static int find_list_position(Node *node, List **nodelist); static bool check_index_only(RelOptInfo *rel, IndexOptInfo *index); static double get_loop_count(PlannerInfo *root, Index cur_relid, Relids outer_relids); static double adjust_rowcount_for_semijoins(PlannerInfo *root, - Index cur_relid, - Index outer_relid, - double rowcount); + Index cur_relid, + Index outer_relid, + double rowcount); static double approximate_joinrel_size(PlannerInfo *root, Relids relids); static void match_restriction_clauses_to_index(PlannerInfo *root, - IndexOptInfo *index, - IndexClauseSet *clauseset); + IndexOptInfo *index, + IndexClauseSet *clauseset); static void match_join_clauses_to_index(PlannerInfo *root, - RelOptInfo *rel, IndexOptInfo *index, - IndexClauseSet *clauseset, - List **joinorclauses); + RelOptInfo *rel, IndexOptInfo *index, + IndexClauseSet *clauseset, + List **joinorclauses); static void match_eclass_clauses_to_index(PlannerInfo *root, - IndexOptInfo *index, - IndexClauseSet *clauseset); + IndexOptInfo *index, + IndexClauseSet *clauseset); static void match_clauses_to_index(PlannerInfo *root, - List *clauses, - IndexOptInfo *index, - IndexClauseSet *clauseset); + List *clauses, + IndexOptInfo *index, + IndexClauseSet *clauseset); static void match_clause_to_index(PlannerInfo *root, - RestrictInfo *rinfo, - IndexOptInfo *index, - IndexClauseSet *clauseset); + RestrictInfo *rinfo, + IndexOptInfo *index, + IndexClauseSet *clauseset); static IndexClause *match_clause_to_indexcol(PlannerInfo *root, - RestrictInfo *rinfo, - int indexcol, - IndexOptInfo *index); + RestrictInfo *rinfo, + int indexcol, + IndexOptInfo *index); static IndexClause *match_boolean_index_clause(RestrictInfo *rinfo, - int indexcol, IndexOptInfo *index); + int indexcol, IndexOptInfo *index); static IndexClause *match_opclause_to_indexcol(PlannerInfo *root, - RestrictInfo *rinfo, - int indexcol, - IndexOptInfo *index); + RestrictInfo *rinfo, + int indexcol, + IndexOptInfo *index); static IndexClause *match_funcclause_to_indexcol(PlannerInfo *root, - RestrictInfo *rinfo, - int indexcol, - IndexOptInfo *index); + RestrictInfo *rinfo, + int indexcol, + IndexOptInfo *index); static IndexClause *get_index_clause_from_support(PlannerInfo *root, - RestrictInfo *rinfo, - Oid funcid, - int indexarg, - int indexcol, - IndexOptInfo *index); + RestrictInfo *rinfo, + Oid funcid, + int indexarg, + int indexcol, + IndexOptInfo *index); static IndexClause *match_saopclause_to_indexcol(RestrictInfo *rinfo, - int indexcol, - IndexOptInfo *index); + int indexcol, + IndexOptInfo *index); static IndexClause *match_rowcompare_to_indexcol(RestrictInfo *rinfo, - int indexcol, - IndexOptInfo *index); + int indexcol, + IndexOptInfo *index); static IndexClause *expand_indexqual_rowcompare(RestrictInfo *rinfo, - int indexcol, - IndexOptInfo *index, - Oid expr_op, - bool var_on_left); + int indexcol, + IndexOptInfo *index, + Oid expr_op, + bool var_on_left); static void match_pathkeys_to_index(IndexOptInfo *index, List *pathkeys, - List **orderby_clauses_p, - List **clause_columns_p); + List **orderby_clauses_p, + List **clause_columns_p); static Expr *match_clause_to_ordering_op(IndexOptInfo *index, - int indexcol, Expr *clause, Oid pk_opfamily); + int indexcol, Expr *clause, Oid pk_opfamily); static bool ec_member_matches_indexcol(PlannerInfo *root, RelOptInfo *rel, - EquivalenceClass *ec, EquivalenceMember *em, - void *arg); + EquivalenceClass *ec, EquivalenceMember *em, + void *arg); /* diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index d8ff4bf4320..501ad775cbe 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -40,54 +40,54 @@ set_join_pathlist_hook_type set_join_pathlist_hook = NULL; (PATH_PARAM_BY_REL_SELF(path, rel) || PATH_PARAM_BY_PARENT(path, rel)) static void try_partial_mergejoin_path(PlannerInfo *root, - RelOptInfo *joinrel, - Path *outer_path, - Path *inner_path, - List *pathkeys, - List *mergeclauses, - List *outersortkeys, - List *innersortkeys, - JoinType jointype, - JoinPathExtraData *extra); + RelOptInfo *joinrel, + Path *outer_path, + Path *inner_path, + List *pathkeys, + List *mergeclauses, + List *outersortkeys, + List *innersortkeys, + JoinType jointype, + JoinPathExtraData *extra); static void sort_inner_and_outer(PlannerInfo *root, RelOptInfo *joinrel, - RelOptInfo *outerrel, RelOptInfo *innerrel, - JoinType jointype, JoinPathExtraData *extra); + RelOptInfo *outerrel, RelOptInfo *innerrel, + JoinType jointype, JoinPathExtraData *extra); static void match_unsorted_outer(PlannerInfo *root, RelOptInfo *joinrel, - RelOptInfo *outerrel, RelOptInfo *innerrel, - JoinType jointype, JoinPathExtraData *extra); + RelOptInfo *outerrel, RelOptInfo *innerrel, + JoinType jointype, JoinPathExtraData *extra); static void consider_parallel_nestloop(PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *outerrel, - RelOptInfo *innerrel, - JoinType jointype, - JoinPathExtraData *extra); + RelOptInfo *joinrel, + RelOptInfo *outerrel, + RelOptInfo *innerrel, + JoinType jointype, + JoinPathExtraData *extra); static void consider_parallel_mergejoin(PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *outerrel, - RelOptInfo *innerrel, - JoinType jointype, - JoinPathExtraData *extra, - Path *inner_cheapest_total); + RelOptInfo *joinrel, + RelOptInfo *outerrel, + RelOptInfo *innerrel, + JoinType jointype, + JoinPathExtraData *extra, + Path *inner_cheapest_total); static void hash_inner_and_outer(PlannerInfo *root, RelOptInfo *joinrel, - RelOptInfo *outerrel, RelOptInfo *innerrel, - JoinType jointype, JoinPathExtraData *extra); + RelOptInfo *outerrel, RelOptInfo *innerrel, + JoinType jointype, JoinPathExtraData *extra); static List *select_mergejoin_clauses(PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *outerrel, - RelOptInfo *innerrel, - List *restrictlist, - JoinType jointype, - bool *mergejoin_allowed); + RelOptInfo *joinrel, + RelOptInfo *outerrel, + RelOptInfo *innerrel, + List *restrictlist, + JoinType jointype, + bool *mergejoin_allowed); static void generate_mergejoin_paths(PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *innerrel, - Path *outerpath, - JoinType jointype, - JoinPathExtraData *extra, - bool useallclauses, - Path *inner_cheapest_total, - List *merge_pathkeys, - bool is_partial); + RelOptInfo *joinrel, + RelOptInfo *innerrel, + Path *outerpath, + JoinType jointype, + JoinPathExtraData *extra, + bool useallclauses, + Path *inner_cheapest_total, + List *merge_pathkeys, + bool is_partial); /* diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c index 46623c33c63..43c3b7ea489 100644 --- a/src/backend/optimizer/path/joinrels.c +++ b/src/backend/optimizer/path/joinrels.c @@ -25,28 +25,28 @@ static void make_rels_by_clause_joins(PlannerInfo *root, - RelOptInfo *old_rel, - ListCell *other_rels); + RelOptInfo *old_rel, + ListCell *other_rels); static void make_rels_by_clauseless_joins(PlannerInfo *root, - RelOptInfo *old_rel, - ListCell *other_rels); + RelOptInfo *old_rel, + ListCell *other_rels); static bool has_join_restriction(PlannerInfo *root, RelOptInfo *rel); static bool has_legal_joinclause(PlannerInfo *root, RelOptInfo *rel); static bool restriction_is_constant_false(List *restrictlist, - RelOptInfo *joinrel, - bool only_pushed_down); + RelOptInfo *joinrel, + bool only_pushed_down); static void populate_joinrel_with_paths(PlannerInfo *root, RelOptInfo *rel1, - RelOptInfo *rel2, RelOptInfo *joinrel, - SpecialJoinInfo *sjinfo, List *restrictlist); + RelOptInfo *rel2, RelOptInfo *joinrel, + SpecialJoinInfo *sjinfo, List *restrictlist); static void try_partitionwise_join(PlannerInfo *root, RelOptInfo *rel1, - RelOptInfo *rel2, RelOptInfo *joinrel, - SpecialJoinInfo *parent_sjinfo, - List *parent_restrictlist); + RelOptInfo *rel2, RelOptInfo *joinrel, + SpecialJoinInfo *parent_sjinfo, + List *parent_restrictlist); static SpecialJoinInfo *build_child_join_sjinfo(PlannerInfo *root, - SpecialJoinInfo *parent_sjinfo, - Relids left_relids, Relids right_relids); -static int match_expr_to_partition_keys(Expr *expr, RelOptInfo *rel, - bool strict_op); + SpecialJoinInfo *parent_sjinfo, + Relids left_relids, Relids right_relids); +static int match_expr_to_partition_keys(Expr *expr, RelOptInfo *rel, + bool strict_op); /* diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c index c301e41a4a7..08b50616128 100644 --- a/src/backend/optimizer/path/pathkeys.c +++ b/src/backend/optimizer/path/pathkeys.c @@ -31,8 +31,8 @@ static bool pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys); static bool matches_boolean_partition_clause(RestrictInfo *rinfo, - RelOptInfo *partrel, - int partkeycol); + RelOptInfo *partrel, + int partkeycol); static Var *find_var_for_subquery_tle(RelOptInfo *rel, TargetEntry *tle); static bool right_merge_direction(PlannerInfo *root, PathKey *pathkey); diff --git a/src/backend/optimizer/plan/analyzejoins.c b/src/backend/optimizer/plan/analyzejoins.c index a4efa693ea7..32695db367b 100644 --- a/src/backend/optimizer/plan/analyzejoins.c +++ b/src/backend/optimizer/plan/analyzejoins.c @@ -35,18 +35,18 @@ /* local functions */ static bool join_is_removable(PlannerInfo *root, SpecialJoinInfo *sjinfo); static void remove_rel_from_query(PlannerInfo *root, int relid, - Relids joinrelids); + Relids joinrelids); static List *remove_rel_from_joinlist(List *joinlist, int relid, int *nremoved); static bool rel_supports_distinctness(PlannerInfo *root, RelOptInfo *rel); static bool rel_is_distinct_for(PlannerInfo *root, RelOptInfo *rel, - List *clause_list); + List *clause_list); static Oid distinct_col_search(int colno, List *colnos, List *opids); static bool is_innerrel_unique_for(PlannerInfo *root, - Relids joinrelids, - Relids outerrelids, - RelOptInfo *innerrel, - JoinType jointype, - List *restrictlist); + Relids joinrelids, + Relids outerrelids, + RelOptInfo *innerrel, + JoinType jointype, + List *restrictlist); /* diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 270c11901b7..608d5adfed2 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -72,223 +72,223 @@ static Plan *create_plan_recurse(PlannerInfo *root, Path *best_path, - int flags); + int flags); static Plan *create_scan_plan(PlannerInfo *root, Path *best_path, - int flags); + int flags); static List *build_path_tlist(PlannerInfo *root, Path *path); static bool use_physical_tlist(PlannerInfo *root, Path *path, int flags); static List *get_gating_quals(PlannerInfo *root, List *quals); static Plan *create_gating_plan(PlannerInfo *root, Path *path, Plan *plan, - List *gating_quals); + List *gating_quals); static Plan *create_join_plan(PlannerInfo *root, JoinPath *best_path); static Plan *create_append_plan(PlannerInfo *root, AppendPath *best_path, - int flags); + int flags); static Plan *create_merge_append_plan(PlannerInfo *root, MergeAppendPath *best_path, - int flags); + int flags); static Result *create_group_result_plan(PlannerInfo *root, - GroupResultPath *best_path); + GroupResultPath *best_path); static ProjectSet *create_project_set_plan(PlannerInfo *root, ProjectSetPath *best_path); static Material *create_material_plan(PlannerInfo *root, MaterialPath *best_path, - int flags); + int flags); static Plan *create_unique_plan(PlannerInfo *root, UniquePath *best_path, - int flags); + int flags); static Gather *create_gather_plan(PlannerInfo *root, GatherPath *best_path); static Plan *create_projection_plan(PlannerInfo *root, - ProjectionPath *best_path, - int flags); + ProjectionPath *best_path, + int flags); static Plan *inject_projection_plan(Plan *subplan, List *tlist, bool parallel_safe); static Sort *create_sort_plan(PlannerInfo *root, SortPath *best_path, int flags); static Group *create_group_plan(PlannerInfo *root, GroupPath *best_path); static Unique *create_upper_unique_plan(PlannerInfo *root, UpperUniquePath *best_path, - int flags); + int flags); static Agg *create_agg_plan(PlannerInfo *root, AggPath *best_path); static Plan *create_groupingsets_plan(PlannerInfo *root, GroupingSetsPath *best_path); static Result *create_minmaxagg_plan(PlannerInfo *root, MinMaxAggPath *best_path); static WindowAgg *create_windowagg_plan(PlannerInfo *root, WindowAggPath *best_path); static SetOp *create_setop_plan(PlannerInfo *root, SetOpPath *best_path, - int flags); + int flags); static RecursiveUnion *create_recursiveunion_plan(PlannerInfo *root, RecursiveUnionPath *best_path); static LockRows *create_lockrows_plan(PlannerInfo *root, LockRowsPath *best_path, - int flags); + int flags); static ModifyTable *create_modifytable_plan(PlannerInfo *root, ModifyTablePath *best_path); static Limit *create_limit_plan(PlannerInfo *root, LimitPath *best_path, - int flags); + int flags); static SeqScan *create_seqscan_plan(PlannerInfo *root, Path *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static SampleScan *create_samplescan_plan(PlannerInfo *root, Path *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static Scan *create_indexscan_plan(PlannerInfo *root, IndexPath *best_path, - List *tlist, List *scan_clauses, bool indexonly); + List *tlist, List *scan_clauses, bool indexonly); static BitmapHeapScan *create_bitmap_scan_plan(PlannerInfo *root, - BitmapHeapPath *best_path, - List *tlist, List *scan_clauses); + BitmapHeapPath *best_path, + List *tlist, List *scan_clauses); static Plan *create_bitmap_subplan(PlannerInfo *root, Path *bitmapqual, - List **qual, List **indexqual, List **indexECs); + List **qual, List **indexqual, List **indexECs); static void bitmap_subplan_mark_shared(Plan *plan); static TidScan *create_tidscan_plan(PlannerInfo *root, TidPath *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static SubqueryScan *create_subqueryscan_plan(PlannerInfo *root, - SubqueryScanPath *best_path, - List *tlist, List *scan_clauses); + SubqueryScanPath *best_path, + List *tlist, List *scan_clauses); static FunctionScan *create_functionscan_plan(PlannerInfo *root, Path *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static ValuesScan *create_valuesscan_plan(PlannerInfo *root, Path *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static TableFuncScan *create_tablefuncscan_plan(PlannerInfo *root, Path *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static CteScan *create_ctescan_plan(PlannerInfo *root, Path *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static NamedTuplestoreScan *create_namedtuplestorescan_plan(PlannerInfo *root, - Path *best_path, List *tlist, List *scan_clauses); + Path *best_path, List *tlist, List *scan_clauses); static Result *create_resultscan_plan(PlannerInfo *root, Path *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static WorkTableScan *create_worktablescan_plan(PlannerInfo *root, Path *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static ForeignScan *create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path, - List *tlist, List *scan_clauses); + List *tlist, List *scan_clauses); static CustomScan *create_customscan_plan(PlannerInfo *root, - CustomPath *best_path, - List *tlist, List *scan_clauses); + CustomPath *best_path, + List *tlist, List *scan_clauses); static NestLoop *create_nestloop_plan(PlannerInfo *root, NestPath *best_path); static MergeJoin *create_mergejoin_plan(PlannerInfo *root, MergePath *best_path); static HashJoin *create_hashjoin_plan(PlannerInfo *root, HashPath *best_path); static Node *replace_nestloop_params(PlannerInfo *root, Node *expr); static Node *replace_nestloop_params_mutator(Node *node, PlannerInfo *root); static void fix_indexqual_references(PlannerInfo *root, IndexPath *index_path, - List **stripped_indexquals_p, - List **fixed_indexquals_p); + List **stripped_indexquals_p, + List **fixed_indexquals_p); static List *fix_indexorderby_references(PlannerInfo *root, IndexPath *index_path); static Node *fix_indexqual_clause(PlannerInfo *root, - IndexOptInfo *index, int indexcol, - Node *clause, List *indexcolnos); + IndexOptInfo *index, int indexcol, + Node *clause, List *indexcolnos); static Node *fix_indexqual_operand(Node *node, IndexOptInfo *index, int indexcol); static List *get_switched_clauses(List *clauses, Relids outerrelids); static List *order_qual_clauses(PlannerInfo *root, List *clauses); static void copy_generic_path_info(Plan *dest, Path *src); static void copy_plan_costsize(Plan *dest, Plan *src); static void label_sort_with_costsize(PlannerInfo *root, Sort *plan, - double limit_tuples); + double limit_tuples); static SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid); static SampleScan *make_samplescan(List *qptlist, List *qpqual, Index scanrelid, - TableSampleClause *tsc); + TableSampleClause *tsc); static IndexScan *make_indexscan(List *qptlist, List *qpqual, Index scanrelid, - Oid indexid, List *indexqual, List *indexqualorig, - List *indexorderby, List *indexorderbyorig, - List *indexorderbyops, - ScanDirection indexscandir); + Oid indexid, List *indexqual, List *indexqualorig, + List *indexorderby, List *indexorderbyorig, + List *indexorderbyops, + ScanDirection indexscandir); static IndexOnlyScan *make_indexonlyscan(List *qptlist, List *qpqual, - Index scanrelid, Oid indexid, - List *indexqual, List *indexorderby, - List *indextlist, - ScanDirection indexscandir); + Index scanrelid, Oid indexid, + List *indexqual, List *indexorderby, + List *indextlist, + ScanDirection indexscandir); static BitmapIndexScan *make_bitmap_indexscan(Index scanrelid, Oid indexid, - List *indexqual, - List *indexqualorig); + List *indexqual, + List *indexqualorig); static BitmapHeapScan *make_bitmap_heapscan(List *qptlist, - List *qpqual, - Plan *lefttree, - List *bitmapqualorig, - Index scanrelid); + List *qpqual, + Plan *lefttree, + List *bitmapqualorig, + Index scanrelid); static TidScan *make_tidscan(List *qptlist, List *qpqual, Index scanrelid, - List *tidquals); + List *tidquals); static SubqueryScan *make_subqueryscan(List *qptlist, - List *qpqual, - Index scanrelid, - Plan *subplan); + List *qpqual, + Index scanrelid, + Plan *subplan); static FunctionScan *make_functionscan(List *qptlist, List *qpqual, - Index scanrelid, List *functions, bool funcordinality); + Index scanrelid, List *functions, bool funcordinality); static ValuesScan *make_valuesscan(List *qptlist, List *qpqual, - Index scanrelid, List *values_lists); + Index scanrelid, List *values_lists); static TableFuncScan *make_tablefuncscan(List *qptlist, List *qpqual, - Index scanrelid, TableFunc *tablefunc); + Index scanrelid, TableFunc *tablefunc); static CteScan *make_ctescan(List *qptlist, List *qpqual, - Index scanrelid, int ctePlanId, int cteParam); + Index scanrelid, int ctePlanId, int cteParam); static NamedTuplestoreScan *make_namedtuplestorescan(List *qptlist, List *qpqual, - Index scanrelid, char *enrname); + Index scanrelid, char *enrname); static WorkTableScan *make_worktablescan(List *qptlist, List *qpqual, - Index scanrelid, int wtParam); + Index scanrelid, int wtParam); static RecursiveUnion *make_recursive_union(List *tlist, - Plan *lefttree, - Plan *righttree, - int wtParam, - List *distinctList, - long numGroups); + Plan *lefttree, + Plan *righttree, + int wtParam, + List *distinctList, + long numGroups); static BitmapAnd *make_bitmap_and(List *bitmapplans); static BitmapOr *make_bitmap_or(List *bitmapplans); static NestLoop *make_nestloop(List *tlist, - List *joinclauses, List *otherclauses, List *nestParams, - Plan *lefttree, Plan *righttree, - JoinType jointype, bool inner_unique); + List *joinclauses, List *otherclauses, List *nestParams, + Plan *lefttree, Plan *righttree, + JoinType jointype, bool inner_unique); static HashJoin *make_hashjoin(List *tlist, - List *joinclauses, List *otherclauses, - List *hashclauses, - Plan *lefttree, Plan *righttree, - JoinType jointype, bool inner_unique); + List *joinclauses, List *otherclauses, + List *hashclauses, + Plan *lefttree, Plan *righttree, + JoinType jointype, bool inner_unique); static Hash *make_hash(Plan *lefttree, - Oid skewTable, - AttrNumber skewColumn, - bool skewInherit); + Oid skewTable, + AttrNumber skewColumn, + bool skewInherit); static MergeJoin *make_mergejoin(List *tlist, - List *joinclauses, List *otherclauses, - List *mergeclauses, - Oid *mergefamilies, - Oid *mergecollations, - int *mergestrategies, - bool *mergenullsfirst, - Plan *lefttree, Plan *righttree, - JoinType jointype, bool inner_unique, - bool skip_mark_restore); + List *joinclauses, List *otherclauses, + List *mergeclauses, + Oid *mergefamilies, + Oid *mergecollations, + int *mergestrategies, + bool *mergenullsfirst, + Plan *lefttree, Plan *righttree, + JoinType jointype, bool inner_unique, + bool skip_mark_restore); static Sort *make_sort(Plan *lefttree, int numCols, - AttrNumber *sortColIdx, Oid *sortOperators, - Oid *collations, bool *nullsFirst); + AttrNumber *sortColIdx, Oid *sortOperators, + Oid *collations, bool *nullsFirst); static Plan *prepare_sort_from_pathkeys(Plan *lefttree, List *pathkeys, - Relids relids, - const AttrNumber *reqColIdx, - bool adjust_tlist_in_place, - int *p_numsortkeys, - AttrNumber **p_sortColIdx, - Oid **p_sortOperators, - Oid **p_collations, - bool **p_nullsFirst); + Relids relids, + const AttrNumber *reqColIdx, + bool adjust_tlist_in_place, + int *p_numsortkeys, + AttrNumber **p_sortColIdx, + Oid **p_sortOperators, + Oid **p_collations, + bool **p_nullsFirst); static EquivalenceMember *find_ec_member_for_tle(EquivalenceClass *ec, - TargetEntry *tle, - Relids relids); + TargetEntry *tle, + Relids relids); static Sort *make_sort_from_pathkeys(Plan *lefttree, List *pathkeys, - Relids relids); + Relids relids); static Sort *make_sort_from_groupcols(List *groupcls, - AttrNumber *grpColIdx, - Plan *lefttree); + AttrNumber *grpColIdx, + Plan *lefttree); static Material *make_material(Plan *lefttree); static WindowAgg *make_windowagg(List *tlist, Index winref, - int partNumCols, AttrNumber *partColIdx, Oid *partOperators, Oid *partCollations, - int ordNumCols, AttrNumber *ordColIdx, Oid *ordOperators, Oid *ordCollations, - int frameOptions, Node *startOffset, Node *endOffset, - Oid startInRangeFunc, Oid endInRangeFunc, - Oid inRangeColl, bool inRangeAsc, bool inRangeNullsFirst, - Plan *lefttree); + int partNumCols, AttrNumber *partColIdx, Oid *partOperators, Oid *partCollations, + int ordNumCols, AttrNumber *ordColIdx, Oid *ordOperators, Oid *ordCollations, + int frameOptions, Node *startOffset, Node *endOffset, + Oid startInRangeFunc, Oid endInRangeFunc, + Oid inRangeColl, bool inRangeAsc, bool inRangeNullsFirst, + Plan *lefttree); static Group *make_group(List *tlist, List *qual, int numGroupCols, - AttrNumber *grpColIdx, Oid *grpOperators, Oid *grpCollations, - Plan *lefttree); + AttrNumber *grpColIdx, Oid *grpOperators, Oid *grpCollations, + Plan *lefttree); static Unique *make_unique_from_sortclauses(Plan *lefttree, List *distinctList); static Unique *make_unique_from_pathkeys(Plan *lefttree, - List *pathkeys, int numCols); + List *pathkeys, int numCols); static Gather *make_gather(List *qptlist, List *qpqual, - int nworkers, int rescan_param, bool single_copy, Plan *subplan); + int nworkers, int rescan_param, bool single_copy, Plan *subplan); static SetOp *make_setop(SetOpCmd cmd, SetOpStrategy strategy, Plan *lefttree, - List *distinctList, AttrNumber flagColIdx, int firstFlag, - long numGroups); + List *distinctList, AttrNumber flagColIdx, int firstFlag, + long numGroups); static LockRows *make_lockrows(Plan *lefttree, List *rowMarks, int epqParam); static Result *make_result(List *tlist, Node *resconstantqual, Plan *subplan); static ProjectSet *make_project_set(List *tlist, Plan *subplan); static ModifyTable *make_modifytable(PlannerInfo *root, - CmdType operation, bool canSetTag, - Index nominalRelation, Index rootRelation, - bool partColsUpdated, - List *resultRelations, List *subplans, List *subroots, - List *withCheckOptionLists, List *returningLists, - List *rowMarks, OnConflictExpr *onconflict, int epqParam); + CmdType operation, bool canSetTag, + Index nominalRelation, Index rootRelation, + bool partColsUpdated, + List *resultRelations, List *subplans, List *subroots, + List *withCheckOptionLists, List *returningLists, + List *rowMarks, OnConflictExpr *onconflict, int epqParam); static GatherMerge *create_gather_merge_plan(PlannerInfo *root, - GatherMergePath *best_path); + GatherMergePath *best_path); /* diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 9798dca2722..73da0c2d8e1 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -49,33 +49,33 @@ typedef struct PostponedQual static void extract_lateral_references(PlannerInfo *root, RelOptInfo *brel, - Index rtindex); + Index rtindex); static List *deconstruct_recurse(PlannerInfo *root, Node *jtnode, - bool below_outer_join, - Relids *qualscope, Relids *inner_join_rels, - List **postponed_qual_list); + bool below_outer_join, + Relids *qualscope, Relids *inner_join_rels, + List **postponed_qual_list); static void process_security_barrier_quals(PlannerInfo *root, - int rti, Relids qualscope, - bool below_outer_join); + int rti, Relids qualscope, + bool below_outer_join); static SpecialJoinInfo *make_outerjoininfo(PlannerInfo *root, - Relids left_rels, Relids right_rels, - Relids inner_join_rels, - JoinType jointype, List *clause); + Relids left_rels, Relids right_rels, + Relids inner_join_rels, + JoinType jointype, List *clause); static void compute_semijoin_info(SpecialJoinInfo *sjinfo, List *clause); static void distribute_qual_to_rels(PlannerInfo *root, Node *clause, - bool is_deduced, - bool below_outer_join, - JoinType jointype, - Index security_level, - Relids qualscope, - Relids ojscope, - Relids outerjoin_nonnullable, - Relids deduced_nullable_relids, - List **postponed_qual_list); + bool is_deduced, + bool below_outer_join, + JoinType jointype, + Index security_level, + Relids qualscope, + Relids ojscope, + Relids outerjoin_nonnullable, + Relids deduced_nullable_relids, + List **postponed_qual_list); static bool check_outerjoin_delay(PlannerInfo *root, Relids *relids_p, - Relids *nullable_relids_p, bool is_pushed_down); + Relids *nullable_relids_p, bool is_pushed_down); static bool check_equivalence_delay(PlannerInfo *root, - RestrictInfo *restrictinfo); + RestrictInfo *restrictinfo); static bool check_redundant_nullability_qual(PlannerInfo *root, Node *clause); static void check_mergejoinable(RestrictInfo *restrictinfo); static void check_hashjoinable(RestrictInfo *restrictinfo); diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c index 67c35c5e869..9381939c822 100644 --- a/src/backend/optimizer/plan/planagg.c +++ b/src/backend/optimizer/plan/planagg.c @@ -50,7 +50,7 @@ static bool find_minmax_aggs_walker(Node *node, List **context); static bool build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo, - Oid eqop, Oid sortop, bool nulls_first); + Oid eqop, Oid sortop, bool nulls_first); static void minmax_qp_callback(PlannerInfo *root, void *extra); static Oid fetch_agg_sort_op(Oid aggfnoid); diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 48005434d40..cb897cc7f4e 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -132,122 +132,122 @@ static Node *preprocess_expression(PlannerInfo *root, Node *expr, int kind); static void preprocess_qual_conditions(PlannerInfo *root, Node *jtnode); static void inheritance_planner(PlannerInfo *root); static void grouping_planner(PlannerInfo *root, bool inheritance_update, - double tuple_fraction); + double tuple_fraction); static grouping_sets_data *preprocess_grouping_sets(PlannerInfo *root); static List *remap_to_groupclause_idx(List *groupClause, List *gsets, - int *tleref_to_colnum_map); + int *tleref_to_colnum_map); static void preprocess_rowmarks(PlannerInfo *root); static double preprocess_limit(PlannerInfo *root, - double tuple_fraction, - int64 *offset_est, int64 *count_est); + double tuple_fraction, + int64 *offset_est, int64 *count_est); static void remove_useless_groupby_columns(PlannerInfo *root); static List *preprocess_groupclause(PlannerInfo *root, List *force); static List *extract_rollup_sets(List *groupingSets); static List *reorder_grouping_sets(List *groupingSets, List *sortclause); static void standard_qp_callback(PlannerInfo *root, void *extra); static double get_number_of_groups(PlannerInfo *root, - double path_rows, - grouping_sets_data *gd, - List *target_list); + double path_rows, + grouping_sets_data *gd, + List *target_list); static RelOptInfo *create_grouping_paths(PlannerInfo *root, - RelOptInfo *input_rel, - PathTarget *target, - bool target_parallel_safe, - const AggClauseCosts *agg_costs, - grouping_sets_data *gd); + RelOptInfo *input_rel, + PathTarget *target, + bool target_parallel_safe, + const AggClauseCosts *agg_costs, + grouping_sets_data *gd); static bool is_degenerate_grouping(PlannerInfo *root); static void create_degenerate_grouping_paths(PlannerInfo *root, - RelOptInfo *input_rel, - RelOptInfo *grouped_rel); + RelOptInfo *input_rel, + RelOptInfo *grouped_rel); static RelOptInfo *make_grouping_rel(PlannerInfo *root, RelOptInfo *input_rel, - PathTarget *target, bool target_parallel_safe, - Node *havingQual); + PathTarget *target, bool target_parallel_safe, + Node *havingQual); static void create_ordinary_grouping_paths(PlannerInfo *root, - RelOptInfo *input_rel, - RelOptInfo *grouped_rel, - const AggClauseCosts *agg_costs, - grouping_sets_data *gd, - GroupPathExtraData *extra, - RelOptInfo **partially_grouped_rel_p); + RelOptInfo *input_rel, + RelOptInfo *grouped_rel, + const AggClauseCosts *agg_costs, + grouping_sets_data *gd, + GroupPathExtraData *extra, + RelOptInfo **partially_grouped_rel_p); static void consider_groupingsets_paths(PlannerInfo *root, - RelOptInfo *grouped_rel, - Path *path, - bool is_sorted, - bool can_hash, - grouping_sets_data *gd, - const AggClauseCosts *agg_costs, - double dNumGroups); + RelOptInfo *grouped_rel, + Path *path, + bool is_sorted, + bool can_hash, + grouping_sets_data *gd, + const AggClauseCosts *agg_costs, + double dNumGroups); static RelOptInfo *create_window_paths(PlannerInfo *root, - RelOptInfo *input_rel, - PathTarget *input_target, - PathTarget *output_target, - bool output_target_parallel_safe, - WindowFuncLists *wflists, - List *activeWindows); + RelOptInfo *input_rel, + PathTarget *input_target, + PathTarget *output_target, + bool output_target_parallel_safe, + WindowFuncLists *wflists, + List *activeWindows); static void create_one_window_path(PlannerInfo *root, - RelOptInfo *window_rel, - Path *path, - PathTarget *input_target, - PathTarget *output_target, - WindowFuncLists *wflists, - List *activeWindows); + RelOptInfo *window_rel, + Path *path, + PathTarget *input_target, + PathTarget *output_target, + WindowFuncLists *wflists, + List *activeWindows); static RelOptInfo *create_distinct_paths(PlannerInfo *root, - RelOptInfo *input_rel); + RelOptInfo *input_rel); static RelOptInfo *create_ordered_paths(PlannerInfo *root, - RelOptInfo *input_rel, - PathTarget *target, - bool target_parallel_safe, - double limit_tuples); + RelOptInfo *input_rel, + PathTarget *target, + bool target_parallel_safe, + double limit_tuples); static PathTarget *make_group_input_target(PlannerInfo *root, - PathTarget *final_target); + PathTarget *final_target); static PathTarget *make_partial_grouping_target(PlannerInfo *root, - PathTarget *grouping_target, - Node *havingQual); + PathTarget *grouping_target, + Node *havingQual); static List *postprocess_setop_tlist(List *new_tlist, List *orig_tlist); static List *select_active_windows(PlannerInfo *root, WindowFuncLists *wflists); static PathTarget *make_window_input_target(PlannerInfo *root, - PathTarget *final_target, - List *activeWindows); + PathTarget *final_target, + List *activeWindows); static List *make_pathkeys_for_window(PlannerInfo *root, WindowClause *wc, - List *tlist); + List *tlist); static PathTarget *make_sort_input_target(PlannerInfo *root, - PathTarget *final_target, - bool *have_postponed_srfs); + PathTarget *final_target, + bool *have_postponed_srfs); static void adjust_paths_for_srfs(PlannerInfo *root, RelOptInfo *rel, - List *targets, List *targets_contain_srfs); + List *targets, List *targets_contain_srfs); static void add_paths_to_grouping_rel(PlannerInfo *root, RelOptInfo *input_rel, - RelOptInfo *grouped_rel, - RelOptInfo *partially_grouped_rel, - const AggClauseCosts *agg_costs, - grouping_sets_data *gd, - double dNumGroups, - GroupPathExtraData *extra); + RelOptInfo *grouped_rel, + RelOptInfo *partially_grouped_rel, + const AggClauseCosts *agg_costs, + grouping_sets_data *gd, + double dNumGroups, + GroupPathExtraData *extra); static RelOptInfo *create_partial_grouping_paths(PlannerInfo *root, - RelOptInfo *grouped_rel, - RelOptInfo *input_rel, - grouping_sets_data *gd, - GroupPathExtraData *extra, - bool force_rel_creation); + RelOptInfo *grouped_rel, + RelOptInfo *input_rel, + grouping_sets_data *gd, + GroupPathExtraData *extra, + bool force_rel_creation); static void gather_grouping_paths(PlannerInfo *root, RelOptInfo *rel); static bool can_partial_agg(PlannerInfo *root, - const AggClauseCosts *agg_costs); + const AggClauseCosts *agg_costs); static void apply_scanjoin_target_to_paths(PlannerInfo *root, - RelOptInfo *rel, - List *scanjoin_targets, - List *scanjoin_targets_contain_srfs, - bool scanjoin_target_parallel_safe, - bool tlist_same_exprs); + RelOptInfo *rel, + List *scanjoin_targets, + List *scanjoin_targets_contain_srfs, + bool scanjoin_target_parallel_safe, + bool tlist_same_exprs); static void create_partitionwise_grouping_paths(PlannerInfo *root, - RelOptInfo *input_rel, - RelOptInfo *grouped_rel, - RelOptInfo *partially_grouped_rel, - const AggClauseCosts *agg_costs, - grouping_sets_data *gd, - PartitionwiseAggregateType patype, - GroupPathExtraData *extra); + RelOptInfo *input_rel, + RelOptInfo *grouped_rel, + RelOptInfo *partially_grouped_rel, + const AggClauseCosts *agg_costs, + grouping_sets_data *gd, + PartitionwiseAggregateType patype, + GroupPathExtraData *extra); static bool group_by_has_partkey(RelOptInfo *input_rel, - List *targetList, - List *groupClause); + List *targetList, + List *groupClause); static int common_prefix_cmp(const void *a, const void *b); diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 4204ca4025d..dc11f098e0f 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -88,25 +88,25 @@ static bool flatten_rtes_walker(Node *node, PlannerGlobal *glob); static void add_rte_to_flat_rtable(PlannerGlobal *glob, RangeTblEntry *rte); static Plan *set_plan_refs(PlannerInfo *root, Plan *plan, int rtoffset); static Plan *set_indexonlyscan_references(PlannerInfo *root, - IndexOnlyScan *plan, - int rtoffset); + IndexOnlyScan *plan, + int rtoffset); static Plan *set_subqueryscan_references(PlannerInfo *root, - SubqueryScan *plan, - int rtoffset); + SubqueryScan *plan, + int rtoffset); static bool trivial_subqueryscan(SubqueryScan *plan); static Plan *clean_up_removed_plan_level(Plan *parent, Plan *child); static void set_foreignscan_references(PlannerInfo *root, - ForeignScan *fscan, - int rtoffset); + ForeignScan *fscan, + int rtoffset); static void set_customscan_references(PlannerInfo *root, - CustomScan *cscan, - int rtoffset); + CustomScan *cscan, + int rtoffset); static Plan *set_append_references(PlannerInfo *root, - Append *aplan, - int rtoffset); + Append *aplan, + int rtoffset); static Plan *set_mergeappend_references(PlannerInfo *root, - MergeAppend *mplan, - int rtoffset); + MergeAppend *mplan, + int rtoffset); static Node *fix_scan_expr(PlannerInfo *root, Node *node, int rtoffset); static Node *fix_scan_expr_mutator(Node *node, fix_scan_expr_context *context); static bool fix_scan_expr_walker(Node *node, fix_scan_expr_context *context); @@ -117,35 +117,35 @@ static Node *convert_combining_aggrefs(Node *node, void *context); static void set_dummy_tlist_references(Plan *plan, int rtoffset); static indexed_tlist *build_tlist_index(List *tlist); static Var *search_indexed_tlist_for_var(Var *var, - indexed_tlist *itlist, - Index newvarno, - int rtoffset); + indexed_tlist *itlist, + Index newvarno, + int rtoffset); static Var *search_indexed_tlist_for_non_var(Expr *node, - indexed_tlist *itlist, - Index newvarno); + indexed_tlist *itlist, + Index newvarno); static Var *search_indexed_tlist_for_sortgroupref(Expr *node, - Index sortgroupref, - indexed_tlist *itlist, - Index newvarno); + Index sortgroupref, + indexed_tlist *itlist, + Index newvarno); static List *fix_join_expr(PlannerInfo *root, - List *clauses, - indexed_tlist *outer_itlist, - indexed_tlist *inner_itlist, - Index acceptable_rel, int rtoffset); + List *clauses, + indexed_tlist *outer_itlist, + indexed_tlist *inner_itlist, + Index acceptable_rel, int rtoffset); static Node *fix_join_expr_mutator(Node *node, - fix_join_expr_context *context); + fix_join_expr_context *context); static Node *fix_upper_expr(PlannerInfo *root, - Node *node, - indexed_tlist *subplan_itlist, - Index newvarno, - int rtoffset); + Node *node, + indexed_tlist *subplan_itlist, + Index newvarno, + int rtoffset); static Node *fix_upper_expr_mutator(Node *node, - fix_upper_expr_context *context); + fix_upper_expr_context *context); static List *set_returning_clause_references(PlannerInfo *root, - List *rlist, - Plan *topplan, - Index resultRelation, - int rtoffset); + List *rlist, + Plan *topplan, + Index resultRelation, + int rtoffset); /***************************************************************************** diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index 921ebfb5edd..efd0fbc21c5 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -67,19 +67,19 @@ typedef struct inline_cte_walker_context static Node *build_subplan(PlannerInfo *root, Plan *plan, PlannerInfo *subroot, - List *plan_params, - SubLinkType subLinkType, int subLinkId, - Node *testexpr, bool adjust_testexpr, - bool unknownEqFalse); + List *plan_params, + SubLinkType subLinkType, int subLinkId, + Node *testexpr, bool adjust_testexpr, + bool unknownEqFalse); static List *generate_subquery_params(PlannerInfo *root, List *tlist, - List **paramIds); + List **paramIds); static List *generate_subquery_vars(PlannerInfo *root, List *tlist, - Index varno); + Index varno); static Node *convert_testexpr(PlannerInfo *root, - Node *testexpr, - List *subst_nodes); + Node *testexpr, + List *subst_nodes); static Node *convert_testexpr_mutator(Node *node, - convert_testexpr_context *context); + convert_testexpr_context *context); static bool subplan_is_hashable(Plan *plan); static bool testexpr_is_hashable(Node *testexpr); static bool hash_ok_operator(OpExpr *expr); @@ -91,15 +91,15 @@ static void inline_cte(PlannerInfo *root, CommonTableExpr *cte); static bool inline_cte_walker(Node *node, inline_cte_walker_context *context); static bool simplify_EXISTS_query(PlannerInfo *root, Query *query); static Query *convert_EXISTS_to_ANY(PlannerInfo *root, Query *subselect, - Node **testexpr, List **paramIds); + Node **testexpr, List **paramIds); static Node *replace_correlation_vars_mutator(Node *node, PlannerInfo *root); static Node *process_sublinks_mutator(Node *node, - process_sublinks_context *context); + process_sublinks_context *context); static Bitmapset *finalize_plan(PlannerInfo *root, - Plan *plan, - int gather_param, - Bitmapset *valid_params, - Bitmapset *scan_params); + Plan *plan, + int gather_param, + Bitmapset *valid_params, + Bitmapset *scan_params); static bool finalize_primnode(Node *node, finalize_primnode_context *context); static bool finalize_agg_primnode(Node *node, finalize_primnode_context *context); diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c index aebe1627135..67eeba938db 100644 --- a/src/backend/optimizer/prep/prepjointree.c +++ b/src/backend/optimizer/prep/prepjointree.c @@ -61,61 +61,61 @@ typedef struct reduce_outer_joins_state } reduce_outer_joins_state; static Node *pull_up_sublinks_jointree_recurse(PlannerInfo *root, Node *jtnode, - Relids *relids); + Relids *relids); static Node *pull_up_sublinks_qual_recurse(PlannerInfo *root, Node *node, - Node **jtlink1, Relids available_rels1, - Node **jtlink2, Relids available_rels2); + Node **jtlink1, Relids available_rels1, + Node **jtlink2, Relids available_rels2); static Node *pull_up_subqueries_recurse(PlannerInfo *root, Node *jtnode, - JoinExpr *lowest_outer_join, - JoinExpr *lowest_nulling_outer_join, - AppendRelInfo *containing_appendrel); + JoinExpr *lowest_outer_join, + JoinExpr *lowest_nulling_outer_join, + AppendRelInfo *containing_appendrel); static Node *pull_up_simple_subquery(PlannerInfo *root, Node *jtnode, - RangeTblEntry *rte, - JoinExpr *lowest_outer_join, - JoinExpr *lowest_nulling_outer_join, - AppendRelInfo *containing_appendrel); + RangeTblEntry *rte, + JoinExpr *lowest_outer_join, + JoinExpr *lowest_nulling_outer_join, + AppendRelInfo *containing_appendrel); static Node *pull_up_simple_union_all(PlannerInfo *root, Node *jtnode, - RangeTblEntry *rte); + RangeTblEntry *rte); static void pull_up_union_leaf_queries(Node *setOp, PlannerInfo *root, - int parentRTindex, Query *setOpQuery, - int childRToffset); + int parentRTindex, Query *setOpQuery, + int childRToffset); static void make_setop_translation_list(Query *query, Index newvarno, - List **translated_vars); + List **translated_vars); static bool is_simple_subquery(Query *subquery, RangeTblEntry *rte, - JoinExpr *lowest_outer_join); + JoinExpr *lowest_outer_join); static Node *pull_up_simple_values(PlannerInfo *root, Node *jtnode, - RangeTblEntry *rte); + RangeTblEntry *rte); static bool is_simple_values(PlannerInfo *root, RangeTblEntry *rte); static bool is_simple_union_all(Query *subquery); static bool is_simple_union_all_recurse(Node *setOp, Query *setOpQuery, - List *colTypes); + List *colTypes); static bool is_safe_append_member(Query *subquery); static bool jointree_contains_lateral_outer_refs(Node *jtnode, bool restricted, - Relids safe_upper_varnos); + Relids safe_upper_varnos); static void replace_vars_in_jointree(Node *jtnode, - pullup_replace_vars_context *context, - JoinExpr *lowest_nulling_outer_join); + pullup_replace_vars_context *context, + JoinExpr *lowest_nulling_outer_join); static Node *pullup_replace_vars(Node *expr, - pullup_replace_vars_context *context); + pullup_replace_vars_context *context); static Node *pullup_replace_vars_callback(Var *var, - replace_rte_variables_context *context); + replace_rte_variables_context *context); static Query *pullup_replace_vars_subquery(Query *query, - pullup_replace_vars_context *context); + pullup_replace_vars_context *context); static reduce_outer_joins_state *reduce_outer_joins_pass1(Node *jtnode); static void reduce_outer_joins_pass2(Node *jtnode, - reduce_outer_joins_state *state, - PlannerInfo *root, - Relids nonnullable_rels, - List *nonnullable_vars, - List *forced_null_vars); + reduce_outer_joins_state *state, + PlannerInfo *root, + Relids nonnullable_rels, + List *nonnullable_vars, + List *forced_null_vars); static Node *remove_useless_results_recurse(PlannerInfo *root, Node *jtnode); static int get_result_relid(PlannerInfo *root, Node *jtnode); static void remove_result_refs(PlannerInfo *root, int varno, Node *newjtloc); static bool find_dependent_phvs(Node *node, int varno); static void substitute_phv_relids(Node *node, - int varno, Relids subrelids); + int varno, Relids subrelids); static void fix_append_rel_relids(List *append_rel_list, int varno, - Relids subrelids); + Relids subrelids); static Node *find_jointree_node_for_rel(Node *jtnode, int relid); diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index 66e6ad9b930..05172ff0234 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -54,7 +54,7 @@ static List *expand_targetlist(List *tlist, int command_type, - Index result_relation, Relation rel); + Index result_relation, Relation rel); /* diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index c1def3823fa..cd9d49c1f79 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -47,42 +47,42 @@ static RelOptInfo *recurse_set_operations(Node *setOp, PlannerInfo *root, - List *colTypes, List *colCollations, - bool junkOK, - int flag, List *refnames_tlist, - List **pTargetList, - double *pNumGroups); + List *colTypes, List *colCollations, + bool junkOK, + int flag, List *refnames_tlist, + List **pTargetList, + double *pNumGroups); static RelOptInfo *generate_recursion_path(SetOperationStmt *setOp, - PlannerInfo *root, - List *refnames_tlist, - List **pTargetList); + PlannerInfo *root, + List *refnames_tlist, + List **pTargetList); static RelOptInfo *generate_union_paths(SetOperationStmt *op, PlannerInfo *root, - List *refnames_tlist, - List **pTargetList); + List *refnames_tlist, + List **pTargetList); static RelOptInfo *generate_nonunion_paths(SetOperationStmt *op, PlannerInfo *root, - List *refnames_tlist, - List **pTargetList); + List *refnames_tlist, + List **pTargetList); static List *plan_union_children(PlannerInfo *root, - SetOperationStmt *top_union, - List *refnames_tlist, - List **tlist_list); + SetOperationStmt *top_union, + List *refnames_tlist, + List **tlist_list); static Path *make_union_unique(SetOperationStmt *op, Path *path, List *tlist, - PlannerInfo *root); + PlannerInfo *root); static void postprocess_setop_rel(PlannerInfo *root, RelOptInfo *rel); static bool choose_hashed_setop(PlannerInfo *root, List *groupClauses, - Path *input_path, - double dNumGroups, double dNumOutputRows, - const char *construct); + Path *input_path, + double dNumGroups, double dNumOutputRows, + const char *construct); static List *generate_setop_tlist(List *colTypes, List *colCollations, - int flag, - Index varno, - bool hack_constants, - List *input_tlist, - List *refnames_tlist); + int flag, + Index varno, + bool hack_constants, + List *input_tlist, + List *refnames_tlist); static List *generate_append_tlist(List *colTypes, List *colCollations, - bool flag, - List *input_tlists, - List *refnames_tlist); + bool flag, + List *input_tlists, + List *refnames_tlist); static List *generate_setop_grouplist(SetOperationStmt *op, List *targetlist); diff --git a/src/backend/optimizer/util/appendinfo.c b/src/backend/optimizer/util/appendinfo.c index ba955290b10..16d315176eb 100644 --- a/src/backend/optimizer/util/appendinfo.c +++ b/src/backend/optimizer/util/appendinfo.c @@ -32,13 +32,13 @@ typedef struct } adjust_appendrel_attrs_context; static void make_inh_translation_list(Relation oldrelation, - Relation newrelation, - Index newvarno, - List **translated_vars); + Relation newrelation, + Index newvarno, + List **translated_vars); static Node *adjust_appendrel_attrs_mutator(Node *node, - adjust_appendrel_attrs_context *context); + adjust_appendrel_attrs_context *context); static List *adjust_inherited_tlist(List *tlist, - AppendRelInfo *context); + AppendRelInfo *context); /* diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 501b0e9e2dc..2e84d6b3b4f 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -99,14 +99,14 @@ typedef struct static bool contain_agg_clause_walker(Node *node, void *context); static bool get_agg_clause_costs_walker(Node *node, - get_agg_clause_costs_context *context); + get_agg_clause_costs_context *context); static bool find_window_functions_walker(Node *node, WindowFuncLists *lists); static bool contain_subplans_walker(Node *node, void *context); static bool contain_mutable_functions_walker(Node *node, void *context); static bool contain_volatile_functions_walker(Node *node, void *context); static bool contain_volatile_functions_not_nextval_walker(Node *node, void *context); static bool max_parallel_hazard_walker(Node *node, - max_parallel_hazard_context *context); + max_parallel_hazard_context *context); static bool contain_nonstrict_functions_walker(Node *node, void *context); static bool contain_context_dependent_node(Node *clause); static bool contain_context_dependent_node_walker(Node *node, int *flags); @@ -115,46 +115,46 @@ static Relids find_nonnullable_rels_walker(Node *node, bool top_level); static List *find_nonnullable_vars_walker(Node *node, bool top_level); static bool is_strict_saop(ScalarArrayOpExpr *expr, bool falseOK); static Node *eval_const_expressions_mutator(Node *node, - eval_const_expressions_context *context); + eval_const_expressions_context *context); static bool contain_non_const_walker(Node *node, void *context); static bool ece_function_is_safe(Oid funcid, - eval_const_expressions_context *context); + eval_const_expressions_context *context); static List *simplify_or_arguments(List *args, - eval_const_expressions_context *context, - bool *haveNull, bool *forceTrue); + eval_const_expressions_context *context, + bool *haveNull, bool *forceTrue); static List *simplify_and_arguments(List *args, - eval_const_expressions_context *context, - bool *haveNull, bool *forceFalse); + eval_const_expressions_context *context, + bool *haveNull, bool *forceFalse); static Node *simplify_boolean_equality(Oid opno, List *args); static Expr *simplify_function(Oid funcid, - Oid result_type, int32 result_typmod, - Oid result_collid, Oid input_collid, List **args_p, - bool funcvariadic, bool process_args, bool allow_non_const, - eval_const_expressions_context *context); + Oid result_type, int32 result_typmod, + Oid result_collid, Oid input_collid, List **args_p, + bool funcvariadic, bool process_args, bool allow_non_const, + eval_const_expressions_context *context); static List *reorder_function_arguments(List *args, HeapTuple func_tuple); static List *add_function_defaults(List *args, HeapTuple func_tuple); static List *fetch_function_defaults(HeapTuple func_tuple); static void recheck_cast_function_args(List *args, Oid result_type, - HeapTuple func_tuple); + HeapTuple func_tuple); static Expr *evaluate_function(Oid funcid, Oid result_type, int32 result_typmod, - Oid result_collid, Oid input_collid, List *args, - bool funcvariadic, - HeapTuple func_tuple, - eval_const_expressions_context *context); + Oid result_collid, Oid input_collid, List *args, + bool funcvariadic, + HeapTuple func_tuple, + eval_const_expressions_context *context); static Expr *inline_function(Oid funcid, Oid result_type, Oid result_collid, - Oid input_collid, List *args, - bool funcvariadic, - HeapTuple func_tuple, - eval_const_expressions_context *context); + Oid input_collid, List *args, + bool funcvariadic, + HeapTuple func_tuple, + eval_const_expressions_context *context); static Node *substitute_actual_parameters(Node *expr, int nargs, List *args, - int *usecounts); + int *usecounts); static Node *substitute_actual_parameters_mutator(Node *node, - substitute_actual_parameters_context *context); + substitute_actual_parameters_context *context); static void sql_inline_error_callback(void *arg); static Query *substitute_actual_srf_parameters(Query *expr, - int nargs, List *args); + int nargs, List *args); static Node *substitute_actual_srf_parameters_mutator(Node *node, - substitute_actual_srf_parameters_context *context); + substitute_actual_srf_parameters_context *context); static bool tlist_matches_coltypelist(List *tlist, List *coltypelist); diff --git a/src/backend/optimizer/util/inherit.c b/src/backend/optimizer/util/inherit.c index bbf204ddfb8..38bc61e6878 100644 --- a/src/backend/optimizer/util/inherit.c +++ b/src/backend/optimizer/util/inherit.c @@ -36,19 +36,19 @@ static void expand_partitioned_rtentry(PlannerInfo *root, RelOptInfo *relinfo, - RangeTblEntry *parentrte, - Index parentRTindex, Relation parentrel, - PlanRowMark *top_parentrc, LOCKMODE lockmode); + RangeTblEntry *parentrte, + Index parentRTindex, Relation parentrel, + PlanRowMark *top_parentrc, LOCKMODE lockmode); static void expand_single_inheritance_child(PlannerInfo *root, - RangeTblEntry *parentrte, - Index parentRTindex, Relation parentrel, - PlanRowMark *top_parentrc, Relation childrel, - RangeTblEntry **childrte_p, - Index *childRTindex_p); + RangeTblEntry *parentrte, + Index parentRTindex, Relation parentrel, + PlanRowMark *top_parentrc, Relation childrel, + RangeTblEntry **childrte_p, + Index *childRTindex_p); static Bitmapset *translate_col_privs(const Bitmapset *parent_privs, - List *translated_vars); + List *translated_vars); static void expand_appendrel_subquery(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte, Index rti); + RangeTblEntry *rte, Index rti); /* diff --git a/src/backend/optimizer/util/orclauses.c b/src/backend/optimizer/util/orclauses.c index b67158154e9..18ebc51bcac 100644 --- a/src/backend/optimizer/util/orclauses.c +++ b/src/backend/optimizer/util/orclauses.c @@ -27,7 +27,7 @@ static bool is_safe_restriction_clause_for(RestrictInfo *rinfo, RelOptInfo *rel); static Expr *extract_or_clause(RestrictInfo *or_rinfo, RelOptInfo *rel); static void consider_new_or_clause(PlannerInfo *root, RelOptInfo *rel, - Expr *orclause, RestrictInfo *join_or_rinfo); + Expr *orclause, RestrictInfo *join_or_rinfo); /* diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index d66471c7a46..d884d2bb000 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -55,8 +55,8 @@ static List *translate_sub_tlist(List *tlist, int relid); static int append_total_cost_compare(const void *a, const void *b); static int append_startup_cost_compare(const void *a, const void *b); static List *reparameterize_pathlist_by_child(PlannerInfo *root, - List *pathlist, - RelOptInfo *child_rel); + List *pathlist, + RelOptInfo *child_rel); /***************************************************************************** diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 80441de65e6..2405acbf6fa 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -62,22 +62,22 @@ get_relation_info_hook_type get_relation_info_hook = NULL; static void get_relation_foreign_keys(PlannerInfo *root, RelOptInfo *rel, - Relation relation, bool inhparent); + Relation relation, bool inhparent); static bool infer_collation_opclass_match(InferenceElem *elem, Relation idxRel, - List *idxExprs); + List *idxExprs); static List *get_relation_constraints(PlannerInfo *root, - Oid relationObjectId, RelOptInfo *rel, - bool include_noinherit, - bool include_notnull, - bool include_partition); + Oid relationObjectId, RelOptInfo *rel, + bool include_noinherit, + bool include_notnull, + bool include_partition); static List *build_index_tlist(PlannerInfo *root, IndexOptInfo *index, - Relation heapRelation); + Relation heapRelation); static List *get_relation_statistics(RelOptInfo *rel, Relation relation); static void set_relation_partition_info(PlannerInfo *root, RelOptInfo *rel, - Relation relation); + Relation relation); static PartitionScheme find_partition_scheme(PlannerInfo *root, Relation rel); static void set_baserel_partition_key_exprs(Relation relation, - RelOptInfo *rel); + RelOptInfo *rel); /* * get_relation_info - diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c index fc4fc09a835..b81eba72191 100644 --- a/src/backend/optimizer/util/predtest.c +++ b/src/backend/optimizer/util/predtest.c @@ -79,9 +79,9 @@ typedef struct PredIterInfoData static bool predicate_implied_by_recurse(Node *clause, Node *predicate, - bool weak); + bool weak); static bool predicate_refuted_by_recurse(Node *clause, Node *predicate, - bool weak); + bool weak); static PredClass predicate_classify(Node *clause, PredIterInfo info); static void list_startup_fn(Node *clause, PredIterInfo info); static Node *list_next_fn(PredIterInfo info); @@ -94,18 +94,18 @@ static void arrayexpr_startup_fn(Node *clause, PredIterInfo info); static Node *arrayexpr_next_fn(PredIterInfo info); static void arrayexpr_cleanup_fn(PredIterInfo info); static bool predicate_implied_by_simple_clause(Expr *predicate, Node *clause, - bool weak); + bool weak); static bool predicate_refuted_by_simple_clause(Expr *predicate, Node *clause, - bool weak); + bool weak); static Node *extract_not_arg(Node *clause); static Node *extract_strong_not_arg(Node *clause); static bool clause_is_strict_for(Node *clause, Node *subexpr, bool allow_false); static bool operator_predicate_proof(Expr *predicate, Node *clause, - bool refute_it, bool weak); + bool refute_it, bool weak); static bool operator_same_subexprs_proof(Oid pred_op, Oid clause_op, - bool refute_it); + bool refute_it); static bool operator_same_subexprs_lookup(Oid pred_op, Oid clause_op, - bool refute_it); + bool refute_it); static Oid get_btree_test_op(Oid pred_op, Oid clause_op, bool refute_it); static void InvalidateOprProofCacheCallBack(Datum arg, int cacheid, uint32 hashvalue); diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index 272e2eb10af..6054bd2b535 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -38,31 +38,31 @@ typedef struct JoinHashEntry } JoinHashEntry; static void build_joinrel_tlist(PlannerInfo *root, RelOptInfo *joinrel, - RelOptInfo *input_rel); + RelOptInfo *input_rel); static List *build_joinrel_restrictlist(PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *outer_rel, - RelOptInfo *inner_rel); + RelOptInfo *joinrel, + RelOptInfo *outer_rel, + RelOptInfo *inner_rel); static void build_joinrel_joinlist(RelOptInfo *joinrel, - RelOptInfo *outer_rel, - RelOptInfo *inner_rel); + RelOptInfo *outer_rel, + RelOptInfo *inner_rel); static List *subbuild_joinrel_restrictlist(RelOptInfo *joinrel, - List *joininfo_list, - List *new_restrictlist); + List *joininfo_list, + List *new_restrictlist); static List *subbuild_joinrel_joinlist(RelOptInfo *joinrel, - List *joininfo_list, - List *new_joininfo); + List *joininfo_list, + List *new_joininfo); static void set_foreign_rel_properties(RelOptInfo *joinrel, - RelOptInfo *outer_rel, RelOptInfo *inner_rel); + RelOptInfo *outer_rel, RelOptInfo *inner_rel); static void add_join_rel(PlannerInfo *root, RelOptInfo *joinrel); static void build_joinrel_partition_info(RelOptInfo *joinrel, - RelOptInfo *outer_rel, RelOptInfo *inner_rel, - List *restrictlist, JoinType jointype); + RelOptInfo *outer_rel, RelOptInfo *inner_rel, + List *restrictlist, JoinType jointype); static void build_child_join_reltarget(PlannerInfo *root, - RelOptInfo *parentrel, - RelOptInfo *childrel, - int nappinfos, - AppendRelInfo **appinfos); + RelOptInfo *parentrel, + RelOptInfo *childrel, + int nappinfos, + AppendRelInfo **appinfos); /* diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimizer/util/restrictinfo.c index 03e5f12d0da..3b50fd29ad6 100644 --- a/src/backend/optimizer/util/restrictinfo.c +++ b/src/backend/optimizer/util/restrictinfo.c @@ -22,22 +22,22 @@ static RestrictInfo *make_restrictinfo_internal(Expr *clause, - Expr *orclause, - bool is_pushed_down, - bool outerjoin_delayed, - bool pseudoconstant, - Index security_level, - Relids required_relids, - Relids outer_relids, - Relids nullable_relids); + Expr *orclause, + bool is_pushed_down, + bool outerjoin_delayed, + bool pseudoconstant, + Index security_level, + Relids required_relids, + Relids outer_relids, + Relids nullable_relids); static Expr *make_sub_restrictinfos(Expr *clause, - bool is_pushed_down, - bool outerjoin_delayed, - bool pseudoconstant, - Index security_level, - Relids required_relids, - Relids outer_relids, - Relids nullable_relids); + bool is_pushed_down, + bool outerjoin_delayed, + bool pseudoconstant, + Index security_level, + Relids required_relids, + Relids outer_relids, + Relids nullable_relids); /* diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index bb3b7969f26..41402821a15 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -54,9 +54,9 @@ typedef struct } split_pathtarget_context; static bool split_pathtarget_walker(Node *node, - split_pathtarget_context *context); + split_pathtarget_context *context); static void add_sp_item_to_pathtarget(PathTarget *target, - split_pathtarget_item *item); + split_pathtarget_item *item); static void add_sp_items_to_pathtarget(PathTarget *target, List *items); diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c index 315c81eb8e6..15cc518a82e 100644 --- a/src/backend/optimizer/util/var.c +++ b/src/backend/optimizer/util/var.c @@ -67,17 +67,17 @@ typedef struct } flatten_join_alias_vars_context; static bool pull_varnos_walker(Node *node, - pull_varnos_context *context); + pull_varnos_context *context); static bool pull_varattnos_walker(Node *node, pull_varattnos_context *context); static bool pull_vars_walker(Node *node, pull_vars_context *context); static bool contain_var_clause_walker(Node *node, void *context); static bool contain_vars_of_level_walker(Node *node, int *sublevels_up); static bool locate_var_of_level_walker(Node *node, - locate_var_of_level_context *context); + locate_var_of_level_context *context); static bool pull_var_clause_walker(Node *node, - pull_var_clause_context *context); + pull_var_clause_context *context); static Node *flatten_join_alias_vars_mutator(Node *node, - flatten_join_alias_vars_context *context); + flatten_join_alias_vars_context *context); static Relids alias_relid_set(Query *query, Relids relids); diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index bd6f3c80445..b13c2461835 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -54,32 +54,32 @@ static Query *transformOptionalSelectInto(ParseState *pstate, Node *parseTree); static Query *transformDeleteStmt(ParseState *pstate, DeleteStmt *stmt); static Query *transformInsertStmt(ParseState *pstate, InsertStmt *stmt); static List *transformInsertRow(ParseState *pstate, List *exprlist, - List *stmtcols, List *icolumns, List *attrnos, - bool strip_indirection); + List *stmtcols, List *icolumns, List *attrnos, + bool strip_indirection); static OnConflictExpr *transformOnConflictClause(ParseState *pstate, - OnConflictClause *onConflictClause); + OnConflictClause *onConflictClause); static int count_rowexpr_columns(ParseState *pstate, Node *expr); static Query *transformSelectStmt(ParseState *pstate, SelectStmt *stmt); static Query *transformValuesClause(ParseState *pstate, SelectStmt *stmt); static Query *transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt); static Node *transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, - bool isTopLevel, List **targetlist); + bool isTopLevel, List **targetlist); static void determineRecursiveColTypes(ParseState *pstate, - Node *larg, List *nrtargetlist); + Node *larg, List *nrtargetlist); static Query *transformUpdateStmt(ParseState *pstate, UpdateStmt *stmt); static List *transformReturningList(ParseState *pstate, List *returningList); static List *transformUpdateTargetList(ParseState *pstate, - List *targetList); + List *targetList); static Query *transformDeclareCursorStmt(ParseState *pstate, - DeclareCursorStmt *stmt); + DeclareCursorStmt *stmt); static Query *transformExplainStmt(ParseState *pstate, - ExplainStmt *stmt); + ExplainStmt *stmt); static Query *transformCreateTableAsStmt(ParseState *pstate, - CreateTableAsStmt *stmt); + CreateTableAsStmt *stmt); static Query *transformCallStmt(ParseState *pstate, - CallStmt *stmt); + CallStmt *stmt); static void transformLockingClause(ParseState *pstate, Query *qry, - LockingClause *lc, bool pushedDown); + LockingClause *lc, bool pushedDown); #ifdef RAW_EXPRESSION_COVERAGE_TEST static bool test_raw_expression_coverage(Node *node, void *context); #endif diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index c745fcdd2b7..d50410d23a6 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -51,23 +51,23 @@ typedef struct bool in_agg_direct_args; } check_ungrouped_columns_context; -static int check_agg_arguments(ParseState *pstate, - List *directargs, - List *args, - Expr *filter); +static int check_agg_arguments(ParseState *pstate, + List *directargs, + List *args, + Expr *filter); static bool check_agg_arguments_walker(Node *node, - check_agg_arguments_context *context); + check_agg_arguments_context *context); static void check_ungrouped_columns(Node *node, ParseState *pstate, Query *qry, - List *groupClauses, List *groupClauseVars, - bool have_non_var_grouping, - List **func_grouped_rels); + List *groupClauses, List *groupClauseVars, + bool have_non_var_grouping, + List **func_grouped_rels); static bool check_ungrouped_columns_walker(Node *node, - check_ungrouped_columns_context *context); + check_ungrouped_columns_context *context); static void finalize_grouping_exprs(Node *node, ParseState *pstate, Query *qry, - List *groupClauses, bool hasJoinRTEs, - bool have_non_var_grouping); + List *groupClauses, bool hasJoinRTEs, + bool have_non_var_grouping); static bool finalize_grouping_exprs_walker(Node *node, - check_ungrouped_columns_context *context); + check_ungrouped_columns_context *context); static void check_agglevels_and_constraints(ParseState *pstate, Node *expr); static List *expand_groupingset_node(GroupingSet *gs); static Node *make_agg_arg(Oid argtype, Oid argcollation); diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index c6ce1011e2d..2a6b2ff153b 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -57,51 +57,51 @@ #define makeDefaultNSItem(rte) makeNamespaceItem(rte, true, true, false, true) static void extractRemainingColumns(List *common_colnames, - List *src_colnames, List *src_colvars, - List **res_colnames, List **res_colvars); + List *src_colnames, List *src_colvars, + List **res_colnames, List **res_colvars); static Node *transformJoinUsingClause(ParseState *pstate, - RangeTblEntry *leftRTE, RangeTblEntry *rightRTE, - List *leftVars, List *rightVars); + RangeTblEntry *leftRTE, RangeTblEntry *rightRTE, + List *leftVars, List *rightVars); static Node *transformJoinOnClause(ParseState *pstate, JoinExpr *j, - List *namespace); + List *namespace); static RangeTblEntry *getRTEForSpecialRelationTypes(ParseState *pstate, - RangeVar *rv); + RangeVar *rv); static RangeTblEntry *transformTableEntry(ParseState *pstate, RangeVar *r); static RangeTblEntry *transformRangeSubselect(ParseState *pstate, - RangeSubselect *r); + RangeSubselect *r); static RangeTblEntry *transformRangeFunction(ParseState *pstate, - RangeFunction *r); + RangeFunction *r); static RangeTblEntry *transformRangeTableFunc(ParseState *pstate, - RangeTableFunc *t); + RangeTableFunc *t); static TableSampleClause *transformRangeTableSample(ParseState *pstate, - RangeTableSample *rts); + RangeTableSample *rts); static Node *transformFromClauseItem(ParseState *pstate, Node *n, - RangeTblEntry **top_rte, int *top_rti, - List **namespace); + RangeTblEntry **top_rte, int *top_rti, + List **namespace); static Node *buildMergedJoinVar(ParseState *pstate, JoinType jointype, - Var *l_colvar, Var *r_colvar); + Var *l_colvar, Var *r_colvar); static ParseNamespaceItem *makeNamespaceItem(RangeTblEntry *rte, - bool rel_visible, bool cols_visible, - bool lateral_only, bool lateral_ok); + bool rel_visible, bool cols_visible, + bool lateral_only, bool lateral_ok); static void setNamespaceColumnVisibility(List *namespace, bool cols_visible); static void setNamespaceLateralState(List *namespace, - bool lateral_only, bool lateral_ok); + bool lateral_only, bool lateral_ok); static void checkExprIsVarFree(ParseState *pstate, Node *n, - const char *constructName); + const char *constructName); static TargetEntry *findTargetlistEntrySQL92(ParseState *pstate, Node *node, - List **tlist, ParseExprKind exprKind); + List **tlist, ParseExprKind exprKind); static TargetEntry *findTargetlistEntrySQL99(ParseState *pstate, Node *node, - List **tlist, ParseExprKind exprKind); -static int get_matching_location(int sortgroupref, - List *sortgrouprefs, List *exprs); + List **tlist, ParseExprKind exprKind); +static int get_matching_location(int sortgroupref, + List *sortgrouprefs, List *exprs); static List *resolve_unique_index_expr(ParseState *pstate, InferClause *infer, - Relation heapRel); + Relation heapRel); static List *addTargetToGroupList(ParseState *pstate, TargetEntry *tle, - List *grouplist, List *targetlist, int location); + List *grouplist, List *targetlist, int location); static WindowClause *findWindowClause(List *wclist, const char *name); static Node *transformFrameOffset(ParseState *pstate, int frameOptions, - Oid rangeopfamily, Oid rangeopcintype, Oid *inRangeFunc, - Node *clause); + Oid rangeopfamily, Oid rangeopcintype, Oid *inRangeFunc, + Node *clause); /* diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index 3840252a5bd..903478d8ca7 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -33,22 +33,22 @@ static Node *coerce_type_typmod(Node *node, - Oid targetTypeId, int32 targetTypMod, - CoercionContext ccontext, CoercionForm cformat, - int location, - bool hideInputCoercion); + Oid targetTypeId, int32 targetTypMod, + CoercionContext ccontext, CoercionForm cformat, + int location, + bool hideInputCoercion); static void hide_coercion_node(Node *node); static Node *build_coercion_expression(Node *node, - CoercionPathType pathtype, - Oid funcId, - Oid targetTypeId, int32 targetTypMod, - CoercionContext ccontext, CoercionForm cformat, - int location); + CoercionPathType pathtype, + Oid funcId, + Oid targetTypeId, int32 targetTypMod, + CoercionContext ccontext, CoercionForm cformat, + int location); static Node *coerce_record_to_complex(ParseState *pstate, Node *node, - Oid targetTypeId, - CoercionContext ccontext, - CoercionForm cformat, - int location); + Oid targetTypeId, + CoercionContext ccontext, + CoercionForm cformat, + int location); static bool is_complex_array(Oid typid); static bool typeIsOfTypedTable(Oid reltypeId, Oid reloftypeId); diff --git a/src/backend/parser/parse_collate.c b/src/backend/parser/parse_collate.c index 0cfe9997a57..4d2e586bd64 100644 --- a/src/backend/parser/parse_collate.c +++ b/src/backend/parser/parse_collate.c @@ -74,19 +74,19 @@ typedef struct static bool assign_query_collations_walker(Node *node, ParseState *pstate); static bool assign_collations_walker(Node *node, - assign_collations_context *context); + assign_collations_context *context); static void merge_collation_state(Oid collation, - CollateStrength strength, - int location, - Oid collation2, - int location2, - assign_collations_context *context); + CollateStrength strength, + int location, + Oid collation2, + int location2, + assign_collations_context *context); static void assign_aggregate_collations(Aggref *aggref, - assign_collations_context *loccontext); + assign_collations_context *loccontext); static void assign_ordered_set_collations(Aggref *aggref, - assign_collations_context *loccontext); + assign_collations_context *loccontext); static void assign_hypothetical_collations(Aggref *aggref, - assign_collations_context *loccontext); + assign_collations_context *loccontext); /* diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 8e136a79818..97f535a2f00 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -104,35 +104,35 @@ static Node *transformMultiAssignRef(ParseState *pstate, MultiAssignRef *maref); static Node *transformCaseExpr(ParseState *pstate, CaseExpr *c); static Node *transformSubLink(ParseState *pstate, SubLink *sublink); static Node *transformArrayExpr(ParseState *pstate, A_ArrayExpr *a, - Oid array_type, Oid element_type, int32 typmod); + Oid array_type, Oid element_type, int32 typmod); static Node *transformRowExpr(ParseState *pstate, RowExpr *r, bool allowDefault); static Node *transformCoalesceExpr(ParseState *pstate, CoalesceExpr *c); static Node *transformMinMaxExpr(ParseState *pstate, MinMaxExpr *m); static Node *transformSQLValueFunction(ParseState *pstate, - SQLValueFunction *svf); + SQLValueFunction *svf); static Node *transformXmlExpr(ParseState *pstate, XmlExpr *x); static Node *transformXmlSerialize(ParseState *pstate, XmlSerialize *xs); static Node *transformBooleanTest(ParseState *pstate, BooleanTest *b); static Node *transformCurrentOfExpr(ParseState *pstate, CurrentOfExpr *cexpr); static Node *transformColumnRef(ParseState *pstate, ColumnRef *cref); static Node *transformWholeRowRef(ParseState *pstate, RangeTblEntry *rte, - int location); + int location); static Node *transformIndirection(ParseState *pstate, A_Indirection *ind); static Node *transformTypeCast(ParseState *pstate, TypeCast *tc); static Node *transformCollateClause(ParseState *pstate, CollateClause *c); static Node *make_row_comparison_op(ParseState *pstate, List *opname, - List *largs, List *rargs, int location); + List *largs, List *rargs, int location); static Node *make_row_distinct_op(ParseState *pstate, List *opname, - RowExpr *lrow, RowExpr *rrow, int location); + RowExpr *lrow, RowExpr *rrow, int location); static Expr *make_distinct_op(ParseState *pstate, List *opname, - Node *ltree, Node *rtree, int location); + Node *ltree, Node *rtree, int location); static Node *make_nulltest_from_distinct(ParseState *pstate, - A_Expr *distincta, Node *arg); + A_Expr *distincta, Node *arg); static int operator_precedence_group(Node *node, const char **nodename); static void emit_precedence_warnings(ParseState *pstate, - int opgroup, const char *opname, - Node *lchild, Node *rchild, - int location); + int opgroup, const char *opname, + Node *lchild, Node *rchild, + int location); /* diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index 752cf1b315f..2a44b434a59 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -43,14 +43,14 @@ typedef enum } FuncLookupError; static void unify_hypothetical_args(ParseState *pstate, - List *fargs, int numAggregatedArgs, - Oid *actual_arg_types, Oid *declared_arg_types); + List *fargs, int numAggregatedArgs, + Oid *actual_arg_types, Oid *declared_arg_types); static Oid FuncNameAsType(List *funcname); static Node *ParseComplexProjection(ParseState *pstate, const char *funcname, - Node *first_arg, int location); -static Oid LookupFuncNameInternal(List *funcname, int nargs, - const Oid *argtypes, - bool missing_ok, FuncLookupError *lookupError); + Node *first_arg, int location); +static Oid LookupFuncNameInternal(List *funcname, int nargs, + const Oid *argtypes, + bool missing_ok, FuncLookupError *lookupError); /* diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 24f0d5c08c5..0e1015962d7 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -67,17 +67,17 @@ typedef struct OprCacheEntry static Oid binary_oper_exact(List *opname, Oid arg1, Oid arg2); static FuncDetailCode oper_select_candidate(int nargs, - Oid *input_typeids, - FuncCandidateList candidates, - Oid *operOid); + Oid *input_typeids, + FuncCandidateList candidates, + Oid *operOid); static const char *op_signature_string(List *op, char oprkind, - Oid arg1, Oid arg2); + Oid arg1, Oid arg2); static void op_error(ParseState *pstate, List *op, char oprkind, - Oid arg1, Oid arg2, - FuncDetailCode fdresult, int location); + Oid arg1, Oid arg2, + FuncDetailCode fdresult, int location); static bool make_oper_cache_key(ParseState *pstate, OprCacheKey *key, - List *opname, Oid ltypeId, Oid rtypeId, - int location); + List *opname, Oid ltypeId, Oid rtypeId, + int location); static Oid find_oper_cache_entry(OprCacheKey *key); static void make_oper_cache_entry(OprCacheKey *key, Oid opr_oid); static void InvalidateOprCacheCallBack(Datum arg, int cacheid, uint32 hashvalue); diff --git a/src/backend/parser/parse_param.c b/src/backend/parser/parse_param.c index 541b9d09575..38915fbce19 100644 --- a/src/backend/parser/parse_param.c +++ b/src/backend/parser/parse_param.c @@ -54,8 +54,8 @@ typedef struct VarParamState static Node *fixed_paramref_hook(ParseState *pstate, ParamRef *pref); static Node *variable_paramref_hook(ParseState *pstate, ParamRef *pref); static Node *variable_coerce_param_hook(ParseState *pstate, Param *param, - Oid targetTypeId, int32 targetTypeMod, - int location); + Oid targetTypeId, int32 targetTypeMod, + int location); static bool check_parameter_resolution_walker(Node *node, ParseState *pstate); static bool query_contains_extern_params_walker(Node *node, void *context); diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index 0640d11fac7..77a48b039d9 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -41,22 +41,22 @@ #define MAX_FUZZY_DISTANCE 3 static RangeTblEntry *scanNameSpaceForRefname(ParseState *pstate, - const char *refname, int location); + const char *refname, int location); static RangeTblEntry *scanNameSpaceForRelid(ParseState *pstate, Oid relid, - int location); + int location); static void check_lateral_ref_ok(ParseState *pstate, ParseNamespaceItem *nsitem, - int location); + int location); static void markRTEForSelectPriv(ParseState *pstate, RangeTblEntry *rte, - int rtindex, AttrNumber col); + int rtindex, AttrNumber col); static void expandRelation(Oid relid, Alias *eref, - int rtindex, int sublevels_up, - int location, bool include_dropped, - List **colnames, List **colvars); + int rtindex, int sublevels_up, + int location, bool include_dropped, + List **colnames, List **colvars); static void expandTupleDesc(TupleDesc tupdesc, Alias *eref, - int count, int offset, - int rtindex, int sublevels_up, - int location, bool include_dropped, - List **colnames, List **colvars); + int count, int offset, + int rtindex, int sublevels_up, + int location, bool include_dropped, + List **colnames, List **colvars); static int specialAttNum(const char *attname); static bool isQueryUsingTempRelation_walker(Node *node, void *context); diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index 0e9598ebfe4..ef2f5b45d87 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -34,37 +34,37 @@ static void markTargetListOrigin(ParseState *pstate, TargetEntry *tle, - Var *var, int levelsup); + Var *var, int levelsup); static Node *transformAssignmentIndirection(ParseState *pstate, - Node *basenode, - const char *targetName, - bool targetIsArray, - Oid targetTypeId, - int32 targetTypMod, - Oid targetCollation, - ListCell *indirection, - Node *rhs, - int location); + Node *basenode, + const char *targetName, + bool targetIsArray, + Oid targetTypeId, + int32 targetTypMod, + Oid targetCollation, + ListCell *indirection, + Node *rhs, + int location); static Node *transformAssignmentSubscripts(ParseState *pstate, - Node *basenode, - const char *targetName, - Oid targetTypeId, - int32 targetTypMod, - Oid targetCollation, - List *subscripts, - bool isSlice, - ListCell *next_indirection, - Node *rhs, - int location); + Node *basenode, + const char *targetName, + Oid targetTypeId, + int32 targetTypMod, + Oid targetCollation, + List *subscripts, + bool isSlice, + ListCell *next_indirection, + Node *rhs, + int location); static List *ExpandColumnRefStar(ParseState *pstate, ColumnRef *cref, - bool make_target_entry); + bool make_target_entry); static List *ExpandAllTables(ParseState *pstate, int location); static List *ExpandIndirectionStar(ParseState *pstate, A_Indirection *ind, - bool make_target_entry, ParseExprKind exprKind); + bool make_target_entry, ParseExprKind exprKind); static List *ExpandSingleTable(ParseState *pstate, RangeTblEntry *rte, - int location, bool make_target_entry); + int location, bool make_target_entry); static List *ExpandRowReference(ParseState *pstate, Node *expr, - bool make_target_entry); + bool make_target_entry); static int FigureColnameInternal(Node *node, char **name); diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c index 5d554633d2c..9de5e0680dc 100644 --- a/src/backend/parser/parse_type.c +++ b/src/backend/parser/parse_type.c @@ -28,7 +28,7 @@ static int32 typenameTypeMod(ParseState *pstate, const TypeName *typeName, - Type typ); + Type typ); /* diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index bbeaada2ae1..7450d74b7ac 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -114,37 +114,37 @@ typedef struct static void transformColumnDefinition(CreateStmtContext *cxt, - ColumnDef *column); + ColumnDef *column); static void transformTableConstraint(CreateStmtContext *cxt, - Constraint *constraint); + Constraint *constraint); static void transformTableLikeClause(CreateStmtContext *cxt, - TableLikeClause *table_like_clause); + TableLikeClause *table_like_clause); static void transformOfType(CreateStmtContext *cxt, - TypeName *ofTypename); + TypeName *ofTypename); static CreateStatsStmt *generateClonedExtStatsStmt(RangeVar *heapRel, - Oid heapRelid, Oid source_statsid); + Oid heapRelid, Oid source_statsid); static List *get_collation(Oid collation, Oid actual_datatype); static List *get_opclass(Oid opclass, Oid actual_datatype); static void transformIndexConstraints(CreateStmtContext *cxt); static IndexStmt *transformIndexConstraint(Constraint *constraint, - CreateStmtContext *cxt); + CreateStmtContext *cxt); static void transformExtendedStatistics(CreateStmtContext *cxt); static void transformFKConstraints(CreateStmtContext *cxt, - bool skipValidation, - bool isAddConstraint); + bool skipValidation, + bool isAddConstraint); static void transformCheckConstraints(CreateStmtContext *cxt, - bool skipValidation); + bool skipValidation); static void transformConstraintAttrs(CreateStmtContext *cxt, - List *constraintList); + List *constraintList); static void transformColumnType(CreateStmtContext *cxt, ColumnDef *column); static void setSchemaName(char *context_schema, char **stmt_schema_name); static void transformPartitionCmd(CreateStmtContext *cxt, PartitionCmd *cmd); static List *transformPartitionRangeBounds(ParseState *pstate, List *blist, - Relation parent); + Relation parent); static void validateInfiniteBounds(ParseState *pstate, List *blist); static Const *transformPartitionBoundValue(ParseState *pstate, Node *con, - const char *colName, Oid colType, int32 colTypmod, - Oid partCollation); + const char *colName, Oid colType, int32 colTypmod, + Oid partCollation); /* diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c index 0e33a370c64..99d26de7e64 100644 --- a/src/backend/partitioning/partbounds.c +++ b/src/backend/partitioning/partbounds.c @@ -71,42 +71,42 @@ typedef struct PartitionRangeBound static int32 qsort_partition_hbound_cmp(const void *a, const void *b); static int32 qsort_partition_list_value_cmp(const void *a, const void *b, - void *arg); + void *arg); static int32 qsort_partition_rbound_cmp(const void *a, const void *b, - void *arg); + void *arg); static PartitionBoundInfo create_hash_bounds(PartitionBoundSpec **boundspecs, - int nparts, PartitionKey key, int **mapping); + int nparts, PartitionKey key, int **mapping); static PartitionBoundInfo create_list_bounds(PartitionBoundSpec **boundspecs, - int nparts, PartitionKey key, int **mapping); + int nparts, PartitionKey key, int **mapping); static PartitionBoundInfo create_range_bounds(PartitionBoundSpec **boundspecs, - int nparts, PartitionKey key, int **mapping); + int nparts, PartitionKey key, int **mapping); static PartitionRangeBound *make_one_partition_rbound(PartitionKey key, int index, - List *datums, bool lower); + List *datums, bool lower); static int32 partition_hbound_cmp(int modulus1, int remainder1, int modulus2, - int remainder2); + int remainder2); static int32 partition_rbound_cmp(int partnatts, FmgrInfo *partsupfunc, - Oid *partcollation, Datum *datums1, - PartitionRangeDatumKind *kind1, bool lower1, - PartitionRangeBound *b2); -static int partition_range_bsearch(int partnatts, FmgrInfo *partsupfunc, - Oid *partcollation, - PartitionBoundInfo boundinfo, - PartitionRangeBound *probe, bool *is_equal); + Oid *partcollation, Datum *datums1, + PartitionRangeDatumKind *kind1, bool lower1, + PartitionRangeBound *b2); +static int partition_range_bsearch(int partnatts, FmgrInfo *partsupfunc, + Oid *partcollation, + PartitionBoundInfo boundinfo, + PartitionRangeBound *probe, bool *is_equal); static int get_partition_bound_num_indexes(PartitionBoundInfo b); static Expr *make_partition_op_expr(PartitionKey key, int keynum, - uint16 strategy, Expr *arg1, Expr *arg2); -static Oid get_partition_operator(PartitionKey key, int col, - StrategyNumber strategy, bool *need_relabel); + uint16 strategy, Expr *arg1, Expr *arg2); +static Oid get_partition_operator(PartitionKey key, int col, + StrategyNumber strategy, bool *need_relabel); static List *get_qual_for_hash(Relation parent, PartitionBoundSpec *spec); static List *get_qual_for_list(Relation parent, PartitionBoundSpec *spec); static List *get_qual_for_range(Relation parent, PartitionBoundSpec *spec, - bool for_default); + bool for_default); static void get_range_key_properties(PartitionKey key, int keynum, - PartitionRangeDatum *ldatum, - PartitionRangeDatum *udatum, - ListCell **partexprs_item, - Expr **keyCol, - Const **lower_val, Const **upper_val); + PartitionRangeDatum *ldatum, + PartitionRangeDatum *udatum, + ListCell **partexprs_item, + Expr **keyCol, + Const **lower_val, Const **upper_val); static List *get_range_nulltest(PartitionKey key); /* diff --git a/src/backend/partitioning/partprune.c b/src/backend/partitioning/partprune.c index 53f814f7788..5982af4de10 100644 --- a/src/backend/partitioning/partprune.c +++ b/src/backend/partitioning/partprune.c @@ -138,67 +138,67 @@ typedef struct PruneStepResult static List *make_partitionedrel_pruneinfo(PlannerInfo *root, - RelOptInfo *parentrel, - int *relid_subplan_map, - List *partitioned_rels, List *prunequal, - Bitmapset **matchedsubplans); + RelOptInfo *parentrel, + int *relid_subplan_map, + List *partitioned_rels, List *prunequal, + Bitmapset **matchedsubplans); static void gen_partprune_steps(RelOptInfo *rel, List *clauses, - PartClauseTarget target, - GeneratePruningStepsContext *context); + PartClauseTarget target, + GeneratePruningStepsContext *context); static List *gen_partprune_steps_internal(GeneratePruningStepsContext *context, - List *clauses); + List *clauses); static PartitionPruneStep *gen_prune_step_op(GeneratePruningStepsContext *context, - StrategyNumber opstrategy, bool op_is_ne, - List *exprs, List *cmpfns, Bitmapset *nullkeys); + StrategyNumber opstrategy, bool op_is_ne, + List *exprs, List *cmpfns, Bitmapset *nullkeys); static PartitionPruneStep *gen_prune_step_combine(GeneratePruningStepsContext *context, - List *source_stepids, - PartitionPruneCombineOp combineOp); + List *source_stepids, + PartitionPruneCombineOp combineOp); static PartitionPruneStep *gen_prune_steps_from_opexps(GeneratePruningStepsContext *context, - List **keyclauses, Bitmapset *nullkeys); + List **keyclauses, Bitmapset *nullkeys); static PartClauseMatchStatus match_clause_to_partition_key(GeneratePruningStepsContext *context, - Expr *clause, Expr *partkey, int partkeyidx, - bool *clause_is_not_null, - PartClauseInfo **pc, List **clause_steps); + Expr *clause, Expr *partkey, int partkeyidx, + bool *clause_is_not_null, + PartClauseInfo **pc, List **clause_steps); static List *get_steps_using_prefix(GeneratePruningStepsContext *context, - StrategyNumber step_opstrategy, - bool step_op_is_ne, - Expr *step_lastexpr, - Oid step_lastcmpfn, - int step_lastkeyno, - Bitmapset *step_nullkeys, - List *prefix); + StrategyNumber step_opstrategy, + bool step_op_is_ne, + Expr *step_lastexpr, + Oid step_lastcmpfn, + int step_lastkeyno, + Bitmapset *step_nullkeys, + List *prefix); static List *get_steps_using_prefix_recurse(GeneratePruningStepsContext *context, - StrategyNumber step_opstrategy, - bool step_op_is_ne, - Expr *step_lastexpr, - Oid step_lastcmpfn, - int step_lastkeyno, - Bitmapset *step_nullkeys, - ListCell *start, - List *step_exprs, - List *step_cmpfns); + StrategyNumber step_opstrategy, + bool step_op_is_ne, + Expr *step_lastexpr, + Oid step_lastcmpfn, + int step_lastkeyno, + Bitmapset *step_nullkeys, + ListCell *start, + List *step_exprs, + List *step_cmpfns); static PruneStepResult *get_matching_hash_bounds(PartitionPruneContext *context, - StrategyNumber opstrategy, Datum *values, int nvalues, - FmgrInfo *partsupfunc, Bitmapset *nullkeys); + StrategyNumber opstrategy, Datum *values, int nvalues, + FmgrInfo *partsupfunc, Bitmapset *nullkeys); static PruneStepResult *get_matching_list_bounds(PartitionPruneContext *context, - StrategyNumber opstrategy, Datum value, int nvalues, - FmgrInfo *partsupfunc, Bitmapset *nullkeys); + StrategyNumber opstrategy, Datum value, int nvalues, + FmgrInfo *partsupfunc, Bitmapset *nullkeys); static PruneStepResult *get_matching_range_bounds(PartitionPruneContext *context, - StrategyNumber opstrategy, Datum *values, int nvalues, - FmgrInfo *partsupfunc, Bitmapset *nullkeys); + StrategyNumber opstrategy, Datum *values, int nvalues, + FmgrInfo *partsupfunc, Bitmapset *nullkeys); static Bitmapset *pull_exec_paramids(Expr *expr); static bool pull_exec_paramids_walker(Node *node, Bitmapset **context); static Bitmapset *get_partkey_exec_paramids(List *steps); static PruneStepResult *perform_pruning_base_step(PartitionPruneContext *context, - PartitionPruneStepOp *opstep); + PartitionPruneStepOp *opstep); static PruneStepResult *perform_pruning_combine_step(PartitionPruneContext *context, - PartitionPruneStepCombine *cstep, - PruneStepResult **step_results); + PartitionPruneStepCombine *cstep, + PruneStepResult **step_results); static bool match_boolean_partition_clause(Oid partopfamily, Expr *clause, - Expr *partkey, Expr **outconst); + Expr *partkey, Expr **outconst); static void partkey_datum_from_expr(PartitionPruneContext *context, - Expr *expr, int stateidx, - Datum *value, bool *isnull); + Expr *expr, int stateidx, + Datum *value, bool *isnull); /* diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index 467e56663e8..ac5106f39da 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -72,9 +72,9 @@ static int nextSemaNumber; /* next free sem num in last sema set */ static IpcSemaphoreId InternalIpcSemaphoreCreate(IpcSemaphoreKey semKey, - int numSems); + int numSems); static void IpcSemaphoreInitialize(IpcSemaphoreId semId, int semNum, - int value); + int value); static void IpcSemaphoreKill(IpcSemaphoreId semId); static int IpcSemaphoreGetValue(IpcSemaphoreId semId, int semNum); static pid_t IpcSemaphoreGetLastPID(IpcSemaphoreId semId, int semNum); diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index fda3442c5b5..4a86fbc1c1e 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -103,8 +103,8 @@ static void *InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size); static void IpcMemoryDetach(int status, Datum shmaddr); static void IpcMemoryDelete(int status, Datum shmId); static IpcMemoryState PGSharedMemoryAttach(IpcMemoryId shmId, - void *attachAt, - PGShmemHeader **addr); + void *attachAt, + PGShmemHeader **addr); /* diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index acd8a9280b9..fd85b9c8f44 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -312,7 +312,7 @@ NON_EXEC_STATIC void AutoVacLauncherMain(int argc, char *argv[]) pg_attribute_no static Oid do_start_worker(void); static void launcher_determine_sleep(bool canlaunch, bool recursing, - struct timeval *nap); + struct timeval *nap); static void launch_worker(TimestampTz now); static List *get_database_list(void); static void rebuild_database_list(Oid newdb); @@ -323,25 +323,25 @@ static void do_autovacuum(void); static void FreeWorkerInfo(int code, Datum arg); static autovac_table *table_recheck_autovac(Oid relid, HTAB *table_toast_map, - TupleDesc pg_class_desc, - int effective_multixact_freeze_max_age); + TupleDesc pg_class_desc, + int effective_multixact_freeze_max_age); static void relation_needs_vacanalyze(Oid relid, AutoVacOpts *relopts, - Form_pg_class classForm, - PgStat_StatTabEntry *tabentry, - int effective_multixact_freeze_max_age, - bool *dovacuum, bool *doanalyze, bool *wraparound); + Form_pg_class classForm, + PgStat_StatTabEntry *tabentry, + int effective_multixact_freeze_max_age, + bool *dovacuum, bool *doanalyze, bool *wraparound); static void autovacuum_do_vac_analyze(autovac_table *tab, - BufferAccessStrategy bstrategy); + BufferAccessStrategy bstrategy); static AutoVacOpts *extract_autovac_opts(HeapTuple tup, - TupleDesc pg_class_desc); + TupleDesc pg_class_desc); static PgStat_StatTabEntry *get_pgstat_tabentry_relid(Oid relid, bool isshared, - PgStat_StatDBEntry *shared, - PgStat_StatDBEntry *dbentry); + PgStat_StatDBEntry *shared, + PgStat_StatDBEntry *dbentry); static void perform_work_item(AutoVacuumWorkItem *workitem); static void autovac_report_activity(autovac_table *tab); static void autovac_report_workitem(AutoVacuumWorkItem *workitem, - const char *nspname, const char *relname); + const char *nspname, const char *relname); static void av_sighup_handler(SIGNAL_ARGS); static void avl_sigusr2_handler(SIGNAL_ARGS); static void avl_sigterm_handler(SIGNAL_ARGS); diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 285def556b6..b4f2b28b517 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -291,7 +291,7 @@ static void pgstat_sighup_handler(SIGNAL_ARGS); static PgStat_StatDBEntry *pgstat_get_db_entry(Oid databaseid, bool create); static PgStat_StatTabEntry *pgstat_get_tab_entry(PgStat_StatDBEntry *dbentry, - Oid tableoid, bool create); + Oid tableoid, bool create); static void pgstat_write_statsfiles(bool permanent, bool allDbs); static void pgstat_write_db_statsfile(PgStat_StatDBEntry *dbentry, bool permanent); static HTAB *pgstat_read_statsfiles(Oid onlydb, bool permanent, bool deep); diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index f2c99e648a1..8e098e401b9 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -397,7 +397,7 @@ static void CleanupBackend(int pid, int exitstatus); static bool CleanupBackgroundWorker(int pid, int exitstatus); static void HandleChildCrash(int pid, int exitstatus, const char *procname); static void LogChildExit(int lev, const char *procname, - int pid, int exitstatus); + int pid, int exitstatus); static void PostmasterStateMachine(void); static void BackendInitialize(Port *port); static void BackendRun(Port *port) pg_attribute_noreturn(); @@ -531,7 +531,7 @@ static void restore_backend_variables(BackendParameters *param, Port *port); static bool save_backend_variables(BackendParameters *param, Port *port); #else static bool save_backend_variables(BackendParameters *param, Port *port, - HANDLE childProcess, pid_t childPid); + HANDLE childProcess, pid_t childPid); #endif static void ShmemBackendArrayAdd(Backend *bn); @@ -6036,7 +6036,7 @@ extern pg_time_t first_syslogger_file_time; #else static bool write_duplicated_handle(HANDLE *dest, HANDLE src, HANDLE child); static bool write_inheritable_socket(InheritableSocket *dest, SOCKET src, - pid_t childPid); + pid_t childPid); static void read_inheritable_socket(SOCKET *dest, InheritableSocket *src); #endif diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index a4718320862..5e934e9bfda 100644 --- a/src/backend/postmaster/syslogger.c +++ b/src/backend/postmaster/syslogger.c @@ -141,7 +141,7 @@ NON_EXEC_STATIC void SysLoggerMain(int argc, char *argv[]) pg_attribute_noreturn static void process_pipe_input(char *logbuffer, int *bytes_in_logbuffer); static void flush_pipe_input(char *logbuffer, int *bytes_in_logbuffer); static FILE *logfile_open(const char *filename, const char *mode, - bool allow_errors); + bool allow_errors); #ifdef WIN32 static unsigned int __stdcall pipeThread(void *arg); diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c index 8cd7d56b226..8765af71d4d 100644 --- a/src/backend/regex/regcomp.c +++ b/src/backend/regex/regcomp.c @@ -55,7 +55,7 @@ static const chr *scanplain(struct vars *); static void onechr(struct vars *, chr, struct state *, struct state *); static void wordchrs(struct vars *); static void processlacon(struct vars *, struct state *, struct state *, int, - struct state *, struct state *); + struct state *, struct state *); static struct subre *subre(struct vars *, int, int, struct state *, struct state *); static void freesubre(struct vars *, struct subre *); static void freesrnode(struct vars *, struct subre *); @@ -161,15 +161,15 @@ static int push(struct nfa *, struct arc *, struct state **); static int combine(struct arc *, struct arc *); static void fixempties(struct nfa *, FILE *); static struct state *emptyreachable(struct nfa *, struct state *, - struct state *, struct arc **); + struct state *, struct arc **); static int isconstraintarc(struct arc *); static int hasconstraintout(struct state *); static void fixconstraintloops(struct nfa *, FILE *); static int findconstraintloop(struct nfa *, struct state *); static void breakconstraintloop(struct nfa *, struct state *); static void clonesuccessorstates(struct nfa *, struct state *, struct state *, - struct state *, struct arc *, - char *, char *, int); + struct state *, struct arc *, + char *, char *, int); static void cleanup(struct nfa *); static void markreachable(struct nfa *, struct state *, struct state *, struct state *); static void markcanreach(struct nfa *, struct state *, struct state *, struct state *); diff --git a/src/backend/regex/regprefix.c b/src/backend/regex/regprefix.c index 3985e337078..207d40904ba 100644 --- a/src/backend/regex/regprefix.c +++ b/src/backend/regex/regprefix.c @@ -19,8 +19,8 @@ /* * forward declarations */ -static int findprefix(struct cnfa *cnfa, struct colormap *cm, - chr *string, size_t *slength); +static int findprefix(struct cnfa *cnfa, struct colormap *cm, + chr *string, size_t *slength); /* diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 36dcb287540..c2978a949ad 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -56,14 +56,14 @@ typedef struct static int64 sendDir(const char *path, int basepathlen, bool sizeonly, - List *tablespaces, bool sendtblspclinks); + List *tablespaces, bool sendtblspclinks); static bool sendFile(const char *readfilename, const char *tarfilename, - struct stat *statbuf, bool missing_ok, Oid dboid); + struct stat *statbuf, bool missing_ok, Oid dboid); static void sendFileWithContent(const char *filename, const char *content); static int64 _tarWriteHeader(const char *filename, const char *linktarget, - struct stat *statbuf, bool sizeonly); + struct stat *statbuf, bool sizeonly); static int64 _tarWriteDir(const char *pathbuf, int basepathlen, struct stat *statbuf, - bool sizeonly); + bool sizeonly); static void send_int8_string(StringInfoData *buf, int64 intval); static void SendBackupHeader(List *tablespaces); static void base_backup_cleanup(int code, Datum arg); diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c index b455c59cd70..6eba08a9208 100644 --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c @@ -49,35 +49,35 @@ struct WalReceiverConn /* Prototypes for interface functions */ static WalReceiverConn *libpqrcv_connect(const char *conninfo, - bool logical, const char *appname, - char **err); + bool logical, const char *appname, + char **err); static void libpqrcv_check_conninfo(const char *conninfo); static char *libpqrcv_get_conninfo(WalReceiverConn *conn); static void libpqrcv_get_senderinfo(WalReceiverConn *conn, - char **sender_host, int *sender_port); + char **sender_host, int *sender_port); static char *libpqrcv_identify_system(WalReceiverConn *conn, - TimeLineID *primary_tli); + TimeLineID *primary_tli); static int libpqrcv_server_version(WalReceiverConn *conn); static void libpqrcv_readtimelinehistoryfile(WalReceiverConn *conn, - TimeLineID tli, char **filename, - char **content, int *len); + TimeLineID tli, char **filename, + char **content, int *len); static bool libpqrcv_startstreaming(WalReceiverConn *conn, - const WalRcvStreamOptions *options); + const WalRcvStreamOptions *options); static void libpqrcv_endstreaming(WalReceiverConn *conn, - TimeLineID *next_tli); -static int libpqrcv_receive(WalReceiverConn *conn, char **buffer, - pgsocket *wait_fd); + TimeLineID *next_tli); +static int libpqrcv_receive(WalReceiverConn *conn, char **buffer, + pgsocket *wait_fd); static void libpqrcv_send(WalReceiverConn *conn, const char *buffer, - int nbytes); + int nbytes); static char *libpqrcv_create_slot(WalReceiverConn *conn, - const char *slotname, - bool temporary, - CRSSnapshotAction snapshot_action, - XLogRecPtr *lsn); + const char *slotname, + bool temporary, + CRSSnapshotAction snapshot_action, + XLogRecPtr *lsn); static WalRcvExecResult *libpqrcv_exec(WalReceiverConn *conn, - const char *query, - const int nRetTypes, - const Oid *retTypes); + const char *query, + const int nRetTypes, + const Oid *retTypes); static void libpqrcv_disconnect(WalReceiverConn *conn); static WalReceiverFunctionsType PQWalReceiverFunctions = { diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c index eec3a228429..151c3ef8825 100644 --- a/src/backend/replication/logical/decode.c +++ b/src/backend/replication/logical/decode.c @@ -70,9 +70,9 @@ static void DecodeMultiInsert(LogicalDecodingContext *ctx, XLogRecordBuffer *buf static void DecodeSpecConfirm(LogicalDecodingContext *ctx, XLogRecordBuffer *buf); static void DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf, - xl_xact_parsed_commit *parsed, TransactionId xid); + xl_xact_parsed_commit *parsed, TransactionId xid); static void DecodeAbort(LogicalDecodingContext *ctx, XLogRecordBuffer *buf, - xl_xact_parsed_abort *parsed, TransactionId xid); + xl_xact_parsed_abort *parsed, TransactionId xid); /* common function to decode tuples */ static void DecodeXLogTuple(char *data, Size len, ReorderBufferTupleBuf *tup); diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c index acb4d9a1066..bbd38c06d19 100644 --- a/src/backend/replication/logical/logical.c +++ b/src/backend/replication/logical/logical.c @@ -55,18 +55,18 @@ typedef struct LogicalErrorCallbackState /* wrappers around output plugin callbacks */ static void output_plugin_error_callback(void *arg); static void startup_cb_wrapper(LogicalDecodingContext *ctx, OutputPluginOptions *opt, - bool is_init); + bool is_init); static void shutdown_cb_wrapper(LogicalDecodingContext *ctx); static void begin_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn); static void commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn, - XLogRecPtr commit_lsn); + XLogRecPtr commit_lsn); static void change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn, - Relation relation, ReorderBufferChange *change); + Relation relation, ReorderBufferChange *change); static void truncate_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn, - int nrelations, Relation relations[], ReorderBufferChange *change); + int nrelations, Relation relations[], ReorderBufferChange *change); static void message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn, - XLogRecPtr message_lsn, bool transactional, - const char *prefix, Size message_size, const char *message); + XLogRecPtr message_lsn, bool transactional, + const char *prefix, Size message_size, const char *message); static void LoadOutputPlugin(OutputPluginCallbacks *callbacks, char *plugin); diff --git a/src/backend/replication/logical/proto.c b/src/backend/replication/logical/proto.c index 0411963f939..e7df47de3ed 100644 --- a/src/backend/replication/logical/proto.c +++ b/src/backend/replication/logical/proto.c @@ -31,7 +31,7 @@ static void logicalrep_write_attrs(StringInfo out, Relation rel); static void logicalrep_write_tuple(StringInfo out, Relation rel, - HeapTuple tuple); + HeapTuple tuple); static void logicalrep_read_attrs(StringInfo in, LogicalRepRelation *rel); static void logicalrep_read_tuple(StringInfo in, LogicalRepTupleData *tuple); diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index acebf5893e9..7894b77fc2e 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -163,10 +163,10 @@ static const Size max_changes_in_memory = 4096; static ReorderBufferTXN *ReorderBufferGetTXN(ReorderBuffer *rb); static void ReorderBufferReturnTXN(ReorderBuffer *rb, ReorderBufferTXN *txn); static ReorderBufferTXN *ReorderBufferTXNByXid(ReorderBuffer *rb, - TransactionId xid, bool create, bool *is_new, - XLogRecPtr lsn, bool create_as_top); + TransactionId xid, bool create, bool *is_new, + XLogRecPtr lsn, bool create_as_top); static void ReorderBufferTransferSnapToParent(ReorderBufferTXN *txn, - ReorderBufferTXN *subtxn); + ReorderBufferTXN *subtxn); static void AssertTXNLsnOrder(ReorderBuffer *rb); @@ -181,7 +181,7 @@ static void AssertTXNLsnOrder(ReorderBuffer *rb); static ReorderBufferIterTXNState *ReorderBufferIterTXNInit(ReorderBuffer *rb, ReorderBufferTXN *txn); static ReorderBufferChange *ReorderBufferIterTXNNext(ReorderBuffer *rb, ReorderBufferIterTXNState *state); static void ReorderBufferIterTXNFinish(ReorderBuffer *rb, - ReorderBufferIterTXNState *state); + ReorderBufferIterTXNState *state); static void ReorderBufferExecuteInvalidations(ReorderBuffer *rb, ReorderBufferTXN *txn); /* @@ -192,19 +192,19 @@ static void ReorderBufferExecuteInvalidations(ReorderBuffer *rb, ReorderBufferTX static void ReorderBufferCheckSerializeTXN(ReorderBuffer *rb, ReorderBufferTXN *txn); static void ReorderBufferSerializeTXN(ReorderBuffer *rb, ReorderBufferTXN *txn); static void ReorderBufferSerializeChange(ReorderBuffer *rb, ReorderBufferTXN *txn, - int fd, ReorderBufferChange *change); + int fd, ReorderBufferChange *change); static Size ReorderBufferRestoreChanges(ReorderBuffer *rb, ReorderBufferTXN *txn, - int *fd, XLogSegNo *segno); + int *fd, XLogSegNo *segno); static void ReorderBufferRestoreChange(ReorderBuffer *rb, ReorderBufferTXN *txn, - char *change); + char *change); static void ReorderBufferRestoreCleanup(ReorderBuffer *rb, ReorderBufferTXN *txn); static void ReorderBufferCleanupSerializedTXNs(const char *slotname); static void ReorderBufferSerializedPath(char *path, ReplicationSlot *slot, - TransactionId xid, XLogSegNo segno); + TransactionId xid, XLogSegNo segno); static void ReorderBufferFreeSnap(ReorderBuffer *rb, Snapshot snap); static Snapshot ReorderBufferCopySnap(ReorderBuffer *rb, Snapshot orig_snap, - ReorderBufferTXN *txn, CommandId cid); + ReorderBufferTXN *txn, CommandId cid); /* --------------------------------------- * toast reassembly support @@ -213,9 +213,9 @@ static Snapshot ReorderBufferCopySnap(ReorderBuffer *rb, Snapshot orig_snap, static void ReorderBufferToastInitHash(ReorderBuffer *rb, ReorderBufferTXN *txn); static void ReorderBufferToastReset(ReorderBuffer *rb, ReorderBufferTXN *txn); static void ReorderBufferToastReplace(ReorderBuffer *rb, ReorderBufferTXN *txn, - Relation relation, ReorderBufferChange *change); + Relation relation, ReorderBufferChange *change); static void ReorderBufferToastAppendChunk(ReorderBuffer *rb, ReorderBufferTXN *txn, - Relation relation, ReorderBufferChange *change); + Relation relation, ReorderBufferChange *change); /* diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c index 63687a97ece..d317fd70063 100644 --- a/src/backend/replication/pgoutput/pgoutput.c +++ b/src/backend/replication/pgoutput/pgoutput.c @@ -30,26 +30,26 @@ PG_MODULE_MAGIC; extern void _PG_output_plugin_init(OutputPluginCallbacks *cb); static void pgoutput_startup(LogicalDecodingContext *ctx, - OutputPluginOptions *opt, bool is_init); + OutputPluginOptions *opt, bool is_init); static void pgoutput_shutdown(LogicalDecodingContext *ctx); static void pgoutput_begin_txn(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn); + ReorderBufferTXN *txn); static void pgoutput_commit_txn(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, XLogRecPtr commit_lsn); + ReorderBufferTXN *txn, XLogRecPtr commit_lsn); static void pgoutput_change(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, Relation rel, - ReorderBufferChange *change); + ReorderBufferTXN *txn, Relation rel, + ReorderBufferChange *change); static void pgoutput_truncate(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, int nrelations, Relation relations[], - ReorderBufferChange *change); + ReorderBufferTXN *txn, int nrelations, Relation relations[], + ReorderBufferChange *change); static bool pgoutput_origin_filter(LogicalDecodingContext *ctx, - RepOriginId origin_id); + RepOriginId origin_id); static bool publications_valid; static List *LoadPublications(List *pubnames); static void publication_invalidation_cb(Datum arg, int cacheid, - uint32 hashvalue); + uint32 hashvalue); /* Entry in the map used to remember which relation schemas we sent. */ typedef struct RelationSyncEntry @@ -67,7 +67,7 @@ static void init_rel_sync_cache(MemoryContext decoding_context); static RelationSyncEntry *get_rel_sync_entry(PGOutputData *data, Oid relid); static void rel_sync_cache_relation_cb(Datum arg, Oid relid); static void rel_sync_cache_publication_cb(Datum arg, int cacheid, - uint32 hashvalue); + uint32 hashvalue); /* * Specify output plugin callbacks diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index 83734575c28..577791f3d5f 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -102,17 +102,17 @@ static void SyncRepCancelWait(void); static int SyncRepWakeQueue(bool all, int mode); static bool SyncRepGetSyncRecPtr(XLogRecPtr *writePtr, - XLogRecPtr *flushPtr, - XLogRecPtr *applyPtr, - bool *am_sync); + XLogRecPtr *flushPtr, + XLogRecPtr *applyPtr, + bool *am_sync); static void SyncRepGetOldestSyncRecPtr(XLogRecPtr *writePtr, - XLogRecPtr *flushPtr, - XLogRecPtr *applyPtr, - List *sync_standbys); + XLogRecPtr *flushPtr, + XLogRecPtr *applyPtr, + List *sync_standbys); static void SyncRepGetNthLatestSyncRecPtr(XLogRecPtr *writePtr, - XLogRecPtr *flushPtr, - XLogRecPtr *applyPtr, - List *sync_standbys, uint8 nth); + XLogRecPtr *flushPtr, + XLogRecPtr *applyPtr, + List *sync_standbys, uint8 nth); static int SyncRepGetStandbyPriority(void); static List *SyncRepGetSyncStandbysPriority(bool *am_sync); static List *SyncRepGetSyncStandbysQuorum(bool *am_sync); diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index 6bd889461e3..7df2b6154cb 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -45,7 +45,7 @@ static void checkRuleResultList(List *targetList, TupleDesc resultDesc, - bool isSelect, bool requireColumnNameMatch); + bool isSelect, bool requireColumnNameMatch); static bool setRuleCheckAsUser_walker(Node *node, Oid *context); static void setRuleCheckAsUser_Query(Query *qry, Oid userid); diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index 39080776b04..ea40c287333 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -55,30 +55,30 @@ typedef struct acquireLocksOnSubLinks_context } acquireLocksOnSubLinks_context; static bool acquireLocksOnSubLinks(Node *node, - acquireLocksOnSubLinks_context *context); + acquireLocksOnSubLinks_context *context); static Query *rewriteRuleAction(Query *parsetree, - Query *rule_action, - Node *rule_qual, - int rt_index, - CmdType event, - bool *returning_flag); + Query *rule_action, + Node *rule_qual, + int rt_index, + CmdType event, + bool *returning_flag); static List *adjustJoinTreeList(Query *parsetree, bool removert, int rt_index); static List *rewriteTargetListIU(List *targetList, - CmdType commandType, - OverridingKind override, - Relation target_relation, - int result_rti); + CmdType commandType, + OverridingKind override, + Relation target_relation, + int result_rti); static TargetEntry *process_matched_tle(TargetEntry *src_tle, - TargetEntry *prior_tle, - const char *attrName); + TargetEntry *prior_tle, + const char *attrName); static Node *get_assignment_input(Node *node); static bool rewriteValuesRTE(Query *parsetree, RangeTblEntry *rte, int rti, - Relation target_relation, bool force_nulls); + Relation target_relation, bool force_nulls); static void markQueryForLocking(Query *qry, Node *jtnode, - LockClauseStrength strength, LockWaitPolicy waitPolicy, - bool pushedDown); + LockClauseStrength strength, LockWaitPolicy waitPolicy, + bool pushedDown); static List *matchLocks(CmdType event, RuleLock *rulelocks, - int varno, Query *parsetree, bool *hasUpdate); + int varno, Query *parsetree, bool *hasUpdate); static Query *fireRIRrules(Query *parsetree, List *activeRIRs); static bool view_has_instead_trigger(Relation view, CmdType event); static Bitmapset *adjust_view_column_set(Bitmapset *cols, List *targetlist); diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index 8fa5c11cc71..e20158b9626 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -41,12 +41,12 @@ typedef struct } locate_windowfunc_context; static bool contain_aggs_of_level_walker(Node *node, - contain_aggs_of_level_context *context); + contain_aggs_of_level_context *context); static bool locate_agg_of_level_walker(Node *node, - locate_agg_of_level_context *context); + locate_agg_of_level_context *context); static bool contain_windowfuncs_walker(Node *node, void *context); static bool locate_windowfunc_walker(Node *node, - locate_windowfunc_context *context); + locate_windowfunc_context *context); static bool checkExprHasSubLink_walker(Node *node, void *context); static Relids offset_relid_set(Relids relids, int offset); static Relids adjust_relid_set(Relids relids, int oldrelid, int newrelid); diff --git a/src/backend/rewrite/rowsecurity.c b/src/backend/rewrite/rowsecurity.c index e9f532ce69a..300af6f06f2 100644 --- a/src/backend/rewrite/rowsecurity.c +++ b/src/backend/rewrite/rowsecurity.c @@ -59,28 +59,28 @@ #include "tcop/utility.h" static void get_policies_for_relation(Relation relation, - CmdType cmd, Oid user_id, - List **permissive_policies, - List **restrictive_policies); + CmdType cmd, Oid user_id, + List **permissive_policies, + List **restrictive_policies); static List *sort_policies_by_name(List *policies); static int row_security_policy_cmp(const void *a, const void *b); static void add_security_quals(int rt_index, - List *permissive_policies, - List *restrictive_policies, - List **securityQuals, - bool *hasSubLinks); + List *permissive_policies, + List *restrictive_policies, + List **securityQuals, + bool *hasSubLinks); static void add_with_check_options(Relation rel, - int rt_index, - WCOKind kind, - List *permissive_policies, - List *restrictive_policies, - List **withCheckOptions, - bool *hasSubLinks, - bool force_using); + int rt_index, + WCOKind kind, + List *permissive_policies, + List *restrictive_policies, + List **withCheckOptions, + bool *hasSubLinks, + bool force_using); static bool check_role_for_policy(ArrayType *policy_roles, Oid user_id); diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c index 8a71c2b534a..591bc16e572 100644 --- a/src/backend/statistics/dependencies.c +++ b/src/backend/statistics/dependencies.c @@ -63,22 +63,22 @@ typedef struct DependencyGeneratorData typedef DependencyGeneratorData *DependencyGenerator; static void generate_dependencies_recurse(DependencyGenerator state, - int index, AttrNumber start, AttrNumber *current); + int index, AttrNumber start, AttrNumber *current); static void generate_dependencies(DependencyGenerator state); static DependencyGenerator DependencyGenerator_init(int n, int k); static void DependencyGenerator_free(DependencyGenerator state); static AttrNumber *DependencyGenerator_next(DependencyGenerator state); static double dependency_degree(int numrows, HeapTuple *rows, int k, - AttrNumber *dependency, VacAttrStats **stats, Bitmapset *attrs); + AttrNumber *dependency, VacAttrStats **stats, Bitmapset *attrs); static bool dependency_is_fully_matched(MVDependency *dependency, - Bitmapset *attnums); + Bitmapset *attnums); static bool dependency_implies_attribute(MVDependency *dependency, - AttrNumber attnum); + AttrNumber attnum); static bool dependency_is_compatible_clause(Node *clause, Index relid, - AttrNumber *attnum); + AttrNumber *attnum); static MVDependency *find_strongest_dependency(StatisticExtInfo *stats, - MVDependencies *dependencies, - Bitmapset *attnums); + MVDependencies *dependencies, + Bitmapset *attnums); static void generate_dependencies_recurse(DependencyGenerator state, int index, diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c index cc6112df3b3..ab187915c1d 100644 --- a/src/backend/statistics/extended_stats.c +++ b/src/backend/statistics/extended_stats.c @@ -64,10 +64,10 @@ typedef struct StatExtEntry static List *fetch_statentries_for_relation(Relation pg_statext, Oid relid); static VacAttrStats **lookup_var_attr_stats(Relation rel, Bitmapset *attrs, - int nvacatts, VacAttrStats **vacatts); + int nvacatts, VacAttrStats **vacatts); static void statext_store(Relation pg_stext, Oid relid, - MVNDistinct *ndistinct, MVDependencies *dependencies, - MCVList *mcvlist, VacAttrStats **stats); + MVNDistinct *ndistinct, MVDependencies *dependencies, + MCVList *mcvlist, VacAttrStats **stats); /* diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c index d22820dec74..c8c44a53bf0 100644 --- a/src/backend/statistics/mcv.c +++ b/src/backend/statistics/mcv.c @@ -75,10 +75,10 @@ static MultiSortSupport build_mss(VacAttrStats **stats, int numattrs); static SortItem *build_distinct_groups(int numrows, SortItem *items, - MultiSortSupport mss, int *ndistinct); + MultiSortSupport mss, int *ndistinct); -static int count_distinct_groups(int numrows, SortItem *items, - MultiSortSupport mss); +static int count_distinct_groups(int numrows, SortItem *items, + MultiSortSupport mss); /* * get_mincount_for_mcv_list diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c index 133503cb9b3..b1a426265bd 100644 --- a/src/backend/statistics/mvdistinct.c +++ b/src/backend/statistics/mvdistinct.c @@ -37,8 +37,8 @@ static double ndistinct_for_combination(double totalrows, int numrows, - HeapTuple *rows, VacAttrStats **stats, - int k, int *combination); + HeapTuple *rows, VacAttrStats **stats, + int k, int *combination); static double estimate_ndistinct(double totalrows, int numrows, int d, int f1); static int n_choose_k(int n, int k); static int num_combinations(int n); diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index bee79d84dc9..7332e6b5903 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -430,9 +430,9 @@ ForgetPrivateRefCountEntry(PrivateRefCountEntry *ref) static Buffer ReadBuffer_common(SMgrRelation reln, char relpersistence, - ForkNumber forkNum, BlockNumber blockNum, - ReadBufferMode mode, BufferAccessStrategy strategy, - bool *hit); + ForkNumber forkNum, BlockNumber blockNum, + ReadBufferMode mode, BufferAccessStrategy strategy, + bool *hit); static bool PinBuffer(BufferDesc *buf, BufferAccessStrategy strategy); static void PinBuffer_Locked(BufferDesc *buf); static void UnpinBuffer(BufferDesc *buf, bool fixOwner); @@ -442,15 +442,15 @@ static int SyncOneBuffer(int buf_id, bool skip_recently_used, WritebackContext * static void WaitIO(BufferDesc *buf); static bool StartBufferIO(BufferDesc *buf, bool forInput); static void TerminateBufferIO(BufferDesc *buf, bool clear_dirty, - uint32 set_flag_bits); + uint32 set_flag_bits); static void shared_buffer_write_error_callback(void *arg); static void local_buffer_write_error_callback(void *arg); static BufferDesc *BufferAlloc(SMgrRelation smgr, - char relpersistence, - ForkNumber forkNum, - BlockNumber blockNum, - BufferAccessStrategy strategy, - bool *foundPtr); + char relpersistence, + ForkNumber forkNum, + BlockNumber blockNum, + BufferAccessStrategy strategy, + bool *foundPtr); static void FlushBuffer(BufferDesc *buf, SMgrRelation reln); static void AtProcExit_Buffers(int code, Datum arg); static void CheckForBufferLeaks(void); diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c index 03caceaf7b0..06659ab2653 100644 --- a/src/backend/storage/buffer/freelist.c +++ b/src/backend/storage/buffer/freelist.c @@ -99,9 +99,9 @@ typedef struct BufferAccessStrategyData /* Prototypes for internal functions */ static BufferDesc *GetBufferFromRing(BufferAccessStrategy strategy, - uint32 *buf_state); + uint32 *buf_state); static void AddBufferToRing(BufferAccessStrategy strategy, - BufferDesc *buf); + BufferDesc *buf); /* * ClockSweepTick - Helper routine for StrategyGetBuffer() diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index ffae52089f7..73c455e66fa 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -308,14 +308,14 @@ static int FreeDesc(AllocateDesc *desc); static void AtProcExit_Files(int code, Datum arg); static void CleanupTempFiles(bool isCommit, bool isProcExit); static void RemovePgTempFilesInDir(const char *tmpdirname, bool missing_ok, - bool unlink_all); + bool unlink_all); static void RemovePgTempRelationFiles(const char *tsdirname); static void RemovePgTempRelationFilesInDbspace(const char *dbspacedirname); static void walkdir(const char *path, - void (*action) (const char *fname, bool isdir, int elevel), - bool process_symlinks, - int elevel); + void (*action) (const char *fname, bool isdir, int elevel), + bool process_symlinks, + int elevel); #ifdef PG_FLUSH_DATA_WORKS static void pre_sync_fname(const char *fname, bool isdir, int elevel); #endif diff --git a/src/backend/storage/file/reinit.c b/src/backend/storage/file/reinit.c index 1ead778cc9d..ccdf80d614c 100644 --- a/src/backend/storage/file/reinit.c +++ b/src/backend/storage/file/reinit.c @@ -24,9 +24,9 @@ #include "utils/memutils.h" static void ResetUnloggedRelationsInTablespaceDir(const char *tsdirname, - int op); + int op); static void ResetUnloggedRelationsInDbspaceDir(const char *dbspacedirname, - int op); + int op); typedef struct { diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c index eee82860575..c17b3f49dd0 100644 --- a/src/backend/storage/freespace/freespace.c +++ b/src/backend/storage/freespace/freespace.c @@ -105,12 +105,12 @@ static uint8 fsm_space_needed_to_cat(Size needed); static Size fsm_space_cat_to_avail(uint8 cat); /* workhorse functions for various operations */ -static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot, - uint8 newValue, uint8 minValue); +static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot, + uint8 newValue, uint8 minValue); static BlockNumber fsm_search(Relation rel, uint8 min_cat); static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr, - BlockNumber start, BlockNumber end, - bool *eof); + BlockNumber start, BlockNumber end, + bool *eof); /******** Public API ********/ diff --git a/src/backend/storage/ipc/dsm.c b/src/backend/storage/ipc/dsm.c index 23ccc59f134..142293fd2c3 100644 --- a/src/backend/storage/ipc/dsm.c +++ b/src/backend/storage/ipc/dsm.c @@ -98,7 +98,7 @@ static void dsm_cleanup_for_mmap(void); static void dsm_postmaster_shutdown(int code, Datum arg); static dsm_segment *dsm_create_descriptor(void); static bool dsm_control_segment_sane(dsm_control_header *control, - Size mapped_size); + Size mapped_size); static uint64 dsm_control_bytes_needed(uint32 nitems); /* Has this backend initialized the dynamic shared memory system yet? */ diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index a22c7928e74..d32996b6fc4 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -73,24 +73,24 @@ #ifdef USE_DSM_POSIX static bool dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size, - void **impl_private, void **mapped_address, - Size *mapped_size, int elevel); + void **impl_private, void **mapped_address, + Size *mapped_size, int elevel); static int dsm_impl_posix_resize(int fd, off_t size); #endif #ifdef USE_DSM_SYSV static bool dsm_impl_sysv(dsm_op op, dsm_handle handle, Size request_size, - void **impl_private, void **mapped_address, - Size *mapped_size, int elevel); + void **impl_private, void **mapped_address, + Size *mapped_size, int elevel); #endif #ifdef USE_DSM_WINDOWS static bool dsm_impl_windows(dsm_op op, dsm_handle handle, Size request_size, - void **impl_private, void **mapped_address, - Size *mapped_size, int elevel); + void **impl_private, void **mapped_address, + Size *mapped_size, int elevel); #endif #ifdef USE_DSM_MMAP static bool dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, - void **impl_private, void **mapped_address, - Size *mapped_size, int elevel); + void **impl_private, void **mapped_address, + Size *mapped_size, int elevel); #endif static int errcode_for_dynamic_shared_memory(void); diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index bff254c2b28..2426cbcf8e9 100644 --- a/src/backend/storage/ipc/latch.c +++ b/src/backend/storage/ipc/latch.c @@ -143,7 +143,7 @@ static void WaitEventAdjustWin32(WaitEventSet *set, WaitEvent *event); #endif static inline int WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout, - WaitEvent *occurred_events, int nevents); + WaitEvent *occurred_events, int nevents); /* * Initialize the process-local latch infrastructure. diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 010cc061c89..18a0f62ba67 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -155,22 +155,22 @@ static void DisplayXidCache(void); /* Primitives for KnownAssignedXids array handling for standby */ static void KnownAssignedXidsCompress(bool force); static void KnownAssignedXidsAdd(TransactionId from_xid, TransactionId to_xid, - bool exclusive_lock); + bool exclusive_lock); static bool KnownAssignedXidsSearch(TransactionId xid, bool remove); static bool KnownAssignedXidExists(TransactionId xid); static void KnownAssignedXidsRemove(TransactionId xid); static void KnownAssignedXidsRemoveTree(TransactionId xid, int nsubxids, - TransactionId *subxids); + TransactionId *subxids); static void KnownAssignedXidsRemovePreceding(TransactionId xid); static int KnownAssignedXidsGet(TransactionId *xarray, TransactionId xmax); -static int KnownAssignedXidsGetAndSetXmin(TransactionId *xarray, - TransactionId *xmin, - TransactionId xmax); +static int KnownAssignedXidsGetAndSetXmin(TransactionId *xarray, + TransactionId *xmin, + TransactionId xmax); static TransactionId KnownAssignedXidsGetOldestXmin(void); static void KnownAssignedXidsDisplay(int trace_level); static void KnownAssignedXidsReset(void); static inline void ProcArrayEndTransactionInternal(PGPROC *proc, - PGXACT *pgxact, TransactionId latestXid); + PGXACT *pgxact, TransactionId latestXid); static void ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid); /* diff --git a/src/backend/storage/ipc/shm_mq.c b/src/backend/storage/ipc/shm_mq.c index 6e471c3e431..91f7714650b 100644 --- a/src/backend/storage/ipc/shm_mq.c +++ b/src/backend/storage/ipc/shm_mq.c @@ -144,14 +144,14 @@ struct shm_mq_handle static void shm_mq_detach_internal(shm_mq *mq); static shm_mq_result shm_mq_send_bytes(shm_mq_handle *mqh, Size nbytes, - const void *data, bool nowait, Size *bytes_written); + const void *data, bool nowait, Size *bytes_written); static shm_mq_result shm_mq_receive_bytes(shm_mq_handle *mqh, - Size bytes_needed, bool nowait, Size *nbytesp, - void **datap); + Size bytes_needed, bool nowait, Size *nbytesp, + void **datap); static bool shm_mq_counterparty_gone(shm_mq *mq, - BackgroundWorkerHandle *handle); + BackgroundWorkerHandle *handle); static bool shm_mq_wait_internal(shm_mq *mq, PGPROC **ptr, - BackgroundWorkerHandle *handle); + BackgroundWorkerHandle *handle); static void shm_mq_inc_bytes_read(shm_mq *mq, Size n); static void shm_mq_inc_bytes_written(shm_mq *mq, Size n); static void shm_mq_detach_callback(dsm_segment *seg, Datum arg); diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 215f1463bb1..842fcabd979 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -43,7 +43,7 @@ int max_standby_streaming_delay = 30 * 1000; static HTAB *RecoveryLockLists; static void ResolveRecoveryConflictWithVirtualXIDs(VirtualTransactionId *waitlist, - ProcSignalReason reason); + ProcSignalReason reason); static void SendRecoveryConflictWithBufferPin(ProcSignalReason reason); static XLogRecPtr LogCurrentRunningXacts(RunningTransactions CurrRunningXacts); static void LogAccessExclusiveLocks(int nlocks, xl_standby_lock *locks); diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c index 74eb449060f..9abc9d778f6 100644 --- a/src/backend/storage/lmgr/deadlock.c +++ b/src/backend/storage/lmgr/deadlock.c @@ -79,15 +79,15 @@ typedef struct static bool DeadLockCheckRecurse(PGPROC *proc); static int TestConfiguration(PGPROC *startProc); static bool FindLockCycle(PGPROC *checkProc, - EDGE *softEdges, int *nSoftEdges); + EDGE *softEdges, int *nSoftEdges); static bool FindLockCycleRecurse(PGPROC *checkProc, int depth, - EDGE *softEdges, int *nSoftEdges); + EDGE *softEdges, int *nSoftEdges); static bool FindLockCycleRecurseMember(PGPROC *checkProc, - PGPROC *checkProcLeader, - int depth, EDGE *softEdges, int *nSoftEdges); + PGPROC *checkProcLeader, + int depth, EDGE *softEdges, int *nSoftEdges); static bool ExpandConstraints(EDGE *constraints, int nConstraints); static bool TopoSort(LOCK *lock, EDGE *constraints, int nConstraints, - PGPROC **ordering); + PGPROC **ordering); #ifdef DEBUG_DEADLOCK static void PrintLockQueue(LOCK *lock, const char *info); diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index c8958766f1e..6745a2432ef 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -211,7 +211,7 @@ static int FastPathLocalUseCount = 0; static bool FastPathGrantRelationLock(Oid relid, LOCKMODE lockmode); static bool FastPathUnGrantRelationLock(Oid relid, LOCKMODE lockmode); static bool FastPathTransferRelationLocks(LockMethod lockMethodTable, - const LOCKTAG *locktag, uint32 hashcode); + const LOCKTAG *locktag, uint32 hashcode); static PROCLOCK *FastPathGetRelationLockEntry(LOCALLOCK *locallock); /* @@ -342,7 +342,7 @@ PROCLOCK_PRINT(const char *where, const PROCLOCK *proclockP) static uint32 proclock_hash(const void *key, Size keysize); static void RemoveLocalLock(LOCALLOCK *locallock); static PROCLOCK *SetupLockInTable(LockMethod lockMethodTable, PGPROC *proc, - const LOCKTAG *locktag, uint32 hashcode, LOCKMODE lockmode); + const LOCKTAG *locktag, uint32 hashcode, LOCKMODE lockmode); static void GrantLockLocal(LOCALLOCK *locallock, ResourceOwner owner); static void BeginStrongLockAcquire(LOCALLOCK *locallock, uint32 fasthashcode); static void FinishStrongLockAcquire(void); @@ -350,15 +350,15 @@ static void WaitOnLock(LOCALLOCK *locallock, ResourceOwner owner); static void ReleaseLockIfHeld(LOCALLOCK *locallock, bool sessionLock); static void LockReassignOwner(LOCALLOCK *locallock, ResourceOwner parent); static bool UnGrantLock(LOCK *lock, LOCKMODE lockmode, - PROCLOCK *proclock, LockMethod lockMethodTable); + PROCLOCK *proclock, LockMethod lockMethodTable); static void CleanUpLock(LOCK *lock, PROCLOCK *proclock, - LockMethod lockMethodTable, uint32 hashcode, - bool wakeupNeeded); + LockMethod lockMethodTable, uint32 hashcode, + bool wakeupNeeded); static void LockRefindAndRelease(LockMethod lockMethodTable, PGPROC *proc, - LOCKTAG *locktag, LOCKMODE lockmode, - bool decrement_strong_lock_count); + LOCKTAG *locktag, LOCKMODE lockmode, + bool decrement_strong_lock_count); static void GetSingleProcBlockerStatusData(PGPROC *blocked_proc, - BlockedProcsData *data); + BlockedProcsData *data); /* diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c index 7f607b2bf8c..2fedbc4c15f 100644 --- a/src/backend/storage/lmgr/predicate.c +++ b/src/backend/storage/lmgr/predicate.c @@ -451,39 +451,39 @@ static uint32 predicatelock_hash(const void *key, Size keysize); static void SummarizeOldestCommittedSxact(void); static Snapshot GetSafeSnapshot(Snapshot snapshot); static Snapshot GetSerializableTransactionSnapshotInt(Snapshot snapshot, - VirtualTransactionId *sourcevxid, - int sourcepid); + VirtualTransactionId *sourcevxid, + int sourcepid); static bool PredicateLockExists(const PREDICATELOCKTARGETTAG *targettag); static bool GetParentPredicateLockTag(const PREDICATELOCKTARGETTAG *tag, - PREDICATELOCKTARGETTAG *parent); + PREDICATELOCKTARGETTAG *parent); static bool CoarserLockCovers(const PREDICATELOCKTARGETTAG *newtargettag); static void RemoveScratchTarget(bool lockheld); static void RestoreScratchTarget(bool lockheld); static void RemoveTargetIfNoLongerUsed(PREDICATELOCKTARGET *target, - uint32 targettaghash); + uint32 targettaghash); static void DeleteChildTargetLocks(const PREDICATELOCKTARGETTAG *newtargettag); static int MaxPredicateChildLocks(const PREDICATELOCKTARGETTAG *tag); static bool CheckAndPromotePredicateLockRequest(const PREDICATELOCKTARGETTAG *reqtag); static void DecrementParentLocks(const PREDICATELOCKTARGETTAG *targettag); static void CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag, - uint32 targettaghash, - SERIALIZABLEXACT *sxact); + uint32 targettaghash, + SERIALIZABLEXACT *sxact); static void DeleteLockTarget(PREDICATELOCKTARGET *target, uint32 targettaghash); static bool TransferPredicateLocksToNewTarget(PREDICATELOCKTARGETTAG oldtargettag, - PREDICATELOCKTARGETTAG newtargettag, - bool removeOld); + PREDICATELOCKTARGETTAG newtargettag, + bool removeOld); static void PredicateLockAcquire(const PREDICATELOCKTARGETTAG *targettag); static void DropAllPredicateLocksFromTable(Relation relation, - bool transfer); + bool transfer); static void SetNewSxactGlobalXmin(void); static void ClearOldPredicateLocks(void); static void ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial, - bool summarize); + bool summarize); static bool XidIsConcurrent(TransactionId xid); static void CheckTargetForConflictsIn(PREDICATELOCKTARGETTAG *targettag); static void FlagRWConflict(SERIALIZABLEXACT *reader, SERIALIZABLEXACT *writer); static void OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader, - SERIALIZABLEXACT *writer); + SERIALIZABLEXACT *writer); static void CreateLocalPredicateLockHash(void); static void ReleasePredicateLocksLocal(void); diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c index 52ca6eeb28f..bbcd18d52b3 100644 --- a/src/backend/storage/smgr/md.c +++ b/src/backend/storage/smgr/md.c @@ -119,25 +119,25 @@ static MemoryContext MdCxt; /* context for all MdfdVec objects */ /* local routines */ static void mdunlinkfork(RelFileNodeBackend rnode, ForkNumber forkNum, - bool isRedo); + bool isRedo); static MdfdVec *mdopen(SMgrRelation reln, ForkNumber forknum, int behavior); static void register_dirty_segment(SMgrRelation reln, ForkNumber forknum, - MdfdVec *seg); + MdfdVec *seg); static void register_unlink_segment(RelFileNodeBackend rnode, ForkNumber forknum, - BlockNumber segno); + BlockNumber segno); static void register_forget_request(RelFileNodeBackend rnode, ForkNumber forknum, - BlockNumber segno); + BlockNumber segno); static void _fdvec_resize(SMgrRelation reln, - ForkNumber forknum, - int nseg); + ForkNumber forknum, + int nseg); static char *_mdfd_segpath(SMgrRelation reln, ForkNumber forknum, - BlockNumber segno); + BlockNumber segno); static MdfdVec *_mdfd_openseg(SMgrRelation reln, ForkNumber forkno, - BlockNumber segno, int oflags); + BlockNumber segno, int oflags); static MdfdVec *_mdfd_getseg(SMgrRelation reln, ForkNumber forkno, - BlockNumber blkno, bool skipFsync, int behavior); + BlockNumber blkno, bool skipFsync, int behavior); static BlockNumber _mdnblocks(SMgrRelation reln, ForkNumber forknum, - MdfdVec *seg); + MdfdVec *seg); /* diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index b6d2e2ac112..61aa1697c3e 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -57,9 +57,9 @@ struct fp_info static int16 parse_fcall_arguments(StringInfo msgBuf, struct fp_info *fip, - FunctionCallInfo fcinfo); + FunctionCallInfo fcinfo); static int16 parse_fcall_arguments_20(StringInfo msgBuf, struct fp_info *fip, - FunctionCallInfo fcinfo); + FunctionCallInfo fcinfo); /* ---------------- diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index 7f15933de2c..d5e71e8bd74 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -36,27 +36,27 @@ Portal ActivePortal = NULL; static void ProcessQuery(PlannedStmt *plan, - const char *sourceText, - ParamListInfo params, - QueryEnvironment *queryEnv, - DestReceiver *dest, - char *completionTag); + const char *sourceText, + ParamListInfo params, + QueryEnvironment *queryEnv, + DestReceiver *dest, + char *completionTag); static void FillPortalStore(Portal portal, bool isTopLevel); static uint64 RunFromStore(Portal portal, ScanDirection direction, uint64 count, - DestReceiver *dest); + DestReceiver *dest); static uint64 PortalRunSelect(Portal portal, bool forward, long count, - DestReceiver *dest); + DestReceiver *dest); static void PortalRunUtility(Portal portal, PlannedStmt *pstmt, - bool isTopLevel, bool setHoldSnapshot, - DestReceiver *dest, char *completionTag); + bool isTopLevel, bool setHoldSnapshot, + DestReceiver *dest, char *completionTag); static void PortalRunMulti(Portal portal, - bool isTopLevel, bool setHoldSnapshot, - DestReceiver *dest, DestReceiver *altdest, - char *completionTag); + bool isTopLevel, bool setHoldSnapshot, + DestReceiver *dest, DestReceiver *altdest, + char *completionTag); static uint64 DoPortalRunFetch(Portal portal, - FetchDirection fdirection, - long count, - DestReceiver *dest); + FetchDirection fdirection, + long count, + DestReceiver *dest); static void DoPortalRewind(Portal portal); diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 92d0507949d..9578b5c7619 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -77,13 +77,13 @@ ProcessUtility_hook_type ProcessUtility_hook = NULL; /* local function declarations */ static void ProcessUtilitySlow(ParseState *pstate, - PlannedStmt *pstmt, - const char *queryString, - ProcessUtilityContext context, - ParamListInfo params, - QueryEnvironment *queryEnv, - DestReceiver *dest, - char *completionTag); + PlannedStmt *pstmt, + const char *queryString, + ProcessUtilityContext context, + ParamListInfo params, + QueryEnvironment *queryEnv, + DestReceiver *dest, + char *completionTag); static void ExecDropStmt(DropStmt *stmt, bool isTopLevel); diff --git a/src/backend/tsearch/ts_selfuncs.c b/src/backend/tsearch/ts_selfuncs.c index 154d7eb9a1b..ed935faead7 100644 --- a/src/backend/tsearch/ts_selfuncs.c +++ b/src/backend/tsearch/ts_selfuncs.c @@ -48,10 +48,10 @@ typedef struct static Selectivity tsquerysel(VariableStatData *vardata, Datum constval); static Selectivity mcelem_tsquery_selec(TSQuery query, - Datum *mcelem, int nmcelem, - float4 *numbers, int nnumbers); + Datum *mcelem, int nmcelem, + float4 *numbers, int nnumbers); static Selectivity tsquery_opr_selec(QueryItem *item, char *operand, - TextFreq *lookup, int length, float4 minfreq); + TextFreq *lookup, int length, float4 minfreq); static int compare_lexeme_textfreq(const void *e1, const void *e2); #define tsquery_opr_selec_no_stats(query) \ diff --git a/src/backend/tsearch/ts_typanalyze.c b/src/backend/tsearch/ts_typanalyze.c index 530f1ccddb0..bd33e67e337 100644 --- a/src/backend/tsearch/ts_typanalyze.c +++ b/src/backend/tsearch/ts_typanalyze.c @@ -37,9 +37,9 @@ typedef struct } TrackItem; static void compute_tsvector_stats(VacAttrStats *stats, - AnalyzeAttrFetchFunc fetchfunc, - int samplerows, - double totalrows); + AnalyzeAttrFetchFunc fetchfunc, + int samplerows, + double totalrows); static void prune_lexemes_hashtable(HTAB *lexemes_tab, int b_current); static uint32 lexeme_hash(const void *key, Size keysize); static int lexeme_match(const void *key1, const void *key2, Size keysize); diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 83c35a4d8b3..cfd139e6e92 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -86,13 +86,13 @@ static const char *aclparse(const char *s, AclItem *aip); static bool aclitem_match(const AclItem *a1, const AclItem *a2); static int aclitemComparator(const void *arg1, const void *arg2); static void check_circularity(const Acl *old_acl, const AclItem *mod_aip, - Oid ownerId); + Oid ownerId); static Acl *recursive_revoke(Acl *acl, Oid grantee, AclMode revoke_privs, - Oid ownerId, DropBehavior behavior); + Oid ownerId, DropBehavior behavior); static AclMode convert_priv_string(text *priv_type_text); static AclMode convert_any_priv_string(text *priv_type_text, - const priv_map *privileges); + const priv_map *privileges); static Oid convert_table_name(text *tablename); static AclMode convert_table_priv_string(text *priv_type_text); diff --git a/src/backend/utils/adt/array_expanded.c b/src/backend/utils/adt/array_expanded.c index 5979f15b8d2..3df14f93900 100644 --- a/src/backend/utils/adt/array_expanded.c +++ b/src/backend/utils/adt/array_expanded.c @@ -23,7 +23,7 @@ /* "Methods" required for an expanded object */ static Size EA_get_flat_size(ExpandedObjectHeader *eohptr); static void EA_flatten_into(ExpandedObjectHeader *eohptr, - void *result, Size allocated_size); + void *result, Size allocated_size); static const ExpandedObjectMethods EA_methods = { @@ -33,7 +33,7 @@ static const ExpandedObjectMethods EA_methods = /* Other local functions */ static void copy_byval_expanded_array(ExpandedArrayHeader *eah, - ExpandedArrayHeader *oldeah); + ExpandedArrayHeader *oldeah); /* diff --git a/src/backend/utils/adt/array_selfuncs.c b/src/backend/utils/adt/array_selfuncs.c index 870131b0738..a0ac9492850 100644 --- a/src/backend/utils/adt/array_selfuncs.c +++ b/src/backend/utils/adt/array_selfuncs.c @@ -39,27 +39,27 @@ DEFAULT_OVERLAP_SEL : DEFAULT_CONTAIN_SEL) static Selectivity calc_arraycontsel(VariableStatData *vardata, Datum constval, - Oid elemtype, Oid operator); + Oid elemtype, Oid operator); static Selectivity mcelem_array_selec(ArrayType *array, - TypeCacheEntry *typentry, - Datum *mcelem, int nmcelem, - float4 *numbers, int nnumbers, - float4 *hist, int nhist, - Oid operator); + TypeCacheEntry *typentry, + Datum *mcelem, int nmcelem, + float4 *numbers, int nnumbers, + float4 *hist, int nhist, + Oid operator); static Selectivity mcelem_array_contain_overlap_selec(Datum *mcelem, int nmcelem, - float4 *numbers, int nnumbers, - Datum *array_data, int nitems, - Oid operator, TypeCacheEntry *typentry); + float4 *numbers, int nnumbers, + Datum *array_data, int nitems, + Oid operator, TypeCacheEntry *typentry); static Selectivity mcelem_array_contained_selec(Datum *mcelem, int nmcelem, - float4 *numbers, int nnumbers, - Datum *array_data, int nitems, - float4 *hist, int nhist, - Oid operator, TypeCacheEntry *typentry); + float4 *numbers, int nnumbers, + Datum *array_data, int nitems, + float4 *hist, int nhist, + Oid operator, TypeCacheEntry *typentry); static float *calc_hist(const float4 *hist, int nhist, int n); static float *calc_distr(const float *p, int n, int m, float rest); static int floor_log2(uint32 n); static bool find_next_mcelem(Datum *mcelem, int nmcelem, Datum value, - int *index, TypeCacheEntry *typentry); + int *index, TypeCacheEntry *typentry); static int element_compare(const void *key1, const void *key2, void *arg); static int float_compare_desc(const void *key1, const void *key2); diff --git a/src/backend/utils/adt/array_typanalyze.c b/src/backend/utils/adt/array_typanalyze.c index a03b7f7860b..eafb94b697e 100644 --- a/src/backend/utils/adt/array_typanalyze.c +++ b/src/backend/utils/adt/array_typanalyze.c @@ -81,7 +81,7 @@ typedef struct } DECountItem; static void compute_array_stats(VacAttrStats *stats, - AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows); + AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows); static void prune_element_hashtable(HTAB *elements_tab, int b_current); static uint32 element_hash(const void *key, Size keysize); static int element_match(const void *key1, const void *key2, Size keysize); diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 9cef018c0b4..3ae15562465 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -90,74 +90,74 @@ typedef struct ArrayIteratorData static bool array_isspace(char ch); static int ArrayCount(const char *str, int *dim, char typdelim); static void ReadArrayStr(char *arrayStr, const char *origStr, - int nitems, int ndim, int *dim, - FmgrInfo *inputproc, Oid typioparam, int32 typmod, - char typdelim, - int typlen, bool typbyval, char typalign, - Datum *values, bool *nulls, - bool *hasnulls, int32 *nbytes); + int nitems, int ndim, int *dim, + FmgrInfo *inputproc, Oid typioparam, int32 typmod, + char typdelim, + int typlen, bool typbyval, char typalign, + Datum *values, bool *nulls, + bool *hasnulls, int32 *nbytes); static void ReadArrayBinary(StringInfo buf, int nitems, - FmgrInfo *receiveproc, Oid typioparam, int32 typmod, - int typlen, bool typbyval, char typalign, - Datum *values, bool *nulls, - bool *hasnulls, int32 *nbytes); + FmgrInfo *receiveproc, Oid typioparam, int32 typmod, + int typlen, bool typbyval, char typalign, + Datum *values, bool *nulls, + bool *hasnulls, int32 *nbytes); static Datum array_get_element_expanded(Datum arraydatum, - int nSubscripts, int *indx, - int arraytyplen, - int elmlen, bool elmbyval, char elmalign, - bool *isNull); + int nSubscripts, int *indx, + int arraytyplen, + int elmlen, bool elmbyval, char elmalign, + bool *isNull); static Datum array_set_element_expanded(Datum arraydatum, - int nSubscripts, int *indx, - Datum dataValue, bool isNull, - int arraytyplen, - int elmlen, bool elmbyval, char elmalign); + int nSubscripts, int *indx, + Datum dataValue, bool isNull, + int arraytyplen, + int elmlen, bool elmbyval, char elmalign); static bool array_get_isnull(const bits8 *nullbitmap, int offset); static void array_set_isnull(bits8 *nullbitmap, int offset, bool isNull); static Datum ArrayCast(char *value, bool byval, int len); -static int ArrayCastAndSet(Datum src, - int typlen, bool typbyval, char typalign, - char *dest); +static int ArrayCastAndSet(Datum src, + int typlen, bool typbyval, char typalign, + char *dest); static char *array_seek(char *ptr, int offset, bits8 *nullbitmap, int nitems, - int typlen, bool typbyval, char typalign); -static int array_nelems_size(char *ptr, int offset, bits8 *nullbitmap, - int nitems, int typlen, bool typbyval, char typalign); -static int array_copy(char *destptr, int nitems, - char *srcptr, int offset, bits8 *nullbitmap, - int typlen, bool typbyval, char typalign); -static int array_slice_size(char *arraydataptr, bits8 *arraynullsptr, - int ndim, int *dim, int *lb, - int *st, int *endp, - int typlen, bool typbyval, char typalign); + int typlen, bool typbyval, char typalign); +static int array_nelems_size(char *ptr, int offset, bits8 *nullbitmap, + int nitems, int typlen, bool typbyval, char typalign); +static int array_copy(char *destptr, int nitems, + char *srcptr, int offset, bits8 *nullbitmap, + int typlen, bool typbyval, char typalign); +static int array_slice_size(char *arraydataptr, bits8 *arraynullsptr, + int ndim, int *dim, int *lb, + int *st, int *endp, + int typlen, bool typbyval, char typalign); static void array_extract_slice(ArrayType *newarray, - int ndim, int *dim, int *lb, - char *arraydataptr, bits8 *arraynullsptr, - int *st, int *endp, - int typlen, bool typbyval, char typalign); + int ndim, int *dim, int *lb, + char *arraydataptr, bits8 *arraynullsptr, + int *st, int *endp, + int typlen, bool typbyval, char typalign); static void array_insert_slice(ArrayType *destArray, ArrayType *origArray, - ArrayType *srcArray, - int ndim, int *dim, int *lb, - int *st, int *endp, - int typlen, bool typbyval, char typalign); + ArrayType *srcArray, + int ndim, int *dim, int *lb, + int *st, int *endp, + int typlen, bool typbyval, char typalign); static int array_cmp(FunctionCallInfo fcinfo); static ArrayType *create_array_envelope(int ndims, int *dimv, int *lbv, int nbytes, - Oid elmtype, int dataoffset); + Oid elmtype, int dataoffset); static ArrayType *array_fill_internal(ArrayType *dims, ArrayType *lbs, - Datum value, bool isnull, Oid elmtype, - FunctionCallInfo fcinfo); + Datum value, bool isnull, Oid elmtype, + FunctionCallInfo fcinfo); static ArrayType *array_replace_internal(ArrayType *array, - Datum search, bool search_isnull, - Datum replace, bool replace_isnull, - bool remove, Oid collation, - FunctionCallInfo fcinfo); + Datum search, bool search_isnull, + Datum replace, bool replace_isnull, + bool remove, Oid collation, + FunctionCallInfo fcinfo); static int width_bucket_array_float8(Datum operand, ArrayType *thresholds); -static int width_bucket_array_fixed(Datum operand, - ArrayType *thresholds, - Oid collation, - TypeCacheEntry *typentry); -static int width_bucket_array_variable(Datum operand, - ArrayType *thresholds, - Oid collation, - TypeCacheEntry *typentry); +static int width_bucket_array_fixed(Datum operand, + ArrayType *thresholds, + Oid collation, + TypeCacheEntry *typentry); +static int width_bucket_array_variable(Datum operand, + ArrayType *thresholds, + Oid collation, + TypeCacheEntry *typentry); /* diff --git a/src/backend/utils/adt/ascii.c b/src/backend/utils/adt/ascii.c index 7d78aac9f89..8316d9aa062 100644 --- a/src/backend/utils/adt/ascii.c +++ b/src/backend/utils/adt/ascii.c @@ -16,7 +16,7 @@ #include "utils/builtins.h" static void pg_to_ascii(unsigned char *src, unsigned char *src_end, - unsigned char *dest, int enc); + unsigned char *dest, int enc); static text *encode_to_ascii(text *data, int enc); diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 0068e71d11a..9def318c57d 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -32,28 +32,28 @@ #include "utils/tzparser.h" -static int DecodeNumber(int flen, char *field, bool haveTextMonth, - int fmask, int *tmask, - struct pg_tm *tm, fsec_t *fsec, bool *is2digits); -static int DecodeNumberField(int len, char *str, - int fmask, int *tmask, - struct pg_tm *tm, fsec_t *fsec, bool *is2digits); -static int DecodeTime(char *str, int fmask, int range, - int *tmask, struct pg_tm *tm, fsec_t *fsec); +static int DecodeNumber(int flen, char *field, bool haveTextMonth, + int fmask, int *tmask, + struct pg_tm *tm, fsec_t *fsec, bool *is2digits); +static int DecodeNumberField(int len, char *str, + int fmask, int *tmask, + struct pg_tm *tm, fsec_t *fsec, bool *is2digits); +static int DecodeTime(char *str, int fmask, int range, + int *tmask, struct pg_tm *tm, fsec_t *fsec); static const datetkn *datebsearch(const char *key, const datetkn *base, int nel); -static int DecodeDate(char *str, int fmask, int *tmask, bool *is2digits, - struct pg_tm *tm); +static int DecodeDate(char *str, int fmask, int *tmask, bool *is2digits, + struct pg_tm *tm); static char *AppendSeconds(char *cp, int sec, fsec_t fsec, - int precision, bool fillzeros); + int precision, bool fillzeros); static void AdjustFractSeconds(double frac, struct pg_tm *tm, fsec_t *fsec, - int scale); + int scale); static void AdjustFractDays(double frac, struct pg_tm *tm, fsec_t *fsec, - int scale); -static int DetermineTimeZoneOffsetInternal(struct pg_tm *tm, pg_tz *tzp, - pg_time_t *tp); + int scale); +static int DetermineTimeZoneOffsetInternal(struct pg_tm *tm, pg_tz *tzp, + pg_time_t *tp); static bool DetermineTimeZoneAbbrevOffsetInternal(pg_time_t t, - const char *abbr, pg_tz *tzp, - int *offset, int *isdst); + const char *abbr, pg_tz *tzp, + int *offset, int *isdst); static pg_tz *FetchDynamicTimeZone(TimeZoneAbbrevTable *tbl, const datetkn *tp); diff --git a/src/backend/utils/adt/expandedrecord.c b/src/backend/utils/adt/expandedrecord.c index 9971abd71f6..166c8630267 100644 --- a/src/backend/utils/adt/expandedrecord.c +++ b/src/backend/utils/adt/expandedrecord.c @@ -32,7 +32,7 @@ /* "Methods" required for an expanded object */ static Size ER_get_flat_size(ExpandedObjectHeader *eohptr); static void ER_flatten_into(ExpandedObjectHeader *eohptr, - void *result, Size allocated_size); + void *result, Size allocated_size); static const ExpandedObjectMethods ER_methods = { @@ -45,10 +45,10 @@ static void ER_mc_callback(void *arg); static MemoryContext get_short_term_cxt(ExpandedRecordHeader *erh); static void build_dummy_expanded_header(ExpandedRecordHeader *main_erh); static pg_noinline void check_domain_for_new_field(ExpandedRecordHeader *erh, - int fnumber, - Datum newValue, bool isnull); + int fnumber, + Datum newValue, bool isnull); static pg_noinline void check_domain_for_new_tuple(ExpandedRecordHeader *erh, - HeapTuple tuple); + HeapTuple tuple); /* diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 3a6a878ffac..206576d4bd3 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -968,15 +968,15 @@ typedef struct NUMProc * ---------- */ static const KeyWord *index_seq_search(const char *str, const KeyWord *kw, - const int *index); + const int *index); static const KeySuffix *suff_search(const char *str, const KeySuffix *suf, int type); static bool is_separator_char(const char *str); static void NUMDesc_prepare(NUMDesc *num, FormatNode *n); static void parse_format(FormatNode *node, const char *str, const KeyWord *kw, - const KeySuffix *suf, const int *index, int ver, NUMDesc *Num); + const KeySuffix *suf, const int *index, int ver, NUMDesc *Num); static void DCH_to_char(FormatNode *node, bool is_interval, - TmToChar *in, char *out, Oid collid); + TmToChar *in, char *out, Oid collid); static void DCH_from_char(FormatNode *node, char *in, TmFromChar *out); #ifdef DEBUG_TO_FROM_CHAR @@ -995,7 +995,7 @@ static int from_char_parse_int(int *dest, char **src, FormatNode *node); static int seq_search(char *name, const char *const *array, int type, int max, int *len); static int from_char_seq_search(int *dest, char **src, const char *const *array, int type, int max, FormatNode *node); static void do_to_timestamp(text *date_txt, text *fmt, - struct pg_tm *tm, fsec_t *fsec); + struct pg_tm *tm, fsec_t *fsec); static char *fill_str(char *str, int c, int max); static FormatNode *NUM_cache(int len, NUMDesc *Num, text *pars_str, bool *shouldFree); static char *int_to_roman(int number); @@ -1004,8 +1004,8 @@ static char *get_last_relevant_decnum(char *num); static void NUM_numpart_from_char(NUMProc *Np, int id, int input_len); static void NUM_numpart_to_char(NUMProc *Np, int id); static char *NUM_processor(FormatNode *node, NUMDesc *Num, char *inout, - char *number, int input_len, int to_char_out_pre_spaces, - int sign, bool is_to_char, Oid collid); + char *number, int input_len, int to_char_out_pre_spaces, + int sign, bool is_to_char, Oid collid); static DCHCacheEntry *DCH_cache_getnew(const char *str); static DCHCacheEntry *DCH_cache_search(const char *str); static DCHCacheEntry *DCH_cache_fetch(const char *str); diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index f2be6143105..2ecc73b7724 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -131,15 +131,15 @@ static float8 dist_ppoly_internal(Point *pt, POLYGON *poly); /* Routines for encoding and decoding */ static float8 single_decode(char *num, char **endptr_p, - const char *type_name, const char *orig_string); + const char *type_name, const char *orig_string); static void single_encode(float8 x, StringInfo str); static void pair_decode(char *str, float8 *x, float8 *y, char **endptr_p, - const char *type_name, const char *orig_string); + const char *type_name, const char *orig_string); static void pair_encode(float8 x, float8 y, StringInfo str); static int pair_count(char *s, char delim); static void path_decode(char *str, bool opentype, int npts, Point *p, - bool *isopen, char **endptr_p, - const char *type_name, const char *orig_string); + bool *isopen, char **endptr_p, + const char *type_name, const char *orig_string); static char *path_encode(enum path_delim path_delim, int npts, Point *pt); diff --git a/src/backend/utils/adt/inet_cidr_ntop.c b/src/backend/utils/adt/inet_cidr_ntop.c index a4193e2ccec..5fdc3ca2513 100644 --- a/src/backend/utils/adt/inet_cidr_ntop.c +++ b/src/backend/utils/adt/inet_cidr_ntop.c @@ -38,9 +38,9 @@ static const char rcsid[] = "Id: inet_net_ntop.c,v 1.1.2.2 2004/03/09 09:17:27 m #endif static char *inet_cidr_ntop_ipv4(const u_char *src, int bits, - char *dst, size_t size); + char *dst, size_t size); static char *inet_cidr_ntop_ipv6(const u_char *src, int bits, - char *dst, size_t size); + char *dst, size_t size); /* * char * diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c index a9784d067c7..26d293709aa 100644 --- a/src/backend/utils/adt/json.c +++ b/src/backend/utils/adt/json.c @@ -78,7 +78,7 @@ typedef struct JsonAggState static inline void json_lex(JsonLexContext *lex); static inline void json_lex_string(JsonLexContext *lex); static inline void json_lex_number(JsonLexContext *lex, char *s, - bool *num_err, int *total_len); + bool *num_err, int *total_len); static inline void parse_scalar(JsonLexContext *lex, JsonSemAction *sem); static void parse_object_field(JsonLexContext *lex, JsonSemAction *sem); static void parse_object(JsonLexContext *lex, JsonSemAction *sem); @@ -89,21 +89,21 @@ static void report_invalid_token(JsonLexContext *lex) pg_attribute_noreturn(); static int report_json_context(JsonLexContext *lex); static char *extract_mb_char(char *s); static void composite_to_json(Datum composite, StringInfo result, - bool use_line_feeds); + bool use_line_feeds); static void array_dim_to_json(StringInfo result, int dim, int ndims, int *dims, - Datum *vals, bool *nulls, int *valcount, - JsonTypeCategory tcategory, Oid outfuncoid, - bool use_line_feeds); + Datum *vals, bool *nulls, int *valcount, + JsonTypeCategory tcategory, Oid outfuncoid, + bool use_line_feeds); static void array_to_json_internal(Datum array, StringInfo result, - bool use_line_feeds); + bool use_line_feeds); static void json_categorize_type(Oid typoid, - JsonTypeCategory *tcategory, - Oid *outfuncoid); + JsonTypeCategory *tcategory, + Oid *outfuncoid); static void datum_to_json(Datum val, bool is_null, StringInfo result, - JsonTypeCategory tcategory, Oid outfuncoid, - bool key_scalar); + JsonTypeCategory tcategory, Oid outfuncoid, + bool key_scalar); static void add_json(Datum val, bool is_null, StringInfo result, - Oid val_type, bool key_scalar); + Oid val_type, bool key_scalar); static text *catenate_stringinfo_string(StringInfo buffer, const char *addon); /* the null action object used for pure validation */ diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c index c742172bd8c..69f41ab4556 100644 --- a/src/backend/utils/adt/jsonb.c +++ b/src/backend/utils/adt/jsonb.c @@ -71,21 +71,21 @@ static void jsonb_in_object_field_start(void *pstate, char *fname, bool isnull); static void jsonb_put_escaped_value(StringInfo out, JsonbValue *scalarVal); static void jsonb_in_scalar(void *pstate, char *token, JsonTokenType tokentype); static void jsonb_categorize_type(Oid typoid, - JsonbTypeCategory *tcategory, - Oid *outfuncoid); + JsonbTypeCategory *tcategory, + Oid *outfuncoid); static void composite_to_jsonb(Datum composite, JsonbInState *result); static void array_dim_to_jsonb(JsonbInState *result, int dim, int ndims, int *dims, - Datum *vals, bool *nulls, int *valcount, - JsonbTypeCategory tcategory, Oid outfuncoid); + Datum *vals, bool *nulls, int *valcount, + JsonbTypeCategory tcategory, Oid outfuncoid); static void array_to_jsonb_internal(Datum array, JsonbInState *result); static void jsonb_categorize_type(Oid typoid, - JsonbTypeCategory *tcategory, - Oid *outfuncoid); + JsonbTypeCategory *tcategory, + Oid *outfuncoid); static void datum_to_jsonb(Datum val, bool is_null, JsonbInState *result, - JsonbTypeCategory tcategory, Oid outfuncoid, - bool key_scalar); + JsonbTypeCategory tcategory, Oid outfuncoid, + bool key_scalar); static void add_jsonb(Datum val, bool is_null, JsonbInState *result, - Oid val_type, bool key_scalar); + Oid val_type, bool key_scalar); static JsonbParseState *clone_parse_state(JsonbParseState *state); static char *JsonbToCStringWorker(StringInfo out, JsonbContainer *in, int estimated_len, bool indent); static void add_indent(StringInfo out, bool indent, int level); diff --git a/src/backend/utils/adt/jsonb_gin.c b/src/backend/utils/adt/jsonb_gin.c index a20e44b1fea..e8d54e70b84 100644 --- a/src/backend/utils/adt/jsonb_gin.c +++ b/src/backend/utils/adt/jsonb_gin.c @@ -155,7 +155,7 @@ static Datum make_text_key(char flag, const char *str, int len); static Datum make_scalar_key(const JsonbValue *scalarVal, bool is_key); static JsonPathGinNode *extract_jsp_bool_expr(JsonPathGinContext *cxt, - JsonPathGinPath path, JsonPathItem *jsp, bool not); + JsonPathGinPath path, JsonPathItem *jsp, bool not); /* Initialize GinEntries struct */ diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c index 1a28d75c59b..7969f6f5843 100644 --- a/src/backend/utils/adt/jsonb_util.c +++ b/src/backend/utils/adt/jsonb_util.c @@ -34,8 +34,8 @@ #define JSONB_MAX_PAIRS (Min(MaxAllocSize / sizeof(JsonbPair), JB_CMASK)) static void fillJsonbValue(JsonbContainer *container, int index, - char *base_addr, uint32 offset, - JsonbValue *result); + char *base_addr, uint32 offset, + JsonbValue *result); static bool equalsJsonbScalarValue(JsonbValue *a, JsonbValue *b); static int compareJsonbScalarValue(JsonbValue *a, JsonbValue *b); static Jsonb *convertToJsonb(JsonbValue *val); @@ -59,8 +59,8 @@ static int lengthCompareJsonbStringValue(const void *a, const void *b); static int lengthCompareJsonbPair(const void *a, const void *b, void *arg); static void uniqueifyJsonbObject(JsonbValue *object); static JsonbValue *pushJsonbValueScalar(JsonbParseState **pstate, - JsonbIteratorToken seq, - JsonbValue *scalarVal); + JsonbIteratorToken seq, + JsonbValue *scalarVal); /* * Turn an in-memory JsonbValue into a Jsonb for on-disk storage. diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index dd88c09e6dd..28bdc7243fd 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -354,7 +354,7 @@ static void get_scalar(void *state, char *token, JsonTokenType tokentype); /* common worker function for json getter functions */ static Datum get_path_all(FunctionCallInfo fcinfo, bool as_text); static text *get_worker(text *json, char **tpath, int *ipath, int npath, - bool normalize_results); + bool normalize_results); static Datum get_jsonb_path_all(FunctionCallInfo fcinfo, bool as_text); /* semantic action functions for json_array_length */ @@ -365,7 +365,7 @@ static void alen_array_element_start(void *state, bool isnull); /* common workers for json{b}_each* functions */ static Datum each_worker(FunctionCallInfo fcinfo, bool as_text); static Datum each_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, - bool as_text); + bool as_text); /* semantic action functions for json_each */ static void each_object_field_start(void *state, char *fname, bool isnull); @@ -375,9 +375,9 @@ static void each_scalar(void *state, char *token, JsonTokenType tokentype); /* common workers for json{b}_array_elements_* functions */ static Datum elements_worker(FunctionCallInfo fcinfo, const char *funcname, - bool as_text); + bool as_text); static Datum elements_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, - bool as_text); + bool as_text); /* semantic action functions for json_array_elements */ static void elements_object_start(void *state); @@ -421,59 +421,59 @@ static void sn_scalar(void *state, char *token, JsonTokenType tokentype); /* worker functions for populate_record, to_record, populate_recordset and to_recordset */ static Datum populate_recordset_worker(FunctionCallInfo fcinfo, const char *funcname, - bool is_json, bool have_record_arg); + bool is_json, bool have_record_arg); static Datum populate_record_worker(FunctionCallInfo fcinfo, const char *funcname, - bool is_json, bool have_record_arg); + bool is_json, bool have_record_arg); /* helper functions for populate_record[set] */ static HeapTupleHeader populate_record(TupleDesc tupdesc, RecordIOData **record_p, - HeapTupleHeader defaultval, MemoryContext mcxt, - JsObject *obj); + HeapTupleHeader defaultval, MemoryContext mcxt, + JsObject *obj); static void JsValueToJsObject(JsValue *jsv, JsObject *jso); static Datum populate_composite(CompositeIOData *io, Oid typid, - const char *colname, MemoryContext mcxt, - HeapTupleHeader defaultval, JsValue *jsv, bool isnull); + const char *colname, MemoryContext mcxt, + HeapTupleHeader defaultval, JsValue *jsv, bool isnull); static Datum populate_scalar(ScalarIOData *io, Oid typid, int32 typmod, JsValue *jsv); static void prepare_column_cache(ColumnIOData *column, Oid typid, int32 typmod, - MemoryContext mcxt, bool need_scalar); + MemoryContext mcxt, bool need_scalar); static Datum populate_record_field(ColumnIOData *col, Oid typid, int32 typmod, - const char *colname, MemoryContext mcxt, Datum defaultval, - JsValue *jsv, bool *isnull); + const char *colname, MemoryContext mcxt, Datum defaultval, + JsValue *jsv, bool *isnull); static RecordIOData *allocate_record_info(MemoryContext mcxt, int ncolumns); static bool JsObjectGetField(JsObject *obj, char *field, JsValue *jsv); static void populate_recordset_record(PopulateRecordsetState *state, JsObject *obj); static void populate_array_json(PopulateArrayContext *ctx, char *json, int len); static void populate_array_dim_jsonb(PopulateArrayContext *ctx, JsonbValue *jbv, - int ndim); + int ndim); static void populate_array_report_expected_array(PopulateArrayContext *ctx, int ndim); static void populate_array_assign_ndims(PopulateArrayContext *ctx, int ndims); static void populate_array_check_dimension(PopulateArrayContext *ctx, int ndim); static void populate_array_element(PopulateArrayContext *ctx, int ndim, JsValue *jsv); static Datum populate_array(ArrayIOData *aio, const char *colname, - MemoryContext mcxt, JsValue *jsv); + MemoryContext mcxt, JsValue *jsv); static Datum populate_domain(DomainIOData *io, Oid typid, const char *colname, - MemoryContext mcxt, JsValue *jsv, bool isnull); + MemoryContext mcxt, JsValue *jsv, bool isnull); /* Worker that takes care of common setup for us */ static JsonbValue *findJsonbValueFromContainerLen(JsonbContainer *container, - uint32 flags, - char *key, - uint32 keylen); + uint32 flags, + char *key, + uint32 keylen); /* functions supporting jsonb_delete, jsonb_set and jsonb_concat */ static JsonbValue *IteratorConcat(JsonbIterator **it1, JsonbIterator **it2, - JsonbParseState **state); + JsonbParseState **state); static JsonbValue *setPath(JsonbIterator **it, Datum *path_elems, - bool *path_nulls, int path_len, - JsonbParseState **st, int level, Jsonb *newval, - int op_type); + bool *path_nulls, int path_len, + JsonbParseState **st, int level, Jsonb *newval, + int op_type); static void setPathObject(JsonbIterator **it, Datum *path_elems, - bool *path_nulls, int path_len, JsonbParseState **st, - int level, - Jsonb *newval, uint32 npairs, int op_type); + bool *path_nulls, int path_len, JsonbParseState **st, + int level, + Jsonb *newval, uint32 npairs, int op_type); static void setPathArray(JsonbIterator **it, Datum *path_elems, - bool *path_nulls, int path_len, JsonbParseState **st, - int level, Jsonb *newval, uint32 nelems, int op_type); + bool *path_nulls, int path_len, JsonbParseState **st, + int level, Jsonb *newval, uint32 nelems, int op_type); static void addJsonbToParseState(JsonbParseState **jbps, Jsonb *jb); /* function supporting iterate_json_values */ diff --git a/src/backend/utils/adt/jsonpath.c b/src/backend/utils/adt/jsonpath.c index b7f0b4a35e3..10cd38a5315 100644 --- a/src/backend/utils/adt/jsonpath.c +++ b/src/backend/utils/adt/jsonpath.c @@ -74,13 +74,13 @@ static Datum jsonPathFromCstring(char *in, int len); static char *jsonPathToCstring(StringInfo out, JsonPath *in, - int estimated_len); -static int flattenJsonPathParseItem(StringInfo buf, JsonPathParseItem *item, - int nestingLevel, bool insideArraySubscript); + int estimated_len); +static int flattenJsonPathParseItem(StringInfo buf, JsonPathParseItem *item, + int nestingLevel, bool insideArraySubscript); static void alignStringInfoInt(StringInfo buf); static int32 reserveSpaceForItemPointer(StringInfo buf); static void printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey, - bool printBracketes); + bool printBracketes); static int operationPriority(JsonPathItemType op); diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c index 5d70c7a6a66..873d64b6304 100644 --- a/src/backend/utils/adt/jsonpath_exec.c +++ b/src/backend/utils/adt/jsonpath_exec.c @@ -172,76 +172,76 @@ typedef JsonPathBool (*JsonPathPredicateCallback) (JsonPathItem *jsp, typedef Numeric (*BinaryArithmFunc) (Numeric num1, Numeric num2, bool *error); static JsonPathExecResult executeJsonPath(JsonPath *path, Jsonb *vars, - Jsonb *json, bool throwErrors, JsonValueList *result); + Jsonb *json, bool throwErrors, JsonValueList *result); static JsonPathExecResult executeItem(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found); + JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found); static JsonPathExecResult executeItemOptUnwrapTarget(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, - JsonValueList *found, bool unwrap); + JsonPathItem *jsp, JsonbValue *jb, + JsonValueList *found, bool unwrap); static JsonPathExecResult executeItemUnwrapTargetArray(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, - JsonValueList *found, bool unwrapElements); + JsonPathItem *jsp, JsonbValue *jb, + JsonValueList *found, bool unwrapElements); static JsonPathExecResult executeNextItem(JsonPathExecContext *cxt, - JsonPathItem *cur, JsonPathItem *next, - JsonbValue *v, JsonValueList *found, bool copy); + JsonPathItem *cur, JsonPathItem *next, + JsonbValue *v, JsonValueList *found, bool copy); static JsonPathExecResult executeItemOptUnwrapResult( - JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, - bool unwrap, JsonValueList *found); + JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, + bool unwrap, JsonValueList *found); static JsonPathExecResult executeItemOptUnwrapResultNoThrow( - JsonPathExecContext *cxt, JsonPathItem *jsp, - JsonbValue *jb, bool unwrap, JsonValueList *found); + JsonPathExecContext *cxt, JsonPathItem *jsp, + JsonbValue *jb, bool unwrap, JsonValueList *found); static JsonPathBool executeBoolItem(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, bool canHaveNext); + JsonPathItem *jsp, JsonbValue *jb, bool canHaveNext); static JsonPathBool executeNestedBoolItem(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb); + JsonPathItem *jsp, JsonbValue *jb); static JsonPathExecResult executeAnyItem(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbContainer *jbc, JsonValueList *found, - uint32 level, uint32 first, uint32 last, - bool ignoreStructuralErrors, bool unwrapNext); + JsonPathItem *jsp, JsonbContainer *jbc, JsonValueList *found, + uint32 level, uint32 first, uint32 last, + bool ignoreStructuralErrors, bool unwrapNext); static JsonPathBool executePredicate(JsonPathExecContext *cxt, - JsonPathItem *pred, JsonPathItem *larg, JsonPathItem *rarg, - JsonbValue *jb, bool unwrapRightArg, - JsonPathPredicateCallback exec, void *param); + JsonPathItem *pred, JsonPathItem *larg, JsonPathItem *rarg, + JsonbValue *jb, bool unwrapRightArg, + JsonPathPredicateCallback exec, void *param); static JsonPathExecResult executeBinaryArithmExpr(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, - BinaryArithmFunc func, JsonValueList *found); + JsonPathItem *jsp, JsonbValue *jb, + BinaryArithmFunc func, JsonValueList *found); static JsonPathExecResult executeUnaryArithmExpr(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, PGFunction func, - JsonValueList *found); + JsonPathItem *jsp, JsonbValue *jb, PGFunction func, + JsonValueList *found); static JsonPathBool executeStartsWith(JsonPathItem *jsp, - JsonbValue *whole, JsonbValue *initial, void *param); + JsonbValue *whole, JsonbValue *initial, void *param); static JsonPathBool executeLikeRegex(JsonPathItem *jsp, JsonbValue *str, - JsonbValue *rarg, void *param); + JsonbValue *rarg, void *param); static JsonPathExecResult executeNumericItemMethod(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, bool unwrap, PGFunction func, - JsonValueList *found); + JsonPathItem *jsp, JsonbValue *jb, bool unwrap, PGFunction func, + JsonValueList *found); static JsonPathExecResult executeKeyValueMethod(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found); + JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found); static JsonPathExecResult appendBoolResult(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonValueList *found, JsonPathBool res); + JsonPathItem *jsp, JsonValueList *found, JsonPathBool res); static void getJsonPathItem(JsonPathExecContext *cxt, JsonPathItem *item, - JsonbValue *value); + JsonbValue *value); static void getJsonPathVariable(JsonPathExecContext *cxt, - JsonPathItem *variable, Jsonb *vars, JsonbValue *value); + JsonPathItem *variable, Jsonb *vars, JsonbValue *value); static int JsonbArraySize(JsonbValue *jb); static JsonPathBool executeComparison(JsonPathItem *cmp, JsonbValue *lv, - JsonbValue *rv, void *p); + JsonbValue *rv, void *p); static JsonPathBool compareItems(int32 op, JsonbValue *jb1, JsonbValue *jb2); static int compareNumeric(Numeric a, Numeric b); static JsonbValue *copyJsonbValue(JsonbValue *src); static JsonPathExecResult getArrayIndex(JsonPathExecContext *cxt, - JsonPathItem *jsp, JsonbValue *jb, int32 *index); + JsonPathItem *jsp, JsonbValue *jb, int32 *index); static JsonBaseObjectInfo setBaseObject(JsonPathExecContext *cxt, - JsonbValue *jbv, int32 id); + JsonbValue *jbv, int32 id); static void JsonValueListAppend(JsonValueList *jvl, JsonbValue *jbv); static int JsonValueListLength(const JsonValueList *jvl); static bool JsonValueListIsEmpty(JsonValueList *jvl); static JsonbValue *JsonValueListHead(JsonValueList *jvl); static List *JsonValueListGetList(JsonValueList *jvl); static void JsonValueListInitIterator(const JsonValueList *jvl, - JsonValueListIterator *it); + JsonValueListIterator *it); static JsonbValue *JsonValueListNext(const JsonValueList *jvl, - JsonValueListIterator *it); + JsonValueListIterator *it); static int JsonbType(JsonbValue *jb); static JsonbValue *JsonbInitBinary(JsonbValue *jbv, Jsonb *jb); static int JsonbType(JsonbValue *jb); diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c index f4dfc504d6e..69beaf2ab50 100644 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@ -31,19 +31,19 @@ #define LIKE_ABORT (-1) -static int SB_MatchText(const char *t, int tlen, const char *p, int plen, - pg_locale_t locale, bool locale_is_c); +static int SB_MatchText(const char *t, int tlen, const char *p, int plen, + pg_locale_t locale, bool locale_is_c); static text *SB_do_like_escape(text *, text *); -static int MB_MatchText(const char *t, int tlen, const char *p, int plen, - pg_locale_t locale, bool locale_is_c); +static int MB_MatchText(const char *t, int tlen, const char *p, int plen, + pg_locale_t locale, bool locale_is_c); static text *MB_do_like_escape(text *, text *); -static int UTF8_MatchText(const char *t, int tlen, const char *p, int plen, - pg_locale_t locale, bool locale_is_c); +static int UTF8_MatchText(const char *t, int tlen, const char *p, int plen, + pg_locale_t locale, bool locale_is_c); -static int SB_IMatchText(const char *t, int tlen, const char *p, int plen, - pg_locale_t locale, bool locale_is_c); +static int SB_IMatchText(const char *t, int tlen, const char *p, int plen, + pg_locale_t locale, bool locale_is_c); static int GenericMatchText(const char *s, int slen, const char *p, int plen, Oid collation); static int Generic_Text_IC_like(text *str, text *pat, Oid collation); diff --git a/src/backend/utils/adt/like_support.c b/src/backend/utils/adt/like_support.c index e2583bc680a..26e06348338 100644 --- a/src/backend/utils/adt/like_support.c +++ b/src/backend/utils/adt/like_support.c @@ -70,36 +70,36 @@ typedef enum static Node *like_regex_support(Node *rawreq, Pattern_Type ptype); static List *match_pattern_prefix(Node *leftop, - Node *rightop, - Pattern_Type ptype, - Oid expr_coll, - Oid opfamily, - Oid indexcollation); + Node *rightop, + Pattern_Type ptype, + Oid expr_coll, + Oid opfamily, + Oid indexcollation); static double patternsel_common(PlannerInfo *root, - Oid oprid, - Oid opfuncid, - List *args, - int varRelid, - Oid collation, - Pattern_Type ptype, - bool negate); + Oid oprid, + Oid opfuncid, + List *args, + int varRelid, + Oid collation, + Pattern_Type ptype, + bool negate); static Pattern_Prefix_Status pattern_fixed_prefix(Const *patt, - Pattern_Type ptype, - Oid collation, - Const **prefix, - Selectivity *rest_selec); + Pattern_Type ptype, + Oid collation, + Const **prefix, + Selectivity *rest_selec); static Selectivity prefix_selectivity(PlannerInfo *root, - VariableStatData *vardata, - Oid vartype, Oid opfamily, Const *prefixcon); + VariableStatData *vardata, + Oid vartype, Oid opfamily, Const *prefixcon); static Selectivity like_selectivity(const char *patt, int pattlen, - bool case_insensitive); + bool case_insensitive); static Selectivity regex_selectivity(const char *patt, int pattlen, - bool case_insensitive, - int fixed_prefix_len); -static int pattern_char_isalpha(char c, bool is_multibyte, - pg_locale_t locale, bool locale_is_c); + bool case_insensitive, + int fixed_prefix_len); +static int pattern_char_isalpha(char c, bool is_multibyte, + pg_locale_t locale, bool locale_is_c); static Const *make_greater_string(const Const *str_const, FmgrInfo *ltproc, - Oid collation); + Oid collation); static Datum string_to_datum(const char *str, Oid datatype); static Const *string_to_const(const char *str, Oid datatype); static Const *string_to_bytea_const(const char *str, size_t str_len); diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c index db9dfcbb7dc..5e980cf23f0 100644 --- a/src/backend/utils/adt/network.c +++ b/src/backend/utils/adt/network.c @@ -31,14 +31,14 @@ static int32 network_cmp_internal(inet *a1, inet *a2); static List *match_network_function(Node *leftop, - Node *rightop, - int indexarg, - Oid funcid, - Oid opfamily); + Node *rightop, + int indexarg, + Oid funcid, + Oid opfamily); static List *match_network_subset(Node *leftop, - Node *rightop, - bool is_eq, - Oid opfamily); + Node *rightop, + bool is_eq, + Oid opfamily); static bool addressOK(unsigned char *a, int bits, int family); static inet *internal_inetpl(inet *ip, int64 addend); diff --git a/src/backend/utils/adt/network_selfuncs.c b/src/backend/utils/adt/network_selfuncs.c index 8268ab29005..5e0f0614ee8 100644 --- a/src/backend/utils/adt/network_selfuncs.c +++ b/src/backend/utils/adt/network_selfuncs.c @@ -44,33 +44,33 @@ #define MAX_CONSIDERED_ELEMS 1024 static Selectivity networkjoinsel_inner(Oid operator, - VariableStatData *vardata1, VariableStatData *vardata2); + VariableStatData *vardata1, VariableStatData *vardata2); static Selectivity networkjoinsel_semi(Oid operator, - VariableStatData *vardata1, VariableStatData *vardata2); + VariableStatData *vardata1, VariableStatData *vardata2); static Selectivity mcv_population(float4 *mcv_numbers, int mcv_nvalues); static Selectivity inet_hist_value_sel(Datum *values, int nvalues, - Datum constvalue, int opr_codenum); + Datum constvalue, int opr_codenum); static Selectivity inet_mcv_join_sel(Datum *mcv1_values, - float4 *mcv1_numbers, int mcv1_nvalues, Datum *mcv2_values, - float4 *mcv2_numbers, int mcv2_nvalues, Oid operator); + float4 *mcv1_numbers, int mcv1_nvalues, Datum *mcv2_values, + float4 *mcv2_numbers, int mcv2_nvalues, Oid operator); static Selectivity inet_mcv_hist_sel(Datum *mcv_values, float4 *mcv_numbers, - int mcv_nvalues, Datum *hist_values, int hist_nvalues, - int opr_codenum); + int mcv_nvalues, Datum *hist_values, int hist_nvalues, + int opr_codenum); static Selectivity inet_hist_inclusion_join_sel(Datum *hist1_values, - int hist1_nvalues, - Datum *hist2_values, int hist2_nvalues, - int opr_codenum); + int hist1_nvalues, + Datum *hist2_values, int hist2_nvalues, + int opr_codenum); static Selectivity inet_semi_join_sel(Datum lhs_value, - bool mcv_exists, Datum *mcv_values, int mcv_nvalues, - bool hist_exists, Datum *hist_values, int hist_nvalues, - double hist_weight, - FmgrInfo *proc, int opr_codenum); + bool mcv_exists, Datum *mcv_values, int mcv_nvalues, + bool hist_exists, Datum *hist_values, int hist_nvalues, + double hist_weight, + FmgrInfo *proc, int opr_codenum); static int inet_opr_codenum(Oid operator); static int inet_inclusion_cmp(inet *left, inet *right, int opr_codenum); -static int inet_masklen_inclusion_cmp(inet *left, inet *right, - int opr_codenum); -static int inet_hist_match_divider(inet *boundary, inet *query, - int opr_codenum); +static int inet_masklen_inclusion_cmp(inet *left, inet *right, + int opr_codenum); +static int inet_hist_match_divider(inet *boundary, inet *query, + int opr_codenum); /* * Selectivity estimation for the subnet inclusion/overlap operators diff --git a/src/backend/utils/adt/network_spgist.c b/src/backend/utils/adt/network_spgist.c index fe477441b62..b1e268a4143 100644 --- a/src/backend/utils/adt/network_spgist.c +++ b/src/backend/utils/adt/network_spgist.c @@ -40,8 +40,8 @@ static int inet_spg_node_number(const inet *val, int commonbits); -static int inet_spg_consistent_bitmap(const inet *prefix, int nkeys, - ScanKey scankeys, bool leaf); +static int inet_spg_consistent_bitmap(const inet *prefix, int nkeys, + ScanKey scankeys, bool leaf); /* * The SP-GiST configuration function diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index fbc2863622e..201784bbf66 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -467,7 +467,7 @@ static void free_var(NumericVar *var); static void zero_var(NumericVar *var); static const char *set_var_from_str(const char *str, const char *cp, - NumericVar *dest); + NumericVar *dest); static void set_var_from_num(Numeric value, NumericVar *dest); static void init_var_from_num(Numeric num, NumericVar *dest); static void set_var_from_var(const NumericVar *value, NumericVar *dest); @@ -495,29 +495,29 @@ static int numeric_fast_cmp(Datum x, Datum y, SortSupport ssup); static int numeric_cmp_abbrev(Datum x, Datum y, SortSupport ssup); static Datum numeric_abbrev_convert_var(const NumericVar *var, - NumericSortSupport *nss); + NumericSortSupport *nss); static int cmp_numerics(Numeric num1, Numeric num2); static int cmp_var(const NumericVar *var1, const NumericVar *var2); -static int cmp_var_common(const NumericDigit *var1digits, int var1ndigits, - int var1weight, int var1sign, - const NumericDigit *var2digits, int var2ndigits, - int var2weight, int var2sign); +static int cmp_var_common(const NumericDigit *var1digits, int var1ndigits, + int var1weight, int var1sign, + const NumericDigit *var2digits, int var2ndigits, + int var2weight, int var2sign); static void add_var(const NumericVar *var1, const NumericVar *var2, - NumericVar *result); + NumericVar *result); static void sub_var(const NumericVar *var1, const NumericVar *var2, - NumericVar *result); + NumericVar *result); static void mul_var(const NumericVar *var1, const NumericVar *var2, - NumericVar *result, - int rscale); + NumericVar *result, + int rscale); static void div_var(const NumericVar *var1, const NumericVar *var2, - NumericVar *result, - int rscale, bool round); + NumericVar *result, + int rscale, bool round); static void div_var_fast(const NumericVar *var1, const NumericVar *var2, - NumericVar *result, int rscale, bool round); + NumericVar *result, int rscale, bool round); static int select_div_scale(const NumericVar *var1, const NumericVar *var2); static void mod_var(const NumericVar *var1, const NumericVar *var2, - NumericVar *result); + NumericVar *result); static void ceil_var(const NumericVar *var, NumericVar *result); static void floor_var(const NumericVar *var, NumericVar *result); @@ -526,26 +526,26 @@ static void exp_var(const NumericVar *arg, NumericVar *result, int rscale); static int estimate_ln_dweight(const NumericVar *var); static void ln_var(const NumericVar *arg, NumericVar *result, int rscale); static void log_var(const NumericVar *base, const NumericVar *num, - NumericVar *result); + NumericVar *result); static void power_var(const NumericVar *base, const NumericVar *exp, - NumericVar *result); + NumericVar *result); static void power_var_int(const NumericVar *base, int exp, NumericVar *result, - int rscale); + int rscale); static int cmp_abs(const NumericVar *var1, const NumericVar *var2); -static int cmp_abs_common(const NumericDigit *var1digits, int var1ndigits, - int var1weight, - const NumericDigit *var2digits, int var2ndigits, - int var2weight); +static int cmp_abs_common(const NumericDigit *var1digits, int var1ndigits, + int var1weight, + const NumericDigit *var2digits, int var2ndigits, + int var2weight); static void add_abs(const NumericVar *var1, const NumericVar *var2, - NumericVar *result); + NumericVar *result); static void sub_abs(const NumericVar *var1, const NumericVar *var2, - NumericVar *result); + NumericVar *result); static void round_var(NumericVar *var, int rscale); static void trunc_var(NumericVar *var, int rscale); static void strip_var(NumericVar *var); static void compute_bucket(Numeric operand, Numeric bound1, Numeric bound2, - const NumericVar *count_var, NumericVar *result_var); + const NumericVar *count_var, NumericVar *result_var); static void accum_sum_add(NumericSumAccum *accum, const NumericVar *var1); static void accum_sum_rescale(NumericSumAccum *accum, const NumericVar *val); diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c index 9d01e0be9c5..f78f5cda53e 100644 --- a/src/backend/utils/adt/oracle_compat.c +++ b/src/backend/utils/adt/oracle_compat.c @@ -22,8 +22,8 @@ static text *dotrim(const char *string, int stringlen, - const char *set, int setlen, - bool doltrim, bool dortrim); + const char *set, int setlen, + bool doltrim, bool dortrim); /******************************************************************** diff --git a/src/backend/utils/adt/rangetypes.c b/src/backend/utils/adt/rangetypes.c index 72c450c70ee..cb16d701d8e 100644 --- a/src/backend/utils/adt/rangetypes.c +++ b/src/backend/utils/adt/rangetypes.c @@ -56,19 +56,19 @@ typedef struct RangeIOData static RangeIOData *get_range_io_data(FunctionCallInfo fcinfo, Oid rngtypid, - IOFuncSelector func); + IOFuncSelector func); static char range_parse_flags(const char *flags_str); static void range_parse(const char *input_str, char *flags, char **lbound_str, - char **ubound_str); + char **ubound_str); static const char *range_parse_bound(const char *string, const char *ptr, - char **bound_str, bool *infinite); + char **bound_str, bool *infinite); static char *range_deparse(char flags, const char *lbound_str, - const char *ubound_str); + const char *ubound_str); static char *range_bound_escape(const char *value); static Size datum_compute_size(Size sz, Datum datum, bool typbyval, - char typalign, int16 typlen, char typstorage); + char typalign, int16 typlen, char typstorage); static Pointer datum_write(Pointer ptr, Datum datum, bool typbyval, - char typalign, int16 typlen, char typstorage); + char typalign, int16 typlen, char typstorage); /* diff --git a/src/backend/utils/adt/rangetypes_gist.c b/src/backend/utils/adt/rangetypes_gist.c index ea6c76d3647..6f93ce64dab 100644 --- a/src/backend/utils/adt/rangetypes_gist.c +++ b/src/backend/utils/adt/rangetypes_gist.c @@ -135,37 +135,37 @@ typedef struct false, -1))) static RangeType *range_super_union(TypeCacheEntry *typcache, RangeType *r1, - RangeType *r2); + RangeType *r2); static bool range_gist_consistent_int(TypeCacheEntry *typcache, - StrategyNumber strategy, RangeType *key, - Datum query); + StrategyNumber strategy, RangeType *key, + Datum query); static bool range_gist_consistent_leaf(TypeCacheEntry *typcache, - StrategyNumber strategy, RangeType *key, - Datum query); + StrategyNumber strategy, RangeType *key, + Datum query); static void range_gist_fallback_split(TypeCacheEntry *typcache, - GistEntryVector *entryvec, - GIST_SPLITVEC *v); + GistEntryVector *entryvec, + GIST_SPLITVEC *v); static void range_gist_class_split(TypeCacheEntry *typcache, - GistEntryVector *entryvec, - GIST_SPLITVEC *v, - SplitLR *classes_groups); + GistEntryVector *entryvec, + GIST_SPLITVEC *v, + SplitLR *classes_groups); static void range_gist_single_sorting_split(TypeCacheEntry *typcache, - GistEntryVector *entryvec, - GIST_SPLITVEC *v, - bool use_upper_bound); + GistEntryVector *entryvec, + GIST_SPLITVEC *v, + bool use_upper_bound); static void range_gist_double_sorting_split(TypeCacheEntry *typcache, - GistEntryVector *entryvec, - GIST_SPLITVEC *v); + GistEntryVector *entryvec, + GIST_SPLITVEC *v); static void range_gist_consider_split(ConsiderSplitContext *context, - RangeBound *right_lower, int min_left_count, - RangeBound *left_upper, int max_left_count); + RangeBound *right_lower, int min_left_count, + RangeBound *left_upper, int max_left_count); static int get_gist_range_class(RangeType *range); static int single_bound_cmp(const void *a, const void *b, void *arg); static int interval_cmp_lower(const void *a, const void *b, void *arg); static int interval_cmp_upper(const void *a, const void *b, void *arg); static int common_entry_cmp(const void *i1, const void *i2); static float8 call_subtype_diff(TypeCacheEntry *typcache, - Datum val1, Datum val2); + Datum val1, Datum val2); /* GiST query consistency check */ diff --git a/src/backend/utils/adt/rangetypes_selfuncs.c b/src/backend/utils/adt/rangetypes_selfuncs.c index 0273f7900f6..640c7f0bc6a 100644 --- a/src/backend/utils/adt/rangetypes_selfuncs.c +++ b/src/backend/utils/adt/rangetypes_selfuncs.c @@ -31,34 +31,34 @@ #include "utils/typcache.h" static double calc_rangesel(TypeCacheEntry *typcache, VariableStatData *vardata, - RangeType *constval, Oid operator); + RangeType *constval, Oid operator); static double default_range_selectivity(Oid operator); static double calc_hist_selectivity(TypeCacheEntry *typcache, - VariableStatData *vardata, RangeType *constval, - Oid operator); + VariableStatData *vardata, RangeType *constval, + Oid operator); static double calc_hist_selectivity_scalar(TypeCacheEntry *typcache, - RangeBound *constbound, - RangeBound *hist, int hist_nvalues, - bool equal); -static int rbound_bsearch(TypeCacheEntry *typcache, RangeBound *value, - RangeBound *hist, int hist_length, bool equal); + RangeBound *constbound, + RangeBound *hist, int hist_nvalues, + bool equal); +static int rbound_bsearch(TypeCacheEntry *typcache, RangeBound *value, + RangeBound *hist, int hist_length, bool equal); static float8 get_position(TypeCacheEntry *typcache, RangeBound *value, - RangeBound *hist1, RangeBound *hist2); + RangeBound *hist1, RangeBound *hist2); static float8 get_len_position(double value, double hist1, double hist2); static float8 get_distance(TypeCacheEntry *typcache, RangeBound *bound1, - RangeBound *bound2); -static int length_hist_bsearch(Datum *length_hist_values, - int length_hist_nvalues, double value, bool equal); + RangeBound *bound2); +static int length_hist_bsearch(Datum *length_hist_values, + int length_hist_nvalues, double value, bool equal); static double calc_length_hist_frac(Datum *length_hist_values, - int length_hist_nvalues, double length1, double length2, bool equal); + int length_hist_nvalues, double length1, double length2, bool equal); static double calc_hist_selectivity_contained(TypeCacheEntry *typcache, - RangeBound *lower, RangeBound *upper, - RangeBound *hist_lower, int hist_nvalues, - Datum *length_hist_values, int length_hist_nvalues); + RangeBound *lower, RangeBound *upper, + RangeBound *hist_lower, int hist_nvalues, + Datum *length_hist_values, int length_hist_nvalues); static double calc_hist_selectivity_contains(TypeCacheEntry *typcache, - RangeBound *lower, RangeBound *upper, - RangeBound *hist_lower, int hist_nvalues, - Datum *length_hist_values, int length_hist_nvalues); + RangeBound *lower, RangeBound *upper, + RangeBound *hist_lower, int hist_nvalues, + Datum *length_hist_values, int length_hist_nvalues); /* * Returns a default selectivity estimate for given operator, when we don't diff --git a/src/backend/utils/adt/rangetypes_spgist.c b/src/backend/utils/adt/rangetypes_spgist.c index f0ef39ea090..8bb730ce8e5 100644 --- a/src/backend/utils/adt/rangetypes_spgist.c +++ b/src/backend/utils/adt/rangetypes_spgist.c @@ -44,14 +44,14 @@ #include "utils/rangetypes.h" static int16 getQuadrant(TypeCacheEntry *typcache, RangeType *centroid, - RangeType *tst); + RangeType *tst); static int bound_cmp(const void *a, const void *b, void *arg); -static int adjacent_inner_consistent(TypeCacheEntry *typcache, - RangeBound *arg, RangeBound *centroid, - RangeBound *prev); -static int adjacent_cmp_bounds(TypeCacheEntry *typcache, RangeBound *arg, - RangeBound *centroid); +static int adjacent_inner_consistent(TypeCacheEntry *typcache, + RangeBound *arg, RangeBound *centroid, + RangeBound *prev); +static int adjacent_cmp_bounds(TypeCacheEntry *typcache, RangeBound *arg, + RangeBound *centroid); /* * SP-GiST 'config' interface function. diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c index 4d7474047ce..631e4210626 100644 --- a/src/backend/utils/adt/rangetypes_typanalyze.c +++ b/src/backend/utils/adt/rangetypes_typanalyze.c @@ -34,7 +34,7 @@ static int float8_qsort_cmp(const void *a1, const void *a2); static int range_bound_qsort_cmp(const void *a1, const void *a2, void *arg); static void compute_range_stats(VacAttrStats *stats, - AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows); + AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows); /* * range_typanalyze -- typanalyze function for range columns diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c index 00a9a33eccc..90a9197792e 100644 --- a/src/backend/utils/adt/regexp.c +++ b/src/backend/utils/adt/regexp.c @@ -112,11 +112,11 @@ static cached_re_str re_array[MAX_CACHED_RES]; /* cached re's */ /* Local functions */ static regexp_matches_ctx *setup_regexp_matches(text *orig_str, text *pattern, - pg_re_flags *flags, - Oid collation, - bool use_subpatterns, - bool ignore_degenerate, - bool fetching_unmatched); + pg_re_flags *flags, + Oid collation, + bool use_subpatterns, + bool ignore_degenerate, + bool fetching_unmatched); static ArrayType *build_regexp_match_result(regexp_matches_ctx *matchctx); static Datum build_regexp_split_result(regexp_matches_ctx *splitctx); diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index 09cf0e1abc5..17a7f6c9d83 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -43,7 +43,7 @@ static char *format_operator_internal(Oid operator_oid, bool force_qualify); static char *format_procedure_internal(Oid procedure_oid, bool force_qualify); static void parseNameAndArgTypes(const char *string, bool allowNone, - List **names, int *nargs, Oid *argtypes); + List **names, int *nargs, Oid *argtypes); /***************************************************************************** diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index b9e0f5c048d..44a6eef5bbf 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -175,27 +175,27 @@ static int ri_constraint_cache_valid_count = 0; * Local function prototypes */ static bool ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel, - TupleTableSlot *oldslot, - const RI_ConstraintInfo *riinfo); + TupleTableSlot *oldslot, + const RI_ConstraintInfo *riinfo); static Datum ri_restrict(TriggerData *trigdata, bool is_no_action); static Datum ri_set(TriggerData *trigdata, bool is_set_null); static void quoteOneName(char *buffer, const char *name); static void quoteRelationName(char *buffer, Relation rel); static void ri_GenerateQual(StringInfo buf, - const char *sep, - const char *leftop, Oid leftoptype, - Oid opoid, - const char *rightop, Oid rightoptype); + const char *sep, + const char *leftop, Oid leftoptype, + Oid opoid, + const char *rightop, Oid rightoptype); static void ri_GenerateQualCollation(StringInfo buf, Oid collation); -static int ri_NullCheck(TupleDesc tupdesc, TupleTableSlot *slot, - const RI_ConstraintInfo *riinfo, bool rel_is_pk); +static int ri_NullCheck(TupleDesc tupdesc, TupleTableSlot *slot, + const RI_ConstraintInfo *riinfo, bool rel_is_pk); static void ri_BuildQueryKey(RI_QueryKey *key, - const RI_ConstraintInfo *riinfo, - int32 constr_queryno); + const RI_ConstraintInfo *riinfo, + int32 constr_queryno); static bool ri_KeysEqual(Relation rel, TupleTableSlot *oldslot, TupleTableSlot *newslot, - const RI_ConstraintInfo *riinfo, bool rel_is_pk); + const RI_ConstraintInfo *riinfo, bool rel_is_pk); static bool ri_AttributesEqual(Oid eq_opr, Oid typeid, - Datum oldvalue, Datum newvalue); + Datum oldvalue, Datum newvalue); static void ri_InitHashTables(void); static void InvalidateConstraintCacheCallBack(Datum arg, int cacheid, uint32 hashvalue); @@ -204,25 +204,25 @@ static void ri_HashPreparedPlan(RI_QueryKey *key, SPIPlanPtr plan); static RI_CompareHashEntry *ri_HashCompareOp(Oid eq_opr, Oid typeid); static void ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, - int tgkind); + int tgkind); static const RI_ConstraintInfo *ri_FetchConstraintInfo(Trigger *trigger, - Relation trig_rel, bool rel_is_pk); + Relation trig_rel, bool rel_is_pk); static const RI_ConstraintInfo *ri_LoadConstraintInfo(Oid constraintOid); static SPIPlanPtr ri_PlanCheck(const char *querystr, int nargs, Oid *argtypes, - RI_QueryKey *qkey, Relation fk_rel, Relation pk_rel, - bool cache_plan); + RI_QueryKey *qkey, Relation fk_rel, Relation pk_rel, + bool cache_plan); static bool ri_PerformCheck(const RI_ConstraintInfo *riinfo, - RI_QueryKey *qkey, SPIPlanPtr qplan, - Relation fk_rel, Relation pk_rel, - TupleTableSlot *oldslot, TupleTableSlot *newslot, - bool detectNewRows, int expect_OK); + RI_QueryKey *qkey, SPIPlanPtr qplan, + Relation fk_rel, Relation pk_rel, + TupleTableSlot *oldslot, TupleTableSlot *newslot, + bool detectNewRows, int expect_OK); static void ri_ExtractValues(Relation rel, TupleTableSlot *slot, - const RI_ConstraintInfo *riinfo, bool rel_is_pk, - Datum *vals, char *nulls); + const RI_ConstraintInfo *riinfo, bool rel_is_pk, + Datum *vals, char *nulls); static void ri_ReportViolation(const RI_ConstraintInfo *riinfo, - Relation pk_rel, Relation fk_rel, - TupleTableSlot *violatorslot, TupleDesc tupdesc, - int queryno, bool partgone) pg_attribute_noreturn(); + Relation pk_rel, Relation fk_rel, + TupleTableSlot *violatorslot, TupleDesc tupdesc, + int queryno, bool partgone) pg_attribute_noreturn(); /* diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index f911511158d..9dda4820afd 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -311,159 +311,159 @@ bool quote_all_identifiers = false; * ---------- */ static char *deparse_expression_pretty(Node *expr, List *dpcontext, - bool forceprefix, bool showimplicit, - int prettyFlags, int startIndent); + bool forceprefix, bool showimplicit, + int prettyFlags, int startIndent); static char *pg_get_viewdef_worker(Oid viewoid, - int prettyFlags, int wrapColumn); + int prettyFlags, int wrapColumn); static char *pg_get_triggerdef_worker(Oid trigid, bool pretty); -static int decompile_column_index_array(Datum column_index_array, Oid relId, - StringInfo buf); +static int decompile_column_index_array(Datum column_index_array, Oid relId, + StringInfo buf); static char *pg_get_ruledef_worker(Oid ruleoid, int prettyFlags); static char *pg_get_indexdef_worker(Oid indexrelid, int colno, - const Oid *excludeOps, - bool attrsOnly, bool keysOnly, - bool showTblSpc, bool inherits, - int prettyFlags, bool missing_ok); + const Oid *excludeOps, + bool attrsOnly, bool keysOnly, + bool showTblSpc, bool inherits, + int prettyFlags, bool missing_ok); static char *pg_get_statisticsobj_worker(Oid statextid, bool missing_ok); static char *pg_get_partkeydef_worker(Oid relid, int prettyFlags, - bool attrsOnly, bool missing_ok); + bool attrsOnly, bool missing_ok); static char *pg_get_constraintdef_worker(Oid constraintId, bool fullCommand, - int prettyFlags, bool missing_ok); + int prettyFlags, bool missing_ok); static text *pg_get_expr_worker(text *expr, Oid relid, const char *relname, - int prettyFlags); -static int print_function_arguments(StringInfo buf, HeapTuple proctup, - bool print_table_args, bool print_defaults); + int prettyFlags); +static int print_function_arguments(StringInfo buf, HeapTuple proctup, + bool print_table_args, bool print_defaults); static void print_function_rettype(StringInfo buf, HeapTuple proctup); static void print_function_trftypes(StringInfo buf, HeapTuple proctup); static void set_rtable_names(deparse_namespace *dpns, List *parent_namespaces, - Bitmapset *rels_used); + Bitmapset *rels_used); static void set_deparse_for_query(deparse_namespace *dpns, Query *query, - List *parent_namespaces); + List *parent_namespaces); static void set_simple_column_names(deparse_namespace *dpns); static bool has_dangerous_join_using(deparse_namespace *dpns, Node *jtnode); static void set_using_names(deparse_namespace *dpns, Node *jtnode, - List *parentUsing); + List *parentUsing); static void set_relation_column_names(deparse_namespace *dpns, - RangeTblEntry *rte, - deparse_columns *colinfo); + RangeTblEntry *rte, + deparse_columns *colinfo); static void set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte, - deparse_columns *colinfo); + deparse_columns *colinfo); static bool colname_is_unique(const char *colname, deparse_namespace *dpns, - deparse_columns *colinfo); + deparse_columns *colinfo); static char *make_colname_unique(char *colname, deparse_namespace *dpns, - deparse_columns *colinfo); + deparse_columns *colinfo); static void expand_colnames_array_to(deparse_columns *colinfo, int n); static void identify_join_columns(JoinExpr *j, RangeTblEntry *jrte, - deparse_columns *colinfo); + deparse_columns *colinfo); static void flatten_join_using_qual(Node *qual, - List **leftvars, List **rightvars); + List **leftvars, List **rightvars); static char *get_rtable_name(int rtindex, deparse_context *context); static void set_deparse_planstate(deparse_namespace *dpns, PlanState *ps); static void push_child_plan(deparse_namespace *dpns, PlanState *ps, - deparse_namespace *save_dpns); + deparse_namespace *save_dpns); static void pop_child_plan(deparse_namespace *dpns, - deparse_namespace *save_dpns); + deparse_namespace *save_dpns); static void push_ancestor_plan(deparse_namespace *dpns, ListCell *ancestor_cell, - deparse_namespace *save_dpns); + deparse_namespace *save_dpns); static void pop_ancestor_plan(deparse_namespace *dpns, - deparse_namespace *save_dpns); + deparse_namespace *save_dpns); static void make_ruledef(StringInfo buf, HeapTuple ruletup, TupleDesc rulettc, - int prettyFlags); + int prettyFlags); static void make_viewdef(StringInfo buf, HeapTuple ruletup, TupleDesc rulettc, - int prettyFlags, int wrapColumn); + int prettyFlags, int wrapColumn); static void get_query_def(Query *query, StringInfo buf, List *parentnamespace, - TupleDesc resultDesc, - int prettyFlags, int wrapColumn, int startIndent); + TupleDesc resultDesc, + int prettyFlags, int wrapColumn, int startIndent); static void get_values_def(List *values_lists, deparse_context *context); static void get_with_clause(Query *query, deparse_context *context); static void get_select_query_def(Query *query, deparse_context *context, - TupleDesc resultDesc); + TupleDesc resultDesc); static void get_insert_query_def(Query *query, deparse_context *context); static void get_update_query_def(Query *query, deparse_context *context); static void get_update_query_targetlist_def(Query *query, List *targetList, - deparse_context *context, - RangeTblEntry *rte); + deparse_context *context, + RangeTblEntry *rte); static void get_delete_query_def(Query *query, deparse_context *context); static void get_utility_query_def(Query *query, deparse_context *context); static void get_basic_select_query(Query *query, deparse_context *context, - TupleDesc resultDesc); + TupleDesc resultDesc); static void get_target_list(List *targetList, deparse_context *context, - TupleDesc resultDesc); + TupleDesc resultDesc); static void get_setop_query(Node *setOp, Query *query, - deparse_context *context, - TupleDesc resultDesc); + deparse_context *context, + TupleDesc resultDesc); static Node *get_rule_sortgroupclause(Index ref, List *tlist, - bool force_colno, - deparse_context *context); + bool force_colno, + deparse_context *context); static void get_rule_groupingset(GroupingSet *gset, List *targetlist, - bool omit_parens, deparse_context *context); + bool omit_parens, deparse_context *context); static void get_rule_orderby(List *orderList, List *targetList, - bool force_colno, deparse_context *context); + bool force_colno, deparse_context *context); static void get_rule_windowclause(Query *query, deparse_context *context); static void get_rule_windowspec(WindowClause *wc, List *targetList, - deparse_context *context); + deparse_context *context); static char *get_variable(Var *var, int levelsup, bool istoplevel, - deparse_context *context); + deparse_context *context); static void get_special_variable(Node *node, deparse_context *context, - void *private); + void *private); static void resolve_special_varno(Node *node, deparse_context *context, - void *private, - void (*callback) (Node *, deparse_context *, void *)); + void *private, + void (*callback) (Node *, deparse_context *, void *)); static Node *find_param_referent(Param *param, deparse_context *context, - deparse_namespace **dpns_p, ListCell **ancestor_cell_p); + deparse_namespace **dpns_p, ListCell **ancestor_cell_p); static void get_parameter(Param *param, deparse_context *context); static const char *get_simple_binary_op_name(OpExpr *expr); static bool isSimpleNode(Node *node, Node *parentNode, int prettyFlags); static void appendContextKeyword(deparse_context *context, const char *str, - int indentBefore, int indentAfter, int indentPlus); + int indentBefore, int indentAfter, int indentPlus); static void removeStringInfoSpaces(StringInfo str); static void get_rule_expr(Node *node, deparse_context *context, - bool showimplicit); + bool showimplicit); static void get_rule_expr_toplevel(Node *node, deparse_context *context, - bool showimplicit); + bool showimplicit); static void get_rule_expr_funccall(Node *node, deparse_context *context, - bool showimplicit); + bool showimplicit); static bool looks_like_function(Node *node); static void get_oper_expr(OpExpr *expr, deparse_context *context); static void get_func_expr(FuncExpr *expr, deparse_context *context, - bool showimplicit); + bool showimplicit); static void get_agg_expr(Aggref *aggref, deparse_context *context, - Aggref *original_aggref); + Aggref *original_aggref); static void get_agg_combine_expr(Node *node, deparse_context *context, - void *private); + void *private); static void get_windowfunc_expr(WindowFunc *wfunc, deparse_context *context); static void get_coercion_expr(Node *arg, deparse_context *context, - Oid resulttype, int32 resulttypmod, - Node *parentNode); + Oid resulttype, int32 resulttypmod, + Node *parentNode); static void get_const_expr(Const *constval, deparse_context *context, - int showtype); + int showtype); static void get_const_collation(Const *constval, deparse_context *context); static void simple_quote_literal(StringInfo buf, const char *val); static void get_sublink_expr(SubLink *sublink, deparse_context *context); static void get_tablefunc(TableFunc *tf, deparse_context *context, - bool showimplicit); + bool showimplicit); static void get_from_clause(Query *query, const char *prefix, - deparse_context *context); + deparse_context *context); static void get_from_clause_item(Node *jtnode, Query *query, - deparse_context *context); + deparse_context *context); static void get_column_alias_list(deparse_columns *colinfo, - deparse_context *context); + deparse_context *context); static void get_from_clause_coldeflist(RangeTblFunction *rtfunc, - deparse_columns *colinfo, - deparse_context *context); + deparse_columns *colinfo, + deparse_context *context); static void get_tablesample_def(TableSampleClause *tablesample, - deparse_context *context); + deparse_context *context); static void get_opclass_name(Oid opclass, Oid actual_datatype, - StringInfo buf); + StringInfo buf); static Node *processIndirection(Node *node, deparse_context *context); static void printSubscripts(SubscriptingRef *sbsref, deparse_context *context); static char *get_relation_name(Oid relid); static char *generate_relation_name(Oid relid, List *namespaces); static char *generate_qualified_relation_name(Oid relid); static char *generate_function_name(Oid funcid, int nargs, - List *argnames, Oid *argtypes, - bool has_variadic, bool *use_variadic_p, - ParseExprKind special_exprkind); + List *argnames, Oid *argtypes, + bool has_variadic, bool *use_variadic_p, + ParseExprKind special_exprkind); static char *generate_operator_name(Oid operid, Oid arg1, Oid arg2); static void add_cast_to(StringInfo buf, Oid typid); static char *generate_qualified_type_name(Oid typid); diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 65fabb7f3b4..d7e3f09f1aa 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -149,55 +149,55 @@ get_index_stats_hook_type get_index_stats_hook = NULL; static double eqsel_internal(PG_FUNCTION_ARGS, bool negate); static double eqjoinsel_inner(Oid opfuncoid, - VariableStatData *vardata1, VariableStatData *vardata2, - double nd1, double nd2, - bool isdefault1, bool isdefault2, - AttStatsSlot *sslot1, AttStatsSlot *sslot2, - Form_pg_statistic stats1, Form_pg_statistic stats2, - bool have_mcvs1, bool have_mcvs2); + VariableStatData *vardata1, VariableStatData *vardata2, + double nd1, double nd2, + bool isdefault1, bool isdefault2, + AttStatsSlot *sslot1, AttStatsSlot *sslot2, + Form_pg_statistic stats1, Form_pg_statistic stats2, + bool have_mcvs1, bool have_mcvs2); static double eqjoinsel_semi(Oid opfuncoid, - VariableStatData *vardata1, VariableStatData *vardata2, - double nd1, double nd2, - bool isdefault1, bool isdefault2, - AttStatsSlot *sslot1, AttStatsSlot *sslot2, - Form_pg_statistic stats1, Form_pg_statistic stats2, - bool have_mcvs1, bool have_mcvs2, - RelOptInfo *inner_rel); + VariableStatData *vardata1, VariableStatData *vardata2, + double nd1, double nd2, + bool isdefault1, bool isdefault2, + AttStatsSlot *sslot1, AttStatsSlot *sslot2, + Form_pg_statistic stats1, Form_pg_statistic stats2, + bool have_mcvs1, bool have_mcvs2, + RelOptInfo *inner_rel); static bool estimate_multivariate_ndistinct(PlannerInfo *root, - RelOptInfo *rel, List **varinfos, double *ndistinct); + RelOptInfo *rel, List **varinfos, double *ndistinct); static bool convert_to_scalar(Datum value, Oid valuetypid, Oid collid, - double *scaledvalue, - Datum lobound, Datum hibound, Oid boundstypid, - double *scaledlobound, double *scaledhibound); + double *scaledvalue, + Datum lobound, Datum hibound, Oid boundstypid, + double *scaledlobound, double *scaledhibound); static double convert_numeric_to_scalar(Datum value, Oid typid, bool *failure); static void convert_string_to_scalar(char *value, - double *scaledvalue, - char *lobound, - double *scaledlobound, - char *hibound, - double *scaledhibound); + double *scaledvalue, + char *lobound, + double *scaledlobound, + char *hibound, + double *scaledhibound); static void convert_bytea_to_scalar(Datum value, - double *scaledvalue, - Datum lobound, - double *scaledlobound, - Datum hibound, - double *scaledhibound); + double *scaledvalue, + Datum lobound, + double *scaledlobound, + Datum hibound, + double *scaledhibound); static double convert_one_string_to_scalar(char *value, - int rangelo, int rangehi); + int rangelo, int rangehi); static double convert_one_bytea_to_scalar(unsigned char *value, int valuelen, - int rangelo, int rangehi); + int rangelo, int rangehi); static char *convert_string_datum(Datum value, Oid typid, Oid collid, - bool *failure); + bool *failure); static double convert_timevalue_to_scalar(Datum value, Oid typid, - bool *failure); + bool *failure); static void examine_simple_variable(PlannerInfo *root, Var *var, - VariableStatData *vardata); + VariableStatData *vardata); static bool get_variable_range(PlannerInfo *root, VariableStatData *vardata, - Oid sortop, Datum *min, Datum *max); + Oid sortop, Datum *min, Datum *max); static bool get_actual_variable_range(PlannerInfo *root, - VariableStatData *vardata, - Oid sortop, - Datum *min, Datum *max); + VariableStatData *vardata, + Oid sortop, + Datum *min, Datum *max); static RelOptInfo *find_join_input_rel(PlannerInfo *root, Relids relids); diff --git a/src/backend/utils/adt/varbit.c b/src/backend/utils/adt/varbit.c index fdcc62096cf..d969a5b9c23 100644 --- a/src/backend/utils/adt/varbit.c +++ b/src/backend/utils/adt/varbit.c @@ -29,7 +29,7 @@ static VarBit *bit_catenate(VarBit *arg1, VarBit *arg2); static VarBit *bitsubstring(VarBit *arg, int32 s, int32 l, - bool length_not_specified); + bool length_not_specified); static VarBit *bit_overlay(VarBit *t1, VarBit *t2, int sp, int sl); diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index e166effa5e5..0864838867f 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -118,9 +118,9 @@ static bool varstr_abbrev_abort(int memtupcount, SortSupport ssup); static int32 text_length(Datum str); static text *text_catenate(text *t1, text *t2); static text *text_substring(Datum str, - int32 start, - int32 length, - bool length_not_specified); + int32 start, + int32 length, + bool length_not_specified); static text *text_overlay(text *t1, text *t2, int sp, int sl); static int text_position(text *t1, text *t2, Oid collid); static void text_position_setup(text *t1, text *t2, Oid collid, TextPositionState *state); @@ -133,27 +133,27 @@ static void check_collation_set(Oid collid); static int text_cmp(text *arg1, text *arg2, Oid collid); static bytea *bytea_catenate(bytea *t1, bytea *t2); static bytea *bytea_substring(Datum str, - int S, - int L, - bool length_not_specified); + int S, + int L, + bool length_not_specified); static bytea *bytea_overlay(bytea *t1, bytea *t2, int sp, int sl); static void appendStringInfoText(StringInfo str, const text *t); static Datum text_to_array_internal(PG_FUNCTION_ARGS); static text *array_to_text_internal(FunctionCallInfo fcinfo, ArrayType *v, - const char *fldsep, const char *null_string); + const char *fldsep, const char *null_string); static StringInfo makeStringAggState(FunctionCallInfo fcinfo); static bool text_format_parse_digits(const char **ptr, const char *end_ptr, - int *value); + int *value); static const char *text_format_parse_format(const char *start_ptr, - const char *end_ptr, - int *argpos, int *widthpos, - int *flags, int *width); + const char *end_ptr, + int *argpos, int *widthpos, + int *flags, int *width); static void text_format_string_conversion(StringInfo buf, char conversion, - FmgrInfo *typOutputInfo, - Datum value, bool isNull, - int flags, int width); + FmgrInfo *typOutputInfo, + Datum value, bool isNull, + int flags, int width); static void text_format_append_string(StringInfo buf, const char *str, - int flags, int width); + int flags, int width); /***************************************************************************** diff --git a/src/backend/utils/adt/windowfuncs.c b/src/backend/utils/adt/windowfuncs.c index 650e140723a..aa177df017b 100644 --- a/src/backend/utils/adt/windowfuncs.c +++ b/src/backend/utils/adt/windowfuncs.c @@ -37,7 +37,7 @@ typedef struct static bool rank_up(WindowObject winobj); static Datum leadlag_common(FunctionCallInfo fcinfo, - bool forward, bool withoffset, bool withdefault); + bool forward, bool withoffset, bool withdefault); /* diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index 48b8034f8d0..d43c3055f3a 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -118,10 +118,10 @@ struct PgXmlErrorContext }; static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID, - xmlParserCtxtPtr ctxt); + xmlParserCtxtPtr ctxt); static void xml_errorHandler(void *data, xmlErrorPtr error); static void xml_ereport_by_code(int level, int sqlcode, - const char *msg, int errcode); + const char *msg, int errcode); static void chopStringInfoNewlines(StringInfo str); static void appendStringInfoLineSeparator(StringInfo str); @@ -137,41 +137,41 @@ static char *xml_pstrdup(const char *string); #endif /* USE_LIBXMLCONTEXT */ static xmlChar *xml_text2xmlChar(text *in); -static int parse_xml_decl(const xmlChar *str, size_t *lenp, - xmlChar **version, xmlChar **encoding, int *standalone); +static int parse_xml_decl(const xmlChar *str, size_t *lenp, + xmlChar **version, xmlChar **encoding, int *standalone); static bool print_xml_decl(StringInfo buf, const xmlChar *version, - pg_enc encoding, int standalone); + pg_enc encoding, int standalone); static bool xml_doctype_in_content(const xmlChar *str); static xmlDocPtr xml_parse(text *data, XmlOptionType xmloption_arg, - bool preserve_whitespace, int encoding); + bool preserve_whitespace, int encoding); static text *xml_xmlnodetoxmltype(xmlNodePtr cur, PgXmlErrorContext *xmlerrcxt); -static int xml_xpathobjtoxmlarray(xmlXPathObjectPtr xpathobj, - ArrayBuildState *astate, - PgXmlErrorContext *xmlerrcxt); +static int xml_xpathobjtoxmlarray(xmlXPathObjectPtr xpathobj, + ArrayBuildState *astate, + PgXmlErrorContext *xmlerrcxt); static xmlChar *pg_xmlCharStrndup(const char *str, size_t len); #endif /* USE_LIBXML */ static void xmldata_root_element_start(StringInfo result, const char *eltname, - const char *xmlschema, const char *targetns, - bool top_level); + const char *xmlschema, const char *targetns, + bool top_level); static void xmldata_root_element_end(StringInfo result, const char *eltname); static StringInfo query_to_xml_internal(const char *query, char *tablename, - const char *xmlschema, bool nulls, bool tableforest, - const char *targetns, bool top_level); + const char *xmlschema, bool nulls, bool tableforest, + const char *targetns, bool top_level); static const char *map_sql_table_to_xmlschema(TupleDesc tupdesc, Oid relid, - bool nulls, bool tableforest, const char *targetns); + bool nulls, bool tableforest, const char *targetns); static const char *map_sql_schema_to_xmlschema_types(Oid nspid, - List *relid_list, bool nulls, - bool tableforest, const char *targetns); + List *relid_list, bool nulls, + bool tableforest, const char *targetns); static const char *map_sql_catalog_to_xmlschema_types(List *nspid_list, - bool nulls, bool tableforest, - const char *targetns); + bool nulls, bool tableforest, + const char *targetns); static const char *map_sql_type_to_xml_name(Oid typeoid, int typmod); static const char *map_sql_typecoll_to_xmlschema_types(List *tupdesc_list); static const char *map_sql_type_to_xmlschema_type(Oid typeoid, int typmod); static void SPI_sql_row_to_xmlelement(uint64 rownum, StringInfo result, - char *tablename, bool nulls, bool tableforest, - const char *targetns, bool top_level); + char *tablename, bool nulls, bool tableforest, + const char *targetns, bool top_level); /* XMLTABLE support */ #ifdef USE_LIBXML @@ -195,13 +195,13 @@ typedef struct XmlTableBuilderData static void XmlTableInitOpaque(struct TableFuncScanState *state, int natts); static void XmlTableSetDocument(struct TableFuncScanState *state, Datum value); static void XmlTableSetNamespace(struct TableFuncScanState *state, const char *name, - const char *uri); + const char *uri); static void XmlTableSetRowFilter(struct TableFuncScanState *state, const char *path); static void XmlTableSetColumnFilter(struct TableFuncScanState *state, - const char *path, int colnum); + const char *path, int colnum); static bool XmlTableFetchRow(struct TableFuncScanState *state); static Datum XmlTableGetValue(struct TableFuncScanState *state, int colnum, - Oid typid, int32 typmod, bool *isnull); + Oid typid, int32 typmod, bool *isnull); static void XmlTableDestroyOpaque(struct TableFuncScanState *state); const TableFuncRoutine XmlTableRoutine = diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index d05930bc4cf..00def27881d 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -64,24 +64,24 @@ static CatCacheHeader *CacheHdr = NULL; static inline HeapTuple SearchCatCacheInternal(CatCache *cache, - int nkeys, - Datum v1, Datum v2, - Datum v3, Datum v4); + int nkeys, + Datum v1, Datum v2, + Datum v3, Datum v4); static pg_noinline HeapTuple SearchCatCacheMiss(CatCache *cache, - int nkeys, - uint32 hashValue, - Index hashIndex, - Datum v1, Datum v2, - Datum v3, Datum v4); + int nkeys, + uint32 hashValue, + Index hashIndex, + Datum v1, Datum v2, + Datum v3, Datum v4); static uint32 CatalogCacheComputeHashValue(CatCache *cache, int nkeys, - Datum v1, Datum v2, Datum v3, Datum v4); + Datum v1, Datum v2, Datum v3, Datum v4); static uint32 CatalogCacheComputeTupleHashValue(CatCache *cache, int nkeys, - HeapTuple tuple); + HeapTuple tuple); static inline bool CatalogCacheCompareTuple(const CatCache *cache, int nkeys, - const Datum *cachekeys, - const Datum *searchkeys); + const Datum *cachekeys, + const Datum *searchkeys); #ifdef CATCACHE_STATS static void CatCachePrintStats(int code, Datum arg); @@ -90,14 +90,14 @@ static void CatCacheRemoveCTup(CatCache *cache, CatCTup *ct); static void CatCacheRemoveCList(CatCache *cache, CatCList *cl); static void CatalogCacheInitializeCache(CatCache *cache); static CatCTup *CatalogCacheCreateEntry(CatCache *cache, HeapTuple ntp, - Datum *arguments, - uint32 hashValue, Index hashIndex, - bool negative); + Datum *arguments, + uint32 hashValue, Index hashIndex, + bool negative); static void CatCacheFreeKeys(TupleDesc tupdesc, int nkeys, int *attnos, - Datum *keys); + Datum *keys); static void CatCacheCopyKeys(TupleDesc tupdesc, int nkeys, int *attnos, - Datum *srckeys, Datum *dstkeys); + Datum *srckeys, Datum *dstkeys); /* diff --git a/src/backend/utils/cache/evtcache.c b/src/backend/utils/cache/evtcache.c index 88b0969b890..419bde567bd 100644 --- a/src/backend/utils/cache/evtcache.c +++ b/src/backend/utils/cache/evtcache.c @@ -50,7 +50,7 @@ static EventTriggerCacheStateType EventTriggerCacheState = ETCS_NEEDS_REBUILD; static void BuildEventTriggerCache(void); static void InvalidateEventCacheCallback(Datum arg, - int cacheid, uint32 hashvalue); + int cacheid, uint32 hashvalue); static int DecodeTextArrayToCString(Datum array, char ***cstringp); /* diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c index 9851bd43d5c..4c114439cf9 100644 --- a/src/backend/utils/cache/plancache.c +++ b/src/backend/utils/cache/plancache.c @@ -98,12 +98,12 @@ static dlist_head cached_expression_list = DLIST_STATIC_INIT(cached_expression_l static void ReleaseGenericPlan(CachedPlanSource *plansource); static List *RevalidateCachedQuery(CachedPlanSource *plansource, - QueryEnvironment *queryEnv); + QueryEnvironment *queryEnv); static bool CheckCachedPlan(CachedPlanSource *plansource); static CachedPlan *BuildCachedPlan(CachedPlanSource *plansource, List *qlist, - ParamListInfo boundParams, QueryEnvironment *queryEnv); + ParamListInfo boundParams, QueryEnvironment *queryEnv); static bool choose_custom_plan(CachedPlanSource *plansource, - ParamListInfo boundParams); + ParamListInfo boundParams); static double cached_plan_cost(CachedPlan *plan, bool include_planner); static Query *QueryListGetPrimaryStmt(List *stmts); static void AcquireExecutorLocks(List *stmt_list, bool acquire); diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 969884d4856..2b992d78327 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -265,13 +265,13 @@ static void RelationFlushRelation(Relation relation); static void RememberToFreeTupleDescAtEOX(TupleDesc td); static void AtEOXact_cleanup(Relation relation, bool isCommit); static void AtEOSubXact_cleanup(Relation relation, bool isCommit, - SubTransactionId mySubid, SubTransactionId parentSubid); + SubTransactionId mySubid, SubTransactionId parentSubid); static bool load_relcache_init_file(bool shared); static void write_relcache_init_file(bool shared); static void write_item(const void *data, Size len, FILE *fp); static void formrdesc(const char *relationName, Oid relationReltype, - bool isshared, int natts, const FormData_pg_attribute *attrs); + bool isshared, int natts, const FormData_pg_attribute *attrs); static HeapTuple ScanPgRelation(Oid targetRelId, bool indexOK, bool force_non_historic); static Relation AllocateRelationDesc(Form_pg_class relp); @@ -288,13 +288,13 @@ static int CheckConstraintCmp(const void *a, const void *b); static List *insert_ordered_oid(List *list, Oid datum); static void InitIndexAmRoutine(Relation relation); static void IndexSupportInitialize(oidvector *indclass, - RegProcedure *indexSupport, - Oid *opFamily, - Oid *opcInType, - StrategyNumber maxSupportNumber, - AttrNumber maxAttributeNumber); + RegProcedure *indexSupport, + Oid *opFamily, + Oid *opcInType, + StrategyNumber maxSupportNumber, + AttrNumber maxAttributeNumber); static OpClassCacheEnt *LookupOpclassInfo(Oid operatorClassOid, - StrategyNumber numSupport); + StrategyNumber numSupport); static void RelationCacheInitFileRemoveInDir(const char *tblspcpath); static void unlink_initfile(const char *initfilename, int elevel); diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c index 7ad0aa0b944..3b4f21bc548 100644 --- a/src/backend/utils/cache/relmapper.c +++ b/src/backend/utils/cache/relmapper.c @@ -133,13 +133,13 @@ static RelMapFile pending_local_updates; /* non-export function prototypes */ static void apply_map_update(RelMapFile *map, Oid relationId, Oid fileNode, - bool add_okay); + bool add_okay); static void merge_map_updates(RelMapFile *map, const RelMapFile *updates, - bool add_okay); + bool add_okay); static void load_relmap_file(bool shared); static void write_relmap_file(bool shared, RelMapFile *newmap, - bool write_wal, bool send_sinval, bool preserve_files, - Oid dbid, Oid tsid, const char *dbpath); + bool write_wal, bool send_sinval, bool preserve_files, + Oid dbid, Oid tsid, const char *dbpath); static void perform_relmap_update(bool shared, const RelMapFile *updates); diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c index 7857424c2c1..fc01e7876d9 100644 --- a/src/backend/utils/cache/typcache.c +++ b/src/backend/utils/cache/typcache.c @@ -301,10 +301,10 @@ static void load_enum_cache_data(TypeCacheEntry *tcache); static EnumItem *find_enumitem(TypeCacheEnumData *enumdata, Oid arg); static int enum_oid_cmp(const void *left, const void *right); static void shared_record_typmod_registry_detach(dsm_segment *segment, - Datum datum); + Datum datum); static TupleDesc find_or_make_matching_shared_tupledesc(TupleDesc tupdesc); static dsa_pointer share_tupledesc(dsa_area *area, TupleDesc tupdesc, - uint32 typmod); + uint32 typmod); /* diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c index 456297a5313..be684786d64 100644 --- a/src/backend/utils/fmgr/dfmgr.c +++ b/src/backend/utils/fmgr/dfmgr.c @@ -78,7 +78,7 @@ char *Dynamic_library_path; static void *internal_load_library(const char *libname); static void incompatible_module_error(const char *libname, - const Pg_magic_struct *module_magic_data) pg_attribute_noreturn(); + const Pg_magic_struct *module_magic_data) pg_attribute_noreturn(); static void internal_unload_library(const char *libname); static bool file_exists(const char *name); static char *expand_dynamic_library_name(const char *name); diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index f039567e209..9b640ccd406 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -53,12 +53,12 @@ static HTAB *CFuncHash = NULL; static void fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt, - bool ignore_security); + bool ignore_security); static void fmgr_info_C_lang(Oid functionId, FmgrInfo *finfo, HeapTuple procedureTuple); static void fmgr_info_other_lang(Oid functionId, FmgrInfo *finfo, HeapTuple procedureTuple); static CFuncHashTabEntry *lookup_C_func(HeapTuple procedureTuple); static void record_C_func(HeapTuple procedureTuple, - PGFunction user_fn, const Pg_finfo_record *inforec); + PGFunction user_fn, const Pg_finfo_record *inforec); /* extern so it's callable via JIT */ extern Datum fmgr_security_definer(PG_FUNCTION_ARGS); diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c index a5e77a208ef..b7fac5d2954 100644 --- a/src/backend/utils/fmgr/funcapi.c +++ b/src/backend/utils/fmgr/funcapi.c @@ -33,13 +33,13 @@ static void shutdown_MultiFuncCall(Datum arg); static TypeFuncClass internal_get_result_type(Oid funcid, - Node *call_expr, - ReturnSetInfo *rsinfo, - Oid *resultTypeId, - TupleDesc *resultTupleDesc); + Node *call_expr, + ReturnSetInfo *rsinfo, + Oid *resultTypeId, + TupleDesc *resultTupleDesc); static bool resolve_polymorphic_tupdesc(TupleDesc tupdesc, - oidvector *declared_args, - Node *call_expr); + oidvector *declared_args, + Node *call_expr); static TypeFuncClass get_type_func_class(Oid typid, Oid *base_typeid); diff --git a/src/backend/utils/mb/mbutils.c b/src/backend/utils/mb/mbutils.c index bc2be43e216..4630e895867 100644 --- a/src/backend/utils/mb/mbutils.c +++ b/src/backend/utils/mb/mbutils.c @@ -86,7 +86,7 @@ static int pending_client_encoding = PG_SQL_ASCII; /* Internal functions */ static char *perform_default_encoding_conversion(const char *src, - int len, bool is_client_to_server); + int len, bool is_client_to_server); static int cliplen(const char *str, int len, int limit); diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 8acfa303c5d..0516940f749 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -141,23 +141,23 @@ char *GUC_check_errhint_string; static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4); static void set_config_sourcefile(const char *name, char *sourcefile, - int sourceline); + int sourceline); static bool call_bool_check_hook(struct config_bool *conf, bool *newval, - void **extra, GucSource source, int elevel); + void **extra, GucSource source, int elevel); static bool call_int_check_hook(struct config_int *conf, int *newval, - void **extra, GucSource source, int elevel); + void **extra, GucSource source, int elevel); static bool call_real_check_hook(struct config_real *conf, double *newval, - void **extra, GucSource source, int elevel); + void **extra, GucSource source, int elevel); static bool call_string_check_hook(struct config_string *conf, char **newval, - void **extra, GucSource source, int elevel); + void **extra, GucSource source, int elevel); static bool call_enum_check_hook(struct config_enum *conf, int *newval, - void **extra, GucSource source, int elevel); + void **extra, GucSource source, int elevel); static bool check_log_destination(char **newval, void **extra, GucSource source); static void assign_log_destination(const char *newval, void *extra); static bool check_wal_consistency_checking(char **newval, void **extra, - GucSource source); + GucSource source); static void assign_wal_consistency_checking(const char *newval, void *extra); #ifdef HAVE_SYSLOG @@ -218,7 +218,7 @@ static bool check_default_with_oids(bool *newval, void **extra, GucSource source /* Private functions in guc-file.l that need to be called from guc.c */ static ConfigVariable *ProcessConfigFileInternal(GucContext context, - bool applySettings, int elevel); + bool applySettings, int elevel); /* @@ -4602,18 +4602,18 @@ static void InitializeOneGUCOption(struct config_generic *gconf); static void push_old_value(struct config_generic *gconf, GucAction action); static void ReportGUCOption(struct config_generic *record); static void reapply_stacked_values(struct config_generic *variable, - struct config_string *pHolder, - GucStack *stack, - const char *curvalue, - GucContext curscontext, GucSource cursource); + struct config_string *pHolder, + GucStack *stack, + const char *curvalue, + GucContext curscontext, GucSource cursource); static void ShowGUCConfigOption(const char *name, DestReceiver *dest); static void ShowAllGUCConfig(DestReceiver *dest); static char *_ShowOption(struct config_generic *record, bool use_units); static bool validate_option_array_item(const char *name, const char *value, - bool skipIfNoPermissions); + bool skipIfNoPermissions); static void write_auto_conf_file(int fd, const char *filename, ConfigVariable *head_p); static void replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p, - const char *name, const char *value); + const char *name, const char *value); /* diff --git a/src/backend/utils/misc/tzparser.c b/src/backend/utils/misc/tzparser.c index 906bd87055d..cdb9db475d0 100644 --- a/src/backend/utils/misc/tzparser.c +++ b/src/backend/utils/misc/tzparser.c @@ -35,11 +35,11 @@ static bool validateTzEntry(tzEntry *tzentry); static bool splitTzLine(const char *filename, int lineno, - char *line, tzEntry *tzentry); -static int addToArray(tzEntry **base, int *arraysize, int n, - tzEntry *entry, bool override); -static int ParseTzFile(const char *filename, int depth, - tzEntry **base, int *arraysize, int n); + char *line, tzEntry *tzentry); +static int addToArray(tzEntry **base, int *arraysize, int n, + tzEntry *entry, bool override); +static int ParseTzFile(const char *filename, int depth, + tzEntry **base, int *arraysize, int n); /* diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c index 08aff333a41..6e4a3434394 100644 --- a/src/backend/utils/mmgr/aset.c +++ b/src/backend/utils/mmgr/aset.c @@ -273,8 +273,8 @@ static void AllocSetDelete(MemoryContext context); static Size AllocSetGetChunkSpace(MemoryContext context, void *pointer); static bool AllocSetIsEmpty(MemoryContext context); static void AllocSetStats(MemoryContext context, - MemoryStatsPrintFunc printfunc, void *passthru, - MemoryContextCounters *totals); + MemoryStatsPrintFunc printfunc, void *passthru, + MemoryContextCounters *totals); #ifdef MEMORY_CONTEXT_CHECKING static void AllocSetCheck(MemoryContext context); diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c index 1135ca91227..4b826cdaa50 100644 --- a/src/backend/utils/mmgr/dsa.c +++ b/src/backend/utils/mmgr/dsa.c @@ -382,28 +382,28 @@ struct dsa_area (segment_map_ptr - &area->segment_maps[0]) static void init_span(dsa_area *area, dsa_pointer span_pointer, - dsa_area_pool *pool, dsa_pointer start, size_t npages, - uint16 size_class); + dsa_area_pool *pool, dsa_pointer start, size_t npages, + uint16 size_class); static bool transfer_first_span(dsa_area *area, dsa_area_pool *pool, - int fromclass, int toclass); + int fromclass, int toclass); static inline dsa_pointer alloc_object(dsa_area *area, int size_class); static bool ensure_active_superblock(dsa_area *area, dsa_area_pool *pool, - int size_class); + int size_class); static dsa_segment_map *get_segment_by_index(dsa_area *area, - dsa_segment_index index); + dsa_segment_index index); static void destroy_superblock(dsa_area *area, dsa_pointer span_pointer); static void unlink_span(dsa_area *area, dsa_area_span *span); static void add_span_to_fullness_class(dsa_area *area, dsa_area_span *span, - dsa_pointer span_pointer, int fclass); + dsa_pointer span_pointer, int fclass); static void unlink_segment(dsa_area *area, dsa_segment_map *segment_map); static dsa_segment_map *get_best_segment(dsa_area *area, size_t npages); static dsa_segment_map *make_new_segment(dsa_area *area, size_t requested_pages); static dsa_area *create_internal(void *place, size_t size, - int tranche_id, - dsm_handle control_handle, - dsm_segment *control_segment); + int tranche_id, + dsm_handle control_handle, + dsm_segment *control_segment); static dsa_area *attach_internal(void *place, dsm_segment *segment, - dsa_handle handle); + dsa_handle handle); static void check_for_freed_segments(dsa_area *area); static void check_for_freed_segments_locked(dsa_area *area); diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c index 92572350015..0c9e98973ab 100644 --- a/src/backend/utils/mmgr/freepage.c +++ b/src/backend/utils/mmgr/freepage.c @@ -126,41 +126,41 @@ typedef struct FreePageBtreeSearchResult /* Helper functions */ static void FreePageBtreeAdjustAncestorKeys(FreePageManager *fpm, - FreePageBtree *btp); + FreePageBtree *btp); static Size FreePageBtreeCleanup(FreePageManager *fpm); static FreePageBtree *FreePageBtreeFindLeftSibling(char *base, - FreePageBtree *btp); + FreePageBtree *btp); static FreePageBtree *FreePageBtreeFindRightSibling(char *base, - FreePageBtree *btp); + FreePageBtree *btp); static Size FreePageBtreeFirstKey(FreePageBtree *btp); static FreePageBtree *FreePageBtreeGetRecycled(FreePageManager *fpm); static void FreePageBtreeInsertInternal(char *base, FreePageBtree *btp, - Size index, Size first_page, FreePageBtree *child); + Size index, Size first_page, FreePageBtree *child); static void FreePageBtreeInsertLeaf(FreePageBtree *btp, Size index, - Size first_page, Size npages); + Size first_page, Size npages); static void FreePageBtreeRecycle(FreePageManager *fpm, Size pageno); static void FreePageBtreeRemove(FreePageManager *fpm, FreePageBtree *btp, - Size index); + Size index); static void FreePageBtreeRemovePage(FreePageManager *fpm, FreePageBtree *btp); static void FreePageBtreeSearch(FreePageManager *fpm, Size first_page, - FreePageBtreeSearchResult *result); + FreePageBtreeSearchResult *result); static Size FreePageBtreeSearchInternal(FreePageBtree *btp, Size first_page); static Size FreePageBtreeSearchLeaf(FreePageBtree *btp, Size first_page); static FreePageBtree *FreePageBtreeSplitPage(FreePageManager *fpm, - FreePageBtree *btp); + FreePageBtree *btp); static void FreePageBtreeUpdateParentPointers(char *base, FreePageBtree *btp); static void FreePageManagerDumpBtree(FreePageManager *fpm, FreePageBtree *btp, - FreePageBtree *parent, int level, StringInfo buf); + FreePageBtree *parent, int level, StringInfo buf); static void FreePageManagerDumpSpans(FreePageManager *fpm, - FreePageSpanLeader *span, Size expected_pages, - StringInfo buf); + FreePageSpanLeader *span, Size expected_pages, + StringInfo buf); static bool FreePageManagerGetInternal(FreePageManager *fpm, Size npages, - Size *first_page); + Size *first_page); static Size FreePageManagerPutInternal(FreePageManager *fpm, Size first_page, - Size npages, bool soft); + Size npages, bool soft); static void FreePagePopSpanLeader(FreePageManager *fpm, Size pageno); static void FreePagePushSpanLeader(FreePageManager *fpm, Size first_page, - Size npages); + Size npages); static Size FreePageManagerLargestContiguous(FreePageManager *fpm); static void FreePageManagerUpdateLargest(FreePageManager *fpm); diff --git a/src/backend/utils/mmgr/generation.c b/src/backend/utils/mmgr/generation.c index 02a23694cb1..eaacafb7be5 100644 --- a/src/backend/utils/mmgr/generation.c +++ b/src/backend/utils/mmgr/generation.c @@ -154,8 +154,8 @@ static void GenerationDelete(MemoryContext context); static Size GenerationGetChunkSpace(MemoryContext context, void *pointer); static bool GenerationIsEmpty(MemoryContext context); static void GenerationStats(MemoryContext context, - MemoryStatsPrintFunc printfunc, void *passthru, - MemoryContextCounters *totals); + MemoryStatsPrintFunc printfunc, void *passthru, + MemoryContextCounters *totals); #ifdef MEMORY_CONTEXT_CHECKING static void GenerationCheck(MemoryContext context); diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c index 43c58c351b8..b07be122369 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -54,10 +54,10 @@ MemoryContext PortalContext = NULL; static void MemoryContextCallResetCallbacks(MemoryContext context); static void MemoryContextStatsInternal(MemoryContext context, int level, - bool print, int max_children, - MemoryContextCounters *totals); + bool print, int max_children, + MemoryContextCounters *totals); static void MemoryContextStatsPrint(MemoryContext context, void *passthru, - const char *stats_string); + const char *stats_string); /* * You should not do memory allocations within a critical section, because diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c index 33d69239d9a..e23669fb4fb 100644 --- a/src/backend/utils/mmgr/slab.c +++ b/src/backend/utils/mmgr/slab.c @@ -132,8 +132,8 @@ static void SlabDelete(MemoryContext context); static Size SlabGetChunkSpace(MemoryContext context, void *pointer); static bool SlabIsEmpty(MemoryContext context); static void SlabStats(MemoryContext context, - MemoryStatsPrintFunc printfunc, void *passthru, - MemoryContextCounters *totals); + MemoryStatsPrintFunc printfunc, void *passthru, + MemoryContextCounters *totals); #ifdef MEMORY_CONTEXT_CHECKING static void SlabCheck(MemoryContext context); #endif diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c index 64aafef3114..7be11c48abe 100644 --- a/src/backend/utils/resowner/resowner.c +++ b/src/backend/utils/resowner/resowner.c @@ -165,9 +165,9 @@ static bool ResourceArrayRemove(ResourceArray *resarr, Datum value); static bool ResourceArrayGetAny(ResourceArray *resarr, Datum *value); static void ResourceArrayFree(ResourceArray *resarr); static void ResourceOwnerReleaseInternal(ResourceOwner owner, - ResourceReleasePhase phase, - bool isCommit, - bool isTopLevel); + ResourceReleasePhase phase, + bool isCommit, + bool isTopLevel); static void ReleaseAuxProcessResourcesCallback(int code, Datum arg); static void PrintRelCacheLeakWarning(Relation rel); static void PrintPlanCacheLeakWarning(CachedPlan *plan); diff --git a/src/backend/utils/sort/logtape.c b/src/backend/utils/sort/logtape.c index f21934dbbc2..8985b9e0955 100644 --- a/src/backend/utils/sort/logtape.c +++ b/src/backend/utils/sort/logtape.c @@ -210,7 +210,7 @@ static void ltsReadBlock(LogicalTapeSet *lts, long blocknum, void *buffer); static long ltsGetFreeBlock(LogicalTapeSet *lts); static void ltsReleaseBlock(LogicalTapeSet *lts, long blocknum); static void ltsConcatWorkerTapes(LogicalTapeSet *lts, TapeShare *shared, - SharedFileSet *fileset); + SharedFileSet *fileset); /* diff --git a/src/backend/utils/sort/sharedtuplestore.c b/src/backend/utils/sort/sharedtuplestore.c index 08106aec567..8df18eb2ee7 100644 --- a/src/backend/utils/sort/sharedtuplestore.c +++ b/src/backend/utils/sort/sharedtuplestore.c @@ -97,7 +97,7 @@ struct SharedTuplestoreAccessor }; static void sts_filename(char *name, SharedTuplestoreAccessor *accessor, - int participant); + int participant); /* * Return the amount of shared memory required to hold SharedTuplestore for a diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 3eebd9ef51c..7b8e67899e9 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -589,8 +589,8 @@ struct Sharedsort static Tuplesortstate *tuplesort_begin_common(int workMem, - SortCoordinate coordinate, - bool randomAccess); + SortCoordinate coordinate, + bool randomAccess); static void puttuple_common(Tuplesortstate *state, SortTuple *tuple); static bool consider_abort_common(Tuplesortstate *state); static void inittapes(Tuplesortstate *state, bool mergeruns); @@ -612,36 +612,36 @@ static void reversedirection(Tuplesortstate *state); static unsigned int getlen(Tuplesortstate *state, int tapenum, bool eofOK); static void markrunend(Tuplesortstate *state, int tapenum); static void *readtup_alloc(Tuplesortstate *state, Size tuplen); -static int comparetup_heap(const SortTuple *a, const SortTuple *b, - Tuplesortstate *state); +static int comparetup_heap(const SortTuple *a, const SortTuple *b, + Tuplesortstate *state); static void copytup_heap(Tuplesortstate *state, SortTuple *stup, void *tup); static void writetup_heap(Tuplesortstate *state, int tapenum, - SortTuple *stup); + SortTuple *stup); static void readtup_heap(Tuplesortstate *state, SortTuple *stup, - int tapenum, unsigned int len); -static int comparetup_cluster(const SortTuple *a, const SortTuple *b, - Tuplesortstate *state); + int tapenum, unsigned int len); +static int comparetup_cluster(const SortTuple *a, const SortTuple *b, + Tuplesortstate *state); static void copytup_cluster(Tuplesortstate *state, SortTuple *stup, void *tup); static void writetup_cluster(Tuplesortstate *state, int tapenum, - SortTuple *stup); + SortTuple *stup); static void readtup_cluster(Tuplesortstate *state, SortTuple *stup, - int tapenum, unsigned int len); -static int comparetup_index_btree(const SortTuple *a, const SortTuple *b, - Tuplesortstate *state); -static int comparetup_index_hash(const SortTuple *a, const SortTuple *b, - Tuplesortstate *state); + int tapenum, unsigned int len); +static int comparetup_index_btree(const SortTuple *a, const SortTuple *b, + Tuplesortstate *state); +static int comparetup_index_hash(const SortTuple *a, const SortTuple *b, + Tuplesortstate *state); static void copytup_index(Tuplesortstate *state, SortTuple *stup, void *tup); static void writetup_index(Tuplesortstate *state, int tapenum, - SortTuple *stup); + SortTuple *stup); static void readtup_index(Tuplesortstate *state, SortTuple *stup, - int tapenum, unsigned int len); -static int comparetup_datum(const SortTuple *a, const SortTuple *b, - Tuplesortstate *state); + int tapenum, unsigned int len); +static int comparetup_datum(const SortTuple *a, const SortTuple *b, + Tuplesortstate *state); static void copytup_datum(Tuplesortstate *state, SortTuple *stup, void *tup); static void writetup_datum(Tuplesortstate *state, int tapenum, - SortTuple *stup); + SortTuple *stup); static void readtup_datum(Tuplesortstate *state, SortTuple *stup, - int tapenum, unsigned int len); + int tapenum, unsigned int len); static int worker_get_identifier(Tuplesortstate *state); static void worker_freeze_result_tape(Tuplesortstate *state); static void worker_nomergeruns(Tuplesortstate *state); diff --git a/src/backend/utils/sort/tuplestore.c b/src/backend/utils/sort/tuplestore.c index 0f38e7c7084..3fc7f921821 100644 --- a/src/backend/utils/sort/tuplestore.c +++ b/src/backend/utils/sort/tuplestore.c @@ -234,8 +234,8 @@ struct Tuplestorestate static Tuplestorestate *tuplestore_begin_common(int eflags, - bool interXact, - int maxKBytes); + bool interXact, + int maxKBytes); static void tuplestore_puttuple_common(Tuplestorestate *state, void *tuple); static void dumptuples(Tuplestorestate *state); static unsigned int getlen(Tuplestorestate *state, bool eofOK); diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 3b442935bb6..ef9fc15ac36 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -196,8 +196,8 @@ static ActiveSnapshotElt *OldestActiveSnapshot = NULL; * Currently registered Snapshots. Ordered in a heap by xmin, so that we can * quickly find the one with lowest xmin, to advance our MyPgXact->xmin. */ -static int xmin_cmp(const pairingheap_node *a, const pairingheap_node *b, - void *arg); +static int xmin_cmp(const pairingheap_node *a, const pairingheap_node *b, + void *arg); static pairingheap RegisteredSnapshots = {&xmin_cmp, NULL, NULL}; |