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 | |
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
712 files changed, 7437 insertions, 7451 deletions
diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c index c935abc7e0..de0a98f6d9 100644 --- a/contrib/amcheck/verify_nbtree.c +++ b/contrib/amcheck/verify_nbtree.c @@ -126,45 +126,45 @@ PG_FUNCTION_INFO_V1(bt_index_check); PG_FUNCTION_INFO_V1(bt_index_parent_check); static void bt_index_check_internal(Oid indrelid, bool parentcheck, - bool heapallindexed, bool rootdescend); + bool heapallindexed, bool rootdescend); static inline void btree_index_checkable(Relation rel); static void bt_check_every_level(Relation rel, Relation heaprel, - bool heapkeyspace, bool readonly, bool heapallindexed, - bool rootdescend); + bool heapkeyspace, bool readonly, bool heapallindexed, + bool rootdescend); static BtreeLevel bt_check_level_from_leftmost(BtreeCheckState *state, - BtreeLevel level); + BtreeLevel level); static void bt_target_page_check(BtreeCheckState *state); static BTScanInsert bt_right_page_check_scankey(BtreeCheckState *state); static void bt_downlink_check(BtreeCheckState *state, BTScanInsert targetkey, - BlockNumber childblock); + BlockNumber childblock); static void bt_downlink_missing_check(BtreeCheckState *state); static void bt_tuple_present_callback(Relation index, HeapTuple htup, - Datum *values, bool *isnull, - bool tupleIsAlive, void *checkstate); + Datum *values, bool *isnull, + bool tupleIsAlive, void *checkstate); static IndexTuple bt_normalize_tuple(BtreeCheckState *state, - IndexTuple itup); + IndexTuple itup); static bool bt_rootdescend(BtreeCheckState *state, IndexTuple itup); static inline bool offset_is_negative_infinity(BTPageOpaque opaque, - OffsetNumber offset); + OffsetNumber offset); static inline bool invariant_l_offset(BtreeCheckState *state, BTScanInsert key, - OffsetNumber upperbound); + OffsetNumber upperbound); static inline bool invariant_leq_offset(BtreeCheckState *state, - BTScanInsert key, - OffsetNumber upperbound); + BTScanInsert key, + OffsetNumber upperbound); static inline bool invariant_g_offset(BtreeCheckState *state, BTScanInsert key, - OffsetNumber lowerbound); + OffsetNumber lowerbound); static inline bool invariant_l_nontarget_offset(BtreeCheckState *state, - BTScanInsert key, - BlockNumber nontargetblock, - Page nontarget, - OffsetNumber upperbound); + BTScanInsert key, + BlockNumber nontargetblock, + Page nontarget, + OffsetNumber upperbound); static Page palloc_btree_page(BtreeCheckState *state, BlockNumber blocknum); static inline BTScanInsert bt_mkscankey_pivotsearch(Relation rel, - IndexTuple itup); + IndexTuple itup); static ItemId PageGetItemIdCareful(BtreeCheckState *state, BlockNumber block, - Page page, OffsetNumber offset); + Page page, OffsetNumber offset); static inline ItemPointer BTreeTupleGetHeapTIDCareful(BtreeCheckState *state, - IndexTuple itup, bool nonpivot); + IndexTuple itup, bool nonpivot); /* * bt_index_check(index regclass, heapallindexed boolean) diff --git a/contrib/auto_explain/auto_explain.c b/contrib/auto_explain/auto_explain.c index edc50f9368..c810a41a79 100644 --- a/contrib/auto_explain/auto_explain.c +++ b/contrib/auto_explain/auto_explain.c @@ -77,8 +77,8 @@ void _PG_fini(void); static void explain_ExecutorStart(QueryDesc *queryDesc, int eflags); static void explain_ExecutorRun(QueryDesc *queryDesc, - ScanDirection direction, - uint64 count, bool execute_once); + ScanDirection direction, + uint64 count, bool execute_once); static void explain_ExecutorFinish(QueryDesc *queryDesc); static void explain_ExecutorEnd(QueryDesc *queryDesc); diff --git a/contrib/bloom/bloom.h b/contrib/bloom/bloom.h index 7c18eaa508..010148eb03 100644 --- a/contrib/bloom/bloom.h +++ b/contrib/bloom/bloom.h @@ -189,26 +189,26 @@ extern bool blvalidate(Oid opclassoid); /* index access method interface functions */ extern bool blinsert(Relation index, Datum *values, bool *isnull, - ItemPointer ht_ctid, Relation heapRel, - IndexUniqueCheck checkUnique, - struct IndexInfo *indexInfo); + ItemPointer ht_ctid, Relation heapRel, + IndexUniqueCheck checkUnique, + struct IndexInfo *indexInfo); extern IndexScanDesc blbeginscan(Relation r, int nkeys, int norderbys); extern int64 blgetbitmap(IndexScanDesc scan, TIDBitmap *tbm); extern void blrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys, - ScanKey orderbys, int norderbys); + ScanKey orderbys, int norderbys); extern void blendscan(IndexScanDesc scan); extern IndexBuildResult *blbuild(Relation heap, Relation index, - struct IndexInfo *indexInfo); + struct IndexInfo *indexInfo); extern void blbuildempty(Relation index); extern IndexBulkDeleteResult *blbulkdelete(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback, - void *callback_state); + IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback, + void *callback_state); extern IndexBulkDeleteResult *blvacuumcleanup(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats); + IndexBulkDeleteResult *stats); extern bytea *bloptions(Datum reloptions, bool validate); extern void blcostestimate(PlannerInfo *root, IndexPath *path, - double loop_count, Cost *indexStartupCost, - Cost *indexTotalCost, Selectivity *indexSelectivity, - double *indexCorrelation, double *indexPages); + double loop_count, Cost *indexStartupCost, + Cost *indexTotalCost, Selectivity *indexSelectivity, + double *indexCorrelation, double *indexPages); #endif diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h index d7945f856c..50907b3b5c 100644 --- a/contrib/btree_gist/btree_utils_num.h +++ b/contrib/btree_gist/btree_utils_num.h @@ -110,26 +110,26 @@ do { \ extern Interval *abs_interval(Interval *a); extern bool gbt_num_consistent(const GBT_NUMKEY_R *key, const void *query, - const StrategyNumber *strategy, bool is_leaf, - const gbtree_ninfo *tinfo, FmgrInfo *flinfo); + const StrategyNumber *strategy, bool is_leaf, + const gbtree_ninfo *tinfo, FmgrInfo *flinfo); extern float8 gbt_num_distance(const GBT_NUMKEY_R *key, const void *query, - bool is_leaf, const gbtree_ninfo *tinfo, FmgrInfo *flinfo); + bool is_leaf, const gbtree_ninfo *tinfo, FmgrInfo *flinfo); extern GIST_SPLITVEC *gbt_num_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v, - const gbtree_ninfo *tinfo, FmgrInfo *flinfo); + const gbtree_ninfo *tinfo, FmgrInfo *flinfo); extern GISTENTRY *gbt_num_compress(GISTENTRY *entry, const gbtree_ninfo *tinfo); extern GISTENTRY *gbt_num_fetch(GISTENTRY *entry, const gbtree_ninfo *tinfo); extern void *gbt_num_union(GBT_NUMKEY *out, const GistEntryVector *entryvec, - const gbtree_ninfo *tinfo, FmgrInfo *flinfo); + const gbtree_ninfo *tinfo, FmgrInfo *flinfo); extern bool gbt_num_same(const GBT_NUMKEY *a, const GBT_NUMKEY *b, - const gbtree_ninfo *tinfo, FmgrInfo *flinfo); + const gbtree_ninfo *tinfo, FmgrInfo *flinfo); extern void gbt_num_bin_union(Datum *u, GBT_NUMKEY *e, - const gbtree_ninfo *tinfo, FmgrInfo *flinfo); + const gbtree_ninfo *tinfo, FmgrInfo *flinfo); #endif diff --git a/contrib/btree_gist/btree_utils_var.h b/contrib/btree_gist/btree_utils_var.h index 15d847c139..1f2ca43e6b 100644 --- a/contrib/btree_gist/btree_utils_var.h +++ b/contrib/btree_gist/btree_utils_var.h @@ -52,22 +52,22 @@ extern GBT_VARKEY *gbt_var_key_copy(const GBT_VARKEY_R *u); extern GISTENTRY *gbt_var_compress(GISTENTRY *entry, const gbtree_vinfo *tinfo); extern GBT_VARKEY *gbt_var_union(const GistEntryVector *entryvec, int32 *size, - Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo); + Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo); extern bool gbt_var_same(Datum d1, Datum d2, Oid collation, - const gbtree_vinfo *tinfo, FmgrInfo *flinfo); + const gbtree_vinfo *tinfo, FmgrInfo *flinfo); extern float *gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n, - Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo); + Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo); extern bool gbt_var_consistent(GBT_VARKEY_R *key, const void *query, - StrategyNumber strategy, Oid collation, bool is_leaf, - const gbtree_vinfo *tinfo, FmgrInfo *flinfo); + StrategyNumber strategy, Oid collation, bool is_leaf, + const gbtree_vinfo *tinfo, FmgrInfo *flinfo); extern GIST_SPLITVEC *gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v, - Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo); + Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo); extern void gbt_var_bin_union(Datum *u, GBT_VARKEY *e, Oid collation, - const gbtree_vinfo *tinfo, FmgrInfo *flinfo); + const gbtree_vinfo *tinfo, FmgrInfo *flinfo); #endif diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index d35e5ba3d8..e432457e2d 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -89,12 +89,12 @@ typedef struct storeInfo static Datum dblink_record_internal(FunctionCallInfo fcinfo, bool is_async); static void prepTuplestoreResult(FunctionCallInfo fcinfo); static void materializeResult(FunctionCallInfo fcinfo, PGconn *conn, - PGresult *res); + PGresult *res); static void materializeQueryResult(FunctionCallInfo fcinfo, - PGconn *conn, - const char *conname, - const char *sql, - bool fail); + PGconn *conn, + const char *conname, + const char *sql, + bool fail); static PGresult *storeQueryResult(volatile storeInfo *sinfo, PGconn *conn, const char *sql); static void storeRow(volatile storeInfo *sinfo, PGresult *res, bool first); static remoteConn *getConnectionByName(const char *name); @@ -114,14 +114,14 @@ static char *generate_relation_name(Relation rel); static void dblink_connstr_check(const char *connstr); static void dblink_security_check(PGconn *conn, remoteConn *rconn); static void dblink_res_error(PGconn *conn, const char *conname, PGresult *res, - bool fail, const char *fmt,...) pg_attribute_printf(5, 6); + bool fail, const char *fmt,...) pg_attribute_printf(5, 6); static char *get_connect_string(const char *servername); static char *escape_param_str(const char *from); static void validate_pkattnums(Relation rel, - int2vector *pkattnums_arg, int32 pknumatts_arg, - int **pkattnums, int *pknumatts); + int2vector *pkattnums_arg, int32 pknumatts_arg, + int **pkattnums, int *pknumatts); static bool is_valid_dblink_option(const PQconninfoOption *options, - const char *option, Oid context); + const char *option, Oid context); static int applyRemoteGucs(PGconn *conn); static void restoreLocalGucs(int nestlevel); diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c index 99baa496bd..412dcabe55 100644 --- a/contrib/file_fdw/file_fdw.c +++ b/contrib/file_fdw/file_fdw.c @@ -117,49 +117,49 @@ PG_FUNCTION_INFO_V1(file_fdw_validator); * FDW callback routines */ static void fileGetForeignRelSize(PlannerInfo *root, - RelOptInfo *baserel, - Oid foreigntableid); + RelOptInfo *baserel, + Oid foreigntableid); static void fileGetForeignPaths(PlannerInfo *root, - RelOptInfo *baserel, - Oid foreigntableid); + RelOptInfo *baserel, + Oid foreigntableid); static ForeignScan *fileGetForeignPlan(PlannerInfo *root, - RelOptInfo *baserel, - Oid foreigntableid, - ForeignPath *best_path, - List *tlist, - List *scan_clauses, - Plan *outer_plan); + RelOptInfo *baserel, + Oid foreigntableid, + ForeignPath *best_path, + List *tlist, + List *scan_clauses, + Plan *outer_plan); static void fileExplainForeignScan(ForeignScanState *node, ExplainState *es); static void fileBeginForeignScan(ForeignScanState *node, int eflags); static TupleTableSlot *fileIterateForeignScan(ForeignScanState *node); static void fileReScanForeignScan(ForeignScanState *node); static void fileEndForeignScan(ForeignScanState *node); static bool fileAnalyzeForeignTable(Relation relation, - AcquireSampleRowsFunc *func, - BlockNumber *totalpages); + AcquireSampleRowsFunc *func, + BlockNumber *totalpages); static bool fileIsForeignScanParallelSafe(PlannerInfo *root, RelOptInfo *rel, - RangeTblEntry *rte); + RangeTblEntry *rte); /* * Helper functions */ static bool is_valid_option(const char *option, Oid context); static void fileGetOptions(Oid foreigntableid, - char **filename, - bool *is_program, - List **other_options); + char **filename, + bool *is_program, + List **other_options); static List *get_file_fdw_attribute_options(Oid relid); static bool check_selective_binary_conversion(RelOptInfo *baserel, - Oid foreigntableid, - List **columns); + Oid foreigntableid, + List **columns); static void estimate_size(PlannerInfo *root, RelOptInfo *baserel, - FileFdwPlanState *fdw_private); + FileFdwPlanState *fdw_private); static void estimate_costs(PlannerInfo *root, RelOptInfo *baserel, - FileFdwPlanState *fdw_private, - Cost *startup_cost, Cost *total_cost); -static int file_acquire_sample_rows(Relation onerel, int elevel, - HeapTuple *rows, int targrows, - double *totalrows, double *totaldeadrows); + FileFdwPlanState *fdw_private, + Cost *startup_cost, Cost *total_cost); +static int file_acquire_sample_rows(Relation onerel, int elevel, + HeapTuple *rows, int targrows, + double *totalrows, double *totaldeadrows); /* diff --git a/contrib/intarray/_int_selfuncs.c b/contrib/intarray/_int_selfuncs.c index 6ebe0ab9a8..b3e63df72c 100644 --- a/contrib/intarray/_int_selfuncs.c +++ b/contrib/intarray/_int_selfuncs.c @@ -35,7 +35,7 @@ PG_FUNCTION_INFO_V1(_int_matchsel); static Selectivity int_query_opr_selec(ITEM *item, Datum *values, float4 *freqs, - int nmncelems, float4 minfreq); + int nmncelems, float4 minfreq); static int compare_val_int4(const void *a, const void *b); /* diff --git a/contrib/jsonb_plpython/jsonb_plpython.c b/contrib/jsonb_plpython/jsonb_plpython.c index 24e7c6559d..ea8fd5b3e6 100644 --- a/contrib/jsonb_plpython/jsonb_plpython.c +++ b/contrib/jsonb_plpython/jsonb_plpython.c @@ -26,7 +26,7 @@ static PyObject *decimal_constructor; static PyObject *PLyObject_FromJsonbContainer(JsonbContainer *jsonb); static JsonbValue *PLyObject_ToJsonbValue(PyObject *obj, - JsonbParseState **jsonb_state, bool is_elem); + JsonbParseState **jsonb_state, bool is_elem); #if PY_MAJOR_VERSION >= 3 typedef PyObject *(*PLyUnicode_FromStringAndSize_t) diff --git a/contrib/ltree/lquery_op.c b/contrib/ltree/lquery_op.c index b6d2deb1af..62172d5ea1 100644 --- a/contrib/ltree/lquery_op.c +++ b/contrib/ltree/lquery_op.c @@ -50,7 +50,7 @@ getlexeme(char *start, char *end, int *len) } bool - compare_subnode(ltree_level *t, char *qn, int len, int (*cmpptr) (const char *, const char *, size_t), bool anyend) +compare_subnode(ltree_level *t, char *qn, int len, int (*cmpptr) (const char *, const char *, size_t), bool anyend) { char *endt = t->name + t->len; char *endq = qn + len; diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h index e4b8c84fa6..366e58004c 100644 --- a/contrib/ltree/ltree.h +++ b/contrib/ltree/ltree.h @@ -155,13 +155,13 @@ Datum ltree_textadd(PG_FUNCTION_ARGS); /* Util function */ Datum ltree_in(PG_FUNCTION_ARGS); -bool ltree_execute(ITEM *curitem, void *checkval, - bool calcnot, bool (*chkcond) (void *checkval, ITEM *val)); +bool ltree_execute(ITEM *curitem, void *checkval, + bool calcnot, bool (*chkcond) (void *checkval, ITEM *val)); int ltree_compare(const ltree *a, const ltree *b); bool inner_isparent(const ltree *c, const ltree *p); -bool compare_subnode(ltree_level *t, char *q, int len, - int (*cmpptr) (const char *, const char *, size_t), bool anyend); +bool compare_subnode(ltree_level *t, char *q, int len, + int (*cmpptr) (const char *, const char *, size_t), bool anyend); ltree *lca_inner(ltree **a, int len); int ltree_strncasecmp(const char *a, const char *b, size_t s); diff --git a/contrib/pageinspect/brinfuncs.c b/contrib/pageinspect/brinfuncs.c index f93690f3a8..04140eccb8 100644 --- a/contrib/pageinspect/brinfuncs.c +++ b/contrib/pageinspect/brinfuncs.c @@ -41,7 +41,7 @@ typedef struct brin_column_state static Page verify_brin_page(bytea *raw_page, uint16 type, - const char *strtype); + const char *strtype); Datum brin_page_type(PG_FUNCTION_ARGS) diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c index 03d6670d1f..f08f62f72d 100644 --- a/contrib/pageinspect/rawpage.c +++ b/contrib/pageinspect/rawpage.c @@ -33,7 +33,7 @@ PG_MODULE_MAGIC; static bytea *get_raw_page_internal(text *relname, ForkNumber forknum, - BlockNumber blkno); + BlockNumber blkno); /* diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 64df240396..26610b34b6 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -300,45 +300,45 @@ static void pgss_shmem_shutdown(int code, Datum arg); static void pgss_post_parse_analyze(ParseState *pstate, Query *query); static void pgss_ExecutorStart(QueryDesc *queryDesc, int eflags); static void pgss_ExecutorRun(QueryDesc *queryDesc, - ScanDirection direction, - uint64 count, bool execute_once); + ScanDirection direction, + uint64 count, bool execute_once); static void pgss_ExecutorFinish(QueryDesc *queryDesc); static void pgss_ExecutorEnd(QueryDesc *queryDesc); static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString, - ProcessUtilityContext context, ParamListInfo params, - QueryEnvironment *queryEnv, - DestReceiver *dest, char *completionTag); + ProcessUtilityContext context, ParamListInfo params, + QueryEnvironment *queryEnv, + DestReceiver *dest, char *completionTag); static uint64 pgss_hash_string(const char *str, int len); static void pgss_store(const char *query, uint64 queryId, - int query_location, int query_len, - double total_time, uint64 rows, - const BufferUsage *bufusage, - pgssJumbleState *jstate); + int query_location, int query_len, + double total_time, uint64 rows, + const BufferUsage *bufusage, + pgssJumbleState *jstate); static void pg_stat_statements_internal(FunctionCallInfo fcinfo, - pgssVersion api_version, - bool showtext); + pgssVersion api_version, + bool showtext); static Size pgss_memsize(void); static pgssEntry *entry_alloc(pgssHashKey *key, Size query_offset, int query_len, - int encoding, bool sticky); + int encoding, bool sticky); static void entry_dealloc(void); static bool qtext_store(const char *query, int query_len, - Size *query_offset, int *gc_count); + Size *query_offset, int *gc_count); static char *qtext_load_file(Size *buffer_size); static char *qtext_fetch(Size query_offset, int query_len, - char *buffer, Size buffer_size); + char *buffer, Size buffer_size); static bool need_gc_qtexts(void); static void gc_qtexts(void); static void entry_reset(Oid userid, Oid dbid, uint64 queryid); static void AppendJumble(pgssJumbleState *jstate, - const unsigned char *item, Size size); + const unsigned char *item, Size size); static void JumbleQuery(pgssJumbleState *jstate, Query *query); static void JumbleRangeTable(pgssJumbleState *jstate, List *rtable); static void JumbleExpr(pgssJumbleState *jstate, Node *node); static void RecordConstLocation(pgssJumbleState *jstate, int location); static char *generate_normalized_query(pgssJumbleState *jstate, const char *query, - int query_loc, int *query_len_p, int encoding); + int query_loc, int *query_len_p, int encoding); static void fill_in_constant_lengths(pgssJumbleState *jstate, const char *query, - int query_loc); + int query_loc); static int comp_location(const void *a, const void *b); diff --git a/contrib/pg_trgm/trgm.h b/contrib/pg_trgm/trgm.h index f0ab50dd05..0fd600d581 100644 --- a/contrib/pg_trgm/trgm.h +++ b/contrib/pg_trgm/trgm.h @@ -134,7 +134,7 @@ extern float4 cnt_sml(TRGM *trg1, TRGM *trg2, bool inexact); extern bool trgm_contained_by(TRGM *trg1, TRGM *trg2); extern bool *trgm_presence_map(TRGM *query, TRGM *key); extern TRGM *createTrgmNFA(text *text_re, Oid collation, - TrgmPackedGraph **graph, MemoryContext rcontext); + TrgmPackedGraph **graph, MemoryContext rcontext); extern bool trigramsMatchGraph(TrgmPackedGraph *graph, bool *check); #endif /* __TRGM_H__ */ diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c index 50e413506c..d6420a5f87 100644 --- a/contrib/pg_trgm/trgm_regexp.c +++ b/contrib/pg_trgm/trgm_regexp.c @@ -478,9 +478,9 @@ typedef struct /* prototypes for private functions */ static TRGM *createTrgmNFAInternal(regex_t *regex, TrgmPackedGraph **graph, - MemoryContext rcontext); + MemoryContext rcontext); static void RE_compile(regex_t *regex, text *text_re, - int cflags, Oid collation); + int cflags, Oid collation); static void getColorInfo(regex_t *regex, TrgmNFA *trgmNFA); static bool convertPgWchar(pg_wchar c, trgm_mb_char *result); static void transformGraph(TrgmNFA *trgmNFA); @@ -489,7 +489,7 @@ static void addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key); static void addKeyToQueue(TrgmNFA *trgmNFA, TrgmStateKey *key); static void addArcs(TrgmNFA *trgmNFA, TrgmState *state); static void addArc(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key, - TrgmColor co, TrgmStateKey *destKey); + TrgmColor co, TrgmStateKey *destKey); static bool validArcLabel(TrgmStateKey *key, TrgmColor co); static TrgmState *getState(TrgmNFA *trgmNFA, TrgmStateKey *key); static bool prefixContains(TrgmPrefix *prefix1, TrgmPrefix *prefix2); diff --git a/contrib/pg_visibility/pg_visibility.c b/contrib/pg_visibility/pg_visibility.c index 3282742b80..1372bb638f 100644 --- a/contrib/pg_visibility/pg_visibility.c +++ b/contrib/pg_visibility/pg_visibility.c @@ -51,10 +51,10 @@ PG_FUNCTION_INFO_V1(pg_truncate_visibility_map); static TupleDesc pg_visibility_tupdesc(bool include_blkno, bool include_pd); static vbits *collect_visibility_data(Oid relid, bool include_pd); static corrupt_items *collect_corrupt_items(Oid relid, bool all_visible, - bool all_frozen); + bool all_frozen); static void record_corrupt_item(corrupt_items *items, ItemPointer tid); static bool tuple_all_visible(HeapTuple tup, TransactionId OldestXmin, - Buffer buffer); + Buffer buffer); static void check_relation_relkind(Relation rel); /* diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c index 62e68b00e7..6936d2cdca 100644 --- a/contrib/pgcrypto/imath.c +++ b/contrib/pgcrypto/imath.c @@ -335,19 +335,19 @@ static int s_uvcmp(mp_int a, mp_usmall uv); /* Unsigned magnitude addition; assumes dc is big enough. Carry out is returned (no memory allocated). */ static mp_digit s_uadd(mp_digit *da, mp_digit *db, mp_digit *dc, mp_size size_a, - mp_size size_b); + mp_size size_b); /* Unsigned magnitude subtraction. Assumes dc is big enough. */ static void s_usub(mp_digit *da, mp_digit *db, mp_digit *dc, mp_size size_a, - mp_size size_b); + mp_size size_b); /* Unsigned recursive multiplication. Assumes dc is big enough. */ -static int s_kmul(mp_digit *da, mp_digit *db, mp_digit *dc, mp_size size_a, - mp_size size_b); +static int s_kmul(mp_digit *da, mp_digit *db, mp_digit *dc, mp_size size_a, + mp_size size_b); /* Unsigned magnitude multiplication. Assumes dc is big enough. */ static void s_umul(mp_digit *da, mp_digit *db, mp_digit *dc, mp_size size_a, - mp_size size_b); + mp_size size_b); /* Unsigned recursive squaring. Assumes dc is big enough. */ static int s_ksqr(mp_digit *da, mp_digit *dc, mp_size size_a); diff --git a/contrib/pgcrypto/mbuf.h b/contrib/pgcrypto/mbuf.h index 50a989f059..e6d754e869 100644 --- a/contrib/pgcrypto/mbuf.h +++ b/contrib/pgcrypto/mbuf.h @@ -90,8 +90,8 @@ int mbuf_free(MBuf *mbuf); /* * Push filter */ -int pushf_create(PushFilter **res, const PushFilterOps *ops, void *init_arg, - PushFilter *next); +int pushf_create(PushFilter **res, const PushFilterOps *ops, void *init_arg, + PushFilter *next); int pushf_write(PushFilter *mp, const uint8 *data, int len); void pushf_free_all(PushFilter *mp); void pushf_free(PushFilter *mp); @@ -102,11 +102,11 @@ int pushf_create_mbuf_writer(PushFilter **mp_p, MBuf *mbuf); /* * Pull filter */ -int pullf_create(PullFilter **res, const PullFilterOps *ops, - void *init_arg, PullFilter *src); +int pullf_create(PullFilter **res, const PullFilterOps *ops, + void *init_arg, PullFilter *src); int pullf_read(PullFilter *mp, int len, uint8 **data_p); -int pullf_read_max(PullFilter *mp, int len, - uint8 **data_p, uint8 *tmpbuf); +int pullf_read_max(PullFilter *mp, int len, + uint8 **data_p, uint8 *tmpbuf); void pullf_free(PullFilter *mp); int pullf_read_fixed(PullFilter *src, int len, uint8 *dst); diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c index 96c344c30b..7d8951cda4 100644 --- a/contrib/pgcrypto/pgp-decrypt.c +++ b/contrib/pgcrypto/pgp-decrypt.c @@ -811,8 +811,8 @@ parse_literal_data(PGP_Context *ctx, MBuf *dst, PullFilter *pkt) } /* process_data_packets and parse_compressed_data call each other */ -static int process_data_packets(PGP_Context *ctx, MBuf *dst, - PullFilter *src, int allow_compr, int need_mdc); +static int process_data_packets(PGP_Context *ctx, MBuf *dst, + PullFilter *src, int allow_compr, int need_mdc); static int parse_compressed_data(PGP_Context *ctx, MBuf *dst, PullFilter *pkt) diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h index 1b6ea4c9ea..7c97fa398f 100644 --- a/contrib/pgcrypto/pgp.h +++ b/contrib/pgcrypto/pgp.h @@ -261,8 +261,8 @@ int pgp_set_unicode_mode(PGP_Context *ctx, int mode); int pgp_get_unicode_mode(PGP_Context *ctx); int pgp_set_symkey(PGP_Context *ctx, const uint8 *key, int klen); -int pgp_set_pubkey(PGP_Context *ctx, MBuf *keypkt, - const uint8 *key, int klen, int pubtype); +int pgp_set_pubkey(PGP_Context *ctx, MBuf *keypkt, + const uint8 *key, int klen, int pubtype); int pgp_get_keyid(MBuf *pgp_data, char *dst); @@ -278,17 +278,17 @@ int pgp_s2k_read(PullFilter *src, PGP_S2K *s2k); int pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int klen); typedef struct PGP_CFB PGP_CFB; -int pgp_cfb_create(PGP_CFB **ctx_p, int algo, - const uint8 *key, int key_len, int recync, uint8 *iv); +int pgp_cfb_create(PGP_CFB **ctx_p, int algo, + const uint8 *key, int key_len, int recync, uint8 *iv); void pgp_cfb_free(PGP_CFB *ctx); int pgp_cfb_encrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst); int pgp_cfb_decrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst); -void pgp_armor_encode(const uint8 *src, unsigned len, StringInfo dst, - int num_headers, char **keys, char **values); +void pgp_armor_encode(const uint8 *src, unsigned len, StringInfo dst, + int num_headers, char **keys, char **values); int pgp_armor_decode(const uint8 *src, int len, StringInfo dst); -int pgp_extract_armor_headers(const uint8 *src, unsigned len, - int *nheaders, char ***keys, char ***values); +int pgp_extract_armor_headers(const uint8 *src, unsigned len, + int *nheaders, char ***keys, char ***values); int pgp_compress_filter(PushFilter **res, PGP_Context *ctx, PushFilter *dst); int pgp_decompress_filter(PullFilter **res, PGP_Context *ctx, PullFilter *src); @@ -298,10 +298,10 @@ void pgp_key_free(PGP_PubKey *pk); int _pgp_read_public_key(PullFilter *pkt, PGP_PubKey **pk_p); int pgp_parse_pubenc_sesskey(PGP_Context *ctx, PullFilter *pkt); -int pgp_create_pkt_reader(PullFilter **pf_p, PullFilter *src, int len, - int pkttype, PGP_Context *ctx); -int pgp_parse_pkt_hdr(PullFilter *src, uint8 *tag, int *len_p, - int allow_ctx); +int pgp_create_pkt_reader(PullFilter **pf_p, PullFilter *src, int len, + int pkttype, PGP_Context *ctx); +int pgp_parse_pkt_hdr(PullFilter *src, uint8 *tag, int *len_p, + int allow_ctx); int pgp_skip_packet(PullFilter *pkt); int pgp_expect_packet_end(PullFilter *pkt); @@ -317,10 +317,10 @@ int pgp_mpi_write(PushFilter *dst, PGP_MPI *n); int pgp_mpi_hash(PX_MD *md, PGP_MPI *n); unsigned pgp_mpi_cksum(unsigned cksum, PGP_MPI *n); -int pgp_elgamal_encrypt(PGP_PubKey *pk, PGP_MPI *m, - PGP_MPI **c1, PGP_MPI **c2); -int pgp_elgamal_decrypt(PGP_PubKey *pk, PGP_MPI *c1, PGP_MPI *c2, - PGP_MPI **m); +int pgp_elgamal_encrypt(PGP_PubKey *pk, PGP_MPI *m, + PGP_MPI **c1, PGP_MPI **c2); +int pgp_elgamal_decrypt(PGP_PubKey *pk, PGP_MPI *c1, PGP_MPI *c2, + PGP_MPI **m); int pgp_rsa_encrypt(PGP_PubKey *pk, PGP_MPI *m, PGP_MPI **c); int pgp_rsa_decrypt(PGP_PubKey *pk, PGP_MPI *c, PGP_MPI **m); diff --git a/contrib/pgcrypto/px-crypt.h b/contrib/pgcrypto/px-crypt.h index 696902a17c..08001a81f5 100644 --- a/contrib/pgcrypto/px-crypt.h +++ b/contrib/pgcrypto/px-crypt.h @@ -56,27 +56,27 @@ int px_gen_salt(const char *salt_type, char *dst, int rounds); */ /* crypt-gensalt.c */ -char *_crypt_gensalt_traditional_rn(unsigned long count, - const char *input, int size, char *output, int output_size); -char *_crypt_gensalt_extended_rn(unsigned long count, - const char *input, int size, char *output, int output_size); -char *_crypt_gensalt_md5_rn(unsigned long count, - const char *input, int size, char *output, int output_size); -char *_crypt_gensalt_blowfish_rn(unsigned long count, - const char *input, int size, char *output, int output_size); +char *_crypt_gensalt_traditional_rn(unsigned long count, + const char *input, int size, char *output, int output_size); +char *_crypt_gensalt_extended_rn(unsigned long count, + const char *input, int size, char *output, int output_size); +char *_crypt_gensalt_md5_rn(unsigned long count, + const char *input, int size, char *output, int output_size); +char *_crypt_gensalt_blowfish_rn(unsigned long count, + const char *input, int size, char *output, int output_size); /* disable 'extended DES crypt' */ /* #define DISABLE_XDES */ /* crypt-blowfish.c */ -char *_crypt_blowfish_rn(const char *key, const char *setting, - char *output, int size); +char *_crypt_blowfish_rn(const char *key, const char *setting, + char *output, int size); /* crypt-des.c */ char *px_crypt_des(const char *key, const char *setting); /* crypt-md5.c */ -char *px_crypt_md5(const char *pw, const char *salt, - char *dst, unsigned dstlen); +char *px_crypt_md5(const char *pw, const char *salt, + char *dst, unsigned dstlen); #endif /* _PX_CRYPT_H */ diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index e1df60bb35..70af43ebd5 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -66,22 +66,22 @@ typedef void (*pgstat_page) (pgstattuple_type *, Relation, BlockNumber, BufferAccessStrategy); static Datum build_pgstattuple_type(pgstattuple_type *stat, - FunctionCallInfo fcinfo); + FunctionCallInfo fcinfo); static Datum pgstat_relation(Relation rel, FunctionCallInfo fcinfo); static Datum pgstat_heap(Relation rel, FunctionCallInfo fcinfo); static void pgstat_btree_page(pgstattuple_type *stat, - Relation rel, BlockNumber blkno, - BufferAccessStrategy bstrategy); + Relation rel, BlockNumber blkno, + BufferAccessStrategy bstrategy); static void pgstat_hash_page(pgstattuple_type *stat, - Relation rel, BlockNumber blkno, - BufferAccessStrategy bstrategy); + Relation rel, BlockNumber blkno, + BufferAccessStrategy bstrategy); static void pgstat_gist_page(pgstattuple_type *stat, - Relation rel, BlockNumber blkno, - BufferAccessStrategy bstrategy); + Relation rel, BlockNumber blkno, + BufferAccessStrategy bstrategy); static Datum pgstat_index(Relation rel, BlockNumber start, - pgstat_page pagefn, FunctionCallInfo fcinfo); + pgstat_page pagefn, FunctionCallInfo fcinfo); static void pgstat_index_page(pgstattuple_type *stat, Page page, - OffsetNumber minoff, OffsetNumber maxoff); + OffsetNumber minoff, OffsetNumber maxoff); /* * build_pgstattuple_type -- build a pgstattuple_type tuple diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c index 239d220c24..5dfdadcc2f 100644 --- a/contrib/postgres_fdw/connection.c +++ b/contrib/postgres_fdw/connection.c @@ -81,16 +81,16 @@ static void do_sql_command(PGconn *conn, const char *sql); static void begin_remote_xact(ConnCacheEntry *entry); static void pgfdw_xact_callback(XactEvent event, void *arg); static void pgfdw_subxact_callback(SubXactEvent event, - SubTransactionId mySubid, - SubTransactionId parentSubid, - void *arg); + SubTransactionId mySubid, + SubTransactionId parentSubid, + void *arg); static void pgfdw_inval_callback(Datum arg, int cacheid, uint32 hashvalue); static void pgfdw_reject_incomplete_xact_state_change(ConnCacheEntry *entry); static bool pgfdw_cancel_query(PGconn *conn); static bool pgfdw_exec_cleanup_query(PGconn *conn, const char *query, - bool ignore_errors); + bool ignore_errors); static bool pgfdw_get_cleanup_result(PGconn *conn, TimestampTz endtime, - PGresult **result); + PGresult **result); /* diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index c4e331166f..6da4c834bf 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -116,34 +116,34 @@ typedef struct deparse_expr_cxt * remote server. */ static bool foreign_expr_walker(Node *node, - foreign_glob_cxt *glob_cxt, - foreign_loc_cxt *outer_cxt); + foreign_glob_cxt *glob_cxt, + foreign_loc_cxt *outer_cxt); static char *deparse_type_name(Oid type_oid, int32 typemod); /* * Functions to construct string representation of a node tree. */ static void deparseTargetList(StringInfo buf, - RangeTblEntry *rte, - Index rtindex, - Relation rel, - bool is_returning, - Bitmapset *attrs_used, - bool qualify_col, - List **retrieved_attrs); + RangeTblEntry *rte, + Index rtindex, + Relation rel, + bool is_returning, + Bitmapset *attrs_used, + bool qualify_col, + List **retrieved_attrs); static void deparseExplicitTargetList(List *tlist, - bool is_returning, - List **retrieved_attrs, - deparse_expr_cxt *context); + bool is_returning, + List **retrieved_attrs, + deparse_expr_cxt *context); static void deparseSubqueryTargetList(deparse_expr_cxt *context); static void deparseReturningList(StringInfo buf, RangeTblEntry *rte, - Index rtindex, Relation rel, - bool trig_after_row, - List *withCheckOptionList, - List *returningList, - List **retrieved_attrs); + Index rtindex, Relation rel, + bool trig_after_row, + List *withCheckOptionList, + List *returningList, + List **retrieved_attrs); static void deparseColumnRef(StringInfo buf, int varno, int varattno, - RangeTblEntry *rte, bool qualify_col); + RangeTblEntry *rte, bool qualify_col); static void deparseRelation(StringInfo buf, Relation rel); static void deparseExpr(Expr *expr, deparse_expr_cxt *context); static void deparseVar(Var *node, deparse_expr_cxt *context); @@ -155,45 +155,45 @@ static void deparseOpExpr(OpExpr *node, deparse_expr_cxt *context); static void deparseOperatorName(StringInfo buf, Form_pg_operator opform); static void deparseDistinctExpr(DistinctExpr *node, deparse_expr_cxt *context); static void deparseScalarArrayOpExpr(ScalarArrayOpExpr *node, - deparse_expr_cxt *context); + deparse_expr_cxt *context); static void deparseRelabelType(RelabelType *node, deparse_expr_cxt *context); static void deparseBoolExpr(BoolExpr *node, deparse_expr_cxt *context); static void deparseNullTest(NullTest *node, deparse_expr_cxt *context); static void deparseArrayExpr(ArrayExpr *node, deparse_expr_cxt *context); static void printRemoteParam(int paramindex, Oid paramtype, int32 paramtypmod, - deparse_expr_cxt *context); + deparse_expr_cxt *context); static void printRemotePlaceholder(Oid paramtype, int32 paramtypmod, - deparse_expr_cxt *context); + deparse_expr_cxt *context); static void deparseSelectSql(List *tlist, bool is_subquery, List **retrieved_attrs, - deparse_expr_cxt *context); + deparse_expr_cxt *context); static void deparseLockingClause(deparse_expr_cxt *context); static void appendOrderByClause(List *pathkeys, bool has_final_sort, - deparse_expr_cxt *context); + deparse_expr_cxt *context); static void appendLimitClause(deparse_expr_cxt *context); static void appendConditions(List *exprs, deparse_expr_cxt *context); static void deparseFromExprForRel(StringInfo buf, PlannerInfo *root, - RelOptInfo *foreignrel, bool use_alias, - Index ignore_rel, List **ignore_conds, - List **params_list); + RelOptInfo *foreignrel, bool use_alias, + Index ignore_rel, List **ignore_conds, + List **params_list); static void deparseFromExpr(List *quals, deparse_expr_cxt *context); static void deparseRangeTblRef(StringInfo buf, PlannerInfo *root, - RelOptInfo *foreignrel, bool make_subquery, - Index ignore_rel, List **ignore_conds, List **params_list); + RelOptInfo *foreignrel, bool make_subquery, + Index ignore_rel, List **ignore_conds, List **params_list); static void deparseAggref(Aggref *node, deparse_expr_cxt *context); static void appendGroupByClause(List *tlist, deparse_expr_cxt *context); static void appendAggOrderBy(List *orderList, List *targetList, - deparse_expr_cxt *context); + deparse_expr_cxt *context); static void appendFunctionName(Oid funcid, deparse_expr_cxt *context); static Node *deparseSortGroupClause(Index ref, List *tlist, bool force_colno, - deparse_expr_cxt *context); + deparse_expr_cxt *context); /* * Helper functions */ static bool is_subquery_var(Var *node, RelOptInfo *foreignrel, - int *relno, int *colno); + int *relno, int *colno); static void get_relation_column_alias_ids(Var *node, RelOptInfo *foreignrel, - int *relno, int *colno); + int *relno, int *colno); /* diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 04dcd40f2e..02c81ce7a9 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -309,199 +309,199 @@ PG_FUNCTION_INFO_V1(postgres_fdw_handler); * FDW callback routines */ static void postgresGetForeignRelSize(PlannerInfo *root, - RelOptInfo *baserel, - Oid foreigntableid); + RelOptInfo *baserel, + Oid foreigntableid); static void postgresGetForeignPaths(PlannerInfo *root, - RelOptInfo *baserel, - Oid foreigntableid); + RelOptInfo *baserel, + Oid foreigntableid); static ForeignScan *postgresGetForeignPlan(PlannerInfo *root, - RelOptInfo *foreignrel, - Oid foreigntableid, - ForeignPath *best_path, - List *tlist, - List *scan_clauses, - Plan *outer_plan); + RelOptInfo *foreignrel, + Oid foreigntableid, + ForeignPath *best_path, + List *tlist, + List *scan_clauses, + Plan *outer_plan); static void postgresBeginForeignScan(ForeignScanState *node, int eflags); static TupleTableSlot *postgresIterateForeignScan(ForeignScanState *node); static void postgresReScanForeignScan(ForeignScanState *node); static void postgresEndForeignScan(ForeignScanState *node); static void postgresAddForeignUpdateTargets(Query *parsetree, - RangeTblEntry *target_rte, - Relation target_relation); + RangeTblEntry *target_rte, + Relation target_relation); static List *postgresPlanForeignModify(PlannerInfo *root, - ModifyTable *plan, - Index resultRelation, - int subplan_index); + ModifyTable *plan, + Index resultRelation, + int subplan_index); static void postgresBeginForeignModify(ModifyTableState *mtstate, - ResultRelInfo *resultRelInfo, - List *fdw_private, - int subplan_index, - int eflags); + ResultRelInfo *resultRelInfo, + List *fdw_private, + int subplan_index, + int eflags); static TupleTableSlot *postgresExecForeignInsert(EState *estate, - ResultRelInfo *resultRelInfo, - TupleTableSlot *slot, - TupleTableSlot *planSlot); + ResultRelInfo *resultRelInfo, + TupleTableSlot *slot, + TupleTableSlot *planSlot); static TupleTableSlot *postgresExecForeignUpdate(EState *estate, - ResultRelInfo *resultRelInfo, - TupleTableSlot *slot, - TupleTableSlot *planSlot); + ResultRelInfo *resultRelInfo, + TupleTableSlot *slot, + TupleTableSlot *planSlot); static TupleTableSlot *postgresExecForeignDelete(EState *estate, - ResultRelInfo *resultRelInfo, - TupleTableSlot *slot, - TupleTableSlot *planSlot); + ResultRelInfo *resultRelInfo, + TupleTableSlot *slot, + TupleTableSlot *planSlot); static void postgresEndForeignModify(EState *estate, - ResultRelInfo *resultRelInfo); + ResultRelInfo *resultRelInfo); static void postgresBeginForeignInsert(ModifyTableState *mtstate, - ResultRelInfo *resultRelInfo); + ResultRelInfo *resultRelInfo); static void postgresEndForeignInsert(EState *estate, - ResultRelInfo *resultRelInfo); + ResultRelInfo *resultRelInfo); static int postgresIsForeignRelUpdatable(Relation rel); static bool postgresPlanDirectModify(PlannerInfo *root, - ModifyTable *plan, - Index resultRelation, - int subplan_index); + ModifyTable *plan, + Index resultRelation, + int subplan_index); static void postgresBeginDirectModify(ForeignScanState *node, int eflags); static TupleTableSlot *postgresIterateDirectModify(ForeignScanState *node); static void postgresEndDirectModify(ForeignScanState *node); static void postgresExplainForeignScan(ForeignScanState *node, - ExplainState *es); + ExplainState *es); static void postgresExplainForeignModify(ModifyTableState *mtstate, - ResultRelInfo *rinfo, - List *fdw_private, - int subplan_index, - ExplainState *es); + ResultRelInfo *rinfo, + List *fdw_private, + int subplan_index, + ExplainState *es); static void postgresExplainDirectModify(ForeignScanState *node, - ExplainState *es); + ExplainState *es); static bool postgresAnalyzeForeignTable(Relation relation, - AcquireSampleRowsFunc *func, - BlockNumber *totalpages); + AcquireSampleRowsFunc *func, + BlockNumber *totalpages); static List *postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, - Oid serverOid); + Oid serverOid); static void postgresGetForeignJoinPaths(PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *outerrel, - RelOptInfo *innerrel, - JoinType jointype, - JoinPathExtraData *extra); + RelOptInfo *joinrel, + RelOptInfo *outerrel, + RelOptInfo *innerrel, + JoinType jointype, + JoinPathExtraData *extra); static bool postgresRecheckForeignScan(ForeignScanState *node, - TupleTableSlot *slot); + TupleTableSlot *slot); static void postgresGetForeignUpperPaths(PlannerInfo *root, - UpperRelationKind stage, - RelOptInfo *input_rel, - RelOptInfo *output_rel, - void *extra); + UpperRelationKind stage, + RelOptInfo *input_rel, + RelOptInfo *output_rel, + void *extra); /* * Helper functions */ static void estimate_path_cost_size(PlannerInfo *root, - RelOptInfo *foreignrel, - List *param_join_conds, - List *pathkeys, - PgFdwPathExtraData *fpextra, - double *p_rows, int *p_width, - Cost *p_startup_cost, Cost *p_total_cost); + RelOptInfo *foreignrel, + List *param_join_conds, + List *pathkeys, + PgFdwPathExtraData *fpextra, + double *p_rows, int *p_width, + Cost *p_startup_cost, Cost *p_total_cost); static void get_remote_estimate(const char *sql, - PGconn *conn, - double *rows, - int *width, - Cost *startup_cost, - Cost *total_cost); + PGconn *conn, + double *rows, + int *width, + Cost *startup_cost, + Cost *total_cost); static void adjust_foreign_grouping_path_cost(PlannerInfo *root, - List *pathkeys, - double retrieved_rows, - double width, - double limit_tuples, - Cost *p_startup_cost, - Cost *p_run_cost); + List *pathkeys, + double retrieved_rows, + double width, + double limit_tuples, + Cost *p_startup_cost, + Cost *p_run_cost); static bool ec_member_matches_foreign(PlannerInfo *root, RelOptInfo *rel, - EquivalenceClass *ec, EquivalenceMember *em, - void *arg); + EquivalenceClass *ec, EquivalenceMember *em, + void *arg); static void create_cursor(ForeignScanState *node); static void fetch_more_data(ForeignScanState *node); static void close_cursor(PGconn *conn, unsigned int cursor_number); static PgFdwModifyState *create_foreign_modify(EState *estate, - RangeTblEntry *rte, - ResultRelInfo *resultRelInfo, - CmdType operation, - Plan *subplan, - char *query, - List *target_attrs, - bool has_returning, - List *retrieved_attrs); + RangeTblEntry *rte, + ResultRelInfo *resultRelInfo, + CmdType operation, + Plan *subplan, + char *query, + List *target_attrs, + bool has_returning, + List *retrieved_attrs); static TupleTableSlot *execute_foreign_modify(EState *estate, - ResultRelInfo *resultRelInfo, - CmdType operation, - TupleTableSlot *slot, - TupleTableSlot *planSlot); + ResultRelInfo *resultRelInfo, + CmdType operation, + TupleTableSlot *slot, + TupleTableSlot *planSlot); static void prepare_foreign_modify(PgFdwModifyState *fmstate); static const char **convert_prep_stmt_params(PgFdwModifyState *fmstate, - ItemPointer tupleid, - TupleTableSlot *slot); + ItemPointer tupleid, + TupleTableSlot *slot); static void store_returning_result(PgFdwModifyState *fmstate, - TupleTableSlot *slot, PGresult *res); + TupleTableSlot *slot, PGresult *res); static void finish_foreign_modify(PgFdwModifyState *fmstate); static List *build_remote_returning(Index rtindex, Relation rel, - List *returningList); + List *returningList); static void rebuild_fdw_scan_tlist(ForeignScan *fscan, List *tlist); static void execute_dml_stmt(ForeignScanState *node); static TupleTableSlot *get_returning_data(ForeignScanState *node); static void init_returning_filter(PgFdwDirectModifyState *dmstate, - List *fdw_scan_tlist, - Index rtindex); + List *fdw_scan_tlist, + Index rtindex); static TupleTableSlot *apply_returning_filter(PgFdwDirectModifyState *dmstate, - TupleTableSlot *slot, - EState *estate); + TupleTableSlot *slot, + EState *estate); static void prepare_query_params(PlanState *node, - List *fdw_exprs, - int numParams, - FmgrInfo **param_flinfo, - List **param_exprs, - const char ***param_values); + List *fdw_exprs, + int numParams, + FmgrInfo **param_flinfo, + List **param_exprs, + const char ***param_values); static void process_query_params(ExprContext *econtext, - FmgrInfo *param_flinfo, - List *param_exprs, - const char **param_values); -static int postgresAcquireSampleRowsFunc(Relation relation, int elevel, - HeapTuple *rows, int targrows, - double *totalrows, - double *totaldeadrows); + FmgrInfo *param_flinfo, + List *param_exprs, + const char **param_values); +static int postgresAcquireSampleRowsFunc(Relation relation, int elevel, + HeapTuple *rows, int targrows, + double *totalrows, + double *totaldeadrows); static void analyze_row_processor(PGresult *res, int row, - PgFdwAnalyzeState *astate); + PgFdwAnalyzeState *astate); static HeapTuple make_tuple_from_result_row(PGresult *res, - int row, - Relation rel, - AttInMetadata *attinmeta, - List *retrieved_attrs, - ForeignScanState *fsstate, - MemoryContext temp_context); + int row, + Relation rel, + AttInMetadata *attinmeta, + List *retrieved_attrs, + ForeignScanState *fsstate, + MemoryContext temp_context); static void conversion_error_callback(void *arg); static bool foreign_join_ok(PlannerInfo *root, RelOptInfo *joinrel, - JoinType jointype, RelOptInfo *outerrel, RelOptInfo *innerrel, - JoinPathExtraData *extra); + JoinType jointype, RelOptInfo *outerrel, RelOptInfo *innerrel, + JoinPathExtraData *extra); static bool foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel, - Node *havingQual); + Node *havingQual); static List *get_useful_pathkeys_for_relation(PlannerInfo *root, - RelOptInfo *rel); + RelOptInfo *rel); static List *get_useful_ecs_for_relation(PlannerInfo *root, RelOptInfo *rel); static void add_paths_with_pathkeys_for_rel(PlannerInfo *root, RelOptInfo *rel, - Path *epq_path); + Path *epq_path); static void add_foreign_grouping_paths(PlannerInfo *root, - RelOptInfo *input_rel, - RelOptInfo *grouped_rel, - GroupPathExtraData *extra); + RelOptInfo *input_rel, + RelOptInfo *grouped_rel, + GroupPathExtraData *extra); static void add_foreign_ordered_paths(PlannerInfo *root, - RelOptInfo *input_rel, - RelOptInfo *ordered_rel); + RelOptInfo *input_rel, + RelOptInfo *ordered_rel); static void add_foreign_final_paths(PlannerInfo *root, - RelOptInfo *input_rel, - RelOptInfo *final_rel, - FinalPathExtraData *extra); + RelOptInfo *input_rel, + RelOptInfo *final_rel, + FinalPathExtraData *extra); static void apply_server_options(PgFdwRelationInfo *fpinfo); static void apply_table_options(PgFdwRelationInfo *fpinfo); static void merge_fdw_options(PgFdwRelationInfo *fpinfo, - const PgFdwRelationInfo *fpinfo_o, - const PgFdwRelationInfo *fpinfo_i); + const PgFdwRelationInfo *fpinfo_o, + const PgFdwRelationInfo *fpinfo_i); /* diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h index 3e4603d718..30b6502bc0 100644 --- a/contrib/postgres_fdw/postgres_fdw.h +++ b/contrib/postgres_fdw/postgres_fdw.h @@ -128,72 +128,72 @@ extern unsigned int GetPrepStmtNumber(PGconn *conn); extern PGresult *pgfdw_get_result(PGconn *conn, const char *query); extern PGresult *pgfdw_exec_query(PGconn *conn, const char *query); extern void pgfdw_report_error(int elevel, PGresult *res, PGconn *conn, - bool clear, const char *sql); + bool clear, const char *sql); /* in option.c */ -extern int ExtractConnectionOptions(List *defelems, - const char **keywords, - const char **values); +extern int ExtractConnectionOptions(List *defelems, + const char **keywords, + const char **values); extern List *ExtractExtensionList(const char *extensionsString, - bool warnOnMissing); + bool warnOnMissing); /* in deparse.c */ extern void classifyConditions(PlannerInfo *root, - RelOptInfo *baserel, - List *input_conds, - List **remote_conds, - List **local_conds); + RelOptInfo *baserel, + List *input_conds, + List **remote_conds, + List **local_conds); extern bool is_foreign_expr(PlannerInfo *root, - RelOptInfo *baserel, - Expr *expr); + RelOptInfo *baserel, + Expr *expr); extern bool is_foreign_param(PlannerInfo *root, - RelOptInfo *baserel, - Expr *expr); + RelOptInfo *baserel, + Expr *expr); extern void deparseInsertSql(StringInfo buf, RangeTblEntry *rte, - Index rtindex, Relation rel, - List *targetAttrs, bool doNothing, - List *withCheckOptionList, List *returningList, - List **retrieved_attrs); + Index rtindex, Relation rel, + List *targetAttrs, bool doNothing, + List *withCheckOptionList, List *returningList, + List **retrieved_attrs); extern void deparseUpdateSql(StringInfo buf, RangeTblEntry *rte, - Index rtindex, Relation rel, - List *targetAttrs, - List *withCheckOptionList, List *returningList, - List **retrieved_attrs); + Index rtindex, Relation rel, + List *targetAttrs, + List *withCheckOptionList, List *returningList, + List **retrieved_attrs); extern void deparseDirectUpdateSql(StringInfo buf, PlannerInfo *root, - Index rtindex, Relation rel, - RelOptInfo *foreignrel, - List *targetlist, - List *targetAttrs, - List *remote_conds, - List **params_list, - List *returningList, - List **retrieved_attrs); + Index rtindex, Relation rel, + RelOptInfo *foreignrel, + List *targetlist, + List *targetAttrs, + List *remote_conds, + List **params_list, + List *returningList, + List **retrieved_attrs); extern void deparseDeleteSql(StringInfo buf, RangeTblEntry *rte, - Index rtindex, Relation rel, - List *returningList, - List **retrieved_attrs); + Index rtindex, Relation rel, + List *returningList, + List **retrieved_attrs); extern void deparseDirectDeleteSql(StringInfo buf, PlannerInfo *root, - Index rtindex, Relation rel, - RelOptInfo *foreignrel, - List *remote_conds, - List **params_list, - List *returningList, - List **retrieved_attrs); + Index rtindex, Relation rel, + RelOptInfo *foreignrel, + List *remote_conds, + List **params_list, + List *returningList, + List **retrieved_attrs); extern void deparseAnalyzeSizeSql(StringInfo buf, Relation rel); extern void deparseAnalyzeSql(StringInfo buf, Relation rel, - List **retrieved_attrs); + List **retrieved_attrs); extern void deparseStringLiteral(StringInfo buf, const char *val); extern Expr *find_em_expr_for_rel(EquivalenceClass *ec, RelOptInfo *rel); extern Expr *find_em_expr_for_input_target(PlannerInfo *root, - EquivalenceClass *ec, - PathTarget *target); + EquivalenceClass *ec, + PathTarget *target); extern List *build_tlist_to_deparse(RelOptInfo *foreignrel); extern void deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root, - RelOptInfo *foreignrel, List *tlist, - List *remote_conds, List *pathkeys, - bool has_final_sort, bool has_limit, - bool is_subquery, - List **retrieved_attrs, List **params_list); + RelOptInfo *foreignrel, List *tlist, + List *remote_conds, List *pathkeys, + bool has_final_sort, bool has_limit, + bool is_subquery, + List **retrieved_attrs, List **params_list); extern const char *get_jointype_name(JoinType jointype); /* in shippable.c */ diff --git a/contrib/sepgsql/sepgsql.h b/contrib/sepgsql/sepgsql.h index a2d48d37c5..7197e3cdf0 100644 --- a/contrib/sepgsql/sepgsql.h +++ b/contrib/sepgsql/sepgsql.h @@ -226,43 +226,43 @@ extern int sepgsql_set_mode(int new_mode); extern bool sepgsql_getenforce(void); extern void sepgsql_audit_log(bool denied, - const char *scontext, - const char *tcontext, - uint16 tclass, - uint32 audited, - const char *audit_name); + const char *scontext, + const char *tcontext, + uint16 tclass, + uint32 audited, + const char *audit_name); extern void sepgsql_compute_avd(const char *scontext, - const char *tcontext, - uint16 tclass, - struct av_decision *avd); + const char *tcontext, + uint16 tclass, + struct av_decision *avd); extern char *sepgsql_compute_create(const char *scontext, - const char *tcontext, - uint16 tclass, - const char *objname); + const char *tcontext, + uint16 tclass, + const char *objname); extern bool sepgsql_check_perms(const char *scontext, - const char *tcontext, - uint16 tclass, - uint32 required, - const char *audit_name, - bool abort_on_violation); + const char *tcontext, + uint16 tclass, + uint32 required, + const char *audit_name, + bool abort_on_violation); /* * uavc.c */ #define SEPGSQL_AVC_NOAUDIT ((void *)(-1)) extern bool sepgsql_avc_check_perms_label(const char *tcontext, - uint16 tclass, - uint32 required, - const char *audit_name, - bool abort_on_violation); + uint16 tclass, + uint32 required, + const char *audit_name, + bool abort_on_violation); extern bool sepgsql_avc_check_perms(const ObjectAddress *tobject, - uint16 tclass, - uint32 required, - const char *audit_name, - bool abort_on_violation); + uint16 tclass, + uint32 required, + const char *audit_name, + bool abort_on_violation); extern char *sepgsql_avc_trusted_proc(Oid functionId); extern void sepgsql_avc_init(void); @@ -274,7 +274,7 @@ extern void sepgsql_init_client_label(void); extern char *sepgsql_get_label(Oid relOid, Oid objOid, int32 subId); extern void sepgsql_object_relabel(const ObjectAddress *object, - const char *seclabel); + const char *seclabel); /* * dml.c @@ -285,7 +285,7 @@ extern bool sepgsql_dml_privileges(List *rangeTabls, bool abort_on_violation); * database.c */ extern void sepgsql_database_post_create(Oid databaseId, - const char *dtemplate); + const char *dtemplate); extern void sepgsql_database_drop(Oid databaseId); extern void sepgsql_database_relabel(Oid databaseId, const char *seclabel); extern void sepgsql_database_setattr(Oid databaseId); @@ -308,7 +308,7 @@ extern void sepgsql_schema_rename(Oid namespaceId); extern void sepgsql_attribute_post_create(Oid relOid, AttrNumber attnum); extern void sepgsql_attribute_drop(Oid relOid, AttrNumber attnum); extern void sepgsql_attribute_relabel(Oid relOid, AttrNumber attnum, - const char *seclabel); + const char *seclabel); extern void sepgsql_attribute_setattr(Oid relOid, AttrNumber attnum); extern void sepgsql_relation_post_create(Oid relOid); extern void sepgsql_relation_drop(Oid relOid); diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c index cd02495c45..e31be80828 100644 --- a/contrib/tablefunc/tablefunc.c +++ b/contrib/tablefunc/tablefunc.c @@ -48,41 +48,41 @@ PG_MODULE_MAGIC; static HTAB *load_categories_hash(char *cats_sql, MemoryContext per_query_ctx); static Tuplestorestate *get_crosstab_tuplestore(char *sql, - HTAB *crosstab_hash, - TupleDesc tupdesc, - MemoryContext per_query_ctx, - bool randomAccess); + HTAB *crosstab_hash, + TupleDesc tupdesc, + MemoryContext per_query_ctx, + bool randomAccess); static void validateConnectbyTupleDesc(TupleDesc tupdesc, bool show_branch, bool show_serial); static bool compatCrosstabTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2); static void compatConnectbyTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2); static void get_normal_pair(float8 *x1, float8 *x2); static Tuplestorestate *connectby(char *relname, - char *key_fld, - char *parent_key_fld, - char *orderby_fld, - char *branch_delim, - char *start_with, - int max_depth, - bool show_branch, - bool show_serial, - MemoryContext per_query_ctx, - bool randomAccess, - AttInMetadata *attinmeta); + char *key_fld, + char *parent_key_fld, + char *orderby_fld, + char *branch_delim, + char *start_with, + int max_depth, + bool show_branch, + bool show_serial, + MemoryContext per_query_ctx, + bool randomAccess, + AttInMetadata *attinmeta); static void build_tuplestore_recursively(char *key_fld, - char *parent_key_fld, - char *relname, - char *orderby_fld, - char *branch_delim, - char *start_with, - char *branch, - int level, - int *serial, - int max_depth, - bool show_branch, - bool show_serial, - MemoryContext per_query_ctx, - AttInMetadata *attinmeta, - Tuplestorestate *tupstore); + char *parent_key_fld, + char *relname, + char *orderby_fld, + char *branch_delim, + char *start_with, + char *branch, + int level, + int *serial, + int max_depth, + bool show_branch, + bool show_serial, + MemoryContext per_query_ctx, + AttInMetadata *attinmeta, + Tuplestorestate *tupstore); typedef struct { diff --git a/contrib/test_decoding/test_decoding.c b/contrib/test_decoding/test_decoding.c index e3f394f512..33955a478e 100644 --- a/contrib/test_decoding/test_decoding.c +++ b/contrib/test_decoding/test_decoding.c @@ -39,29 +39,29 @@ typedef struct } TestDecodingData; static void pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, - bool is_init); + bool is_init); static void pg_decode_shutdown(LogicalDecodingContext *ctx); static void pg_decode_begin_txn(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn); + ReorderBufferTXN *txn); static void pg_output_begin(LogicalDecodingContext *ctx, - TestDecodingData *data, - ReorderBufferTXN *txn, - bool last_write); + TestDecodingData *data, + ReorderBufferTXN *txn, + bool last_write); static void pg_decode_commit_txn(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, XLogRecPtr commit_lsn); + ReorderBufferTXN *txn, XLogRecPtr commit_lsn); static void pg_decode_change(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, Relation rel, - ReorderBufferChange *change); + ReorderBufferTXN *txn, Relation rel, + ReorderBufferChange *change); static void pg_decode_truncate(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, - int nrelations, Relation relations[], - ReorderBufferChange *change); + ReorderBufferTXN *txn, + int nrelations, Relation relations[], + ReorderBufferChange *change); static bool pg_decode_filter(LogicalDecodingContext *ctx, - RepOriginId origin_id); + RepOriginId origin_id); static void pg_decode_message(LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, XLogRecPtr message_lsn, - bool transactional, const char *prefix, - Size sz, const char *message); + ReorderBufferTXN *txn, XLogRecPtr message_lsn, + bool transactional, const char *prefix, + Size sz, const char *message); void _PG_init(void) diff --git a/contrib/tsm_system_rows/tsm_system_rows.c b/contrib/tsm_system_rows/tsm_system_rows.c index 3611d05833..e6dbf6bc0d 100644 --- a/contrib/tsm_system_rows/tsm_system_rows.c +++ b/contrib/tsm_system_rows/tsm_system_rows.c @@ -55,20 +55,20 @@ typedef struct } SystemRowsSamplerData; static void system_rows_samplescangetsamplesize(PlannerInfo *root, - RelOptInfo *baserel, - List *paramexprs, - BlockNumber *pages, - double *tuples); + RelOptInfo *baserel, + List *paramexprs, + BlockNumber *pages, + double *tuples); static void system_rows_initsamplescan(SampleScanState *node, - int eflags); + int eflags); static void system_rows_beginsamplescan(SampleScanState *node, - Datum *params, - int nparams, - uint32 seed); + Datum *params, + int nparams, + uint32 seed); static BlockNumber system_rows_nextsampleblock(SampleScanState *node, BlockNumber nblocks); static OffsetNumber system_rows_nextsampletuple(SampleScanState *node, - BlockNumber blockno, - OffsetNumber maxoffset); + BlockNumber blockno, + OffsetNumber maxoffset); static uint32 random_relative_prime(uint32 n, SamplerRandomState randstate); diff --git a/contrib/tsm_system_time/tsm_system_time.c b/contrib/tsm_system_time/tsm_system_time.c index ab9f685f0a..ed486c4696 100644 --- a/contrib/tsm_system_time/tsm_system_time.c +++ b/contrib/tsm_system_time/tsm_system_time.c @@ -55,20 +55,20 @@ typedef struct } SystemTimeSamplerData; static void system_time_samplescangetsamplesize(PlannerInfo *root, - RelOptInfo *baserel, - List *paramexprs, - BlockNumber *pages, - double *tuples); + RelOptInfo *baserel, + List *paramexprs, + BlockNumber *pages, + double *tuples); static void system_time_initsamplescan(SampleScanState *node, - int eflags); + int eflags); static void system_time_beginsamplescan(SampleScanState *node, - Datum *params, - int nparams, - uint32 seed); + Datum *params, + int nparams, + uint32 seed); static BlockNumber system_time_nextsampleblock(SampleScanState *node, BlockNumber nblocks); static OffsetNumber system_time_nextsampletuple(SampleScanState *node, - BlockNumber blockno, - OffsetNumber maxoffset); + BlockNumber blockno, + OffsetNumber maxoffset); static uint32 random_relative_prime(uint32 n, SamplerRandomState randstate); diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index 95e580df08..1e5b71d9a0 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -41,16 +41,16 @@ typedef struct /* local declarations */ static xmlChar *pgxmlNodeSetToText(xmlNodeSetPtr nodeset, - xmlChar *toptagname, xmlChar *septagname, - xmlChar *plainsep); + xmlChar *toptagname, xmlChar *septagname, + xmlChar *plainsep); static text *pgxml_result_to_text(xmlXPathObjectPtr res, xmlChar *toptag, - xmlChar *septag, xmlChar *plainsep); + xmlChar *septag, xmlChar *plainsep); static xmlChar *pgxml_texttoxmlchar(text *textstring); static xmlXPathObjectPtr pgxml_xpath(text *document, xmlChar *xpath, - xpath_workspace *workspace); + xpath_workspace *workspace); static void cleanup_workspace(xpath_workspace *workspace); diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c index aba234c0af..ae7b729edd 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 60f857f02d..332a854af6 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 a10c206231..ad0d18ed39 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 fcc468ced9..f907b4bc29 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 1bf36d6f5c..e2bfbf8a68 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 a5bc6f5749..5abb472ee4 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 44add482d3..24d6cd0249 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 cfbabb5265..4d0d24be0b 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 9f82eef8c3..11a8ed7bbc 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 fb085c7dd8..57c3b830d8 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 1f5ba33d51..b87ff26f9c 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 d70a138f54..45c00aaa87 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 8e81eda517..ecef0ff072 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 4f2363e21e..d71354140e 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 c9da2307be..1826b51bbb 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 e2029d842c..4270226eee 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 048e40e46f..e9f2c84af1 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 e17f01718f..5321762d5e 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 b7adfdb826..376ee2a63b 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 61c90e6bb7..79ae499198 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 723e153705..6c342635e8 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 674c1d3a81..a4a28e88ec 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 417a2bf8e6..0efe3ce999 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 c0a45dc75a..b615940ed3 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 e10715a775..55d6e91d1c 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 637e47c08c..a3c4a1df3b 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 0fc9139bad..aefdd2916d 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 36a570045a..2eccc99023 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 e7c40cba97..de4d4efc46 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 02fb352b94..85e54ac44b 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 dc42213ac6..1f809c24a1 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 d6fa574238..d0b9013caf 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 d045fe0d10..f43ec6774b 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 1238d544cd..431b8477e9 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 42d373ab83..5ff5bdbd53 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 b1fb9b3201..4693c667b5 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 3bd55fbdd3..47db7a8a88 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 8162f884bd..3316734e14 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 5b00b7275b..d259160103 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 763b999707..4004468fa0 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 974d42fc86..2dbc65b125 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 21e028283c..5196d6181d 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 b40da74e09..f1108ccc8b 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 c7c9e91b6a..1c7dd51b9f 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 1c76dcfa0d..d3c0a93a2e 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 9196aa3aae..88be7fe022 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 f0fdda1eb9..2797af35c3 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 7af1670c0d..6315fc4b2f 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 3c46c25107..86820eecfc 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 b7d1ac0923..50c8bb9ce6 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 cdd5006a72..97b911679c 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 7a32ac1fb1..2235e5626f 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 da98c54391..8134098fc1 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 310d45266f..7cab039ded 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 0f9a12b35c..bcaa26c997 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 3487caf82f..002584b941 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 4a9b4efb05..fb7f8ddefc 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 cf20ddb4e9..de6282a667 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 e0ec62c88c..6cb545c126 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 5a7ee0de4c..738e6ec7e2 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 cacc023619..ebaec4f8dd 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 5f81aa57d4..b00891ffd2 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 5015e5b3b6..15207bf75a 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 f26a2f4779..be7a40d5d2 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 adb77d8f69..efef120c03 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 039a87c155..92969636b7 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 300bb1261f..59ca5cd5a9 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 62a4c4fb9b..40ea629ffe 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 97cf0bc4ad..417d595a7f 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 99bf3c29f2..dc2940cd4e 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 b8c7b9657f..6a1ccdeb82 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 6a85e14369..1df76623ad 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 fc231caf70..c278ee7318 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 b7917618bf..343cd1dbb0 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 0d32f2d6e3..1ac1a71bd9 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 e9add1b987..0960b339ca 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 95ec352abe..217d3a4533 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 7fa8dcce61..602a8dbd1c 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 33df2ec0af..87fab52d83 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 209021a61a..3132a13785 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 8e5eec22b5..11a7f29eaf 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 7e6bcc5239..e9c8873ade 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 834094898d..ccc586d8e8 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 d69a73d13e..e7b379dfda 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 fdb2c36246..c7f909241b 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 5d64471eed..e4a6c20ed0 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 612a88456e..66a67c72b2 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 3b602bb8ba..c41c5f45e7 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 44e4a6d104..e80abe1b8b 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 da9074c54c..0ab9a9939c 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 73ba298c5d..6f2b4d62b4 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 265250186a..c8a3efc365 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 ad13fd9a05..3db43e6f8a 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 b34f565bfe..29a8a16f5f 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 46da055e76..bd36f8ee68 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 43ab9fb392..5b4a602952 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 a74b46c04f..758b16dd35 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 d2da5d3a95..6ef128e2ab 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 64eec91f8b..3c33ce74e0 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 5ccdc1af2e..8484a287e7 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 5dce284fe7..ee5b1c493b 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 73bfd424d9..ac7aa81f67 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 8acdaf2057..3125e5c993 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 3662fcada8..f6445e286a 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 b090828c01..def00cd7c5 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 22d0fe5ac4..8eedb613a1 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 1bb58e3e61..30133634c7 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 d82420bd68..859aac07b7 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 f095196fb6..24dd372252 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 9984fd55e8..6f8a03709e 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 6ab3b77246..bdaa3b1ad7 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 4c7b149570..45811e155c 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 caf3b71f9e..a7763f3f60 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 f6e90ea3a7..e0d0bfabd6 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 673066a456..c97c811e63 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 37d5ad44a5..52ac0d78f7 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 62cf758ca1..3c8237798a 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 8ed30c011a..05ae73f7db 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 64ab0cfc0e..9b913feb89 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 e07bab831e..6c69c1c147 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 af05bb7511..b7723481b0 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 bfad6b7987..4bf777d82d 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 afd32884a2..a2a9b1f7be 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 61b5b119b0..e9bd5eaff5 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 3434219dbd..c208e9bfb0 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 d8ff4bf432..501ad775cb 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 46623c33c6..43c3b7ea48 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 c301e41a4a..08b5061612 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 a4efa693ea..32695db367 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 270c11901b..608d5adfed 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 9798dca272..73da0c2d8e 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 67c35c5e86..9381939c82 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 48005434d4..cb897cc7f4 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 4204ca4025..dc11f098e0 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 921ebfb5ed..efd0fbc21c 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 aebe162713..67eeba938d 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 66e6ad9b93..05172ff023 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 c1def3823f..cd9d49c1f7 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 ba955290b1..16d315176e 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 501b0e9e2d..2e84d6b3b4 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 bbf204ddfb..38bc61e687 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 b67158154e..18ebc51bca 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 d66471c7a4..d884d2bb00 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 80441de65e..2405acbf6f 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 fc4fc09a83..b81eba7219 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 272e2eb10a..6054bd2b53 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 03e5f12d0d..3b50fd29ad 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 bb3b7969f2..41402821a1 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 315c81eb8e..15cc518a82 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 bd6f3c8044..b13c246183 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 c745fcdd2b..d50410d23a 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 c6ce1011e2..2a6b2ff153 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 3840252a5b..903478d8ca 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 0cfe9997a5..4d2e586bd6 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 8e136a7981..97f535a2f0 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 752cf1b315..2a44b434a5 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 24f0d5c08c..0e1015962d 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 541b9d0957..38915fbce1 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 0640d11fac..77a48b039d 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 0e9598ebfe..ef2f5b45d8 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 5d554633d2..9de5e0680d 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 bbeaada2ae..7450d74b7a 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 0e33a370c6..99d26de7e6 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 53f814f778..5982af4de1 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 467e56663e..ac5106f39d 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 fda3442c5b..4a86fbc1c1 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 acd8a9280b..fd85b9c8f4 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 285def556b..b4f2b28b51 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 f2c99e648a..8e098e401b 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 a471832086..5e934e9bfd 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 8cd7d56b22..8765af71d4 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 3985e33707..207d40904b 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 36dcb28754..c2978a949a 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 b455c59cd7..6eba08a920 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 eec3a22842..151c3ef882 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 acb4d9a106..bbd38c06d1 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 0411963f93..e7df47de3e 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 acebf5893e..7894b77fc2 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 63687a97ec..d317fd7006 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 83734575c2..577791f3d5 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 6bd889461e..7df2b6154c 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 39080776b0..ea40c28733 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 8fa5c11cc7..e20158b962 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 e9f532ce69..300af6f06f 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 8a71c2b534..591bc16e57 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 cc6112df3b..ab187915c1 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 d22820dec7..c8c44a53bf 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 133503cb9b..b1a426265b 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 bee79d84dc..7332e6b590 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 03caceaf7b..06659ab265 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 ffae52089f..73c455e66f 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 1ead778cc9..ccdf80d614 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 eee8286057..c17b3f49dd 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 23ccc59f13..142293fd2c 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 a22c7928e7..d32996b6fc 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 bff254c2b2..2426cbcf8e 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 010cc061c8..18a0f62ba6 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 6e471c3e43..91f7714650 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 215f1463bb..842fcabd97 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 74eb449060..9abc9d778f 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 c8958766f1..6745a2432e 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 7f607b2bf8..2fedbc4c15 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 52ca6eeb28..bbcd18d52b 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 b6d2e2ac11..61aa1697c3 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 7f15933de2..d5e71e8bd7 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 92d0507949..9578b5c761 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 154d7eb9a1..ed935faead 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 530f1ccddb..bd33e67e33 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 83c35a4d8b..cfd139e6e9 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 5979f15b8d..3df14f9390 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 870131b073..a0ac949285 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 a03b7f7860..eafb94b697 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 9cef018c0b..3ae1556246 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 7d78aac9f8..8316d9aa06 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 0068e71d11..9def318c57 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 9971abd71f..166c863026 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 3a6a878ffa..206576d4bd 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 f2be614310..2ecc73b772 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 a4193e2cce..5fdc3ca251 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 a9784d067c..26d293709a 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 c742172bd8..69f41ab455 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 a20e44b1fe..e8d54e70b8 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 1a28d75c59..7969f6f584 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 dd88c09e6d..28bdc7243f 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 b7f0b4a35e..10cd38a531 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 5d70c7a6a6..873d64b630 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 f4dfc504d6..69beaf2ab5 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 e2583bc680..26e0634833 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 db9dfcbb7d..5e980cf23f 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 8268ab2900..5e0f0614ee 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 fe477441b6..b1e268a414 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 fbc2863622..201784bbf6 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 9d01e0be9c..f78f5cda53 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 72c450c70e..cb16d701d8 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 ea6c76d364..6f93ce64da 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 0273f7900f..640c7f0bc6 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 f0ef39ea09..8bb730ce8e 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 4d7474047c..631e421062 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 00a9a33ecc..90a9197792 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 09cf0e1abc..17a7f6c9d8 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 b9e0f5c048..44a6eef5bb 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 f911511158..9dda4820af 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 65fabb7f3b..d7e3f09f1a 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 fdcc62096c..d969a5b9c2 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 e166effa5e..0864838867 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 650e140723..aa177df017 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 48b8034f8d..d43c3055f3 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 d05930bc4c..00def27881 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 88b0969b89..419bde567b 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 9851bd43d5..4c114439cf 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 969884d485..2b992d7832 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 7ad0aa0b94..3b4f21bc54 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 7857424c2c..fc01e7876d 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 456297a531..be684786d6 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 f039567e20..9b640ccd40 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 a5e77a208e..b7fac5d295 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 bc2be43e21..4630e89586 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 8acfa303c5..0516940f74 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 906bd87055..cdb9db475d 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 08aff333a4..6e4a343439 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 1135ca9122..4b826cdaa5 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 9257235001..0c9e98973a 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 02a23694cb..eaacafb7be 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 43c58c351b..b07be12236 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 33d69239d9..e23669fb4f 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 64aafef311..7be11c48ab 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 f21934dbbc..8985b9e095 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 08106aec56..8df18eb2ee 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 3eebd9ef51..7b8e67899e 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 0f38e7c708..3fc7f92182 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 3b442935bb..ef9fc15ac3 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}; diff --git a/src/bin/initdb/findtimezone.c b/src/bin/initdb/findtimezone.c index 53b3b1b198..3477a08efd 100644 --- a/src/bin/initdb/findtimezone.c +++ b/src/bin/initdb/findtimezone.c @@ -159,10 +159,10 @@ struct tztry }; static bool check_system_link_file(const char *linkname, struct tztry *tt, - char *bestzonename); + char *bestzonename); static void scan_available_timezones(char *tzdir, char *tzdirsub, - struct tztry *tt, - int *bestscore, char *bestzonename); + struct tztry *tt, + int *bestscore, char *bestzonename); /* diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 9a9069e551..ad5cd4194a 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -231,7 +231,7 @@ static char bin_path[MAXPGPATH]; static char backend_exec[MAXPGPATH]; static char **replace_token(char **lines, - const char *token, const char *replacement); + const char *token, const char *replacement); #ifndef HAVE_UNIX_SOCKETS static char **filter_lines_with_token(char **lines, const char *token); @@ -268,7 +268,7 @@ static char *escape_quotes(const char *src); static char *escape_quotes_bki(const char *src); static int locale_date_order(const char *locale); static void check_locale_name(int category, const char *locale, - char **canonname); + char **canonname); static bool check_locale_encoding(const char *locale, int encoding); static void setlocales(void); static void usage(const char *progname); diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 74d7c85664..9f0bede93b 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -152,7 +152,7 @@ static void WriteRecoveryConf(void); static void BaseBackup(void); static bool reached_end_position(XLogRecPtr segendpos, uint32 timeline, - bool segment_finished); + bool segment_finished); static const char *get_tablespace_mapping(const char *dir); static void tablespace_list_append(const char *arg); diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index 86859b7813..f39c1339d7 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -54,7 +54,7 @@ static void close_destination_dir(DIR *dest_dir, char *dest_folder); static XLogRecPtr FindStreamingStart(uint32 *tli); static void StreamLog(void); static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline, - bool segment_finished); + bool segment_finished); static void disconnect_atexit(void) diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index 2e45c14642..b029118bf6 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -68,7 +68,7 @@ static void usage(void); static void StreamLogicalLog(void); static bool flushAndSendFeedback(PGconn *conn, TimestampTz *now); static void prepareToTerminate(PGconn *conn, XLogRecPtr endpos, - bool keepalive, XLogRecPtr lsn); + bool keepalive, XLogRecPtr lsn); static void usage(void) diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index bf99a7dbc8..2fd16421aa 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -39,23 +39,23 @@ static XLogRecPtr lastFlushPosition = InvalidXLogRecPtr; static bool still_sending = true; /* feedback still needs to be sent? */ static PGresult *HandleCopyStream(PGconn *conn, StreamCtl *stream, - XLogRecPtr *stoppos); + XLogRecPtr *stoppos); static int CopyStreamPoll(PGconn *conn, long timeout_ms, pgsocket stop_socket); -static int CopyStreamReceive(PGconn *conn, long timeout, pgsocket stop_socket, - char **buffer); +static int CopyStreamReceive(PGconn *conn, long timeout, pgsocket stop_socket, + char **buffer); static bool ProcessKeepaliveMsg(PGconn *conn, StreamCtl *stream, char *copybuf, - int len, XLogRecPtr blockpos, TimestampTz *last_status); + int len, XLogRecPtr blockpos, TimestampTz *last_status); static bool ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, - XLogRecPtr *blockpos); + XLogRecPtr *blockpos); static PGresult *HandleEndOfCopyStream(PGconn *conn, StreamCtl *stream, char *copybuf, - XLogRecPtr blockpos, XLogRecPtr *stoppos); + XLogRecPtr blockpos, XLogRecPtr *stoppos); static bool CheckCopyStreamStop(PGconn *conn, StreamCtl *stream, XLogRecPtr blockpos, - XLogRecPtr *stoppos); + XLogRecPtr *stoppos); static long CalculateCopyStreamSleeptime(TimestampTz now, int standby_message_timeout, - TimestampTz last_status); + TimestampTz last_status); static bool ReadEndOfStreamingResult(PGresult *res, XLogRecPtr *startpos, - uint32 *timeline); + uint32 *timeline); static bool mark_file_as_archived(StreamCtl *stream, const char *fname) diff --git a/src/bin/pg_basebackup/receivelog.h b/src/bin/pg_basebackup/receivelog.h index 9f82c16e68..b6e2743f55 100644 --- a/src/bin/pg_basebackup/receivelog.h +++ b/src/bin/pg_basebackup/receivelog.h @@ -53,6 +53,6 @@ typedef struct StreamCtl extern bool CheckServerVersionForStreaming(PGconn *conn); extern bool ReceiveXlogStream(PGconn *conn, - StreamCtl *stream); + StreamCtl *stream); #endif /* RECEIVELOG_H */ diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h index 2fa74e71bd..a756eee262 100644 --- a/src/bin/pg_basebackup/streamutil.h +++ b/src/bin/pg_basebackup/streamutil.h @@ -33,21 +33,21 @@ extern PGconn *GetConnection(void); /* Replication commands */ extern bool CreateReplicationSlot(PGconn *conn, const char *slot_name, - const char *plugin, bool is_temporary, - bool is_physical, bool reserve_wal, - bool slot_exists_ok); + const char *plugin, bool is_temporary, + bool is_physical, bool reserve_wal, + bool slot_exists_ok); extern bool DropReplicationSlot(PGconn *conn, const char *slot_name); extern bool RunIdentifySystem(PGconn *conn, char **sysid, - TimeLineID *starttli, - XLogRecPtr *startpos, - char **db_name); + TimeLineID *starttli, + XLogRecPtr *startpos, + char **db_name); extern bool RetrieveWalSegSize(PGconn *conn); extern TimestampTz feGetCurrentTimestamp(void); extern void feTimestampDifference(TimestampTz start_time, TimestampTz stop_time, - long *secs, int *microsecs); + long *secs, int *microsecs); extern bool feTimestampDifferenceExceeds(TimestampTz start_time, TimestampTz stop_time, - int msec); + int msec); extern void fe_sendint64(int64 i, char *buf); extern int64 fe_recvint64(char *buf); diff --git a/src/bin/pg_basebackup/walmethods.h b/src/bin/pg_basebackup/walmethods.h index 247692e4b4..94d0f6bc91 100644 --- a/src/bin/pg_basebackup/walmethods.h +++ b/src/bin/pg_basebackup/walmethods.h @@ -86,7 +86,7 @@ struct WalWriteMethod * not all those required for pg_receivewal) */ WalWriteMethod *CreateWalDirectoryMethod(const char *basedir, - int compression, bool sync); + int compression, bool sync); WalWriteMethod *CreateWalTarMethod(const char *tarbase, int compression, bool sync); /* Cleanup routines for previously-created methods */ diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index 522a245088..8fbaeccf49 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -67,18 +67,18 @@ static ExtensionMemberId *extmembers; static int numextmembers; static void flagInhTables(Archive *fout, TableInfo *tbinfo, int numTables, - InhInfo *inhinfo, int numInherits); + InhInfo *inhinfo, int numInherits); static void flagInhIndexes(Archive *fout, TableInfo *tblinfo, int numTables); static void flagInhAttrs(DumpOptions *dopt, TableInfo *tblinfo, int numTables); static DumpableObject **buildIndexArray(void *objArray, int numObjs, - Size objSize); + Size objSize); static int DOCatalogIdCompare(const void *p1, const void *p2); static int ExtensionMemberIdCompare(const void *p1, const void *p2); static void findParentsByOid(TableInfo *self, - InhInfo *inhinfo, int numInherits); + InhInfo *inhinfo, int numInherits); static int strInArray(const char *pattern, char **arr, int arr_size); static IndxInfo *findIndexByOid(Oid oid, DumpableObject **idxinfoindex, - int numIndexes); + int numIndexes); /* diff --git a/src/bin/pg_dump/compress_io.c b/src/bin/pg_dump/compress_io.c index 952caef52c..03c3e73ad0 100644 --- a/src/bin/pg_dump/compress_io.c +++ b/src/bin/pg_dump/compress_io.c @@ -75,23 +75,23 @@ struct CompressorState }; static void ParseCompressionOption(int compression, CompressionAlgorithm *alg, - int *level); + int *level); /* Routines that support zlib compressed data I/O */ #ifdef HAVE_LIBZ static void InitCompressorZlib(CompressorState *cs, int level); static void DeflateCompressorZlib(ArchiveHandle *AH, CompressorState *cs, - bool flush); + bool flush); static void ReadDataFromArchiveZlib(ArchiveHandle *AH, ReadFunc readF); static void WriteDataToArchiveZlib(ArchiveHandle *AH, CompressorState *cs, - const char *data, size_t dLen); + const char *data, size_t dLen); static void EndCompressorZlib(ArchiveHandle *AH, CompressorState *cs); #endif /* Routines that support uncompressed data I/O */ static void ReadDataFromArchiveNone(ArchiveHandle *AH, ReadFunc readF); static void WriteDataToArchiveNone(ArchiveHandle *AH, CompressorState *cs, - const char *data, size_t dLen); + const char *data, size_t dLen); /* * Interprets a numeric 'compression' value. The algorithm implied by the diff --git a/src/bin/pg_dump/compress_io.h b/src/bin/pg_dump/compress_io.h index b6cd4b551d..69f7c8d94e 100644 --- a/src/bin/pg_dump/compress_io.h +++ b/src/bin/pg_dump/compress_io.h @@ -48,9 +48,9 @@ typedef struct CompressorState CompressorState; extern CompressorState *AllocateCompressor(int compression, WriteFunc writeF); extern void ReadDataFromArchive(ArchiveHandle *AH, int compression, - ReadFunc readF); + ReadFunc readF); extern void WriteDataToArchive(ArchiveHandle *AH, CompressorState *cs, - const void *data, size_t dLen); + const void *data, size_t dLen); extern void EndCompressor(ArchiveHandle *AH, CompressorState *cs); diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index 67691eb57a..ef8b53cd09 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -21,12 +21,12 @@ static bool parseAclItem(const char *item, const char *type, - const char *name, const char *subname, int remoteVersion, - PQExpBuffer grantee, PQExpBuffer grantor, - PQExpBuffer privs, PQExpBuffer privswgo); + const char *name, const char *subname, int remoteVersion, + PQExpBuffer grantee, PQExpBuffer grantor, + PQExpBuffer privs, PQExpBuffer privswgo); static char *copyAclUserName(PQExpBuffer output, char *input); static void AddAcl(PQExpBuffer aclbuf, const char *keyword, - const char *subname); + const char *subname); /* diff --git a/src/bin/pg_dump/dumputils.h b/src/bin/pg_dump/dumputils.h index 8194272bd7..7ec5df9513 100644 --- a/src/bin/pg_dump/dumputils.h +++ b/src/bin/pg_dump/dumputils.h @@ -37,33 +37,33 @@ extern bool buildACLCommands(const char *name, const char *subname, const char *nspname, - const char *type, const char *acls, const char *racls, - const char *owner, const char *prefix, int remoteVersion, - PQExpBuffer sql); + const char *type, const char *acls, const char *racls, + const char *owner, const char *prefix, int remoteVersion, + PQExpBuffer sql); extern bool buildDefaultACLCommands(const char *type, const char *nspname, - const char *acls, const char *racls, - const char *initacls, const char *initracls, - const char *owner, - int remoteVersion, - PQExpBuffer sql); + const char *acls, const char *racls, + const char *initacls, const char *initracls, + const char *owner, + int remoteVersion, + PQExpBuffer sql); extern void buildShSecLabelQuery(PGconn *conn, const char *catalog_name, - Oid objectId, PQExpBuffer sql); + Oid objectId, PQExpBuffer sql); extern void emitShSecLabels(PGconn *conn, PGresult *res, - PQExpBuffer buffer, const char *objtype, const char *objname); + PQExpBuffer buffer, const char *objtype, const char *objname); extern void buildACLQueries(PQExpBuffer acl_subquery, PQExpBuffer racl_subquery, - PQExpBuffer init_acl_subquery, PQExpBuffer init_racl_subquery, - const char *acl_column, const char *acl_owner, - const char *obj_kind, bool binary_upgrade); + PQExpBuffer init_acl_subquery, PQExpBuffer init_racl_subquery, + const char *acl_column, const char *acl_owner, + const char *obj_kind, bool binary_upgrade); extern bool variable_is_guc_list_quote(const char *name); extern bool SplitGUCList(char *rawstring, char separator, - char ***namelist); + char ***namelist); extern void makeAlterConfigCommand(PGconn *conn, const char *configitem, - const char *type, const char *name, - const char *type2, const char *name2, - PQExpBuffer buf); + const char *type, const char *name, + const char *type2, const char *name2, + PQExpBuffer buf); #endif /* DUMPUTILS_H */ diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c index 7152fd6457..03479f1a13 100644 --- a/src/bin/pg_dump/parallel.c +++ b/src/bin/pg_dump/parallel.c @@ -211,14 +211,14 @@ static bool HasEveryWorkerTerminated(ParallelState *pstate); static void lockTableForWorker(ArchiveHandle *AH, TocEntry *te); static void WaitForCommands(ArchiveHandle *AH, int pipefd[2]); static bool ListenToWorkers(ArchiveHandle *AH, ParallelState *pstate, - bool do_wait); + bool do_wait); static char *getMessageFromMaster(int pipefd[2]); static void sendMessageToMaster(int pipefd[2], const char *str); static int select_loop(int maxFd, fd_set *workerset); static char *getMessageFromWorker(ParallelState *pstate, - bool do_wait, int *worker); + bool do_wait, int *worker); static void sendMessageToWorker(ParallelState *pstate, - int worker, const char *str); + int worker, const char *str); static char *readMessageFromPipe(int fd); #define messageStartsWith(msg, prefix) \ diff --git a/src/bin/pg_dump/parallel.h b/src/bin/pg_dump/parallel.h index a4e355c036..b51ed92430 100644 --- a/src/bin/pg_dump/parallel.h +++ b/src/bin/pg_dump/parallel.h @@ -54,15 +54,15 @@ extern void init_parallel_dump_utils(void); extern bool IsEveryWorkerIdle(ParallelState *pstate); extern void WaitForWorkers(ArchiveHandle *AH, ParallelState *pstate, - WFW_WaitOption mode); + WFW_WaitOption mode); extern ParallelState *ParallelBackupStart(ArchiveHandle *AH); extern void DispatchJobForTocEntry(ArchiveHandle *AH, - ParallelState *pstate, - TocEntry *te, - T_Action act, - ParallelCompletionPtr callback, - void *callback_data); + ParallelState *pstate, + TocEntry *te, + T_Action act, + ParallelCompletionPtr callback, + void *callback_data); extern void ParallelBackupEnd(ArchiveHandle *AH, ParallelState *pstate); extern void set_archive_cancel_info(ArchiveHandle *AH, PGconn *conn); diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h index 7ab27391fb..79c87a649d 100644 --- a/src/bin/pg_dump/pg_backup.h +++ b/src/bin/pg_dump/pg_backup.h @@ -243,11 +243,11 @@ typedef void (*SetupWorkerPtrType) (Archive *AH); */ extern void ConnectDatabase(Archive *AH, - const char *dbname, - const char *pghost, - const char *pgport, - const char *username, - trivalue prompt_password); + const char *dbname, + const char *pghost, + const char *pgport, + const char *username, + trivalue prompt_password); extern void DisconnectDatabase(Archive *AHX); extern PGconn *GetConnection(Archive *AHX); @@ -270,8 +270,8 @@ extern Archive *OpenArchive(const char *FileSpec, const ArchiveFormat fmt); /* Create a new archive */ extern Archive *CreateArchive(const char *FileSpec, const ArchiveFormat fmt, - const int compression, bool dosync, ArchiveMode mode, - SetupWorkerPtrType setupDumpWorker); + const int compression, bool dosync, ArchiveMode mode, + SetupWorkerPtrType setupDumpWorker); /* The --list option */ extern void PrintTOCSummary(Archive *AH); diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 564772ea7e..40c77af540 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -69,10 +69,10 @@ typedef struct _parallelReadyList static ArchiveHandle *_allocAH(const char *FileSpec, const ArchiveFormat fmt, - const int compression, bool dosync, ArchiveMode mode, - SetupWorkerPtrType setupWorkerPtr); + const int compression, bool dosync, ArchiveMode mode, + SetupWorkerPtrType setupWorkerPtr); static void _getObjectDescription(PQExpBuffer buf, TocEntry *te, - ArchiveHandle *AH); + ArchiveHandle *AH); static void _printTocEntry(ArchiveHandle *AH, TocEntry *te, bool isData); static char *sanitize_line(const char *str, bool want_hyphen); static void _doSetFixedOutputState(ArchiveHandle *AH); @@ -104,12 +104,12 @@ static void RestoreOutput(ArchiveHandle *AH, OutputContext savedContext); static int restore_toc_entry(ArchiveHandle *AH, TocEntry *te, bool is_parallel); static void restore_toc_entries_prefork(ArchiveHandle *AH, - TocEntry *pending_list); + TocEntry *pending_list); static void restore_toc_entries_parallel(ArchiveHandle *AH, - ParallelState *pstate, - TocEntry *pending_list); + ParallelState *pstate, + TocEntry *pending_list); static void restore_toc_entries_postfork(ArchiveHandle *AH, - TocEntry *pending_list); + TocEntry *pending_list); static void pending_list_header_init(TocEntry *l); static void pending_list_append(TocEntry *l, TocEntry *te); static void pending_list_remove(TocEntry *te); @@ -120,25 +120,25 @@ static void ready_list_remove(ParallelReadyList *ready_list, int i); static void ready_list_sort(ParallelReadyList *ready_list); static int TocEntrySizeCompare(const void *p1, const void *p2); static void move_to_ready_list(TocEntry *pending_list, - ParallelReadyList *ready_list, - RestorePass pass); + ParallelReadyList *ready_list, + RestorePass pass); static TocEntry *pop_next_work_item(ArchiveHandle *AH, - ParallelReadyList *ready_list, - ParallelState *pstate); + ParallelReadyList *ready_list, + ParallelState *pstate); static void mark_dump_job_done(ArchiveHandle *AH, - TocEntry *te, - int status, - void *callback_data); + TocEntry *te, + int status, + void *callback_data); static void mark_restore_job_done(ArchiveHandle *AH, - TocEntry *te, - int status, - void *callback_data); + TocEntry *te, + int status, + void *callback_data); static void fix_dependencies(ArchiveHandle *AH); static bool has_lock_conflicts(TocEntry *te1, TocEntry *te2); static void repoint_table_dependencies(ArchiveHandle *AH); static void identify_locking_dependencies(ArchiveHandle *AH, TocEntry *te); static void reduce_dependencies(ArchiveHandle *AH, TocEntry *te, - ParallelReadyList *ready_list); + ParallelReadyList *ready_list); static void mark_create_done(ArchiveHandle *AH, TocEntry *te); static void inhibit_data_for_failed_table(ArchiveHandle *AH, TocEntry *te); diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index f3905c00fd..edc93da737 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -424,7 +424,7 @@ typedef struct _archiveOpts #define ARCHIVE_OPTS(...) &(ArchiveOpts){__VA_ARGS__} /* Called to add a TOC entry */ extern TocEntry *ArchiveEntry(Archive *AHX, CatalogId catalogId, - DumpId dumpId, ArchiveOpts *opts); + DumpId dumpId, ArchiveOpts *opts); extern void WriteTOC(ArchiveHandle *AH); extern void ReadTOC(ArchiveHandle *AH); diff --git a/src/bin/pg_dump/pg_backup_db.h b/src/bin/pg_dump/pg_backup_db.h index a79f5283fe..8888dd34b9 100644 --- a/src/bin/pg_dump/pg_backup_db.h +++ b/src/bin/pg_dump/pg_backup_db.h @@ -15,7 +15,7 @@ extern int ExecuteSqlCommandBuf(Archive *AHX, const char *buf, size_t bufLen); extern void ExecuteSqlStatement(Archive *AHX, const char *query); extern PGresult *ExecuteSqlQuery(Archive *AHX, const char *query, - ExecStatusType status); + ExecStatusType status); extern PGresult *ExecuteSqlQueryForSingleRow(Archive *fout, const char *query); extern void EndDBCopyMode(Archive *AHX, const char *tocEntryTag); diff --git a/src/bin/pg_dump/pg_backup_directory.c b/src/bin/pg_dump/pg_backup_directory.c index cfa2f6ec74..38a2185ab4 100644 --- a/src/bin/pg_dump/pg_backup_directory.c +++ b/src/bin/pg_dump/pg_backup_directory.c @@ -92,7 +92,7 @@ static int _WorkerJobRestoreDirectory(ArchiveHandle *AH, TocEntry *te); static int _WorkerJobDumpDirectory(ArchiveHandle *AH, TocEntry *te); static void setFilePath(ArchiveHandle *AH, char *buf, - const char *relativeFilename); + const char *relativeFilename); /* * Init routine required by ALL formats. This is a global routine diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 38a01758a1..c11cab70d8 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -152,32 +152,32 @@ static int extra_float_digits; static void help(const char *progname); static void setup_connection(Archive *AH, - const char *dumpencoding, const char *dumpsnapshot, - char *use_role); + const char *dumpencoding, const char *dumpsnapshot, + char *use_role); static ArchiveFormat parseArchiveFormat(const char *format, ArchiveMode *mode); static void expand_schema_name_patterns(Archive *fout, - SimpleStringList *patterns, - SimpleOidList *oids, - bool strict_names); + SimpleStringList *patterns, + SimpleOidList *oids, + bool strict_names); static void expand_table_name_patterns(Archive *fout, - SimpleStringList *patterns, - SimpleOidList *oids, - bool strict_names); + SimpleStringList *patterns, + SimpleOidList *oids, + bool strict_names); static NamespaceInfo *findNamespace(Archive *fout, Oid nsoid); static void dumpTableData(Archive *fout, TableDataInfo *tdinfo); static void refreshMatViewData(Archive *fout, TableDataInfo *tdinfo); static void guessConstraintInheritance(TableInfo *tblinfo, int numTables); static void dumpComment(Archive *fout, const char *type, const char *name, - const char *namespace, const char *owner, - CatalogId catalogId, int subid, DumpId dumpId); -static int findComments(Archive *fout, Oid classoid, Oid objoid, - CommentItem **items); + const char *namespace, const char *owner, + CatalogId catalogId, int subid, DumpId dumpId); +static int findComments(Archive *fout, Oid classoid, Oid objoid, + CommentItem **items); static int collectComments(Archive *fout, CommentItem **items); static void dumpSecLabel(Archive *fout, const char *type, const char *name, - const char *namespace, const char *owner, - CatalogId catalogId, int subid, DumpId dumpId); -static int findSecLabels(Archive *fout, Oid classoid, Oid objoid, - SecLabelItem **items); + const char *namespace, const char *owner, + CatalogId catalogId, int subid, DumpId dumpId); +static int findSecLabels(Archive *fout, Oid classoid, Oid objoid, + SecLabelItem **items); static int collectSecLabels(Archive *fout, SecLabelItem **items); static void dumpDumpableObject(Archive *fout, DumpableObject *dobj); static void dumpNamespace(Archive *fout, NamespaceInfo *nspinfo); @@ -222,24 +222,24 @@ static void dumpTSConfig(Archive *fout, TSConfigInfo *cfginfo); static void dumpForeignDataWrapper(Archive *fout, FdwInfo *fdwinfo); static void dumpForeignServer(Archive *fout, ForeignServerInfo *srvinfo); static void dumpUserMappings(Archive *fout, - const char *servername, const char *namespace, - const char *owner, CatalogId catalogId, DumpId dumpId); + const char *servername, const char *namespace, + const char *owner, CatalogId catalogId, DumpId dumpId); static void dumpDefaultACL(Archive *fout, DefaultACLInfo *daclinfo); static void dumpACL(Archive *fout, CatalogId objCatId, DumpId objDumpId, - const char *type, const char *name, const char *subname, - const char *nspname, const char *owner, - const char *acls, const char *racls, - const char *initacls, const char *initracls); + const char *type, const char *name, const char *subname, + const char *nspname, const char *owner, + const char *acls, const char *racls, + const char *initacls, const char *initracls); static void getDependencies(Archive *fout); static void BuildArchiveDependencies(Archive *fout); static void findDumpableDependencies(ArchiveHandle *AH, DumpableObject *dobj, - DumpId **dependencies, int *nDeps, int *allocDeps); + DumpId **dependencies, int *nDeps, int *allocDeps); static DumpableObject *createBoundaryObjects(void); static void addBoundaryDependencies(DumpableObject **dobjs, int numObjs, - DumpableObject *boundaryObjs); + DumpableObject *boundaryObjs); static void getDomainConstraints(Archive *fout, TypeInfo *tyinfo); static void getTableData(DumpOptions *dopt, TableInfo *tblinfo, int numTables, char relkind); @@ -247,16 +247,16 @@ static void makeTableDataInfo(DumpOptions *dopt, TableInfo *tbinfo); static void buildMatViewRefreshDependencies(Archive *fout); static void getTableDataFKConstraints(void); static char *format_function_arguments(FuncInfo *finfo, char *funcargs, - bool is_agg); + bool is_agg); static char *format_function_arguments_old(Archive *fout, - FuncInfo *finfo, int nallargs, - char **allargtypes, - char **argmodes, - char **argnames); + FuncInfo *finfo, int nallargs, + char **allargtypes, + char **argmodes, + char **argnames); static char *format_function_signature(Archive *fout, - FuncInfo *finfo, bool honor_quotes); + FuncInfo *finfo, bool honor_quotes); static char *convertRegProcReference(Archive *fout, - const char *proc); + const char *proc); static char *getFormattedOperatorName(Archive *fout, const char *oproid); static char *convertTSFunction(Archive *fout, Oid funcOid); static Oid findLastBuiltinOid_V71(Archive *fout); @@ -270,29 +270,29 @@ static void dumpPublicationTable(Archive *fout, PublicationRelInfo *pubrinfo); static void dumpSubscription(Archive *fout, SubscriptionInfo *subinfo); static void dumpDatabase(Archive *AH); static void dumpDatabaseConfig(Archive *AH, PQExpBuffer outbuf, - const char *dbname, Oid dboid); + const char *dbname, Oid dboid); static void dumpEncoding(Archive *AH); static void dumpStdStrings(Archive *AH); static void dumpSearchPath(Archive *AH); static void binary_upgrade_set_type_oids_by_type_oid(Archive *fout, - PQExpBuffer upgrade_buffer, - Oid pg_type_oid, - bool force_array_type); + PQExpBuffer upgrade_buffer, + Oid pg_type_oid, + bool force_array_type); static bool binary_upgrade_set_type_oids_by_rel_oid(Archive *fout, - PQExpBuffer upgrade_buffer, Oid pg_rel_oid); + PQExpBuffer upgrade_buffer, Oid pg_rel_oid); static void binary_upgrade_set_pg_class_oids(Archive *fout, - PQExpBuffer upgrade_buffer, - Oid pg_class_oid, bool is_index); + PQExpBuffer upgrade_buffer, + Oid pg_class_oid, bool is_index); static void binary_upgrade_extension_member(PQExpBuffer upgrade_buffer, - DumpableObject *dobj, - const char *objtype, - const char *objname, - const char *objnamespace); + DumpableObject *dobj, + const char *objtype, + const char *objname, + const char *objnamespace); static const char *getAttrName(int attrnum, TableInfo *tblInfo); static const char *fmtCopyColumnList(const TableInfo *ti, PQExpBuffer buffer); static bool nonemptyReloptions(const char *reloptions); static void appendReloptionsArrayAH(PQExpBuffer buffer, const char *reloptions, - const char *prefix, Archive *fout); + const char *prefix, Archive *fout); static char *get_synchronized_snapshot(Archive *fout); static void setupDumpWorker(Archive *AHX); static TableInfo *getRootTableInfo(TableInfo *tbinfo); diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index 4f9ebb4904..c3c2ea1473 100644 --- a/src/bin/pg_dump/pg_dump.h +++ b/src/bin/pg_dump/pg_dump.h @@ -676,7 +676,7 @@ extern ExtensionInfo *findOwningExtension(CatalogId catalogId); extern void parseOidArray(const char *str, Oid *array, int arraysize); extern void sortDumpableObjects(DumpableObject **objs, int numObjs, - DumpId preBoundaryId, DumpId postBoundaryId); + DumpId preBoundaryId, DumpId postBoundaryId); extern void sortDumpableObjectsByTypeName(DumpableObject **objs, int numObjs); /* @@ -711,19 +711,19 @@ extern TSDictInfo *getTSDictionaries(Archive *fout, int *numTSDicts); extern TSTemplateInfo *getTSTemplates(Archive *fout, int *numTSTemplates); extern TSConfigInfo *getTSConfigurations(Archive *fout, int *numTSConfigs); extern FdwInfo *getForeignDataWrappers(Archive *fout, - int *numForeignDataWrappers); + int *numForeignDataWrappers); extern ForeignServerInfo *getForeignServers(Archive *fout, - int *numForeignServers); + int *numForeignServers); extern DefaultACLInfo *getDefaultACLs(Archive *fout, int *numDefaultACLs); extern void getExtensionMembership(Archive *fout, ExtensionInfo extinfo[], - int numExtensions); + int numExtensions); extern void processExtensionTables(Archive *fout, ExtensionInfo extinfo[], - int numExtensions); + int numExtensions); extern EventTriggerInfo *getEventTriggers(Archive *fout, int *numEventTriggers); extern void getPolicies(Archive *fout, TableInfo tblinfo[], int numTables); extern void getPublications(Archive *fout); extern void getPublicationTables(Archive *fout, TableInfo tblinfo[], - int numTables); + int numTables); extern void getSubscriptions(Archive *fout); #endif /* PG_DUMP_H */ diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c index 90ec67ca67..54430a5004 100644 --- a/src/bin/pg_dump/pg_dump_sort.c +++ b/src/bin/pg_dump/pg_dump_sort.c @@ -87,22 +87,22 @@ static DumpId postDataBoundId; static int DOTypeNameCompare(const void *p1, const void *p2); static bool TopoSort(DumpableObject **objs, - int numObjs, - DumpableObject **ordering, - int *nOrdering); + int numObjs, + DumpableObject **ordering, + int *nOrdering); static void addHeapElement(int val, int *heap, int heapLength); static int removeHeapElement(int *heap, int heapLength); static void findDependencyLoops(DumpableObject **objs, int nObjs, int totObjs); -static int findLoop(DumpableObject *obj, - DumpId startPoint, - bool *processed, - DumpId *searchFailed, - DumpableObject **workspace, - int depth); +static int findLoop(DumpableObject *obj, + DumpId startPoint, + bool *processed, + DumpId *searchFailed, + DumpableObject **workspace, + int depth); static void repairDependencyLoop(DumpableObject **loop, - int nLoop); + int nLoop); static void describeDumpableObject(DumpableObject *obj, - char *buf, int bufsize); + char *buf, int bufsize); /* diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index e8fe5b596a..7623fc8b4e 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -45,16 +45,16 @@ static void dumpDatabases(PGconn *conn); static void dumpTimestamp(const char *msg); static int runPgDump(const char *dbname, const char *create_opts); static void buildShSecLabels(PGconn *conn, - const char *catalog_name, Oid objectId, - const char *objtype, const char *objname, - PQExpBuffer buffer); + const char *catalog_name, Oid objectId, + const char *objtype, const char *objname, + PQExpBuffer buffer); static PGconn *connectDatabase(const char *dbname, const char *connstr, const char *pghost, const char *pgport, - const char *pguser, trivalue prompt_password, bool fail_on_error); + const char *pguser, trivalue prompt_password, bool fail_on_error); static char *constructConnStr(const char **keywords, const char **values); static PGresult *executeQuery(PGconn *conn, const char *query); static void executeCommand(PGconn *conn, const char *query); static void expand_dbname_patterns(PGconn *conn, SimpleStringList *patterns, - SimpleStringList *names); + SimpleStringList *names); static char pg_dump_bin[MAXPGPATH]; static const char *progname; diff --git a/src/bin/pg_rewind/copy_fetch.c b/src/bin/pg_rewind/copy_fetch.c index 2ada8611ee..d74001eb05 100644 --- a/src/bin/pg_rewind/copy_fetch.c +++ b/src/bin/pg_rewind/copy_fetch.c @@ -21,7 +21,7 @@ #include "pg_rewind.h" static void recurse_dir(const char *datadir, const char *path, - process_file_callback_t callback); + process_file_callback_t callback); static void execute_pagemap(datapagemap_t *pagemap, const char *path); diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c index 3c7ef90013..601f7e9690 100644 --- a/src/bin/pg_rewind/filemap.c +++ b/src/bin/pg_rewind/filemap.c @@ -25,7 +25,7 @@ filemap_t *filemap = NULL; static bool isRelDataFile(const char *path); static char *datasegpath(RelFileNode rnode, ForkNumber forknum, - BlockNumber segno); + BlockNumber segno); static int path_cmp(const void *a, const void *b); static int final_filemap_cmp(const void *a, const void *b); static void filemap_list_to_array(filemap_t *map); diff --git a/src/bin/pg_rewind/filemap.h b/src/bin/pg_rewind/filemap.h index 800cc61160..588228404c 100644 --- a/src/bin/pg_rewind/filemap.h +++ b/src/bin/pg_rewind/filemap.h @@ -95,11 +95,11 @@ extern void print_filemap(void); /* Functions for populating the filemap */ extern void process_source_file(const char *path, file_type_t type, - size_t newsize, const char *link_target); + size_t newsize, const char *link_target); extern void process_target_file(const char *path, file_type_t type, - size_t newsize, const char *link_target); + size_t newsize, const char *link_target); extern void process_block_change(ForkNumber forknum, RelFileNode rnode, - BlockNumber blkno); + BlockNumber blkno); extern void filemap_finalize(void); #endif /* FILEMAP_H */ diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c index b31071bc09..287af60c4e 100644 --- a/src/bin/pg_rewind/parsexlog.c +++ b/src/bin/pg_rewind/parsexlog.c @@ -47,10 +47,10 @@ typedef struct XLogPageReadPrivate int tliIndex; } XLogPageReadPrivate; -static int SimpleXLogPageRead(XLogReaderState *xlogreader, - XLogRecPtr targetPagePtr, - int reqLen, XLogRecPtr targetRecPtr, char *readBuf, - TimeLineID *pageTLI); +static int SimpleXLogPageRead(XLogReaderState *xlogreader, + XLogRecPtr targetPagePtr, + int reqLen, XLogRecPtr targetRecPtr, char *readBuf, + TimeLineID *pageTLI); /* * Read WAL from the datadir/pg_wal, starting from 'startpoint' on timeline diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 6cd3917628..6e77201be6 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -33,10 +33,10 @@ static void usage(const char *progname); static void createBackupLabel(XLogRecPtr startpoint, TimeLineID starttli, - XLogRecPtr checkpointloc); + XLogRecPtr checkpointloc); static void digestControlFile(ControlFileData *ControlFile, char *source, - size_t size); + size_t size); static void syncTargetDirectory(void); static void sanityChecks(void); static void findCommonAncestorTimeline(XLogRecPtr *recptr, int *tliIndex); diff --git a/src/bin/pg_rewind/pg_rewind.h b/src/bin/pg_rewind/pg_rewind.h index a54a5d7fd4..1125c7e60f 100644 --- a/src/bin/pg_rewind/pg_rewind.h +++ b/src/bin/pg_rewind/pg_rewind.h @@ -40,19 +40,19 @@ extern uint64 fetch_done; /* in parsexlog.c */ extern void extractPageMap(const char *datadir, XLogRecPtr startpoint, - int tliIndex, XLogRecPtr endpoint); + int tliIndex, XLogRecPtr endpoint); extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr, - int tliIndex, - XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli, - XLogRecPtr *lastchkptredo); + int tliIndex, + XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli, + XLogRecPtr *lastchkptredo); extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr, - int tliIndex); + int tliIndex); /* in pg_rewind.c */ extern void progress_report(bool force); /* in timeline.c */ extern TimeLineHistoryEntry *rewind_parseTimeLineHistory(char *buffer, - TimeLineID targetTLI, int *nentries); + TimeLineID targetTLI, int *nentries); #endif /* PG_REWIND_H */ diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c index 2f925f086c..5c7b4337ba 100644 --- a/src/bin/pg_upgrade/info.c +++ b/src/bin/pg_upgrade/info.c @@ -16,11 +16,11 @@ static void create_rel_filename_map(const char *old_data, const char *new_data, - const DbInfo *old_db, const DbInfo *new_db, - const RelInfo *old_rel, const RelInfo *new_rel, - FileNameMap *map); + const DbInfo *old_db, const DbInfo *new_db, + const RelInfo *old_rel, const RelInfo *new_rel, + FileNameMap *map); static void report_unmatched_relation(const RelInfo *rel, const DbInfo *db, - bool is_new_db); + bool is_new_db); static void free_db_and_rel_infos(DbInfoArr *db_arr); static void get_db_infos(ClusterInfo *cluster); static void get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo); diff --git a/src/bin/pg_upgrade/option.c b/src/bin/pg_upgrade/option.c index ab5e2d6a30..171aaa8f13 100644 --- a/src/bin/pg_upgrade/option.c +++ b/src/bin/pg_upgrade/option.c @@ -22,8 +22,8 @@ static void usage(void); static void check_required_directory(char **dirpath, - const char *envVarName, bool useCwd, - const char *cmdLineOption, const char *description); + const char *envVarName, bool useCwd, + const char *cmdLineOption, const char *description); #define FIX_DEFAULT_READ_ONLY "-c default_transaction_read_only=false" diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h index 2f67eee22b..5d31750d86 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -342,8 +342,8 @@ void check_and_dump_old_cluster(bool live_check); void check_new_cluster(void); void report_clusters_compatible(void); void issue_warnings_and_set_wal_level(void); -void output_completion_banner(char *analyze_script_file_name, - char *deletion_script_file_name); +void output_completion_banner(char *analyze_script_file_name, + char *deletion_script_file_name); void check_cluster_versions(void); void check_cluster_compatibility(bool live_check); void create_script_for_old_cluster_deletion(char **deletion_script_file_name); @@ -366,22 +366,22 @@ void generate_old_dump(void); #define EXEC_PSQL_ARGS "--echo-queries --set ON_ERROR_STOP=on --no-psqlrc --dbname=template1" -bool exec_prog(const char *log_file, const char *opt_log_file, - bool report_error, bool exit_on_error, const char *fmt,...) pg_attribute_printf(5, 6); +bool exec_prog(const char *log_file, const char *opt_log_file, + bool report_error, bool exit_on_error, const char *fmt,...) pg_attribute_printf(5, 6); void verify_directories(void); bool pid_lock_file_exists(const char *datadir); /* file.c */ -void cloneFile(const char *src, const char *dst, - const char *schemaName, const char *relName); -void copyFile(const char *src, const char *dst, - const char *schemaName, const char *relName); -void linkFile(const char *src, const char *dst, - const char *schemaName, const char *relName); -void rewriteVisibilityMap(const char *fromfile, const char *tofile, +void cloneFile(const char *src, const char *dst, + const char *schemaName, const char *relName); +void copyFile(const char *src, const char *dst, const char *schemaName, const char *relName); +void linkFile(const char *src, const char *dst, + const char *schemaName, const char *relName); +void rewriteVisibilityMap(const char *fromfile, const char *tofile, + const char *schemaName, const char *relName); void check_file_clone(void); void check_hard_link(void); @@ -396,11 +396,11 @@ void check_loadable_libraries(void); /* info.c */ FileNameMap *gen_db_file_maps(DbInfo *old_db, - DbInfo *new_db, int *nmaps, const char *old_pgdata, - const char *new_pgdata); + DbInfo *new_db, int *nmaps, const char *old_pgdata, + const char *new_pgdata); void get_db_and_rel_infos(ClusterInfo *cluster); -void print_maps(FileNameMap *maps, int n, - const char *db_name); +void print_maps(FileNameMap *maps, int n, + const char *db_name); /* option.c */ @@ -410,11 +410,11 @@ void get_sock_dir(ClusterInfo *cluster, bool live_check); /* relfilenode.c */ -void transfer_all_new_tablespaces(DbInfoArr *old_db_arr, - DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata); -void transfer_all_new_dbs(DbInfoArr *old_db_arr, - DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata, - char *old_tablespace); +void transfer_all_new_tablespaces(DbInfoArr *old_db_arr, + DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata); +void transfer_all_new_dbs(DbInfoArr *old_db_arr, + DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata, + char *old_tablespace); /* tablespace.c */ @@ -451,17 +451,17 @@ void pg_putenv(const char *var, const char *val); /* version.c */ -void new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster, - bool check_mode); +void new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster, + bool check_mode); void old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster); void old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster); -void old_9_6_invalidate_hash_indexes(ClusterInfo *cluster, - bool check_mode); +void old_9_6_invalidate_hash_indexes(ClusterInfo *cluster, + bool check_mode); /* parallel.c */ -void parallel_exec_prog(const char *log_file, const char *opt_log_file, - const char *fmt,...) pg_attribute_printf(3, 4); -void parallel_transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr, - char *old_pgdata, char *new_pgdata, - char *old_tablespace); +void parallel_exec_prog(const char *log_file, const char *opt_log_file, + const char *fmt,...) pg_attribute_printf(3, 4); +void parallel_transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr, + char *old_pgdata, char *new_pgdata, + char *old_tablespace); bool reap_child(bool wait_for_child); diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index e99ab1e07f..8b84658ccd 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -576,12 +576,12 @@ static void setBoolValue(PgBenchValue *pv, bool bval); static void setIntValue(PgBenchValue *pv, int64 ival); static void setDoubleValue(PgBenchValue *pv, double dval); static bool evaluateExpr(CState *st, PgBenchExpr *expr, - PgBenchValue *retval); + PgBenchValue *retval); static ConnectionStateEnum executeMetaCommand(CState *st, instr_time *now); static void doLog(TState *thread, CState *st, - StatsData *agg, bool skipped, double latency, double lag); + StatsData *agg, bool skipped, double latency, double lag); static void processXactStats(TState *thread, CState *st, instr_time *now, - bool skipped, StatsData *agg); + bool skipped, StatsData *agg); static void addScript(ParsedScript script); static void *threadRun(void *arg); static void finishCon(CState *st); diff --git a/src/bin/pgbench/pgbench.h b/src/bin/pgbench/pgbench.h index dc557d416c..c4a1e298e0 100644 --- a/src/bin/pgbench/pgbench.h +++ b/src/bin/pgbench/pgbench.h @@ -143,22 +143,22 @@ extern int expr_yyparse(yyscan_t yyscanner); extern int expr_yylex(union YYSTYPE *lvalp, yyscan_t yyscanner); extern void expr_yyerror(yyscan_t yyscanner, const char *str) pg_attribute_noreturn(); extern void expr_yyerror_more(yyscan_t yyscanner, const char *str, - const char *more) pg_attribute_noreturn(); + const char *more) pg_attribute_noreturn(); extern bool expr_lex_one_word(PsqlScanState state, PQExpBuffer word_buf, - int *offset); + int *offset); extern yyscan_t expr_scanner_init(PsqlScanState state, - const char *source, int lineno, int start_offset, - const char *command); + const char *source, int lineno, int start_offset, + const char *command); extern void expr_scanner_finish(yyscan_t yyscanner); extern int expr_scanner_offset(PsqlScanState state); extern char *expr_scanner_get_substring(PsqlScanState state, - int start_offset, int end_offset, - bool chomp); + int start_offset, int end_offset, + bool chomp); extern int expr_scanner_get_lineno(PsqlScanState state, int offset); extern void syntax_error(const char *source, int lineno, const char *line, - const char *cmd, const char *msg, - const char *more, int col) pg_attribute_noreturn(); + const char *cmd, const char *msg, + const char *more, int col) pg_attribute_noreturn(); extern bool strtoint64(const char *str, bool errorOK, int64 *pi); extern bool strtodouble(const char *str, bool errorOK, double *pd); diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index df3824f689..a3280eeb18 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -55,77 +55,77 @@ typedef enum EditableObjectType /* local function declarations */ static backslashResult exec_command(const char *cmd, - PsqlScanState scan_state, - ConditionalStack cstack, - PQExpBuffer query_buf, - PQExpBuffer previous_buf); + PsqlScanState scan_state, + ConditionalStack cstack, + PQExpBuffer query_buf, + PQExpBuffer previous_buf); static backslashResult exec_command_a(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_C(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_connect(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_cd(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_conninfo(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_copy(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_copyright(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_crosstabview(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_d(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_edit(PsqlScanState scan_state, bool active_branch, - PQExpBuffer query_buf, PQExpBuffer previous_buf); + PQExpBuffer query_buf, PQExpBuffer previous_buf); static backslashResult exec_command_ef_ev(PsqlScanState scan_state, bool active_branch, - PQExpBuffer query_buf, bool is_func); + PQExpBuffer query_buf, bool is_func); static backslashResult exec_command_echo(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_elif(PsqlScanState scan_state, ConditionalStack cstack, - PQExpBuffer query_buf); + PQExpBuffer query_buf); static backslashResult exec_command_else(PsqlScanState scan_state, ConditionalStack cstack, - PQExpBuffer query_buf); + PQExpBuffer query_buf); static backslashResult exec_command_endif(PsqlScanState scan_state, ConditionalStack cstack, - PQExpBuffer query_buf); + PQExpBuffer query_buf); static backslashResult exec_command_encoding(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_errverbose(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_f(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_g(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_gdesc(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_gexec(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_gset(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_help(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_html(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_include(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_if(PsqlScanState scan_state, ConditionalStack cstack, - PQExpBuffer query_buf); + PQExpBuffer query_buf); static backslashResult exec_command_list(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_lo(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_out(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_print(PsqlScanState scan_state, bool active_branch, - PQExpBuffer query_buf, PQExpBuffer previous_buf); + PQExpBuffer query_buf, PQExpBuffer previous_buf); static backslashResult exec_command_password(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_prompt(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_pset(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_quit(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_reset(PsqlScanState scan_state, bool active_branch, - PQExpBuffer query_buf); + PQExpBuffer query_buf); static backslashResult exec_command_s(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_set(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_setenv(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_sf_sv(PsqlScanState scan_state, bool active_branch, - const char *cmd, bool is_func); + const char *cmd, bool is_func); static backslashResult exec_command_t(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_T(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_timing(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_unset(PsqlScanState scan_state, bool active_branch, - const char *cmd); + const char *cmd); static backslashResult exec_command_write(PsqlScanState scan_state, bool active_branch, - const char *cmd, - PQExpBuffer query_buf, PQExpBuffer previous_buf); + const char *cmd, + PQExpBuffer query_buf, PQExpBuffer previous_buf); static backslashResult exec_command_watch(PsqlScanState scan_state, bool active_branch, - PQExpBuffer query_buf, PQExpBuffer previous_buf); + PQExpBuffer query_buf, PQExpBuffer previous_buf); static backslashResult exec_command_x(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_z(PsqlScanState scan_state, bool active_branch); static backslashResult exec_command_shell_escape(PsqlScanState scan_state, bool active_branch); @@ -139,24 +139,24 @@ static void ignore_slash_filepipe(PsqlScanState scan_state); static void ignore_slash_whole_line(PsqlScanState scan_state); static bool is_branching_command(const char *cmd); static void save_query_text_state(PsqlScanState scan_state, ConditionalStack cstack, - PQExpBuffer query_buf); + PQExpBuffer query_buf); static void discard_query_text(PsqlScanState scan_state, ConditionalStack cstack, - PQExpBuffer query_buf); + PQExpBuffer query_buf); static void copy_previous_query(PQExpBuffer query_buf, PQExpBuffer previous_buf); static bool do_connect(enum trivalue reuse_previous_specification, - char *dbname, char *user, char *host, char *port); + char *dbname, char *user, char *host, char *port); static bool do_edit(const char *filename_arg, PQExpBuffer query_buf, - int lineno, bool *edited); + int lineno, bool *edited); static bool do_shell(const char *command); static bool do_watch(PQExpBuffer query_buf, double sleep); static bool lookup_object_oid(EditableObjectType obj_type, const char *desc, - Oid *obj_oid); + Oid *obj_oid); static bool get_create_object_cmd(EditableObjectType obj_type, Oid oid, - PQExpBuffer buf); + PQExpBuffer buf); static int strip_lineno_from_objdesc(char *obj); static int count_lines_in_buf(PQExpBuffer buf); static void print_with_linenumbers(FILE *output, char *lines, - const char *header_keyword); + const char *header_keyword); static void minimal_error_message(PGresult *res); static void printSSLInfo(void); diff --git a/src/bin/psql/command.h b/src/bin/psql/command.h index de748d320e..33791b6ff8 100644 --- a/src/bin/psql/command.h +++ b/src/bin/psql/command.h @@ -26,16 +26,16 @@ typedef enum _backslashResult extern backslashResult HandleSlashCmds(PsqlScanState scan_state, - ConditionalStack cstack, - PQExpBuffer query_buf, - PQExpBuffer previous_buf); + ConditionalStack cstack, + PQExpBuffer query_buf, + PQExpBuffer previous_buf); extern int process_file(char *filename, bool use_relative_path); extern bool do_pset(const char *param, - const char *value, - printQueryOpt *popt, - bool quiet); + const char *value, + printQueryOpt *popt, + bool quiet); extern void connection_warnings(bool in_startup); diff --git a/src/bin/psql/common.h b/src/bin/psql/common.h index 4739b8ee33..282a520116 100644 --- a/src/bin/psql/common.h +++ b/src/bin/psql/common.h @@ -18,7 +18,7 @@ extern bool openQueryOutputFile(const char *fname, FILE **fout, bool *is_pipe); extern bool setQFout(const char *fname); extern char *psql_get_variable(const char *varname, PsqlScanQuoteType quote, - void *passthrough); + void *passthrough); extern void NoticeProcessor(void *arg, const char *message); diff --git a/src/bin/psql/copy.h b/src/bin/psql/copy.h index 9b30979d2c..cee731beeb 100644 --- a/src/bin/psql/copy.h +++ b/src/bin/psql/copy.h @@ -17,8 +17,8 @@ extern bool do_copy(const char *args); /* lower level processors for copy in/out streams */ extern bool handleCopyOut(PGconn *conn, FILE *copystream, - PGresult **res); + PGresult **res); extern bool handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary, - PGresult **res); + PGresult **res); #endif diff --git a/src/bin/psql/crosstabview.c b/src/bin/psql/crosstabview.c index 184ebe6d21..83789cb911 100644 --- a/src/bin/psql/crosstabview.c +++ b/src/bin/psql/crosstabview.c @@ -79,13 +79,13 @@ typedef struct _avl_tree static bool printCrosstab(const PGresult *results, - int num_columns, pivot_field *piv_columns, int field_for_columns, - int num_rows, pivot_field *piv_rows, int field_for_rows, - int field_for_data); + int num_columns, pivot_field *piv_columns, int field_for_columns, + int num_rows, pivot_field *piv_rows, int field_for_rows, + int field_for_data); static void avlInit(avl_tree *tree); static void avlMergeValue(avl_tree *tree, char *name, char *sort_value); -static int avlCollectFields(avl_tree *tree, avl_node *node, - pivot_field *fields, int idx); +static int avlCollectFields(avl_tree *tree, avl_node *node, + pivot_field *fields, int idx); static void avlFree(avl_tree *tree, avl_node *node); static void rankSort(int num_columns, pivot_field *piv_columns); static int indexOfColumn(char *arg, const PGresult *res); diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 3dc5447f1a..97167d2c4b 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -31,19 +31,19 @@ static bool describeOneTableDetails(const char *schemaname, - const char *relationname, - const char *oid, - bool verbose); + const char *relationname, + const char *oid, + bool verbose); static void add_tablespace_footer(printTableContent *const cont, char relkind, - Oid tablespace, const bool newline); + Oid tablespace, const bool newline); static void add_role_attribute(PQExpBuffer buf, const char *const str); static bool listTSParsersVerbose(const char *pattern); static bool describeOneTSParser(const char *oid, const char *nspname, - const char *prsname); + const char *prsname); static bool listTSConfigsVerbose(const char *pattern); static bool describeOneTSConfig(const char *oid, const char *nspname, - const char *cfgname, - const char *pnspname, const char *prsname); + const char *cfgname, + const char *pnspname, const char *prsname); static void printACLColumn(PQExpBuffer buf, const char *colname); static bool listOneExtensionContents(const char *extname, const char *oid); diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index dc6dcbba01..bb9921a894 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -81,9 +81,9 @@ struct adhoc_opts }; static void parse_psql_options(int argc, char *argv[], - struct adhoc_opts *options); + struct adhoc_opts *options); static void simple_action_list_append(SimpleActionList *list, - enum _actions action, const char *val); + enum _actions action, const char *val); static void process_psqlrc(char *argv0); static void process_psqlrc_file(char *filename); static void showVersion(void); diff --git a/src/bin/psql/stringutils.h b/src/bin/psql/stringutils.h index 3ecfad5c16..16a7af0b52 100644 --- a/src/bin/psql/stringutils.h +++ b/src/bin/psql/stringutils.h @@ -11,17 +11,17 @@ /* The cooler version of strtok() which knows about quotes and doesn't * overwrite your input */ extern char *strtokx(const char *s, - const char *whitespace, - const char *delim, - const char *quote, - char escape, - bool e_strings, - bool del_quotes, - int encoding); + const char *whitespace, + const char *delim, + const char *quote, + char escape, + bool e_strings, + bool del_quotes, + int encoding); extern void strip_quotes(char *source, char quote, char escape, int encoding); extern char *quote_if_needed(const char *source, const char *entails_quote, - char quote, char escape, int encoding); + char quote, char escape, int encoding); #endif /* STRINGUTILS_H */ diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 04ce3e722f..c6347b6190 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1075,15 +1075,15 @@ static char *complete_from_versioned_query(const char *text, int state); static char *complete_from_schema_query(const char *text, int state); static char *complete_from_versioned_schema_query(const char *text, int state); static char *_complete_from_query(const char *simple_query, - const SchemaQuery *schema_query, - const char *text, int state); + const SchemaQuery *schema_query, + const char *text, int state); static char *complete_from_list(const char *text, int state); static char *complete_from_const(const char *text, int state); static void append_variable_names(char ***varnames, int *nvars, - int *maxvars, const char *varname, - const char *prefix, const char *suffix); + int *maxvars, const char *varname, + const char *prefix, const char *suffix); static char **complete_from_variables(const char *text, - const char *prefix, const char *suffix, bool need_value); + const char *prefix, const char *suffix, bool need_value); static char *complete_from_files(const char *text, int state); static char *pg_strdup_keyword_case(const char *s, const char *ref); diff --git a/src/bin/psql/variables.h b/src/bin/psql/variables.h index c7e509eeee..9d4cf54713 100644 --- a/src/bin/psql/variables.h +++ b/src/bin/psql/variables.h @@ -75,11 +75,11 @@ typedef struct _variable *VariableSpace; VariableSpace CreateVariableSpace(void); const char *GetVariable(VariableSpace space, const char *name); -bool ParseVariableBool(const char *value, const char *name, - bool *result); +bool ParseVariableBool(const char *value, const char *name, + bool *result); -bool ParseVariableNum(const char *value, const char *name, - int *result); +bool ParseVariableNum(const char *value, const char *name, + int *result); void PrintVariables(VariableSpace space); @@ -87,9 +87,9 @@ bool SetVariable(VariableSpace space, const char *name, const char *value); bool SetVariableBool(VariableSpace space, const char *name); bool DeleteVariable(VariableSpace space, const char *name); -void SetVariableHooks(VariableSpace space, const char *name, - VariableSubstituteHook shook, - VariableAssignHook ahook); +void SetVariableHooks(VariableSpace space, const char *name, + VariableSubstituteHook shook, + VariableAssignHook ahook); void PsqlVarEnumError(const char *name, const char *value, const char *suggestions); diff --git a/src/bin/scripts/clusterdb.c b/src/bin/scripts/clusterdb.c index a1b4119efa..15fff91e16 100644 --- a/src/bin/scripts/clusterdb.c +++ b/src/bin/scripts/clusterdb.c @@ -17,13 +17,13 @@ static void cluster_one_database(const char *dbname, bool verbose, const char *table, - const char *host, const char *port, - const char *username, enum trivalue prompt_password, - const char *progname, bool echo); + const char *host, const char *port, + const char *username, enum trivalue prompt_password, + const char *progname, bool echo); static void cluster_all_databases(bool verbose, const char *maintenance_db, - const char *host, const char *port, - const char *username, enum trivalue prompt_password, - const char *progname, bool echo, bool quiet); + const char *host, const char *port, + const char *username, enum trivalue prompt_password, + const char *progname, bool echo, bool quiet); static void help(const char *progname); diff --git a/src/bin/scripts/common.h b/src/bin/scripts/common.h index b59ade0c39..35d1a3e0d5 100644 --- a/src/bin/scripts/common.h +++ b/src/bin/scripts/common.h @@ -26,33 +26,33 @@ extern bool CancelRequested; typedef void (*help_handler) (const char *progname); extern void handle_help_version_opts(int argc, char *argv[], - const char *fixed_progname, - help_handler hlp); + const char *fixed_progname, + help_handler hlp); extern PGconn *connectDatabase(const char *dbname, const char *pghost, - const char *pgport, const char *pguser, - enum trivalue prompt_password, const char *progname, - bool echo, bool fail_ok, bool allow_password_reuse); + const char *pgport, const char *pguser, + enum trivalue prompt_password, const char *progname, + bool echo, bool fail_ok, bool allow_password_reuse); extern PGconn *connectMaintenanceDatabase(const char *maintenance_db, - const char *pghost, const char *pgport, - const char *pguser, enum trivalue prompt_password, - const char *progname, bool echo); + const char *pghost, const char *pgport, + const char *pguser, enum trivalue prompt_password, + const char *progname, bool echo); extern PGresult *executeQuery(PGconn *conn, const char *query, - const char *progname, bool echo); + const char *progname, bool echo); extern void executeCommand(PGconn *conn, const char *query, - const char *progname, bool echo); + const char *progname, bool echo); extern bool executeMaintenanceCommand(PGconn *conn, const char *query, - bool echo); + bool echo); extern void splitTableColumnsSpec(const char *spec, int encoding, - char **table, const char **columns); + char **table, const char **columns); extern void appendQualifiedRelation(PQExpBuffer buf, const char *name, - PGconn *conn, const char *progname, bool echo); + PGconn *conn, const char *progname, bool echo); extern bool yesno_prompt(const char *question); diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c index ba4d10e65c..bec57589d3 100644 --- a/src/bin/scripts/reindexdb.c +++ b/src/bin/scripts/reindexdb.c @@ -17,20 +17,20 @@ static void reindex_one_database(const char *name, const char *dbname, - const char *type, const char *host, - const char *port, const char *username, - enum trivalue prompt_password, const char *progname, - bool echo, bool verbose, bool concurrently); + const char *type, const char *host, + const char *port, const char *username, + enum trivalue prompt_password, const char *progname, + bool echo, bool verbose, bool concurrently); static void reindex_all_databases(const char *maintenance_db, - const char *host, const char *port, - const char *username, enum trivalue prompt_password, - const char *progname, bool echo, - bool quiet, bool verbose, bool concurrently); + const char *host, const char *port, + const char *username, enum trivalue prompt_password, + const char *progname, bool echo, + bool quiet, bool verbose, bool concurrently); static void reindex_system_catalogs(const char *dbname, - const char *host, const char *port, - const char *username, enum trivalue prompt_password, - const char *progname, bool echo, bool verbose, - bool concurrently); + const char *host, const char *port, + const char *username, enum trivalue prompt_password, + const char *progname, bool echo, bool verbose, + bool concurrently); static void help(const char *progname); int diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index 6d216aab6b..df2a315f95 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -50,32 +50,32 @@ typedef struct vacuumingOptions static void vacuum_one_database(const char *dbname, vacuumingOptions *vacopts, - int stage, - SimpleStringList *tables, - const char *host, const char *port, - const char *username, enum trivalue prompt_password, - int concurrentCons, - const char *progname, bool echo, bool quiet); + int stage, + SimpleStringList *tables, + const char *host, const char *port, + const char *username, enum trivalue prompt_password, + int concurrentCons, + const char *progname, bool echo, bool quiet); static void vacuum_all_databases(vacuumingOptions *vacopts, - bool analyze_in_stages, - const char *maintenance_db, - const char *host, const char *port, - const char *username, enum trivalue prompt_password, - int concurrentCons, - const char *progname, bool echo, bool quiet); + bool analyze_in_stages, + const char *maintenance_db, + const char *host, const char *port, + const char *username, enum trivalue prompt_password, + int concurrentCons, + const char *progname, bool echo, bool quiet); static void prepare_vacuum_command(PQExpBuffer sql, int serverVersion, - vacuumingOptions *vacopts, const char *table); + vacuumingOptions *vacopts, const char *table); static void run_vacuum_command(PGconn *conn, const char *sql, bool echo, - const char *table, const char *progname, bool async); + const char *table, const char *progname, bool async); static ParallelSlot *GetIdleSlot(ParallelSlot slots[], int numslots, - const char *progname); + const char *progname); static bool ProcessQueryResult(PGconn *conn, PGresult *result, - const char *progname); + const char *progname); static bool GetQueryResult(PGconn *conn, const char *progname); diff --git a/src/common/file_utils.c b/src/common/file_utils.c index 3d7a637212..8b9ebcb314 100644 --- a/src/common/file_utils.c +++ b/src/common/file_utils.c @@ -39,8 +39,8 @@ static int pre_sync_fname(const char *fname, bool isdir); #endif static void walkdir(const char *path, - int (*action) (const char *fname, bool isdir), - bool process_symlinks); + int (*action) (const char *fname, bool isdir), + bool process_symlinks); /* * Issue fsync recursively on PGDATA and all its contents. diff --git a/src/common/ip.c b/src/common/ip.c index 8b56251c96..7897fdc9ff 100644 --- a/src/common/ip.c +++ b/src/common/ip.c @@ -39,14 +39,14 @@ #ifdef HAVE_UNIX_SOCKETS -static int getaddrinfo_unix(const char *path, - const struct addrinfo *hintsp, - struct addrinfo **result); - -static int getnameinfo_unix(const struct sockaddr_un *sa, int salen, - char *node, int nodelen, - char *service, int servicelen, - int flags); +static int getaddrinfo_unix(const char *path, + const struct addrinfo *hintsp, + struct addrinfo **result); + +static int getnameinfo_unix(const struct sockaddr_un *sa, int salen, + char *node, int nodelen, + char *service, int servicelen, + int flags); #endif diff --git a/src/fe_utils/print.c b/src/fe_utils/print.c index 779a95e8bc..e41f42ea98 100644 --- a/src/fe_utils/print.c +++ b/src/fe_utils/print.c @@ -200,10 +200,10 @@ static const unicodeStyleFormat unicode_style = { /* Local functions */ static int strlen_max_width(unsigned char *str, int *target_width, int encoding); static void IsPagerNeeded(const printTableContent *cont, int extra_lines, bool expanded, - FILE **fout, bool *is_pager); + FILE **fout, bool *is_pager); static void print_aligned_vertical(const printTableContent *cont, - FILE *fout, bool is_pager); + FILE *fout, bool is_pager); /* Count number of digits in integral part of number */ diff --git a/src/include/access/amvalidate.h b/src/include/access/amvalidate.h index 5888c22350..317e1e6893 100644 --- a/src/include/access/amvalidate.h +++ b/src/include/access/amvalidate.h @@ -28,9 +28,9 @@ typedef struct OpFamilyOpFuncGroup /* Functions in access/index/amvalidate.c */ extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist); extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact, - int minargs, int maxargs,...); + int minargs, int maxargs,...); extern bool check_amop_signature(Oid opno, Oid restype, - Oid lefttype, Oid righttype); + Oid lefttype, Oid righttype); extern bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid); #endif /* AMVALIDATE_H */ diff --git a/src/include/access/brin_internal.h b/src/include/access/brin_internal.h index 1defef832d..b1c9199946 100644 --- a/src/include/access/brin_internal.h +++ b/src/include/access/brin_internal.h @@ -85,23 +85,23 @@ typedef struct BrinDesc extern BrinDesc *brin_build_desc(Relation rel); extern void brin_free_desc(BrinDesc *bdesc); extern IndexBuildResult *brinbuild(Relation heap, Relation index, - struct IndexInfo *indexInfo); + struct IndexInfo *indexInfo); extern void brinbuildempty(Relation index); extern bool brininsert(Relation idxRel, Datum *values, bool *nulls, - ItemPointer heaptid, Relation heapRel, - IndexUniqueCheck checkUnique, - struct IndexInfo *indexInfo); + ItemPointer heaptid, Relation heapRel, + IndexUniqueCheck checkUnique, + struct IndexInfo *indexInfo); extern IndexScanDesc brinbeginscan(Relation r, int nkeys, int norderbys); extern int64 bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm); extern void brinrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys, - ScanKey orderbys, int norderbys); + ScanKey orderbys, int norderbys); extern void brinendscan(IndexScanDesc scan); extern IndexBulkDeleteResult *brinbulkdelete(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats, - IndexBulkDeleteCallback callback, - void *callback_state); + IndexBulkDeleteResult *stats, + IndexBulkDeleteCallback callback, + void *callback_state); extern IndexBulkDeleteResult *brinvacuumcleanup(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats); + IndexBulkDeleteResult *stats); extern bytea *brinoptions(Datum reloptions, bool validate); /* brin_validate.c */ diff --git a/src/include/access/brin_pageops.h b/src/include/access/brin_pageops.h index 30d1761fc7..0449235810 100644 --- a/src/include/access/brin_pageops.h +++ b/src/include/access/brin_pageops.h @@ -14,24 +14,24 @@ #include "access/brin_revmap.h" extern bool brin_doupdate(Relation idxrel, BlockNumber pagesPerRange, - BrinRevmap *revmap, BlockNumber heapBlk, - Buffer oldbuf, OffsetNumber oldoff, - const BrinTuple *origtup, Size origsz, - const BrinTuple *newtup, Size newsz, - bool samepage); + BrinRevmap *revmap, BlockNumber heapBlk, + Buffer oldbuf, OffsetNumber oldoff, + const BrinTuple *origtup, Size origsz, + const BrinTuple *newtup, Size newsz, + bool samepage); extern bool brin_can_do_samepage_update(Buffer buffer, Size origsz, - Size newsz); + Size newsz); extern OffsetNumber brin_doinsert(Relation idxrel, BlockNumber pagesPerRange, - BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk, - BrinTuple *tup, Size itemsz); + BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk, + BrinTuple *tup, Size itemsz); extern void brin_page_init(Page page, uint16 type); extern void brin_metapage_init(Page page, BlockNumber pagesPerRange, - uint16 version); + uint16 version); extern bool brin_start_evacuating_page(Relation idxRel, Buffer buf); extern void brin_evacuate_page(Relation idxRel, BlockNumber pagesPerRange, - BrinRevmap *revmap, Buffer buf); + BrinRevmap *revmap, Buffer buf); extern void brin_page_cleanup(Relation idxrel, Buffer buf); diff --git a/src/include/access/brin_revmap.h b/src/include/access/brin_revmap.h index 3a7518c820..2ade88bc1e 100644 --- a/src/include/access/brin_revmap.h +++ b/src/include/access/brin_revmap.h @@ -24,18 +24,18 @@ typedef struct BrinRevmap BrinRevmap; extern BrinRevmap *brinRevmapInitialize(Relation idxrel, - BlockNumber *pagesPerRange, Snapshot snapshot); + BlockNumber *pagesPerRange, Snapshot snapshot); extern void brinRevmapTerminate(BrinRevmap *revmap); extern void brinRevmapExtend(BrinRevmap *revmap, - BlockNumber heapBlk); + BlockNumber heapBlk); extern Buffer brinLockRevmapPageForUpdate(BrinRevmap *revmap, - BlockNumber heapBlk); + BlockNumber heapBlk); extern void brinSetHeapBlockItemptr(Buffer rmbuf, BlockNumber pagesPerRange, - BlockNumber heapBlk, ItemPointerData tid); + BlockNumber heapBlk, ItemPointerData tid); extern BrinTuple *brinGetTupleForHeapBlock(BrinRevmap *revmap, - BlockNumber heapBlk, Buffer *buf, OffsetNumber *off, - Size *size, int mode, Snapshot snapshot); + BlockNumber heapBlk, Buffer *buf, OffsetNumber *off, + Size *size, int mode, Snapshot snapshot); extern bool brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk); #endif /* BRIN_REVMAP_H */ diff --git a/src/include/access/brin_tuple.h b/src/include/access/brin_tuple.h index f07796a971..474541eba4 100644 --- a/src/include/access/brin_tuple.h +++ b/src/include/access/brin_tuple.h @@ -84,19 +84,19 @@ typedef struct BrinTuple extern BrinTuple *brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, - BrinMemTuple *tuple, Size *size); + BrinMemTuple *tuple, Size *size); extern BrinTuple *brin_form_placeholder_tuple(BrinDesc *brdesc, - BlockNumber blkno, Size *size); + BlockNumber blkno, Size *size); extern void brin_free_tuple(BrinTuple *tuple); extern BrinTuple *brin_copy_tuple(BrinTuple *tuple, Size len, - BrinTuple *dest, Size *destsz); + BrinTuple *dest, Size *destsz); extern bool brin_tuples_equal(const BrinTuple *a, Size alen, - const BrinTuple *b, Size blen); + const BrinTuple *b, Size blen); extern BrinMemTuple *brin_new_memtuple(BrinDesc *brdesc); extern BrinMemTuple *brin_memtuple_initialize(BrinMemTuple *dtuple, - BrinDesc *brdesc); + BrinDesc *brdesc); extern BrinMemTuple *brin_deform_tuple(BrinDesc *brdesc, - BrinTuple *tuple, BrinMemTuple *dMemtuple); + BrinTuple *tuple, BrinMemTuple *dMemtuple); #endif /* BRIN_TUPLE_H */ diff --git a/src/include/access/clog.h b/src/include/access/clog.h index 57ef9fe858..90ca61e7f6 100644 --- a/src/include/access/clog.h +++ b/src/include/access/clog.h @@ -36,7 +36,7 @@ typedef struct xl_clog_truncate } xl_clog_truncate; extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids, - TransactionId *subxids, XidStatus status, XLogRecPtr lsn); + TransactionId *subxids, XidStatus status, XLogRecPtr lsn); extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn); extern Size CLOGShmemBuffers(void); diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h index 123c91128b..e22bfbf3e6 100644 --- a/src/include/access/commit_ts.h +++ b/src/include/access/commit_ts.h @@ -20,15 +20,15 @@ extern PGDLLIMPORT bool track_commit_timestamp; extern bool check_track_commit_timestamp(bool *newval, void **extra, - GucSource source); + GucSource source); extern void TransactionTreeSetCommitTsData(TransactionId xid, int nsubxids, - TransactionId *subxids, TimestampTz timestamp, - RepOriginId nodeid, bool write_xlog); + TransactionId *subxids, TimestampTz timestamp, + RepOriginId nodeid, bool write_xlog); extern bool TransactionIdGetCommitTsData(TransactionId xid, - TimestampTz *ts, RepOriginId *nodeid); + TimestampTz *ts, RepOriginId *nodeid); extern TransactionId GetLatestCommitTsData(TimestampTz *ts, - RepOriginId *nodeid); + RepOriginId *nodeid); extern Size CommitTsShmemBuffers(void); extern Size CommitTsShmemSize(void); @@ -42,7 +42,7 @@ extern void CheckPointCommitTs(void); extern void ExtendCommitTs(TransactionId newestXact); extern void TruncateCommitTs(TransactionId oldestXact); extern void SetCommitTsLimit(TransactionId oldestXact, - TransactionId newestXact); + TransactionId newestXact); extern void AdvanceOldestCommitTsXid(TransactionId oldestXact); /* XLOG stuff */ diff --git a/src/include/access/genam.h b/src/include/access/genam.h index 9717183ef2..8c053be2ca 100644 --- a/src/include/access/genam.h +++ b/src/include/access/genam.h @@ -132,86 +132,86 @@ extern Relation index_open(Oid relationId, LOCKMODE lockmode); extern void index_close(Relation relation, LOCKMODE lockmode); extern bool index_insert(Relation indexRelation, - Datum *values, bool *isnull, - ItemPointer heap_t_ctid, - Relation heapRelation, - IndexUniqueCheck checkUnique, - struct IndexInfo *indexInfo); + Datum *values, bool *isnull, + ItemPointer heap_t_ctid, + Relation heapRelation, + IndexUniqueCheck checkUnique, + struct IndexInfo *indexInfo); extern IndexScanDesc index_beginscan(Relation heapRelation, - Relation indexRelation, - Snapshot snapshot, - int nkeys, int norderbys); + Relation indexRelation, + Snapshot snapshot, + int nkeys, int norderbys); extern IndexScanDesc index_beginscan_bitmap(Relation indexRelation, - Snapshot snapshot, - int nkeys); + Snapshot snapshot, + int nkeys); extern void index_rescan(IndexScanDesc scan, - ScanKey keys, int nkeys, - ScanKey orderbys, int norderbys); + ScanKey keys, int nkeys, + ScanKey orderbys, int norderbys); extern void index_endscan(IndexScanDesc scan); extern void index_markpos(IndexScanDesc scan); extern void index_restrpos(IndexScanDesc scan); extern Size index_parallelscan_estimate(Relation indexrel, Snapshot snapshot); extern void index_parallelscan_initialize(Relation heaprel, Relation indexrel, - Snapshot snapshot, ParallelIndexScanDesc target); + Snapshot snapshot, ParallelIndexScanDesc target); extern void index_parallelrescan(IndexScanDesc scan); extern IndexScanDesc index_beginscan_parallel(Relation heaprel, - Relation indexrel, int nkeys, int norderbys, - ParallelIndexScanDesc pscan); + Relation indexrel, int nkeys, int norderbys, + ParallelIndexScanDesc pscan); extern ItemPointer index_getnext_tid(IndexScanDesc scan, - ScanDirection direction); + ScanDirection direction); struct TupleTableSlot; extern bool index_fetch_heap(IndexScanDesc scan, struct TupleTableSlot *slot); extern bool index_getnext_slot(IndexScanDesc scan, ScanDirection direction, - struct TupleTableSlot *slot); + struct TupleTableSlot *slot); extern int64 index_getbitmap(IndexScanDesc scan, TIDBitmap *bitmap); extern IndexBulkDeleteResult *index_bulk_delete(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats, - IndexBulkDeleteCallback callback, - void *callback_state); + IndexBulkDeleteResult *stats, + IndexBulkDeleteCallback callback, + void *callback_state); extern IndexBulkDeleteResult *index_vacuum_cleanup(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats); + IndexBulkDeleteResult *stats); extern bool index_can_return(Relation indexRelation, int attno); extern RegProcedure index_getprocid(Relation irel, AttrNumber attnum, - uint16 procnum); + uint16 procnum); extern FmgrInfo *index_getprocinfo(Relation irel, AttrNumber attnum, - uint16 procnum); + uint16 procnum); extern void index_store_float8_orderby_distances(IndexScanDesc scan, - Oid *orderByTypes, double *distances, - bool recheckOrderBy); + Oid *orderByTypes, double *distances, + bool recheckOrderBy); /* * index access method support routines (in genam.c) */ extern IndexScanDesc RelationGetIndexScan(Relation indexRelation, - int nkeys, int norderbys); + int nkeys, int norderbys); extern void IndexScanEnd(IndexScanDesc scan); extern char *BuildIndexValueDescription(Relation indexRelation, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern TransactionId index_compute_xid_horizon_for_tuples(Relation irel, - Relation hrel, - Buffer ibuf, - OffsetNumber *itemnos, - int nitems); + Relation hrel, + Buffer ibuf, + OffsetNumber *itemnos, + int nitems); /* * heap-or-index access to system catalogs (in genam.c) */ extern SysScanDesc systable_beginscan(Relation heapRelation, - Oid indexId, - bool indexOK, - Snapshot snapshot, - int nkeys, ScanKey key); + Oid indexId, + bool indexOK, + Snapshot snapshot, + int nkeys, ScanKey key); extern HeapTuple systable_getnext(SysScanDesc sysscan); extern bool systable_recheck_tuple(SysScanDesc sysscan, HeapTuple tup); extern void systable_endscan(SysScanDesc sysscan); extern SysScanDesc systable_beginscan_ordered(Relation heapRelation, - Relation indexRelation, - Snapshot snapshot, - int nkeys, ScanKey key); + Relation indexRelation, + Snapshot snapshot, + int nkeys, ScanKey key); extern HeapTuple systable_getnext_ordered(SysScanDesc sysscan, - ScanDirection direction); + ScanDirection direction); extern void systable_endscan_ordered(SysScanDesc sysscan); #endif /* GENAM_H */ diff --git a/src/include/access/generic_xlog.h b/src/include/access/generic_xlog.h index cb5b5b713a..129c15cc27 100644 --- a/src/include/access/generic_xlog.h +++ b/src/include/access/generic_xlog.h @@ -32,7 +32,7 @@ typedef struct GenericXLogState GenericXLogState; /* API for construction of generic xlog records */ extern GenericXLogState *GenericXLogStart(Relation relation); extern Page GenericXLogRegisterBuffer(GenericXLogState *state, Buffer buffer, - int flags); + int flags); extern XLogRecPtr GenericXLogFinish(GenericXLogState *state); extern void GenericXLogAbort(GenericXLogState *state); diff --git a/src/include/access/gin.h b/src/include/access/gin.h index 4f0fa03782..a8eef5a379 100644 --- a/src/include/access/gin.h +++ b/src/include/access/gin.h @@ -72,6 +72,6 @@ extern int gin_pending_list_limit; /* ginutil.c */ extern void ginGetStats(Relation index, GinStatsData *stats); extern void ginUpdateStats(Relation index, const GinStatsData *stats, - bool is_build); + bool is_build); #endif /* GIN_H */ diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index e56aaa17ab..afb3e15721 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -90,32 +90,32 @@ extern Buffer GinNewBuffer(Relation index); extern void GinInitBuffer(Buffer b, uint32 f); extern void GinInitPage(Page page, uint32 f, Size pageSize); extern void GinInitMetabuffer(Buffer b); -extern int ginCompareEntries(GinState *ginstate, OffsetNumber attnum, - Datum a, GinNullCategory categorya, - Datum b, GinNullCategory categoryb); -extern int ginCompareAttEntries(GinState *ginstate, - OffsetNumber attnuma, Datum a, GinNullCategory categorya, - OffsetNumber attnumb, Datum b, GinNullCategory categoryb); +extern int ginCompareEntries(GinState *ginstate, OffsetNumber attnum, + Datum a, GinNullCategory categorya, + Datum b, GinNullCategory categoryb); +extern int ginCompareAttEntries(GinState *ginstate, + OffsetNumber attnuma, Datum a, GinNullCategory categorya, + OffsetNumber attnumb, Datum b, GinNullCategory categoryb); extern Datum *ginExtractEntries(GinState *ginstate, OffsetNumber attnum, - Datum value, bool isNull, - int32 *nentries, GinNullCategory **categories); + Datum value, bool isNull, + int32 *nentries, GinNullCategory **categories); extern OffsetNumber gintuple_get_attrnum(GinState *ginstate, IndexTuple tuple); extern Datum gintuple_get_key(GinState *ginstate, IndexTuple tuple, - GinNullCategory *category); + GinNullCategory *category); /* gininsert.c */ extern IndexBuildResult *ginbuild(Relation heap, Relation index, - struct IndexInfo *indexInfo); + struct IndexInfo *indexInfo); extern void ginbuildempty(Relation index); extern bool gininsert(Relation index, Datum *values, bool *isnull, - ItemPointer ht_ctid, Relation heapRel, - IndexUniqueCheck checkUnique, - struct IndexInfo *indexInfo); + ItemPointer ht_ctid, Relation heapRel, + IndexUniqueCheck checkUnique, + struct IndexInfo *indexInfo); extern void ginEntryInsert(GinState *ginstate, - OffsetNumber attnum, Datum key, GinNullCategory category, - ItemPointerData *items, uint32 nitem, - GinStatsData *buildStats); + OffsetNumber attnum, Datum key, GinNullCategory category, + ItemPointerData *items, uint32 nitem, + GinStatsData *buildStats); /* ginbtree.c */ @@ -196,34 +196,34 @@ typedef struct */ extern GinBtreeStack *ginFindLeafPage(GinBtree btree, bool searchMode, - bool rootConflictCheck, Snapshot snapshot); + bool rootConflictCheck, Snapshot snapshot); extern Buffer ginStepRight(Buffer buffer, Relation index, int lockmode); extern void freeGinBtreeStack(GinBtreeStack *stack); extern void ginInsertValue(GinBtree btree, GinBtreeStack *stack, - void *insertdata, GinStatsData *buildStats); + void *insertdata, GinStatsData *buildStats); /* ginentrypage.c */ extern IndexTuple GinFormTuple(GinState *ginstate, - OffsetNumber attnum, Datum key, GinNullCategory category, - Pointer data, Size dataSize, int nipd, bool errorTooBig); + OffsetNumber attnum, Datum key, GinNullCategory category, + Pointer data, Size dataSize, int nipd, bool errorTooBig); extern void ginPrepareEntryScan(GinBtree btree, OffsetNumber attnum, - Datum key, GinNullCategory category, - GinState *ginstate); + Datum key, GinNullCategory category, + GinState *ginstate); extern void ginEntryFillRoot(GinBtree btree, Page root, BlockNumber lblkno, Page lpage, BlockNumber rblkno, Page rpage); extern ItemPointer ginReadTuple(GinState *ginstate, OffsetNumber attnum, - IndexTuple itup, int *nitems); + IndexTuple itup, int *nitems); /* gindatapage.c */ extern ItemPointer GinDataLeafPageGetItems(Page page, int *nitems, ItemPointerData advancePast); extern int GinDataLeafPageGetItemsToTbm(Page page, TIDBitmap *tbm); extern BlockNumber createPostingTree(Relation index, - ItemPointerData *items, uint32 nitems, - GinStatsData *buildStats, Buffer entrybuffer); + ItemPointerData *items, uint32 nitems, + GinStatsData *buildStats, Buffer entrybuffer); extern void GinDataPageAddPostingItem(Page page, PostingItem *data, OffsetNumber offset); extern void GinPageDeletePostingItem(Page page, OffsetNumber offset); extern void ginInsertItemPointers(Relation index, BlockNumber rootBlkno, - ItemPointerData *items, uint32 nitem, - GinStatsData *buildStats); + ItemPointerData *items, uint32 nitem, + GinStatsData *buildStats); extern GinBtreeStack *ginScanBeginPostingTree(GinBtree btree, Relation index, BlockNumber rootBlkno, Snapshot snapshot); extern void ginDataFillRoot(GinBtree btree, Page root, BlockNumber lblkno, Page lpage, BlockNumber rblkno, Page rpage); @@ -366,7 +366,7 @@ typedef GinScanOpaqueData *GinScanOpaque; extern IndexScanDesc ginbeginscan(Relation rel, int nkeys, int norderbys); extern void ginendscan(IndexScanDesc scan); extern void ginrescan(IndexScanDesc scan, ScanKey key, int nscankeys, - ScanKey orderbys, int norderbys); + ScanKey orderbys, int norderbys); extern void ginNewScanKey(IndexScanDesc scan); extern void ginFreeScanKeys(GinScanOpaque so); @@ -378,13 +378,13 @@ extern void ginInitConsistentFunction(GinState *ginstate, GinScanKey key); /* ginvacuum.c */ extern IndexBulkDeleteResult *ginbulkdelete(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats, - IndexBulkDeleteCallback callback, - void *callback_state); + IndexBulkDeleteResult *stats, + IndexBulkDeleteCallback callback, + void *callback_state); extern IndexBulkDeleteResult *ginvacuumcleanup(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats); + IndexBulkDeleteResult *stats); extern ItemPointer ginVacuumItemPointers(GinVacuumState *gvs, - ItemPointerData *items, int nitem, int *nremaining); + ItemPointerData *items, int nitem, int *nremaining); /* ginvalidate.c */ extern bool ginvalidate(Oid opclassoid); @@ -414,13 +414,13 @@ typedef struct extern void ginInitBA(BuildAccumulator *accum); extern void ginInsertBAEntries(BuildAccumulator *accum, - ItemPointer heapptr, OffsetNumber attnum, - Datum *entries, GinNullCategory *categories, - int32 nentries); + ItemPointer heapptr, OffsetNumber attnum, + Datum *entries, GinNullCategory *categories, + int32 nentries); extern void ginBeginBAScan(BuildAccumulator *accum); extern ItemPointerData *ginGetBAEntry(BuildAccumulator *accum, - OffsetNumber *attnum, Datum *key, GinNullCategory *category, - uint32 *n); + OffsetNumber *attnum, Datum *key, GinNullCategory *category, + uint32 *n); /* ginfast.c */ @@ -433,25 +433,25 @@ typedef struct GinTupleCollector } GinTupleCollector; extern void ginHeapTupleFastInsert(GinState *ginstate, - GinTupleCollector *collector); + GinTupleCollector *collector); extern void ginHeapTupleFastCollect(GinState *ginstate, - GinTupleCollector *collector, - OffsetNumber attnum, Datum value, bool isNull, - ItemPointer ht_ctid); + GinTupleCollector *collector, + OffsetNumber attnum, Datum value, bool isNull, + ItemPointer ht_ctid); extern void ginInsertCleanup(GinState *ginstate, bool full_clean, - bool fill_fsm, bool forceCleanup, IndexBulkDeleteResult *stats); + bool fill_fsm, bool forceCleanup, IndexBulkDeleteResult *stats); /* ginpostinglist.c */ extern GinPostingList *ginCompressPostingList(const ItemPointer ptrs, int nptrs, - int maxsize, int *nwritten); + int maxsize, int *nwritten); extern int ginPostingListDecodeAllSegmentsToTbm(GinPostingList *ptr, int totalsize, TIDBitmap *tbm); extern ItemPointer ginPostingListDecodeAllSegments(GinPostingList *ptr, int len, int *ndecoded); extern ItemPointer ginPostingListDecode(GinPostingList *ptr, int *ndecoded); extern ItemPointer ginMergeItemPointers(ItemPointerData *a, uint32 na, - ItemPointerData *b, uint32 nb, - int *nmerged); + ItemPointerData *b, uint32 nb, + int *nmerged); /* * Merging the results of several gin scans compares item pointers a lot, diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index 614d9996ec..f80694bf9a 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -391,18 +391,18 @@ typedef struct GiSTOptions /* gist.c */ extern void gistbuildempty(Relation index); extern bool gistinsert(Relation r, Datum *values, bool *isnull, - ItemPointer ht_ctid, Relation heapRel, - IndexUniqueCheck checkUnique, - struct IndexInfo *indexInfo); + ItemPointer ht_ctid, Relation heapRel, + IndexUniqueCheck checkUnique, + struct IndexInfo *indexInfo); extern MemoryContext createTempGistContext(void); extern GISTSTATE *initGISTstate(Relation index); extern void freeGISTstate(GISTSTATE *giststate); extern void gistdoinsert(Relation r, - IndexTuple itup, - Size freespace, - GISTSTATE *GISTstate, - Relation heapRel, - bool is_build); + IndexTuple itup, + Size freespace, + GISTSTATE *GISTstate, + Relation heapRel, + bool is_build); /* A List of these is returned from gistplacetopage() in *splitinfo */ typedef struct @@ -412,38 +412,38 @@ typedef struct } GISTPageSplitInfo; extern bool gistplacetopage(Relation rel, Size freespace, GISTSTATE *giststate, - Buffer buffer, - IndexTuple *itup, int ntup, - OffsetNumber oldoffnum, BlockNumber *newblkno, - Buffer leftchildbuf, - List **splitinfo, - bool markleftchild, - Relation heapRel, - bool is_build); + Buffer buffer, + IndexTuple *itup, int ntup, + OffsetNumber oldoffnum, BlockNumber *newblkno, + Buffer leftchildbuf, + List **splitinfo, + bool markleftchild, + Relation heapRel, + bool is_build); extern SplitedPageLayout *gistSplit(Relation r, Page page, IndexTuple *itup, - int len, GISTSTATE *giststate); + int len, GISTSTATE *giststate); /* gistxlog.c */ extern XLogRecPtr gistXLogPageDelete(Buffer buffer, - TransactionId xid, Buffer parentBuffer, - OffsetNumber downlinkOffset); + TransactionId xid, Buffer parentBuffer, + OffsetNumber downlinkOffset); extern void gistXLogPageReuse(Relation rel, BlockNumber blkno, - TransactionId latestRemovedXid); + TransactionId latestRemovedXid); extern XLogRecPtr gistXLogUpdate(Buffer buffer, - OffsetNumber *todelete, int ntodelete, - IndexTuple *itup, int ntup, - Buffer leftchild); + OffsetNumber *todelete, int ntodelete, + IndexTuple *itup, int ntup, + Buffer leftchild); extern XLogRecPtr gistXLogDelete(Buffer buffer, OffsetNumber *todelete, - int ntodelete, TransactionId latestRemovedXid); + int ntodelete, TransactionId latestRemovedXid); extern XLogRecPtr gistXLogSplit(bool page_is_leaf, - SplitedPageLayout *dist, - BlockNumber origrlink, GistNSN oldnsn, - Buffer leftchild, bool markfollowright); + SplitedPageLayout *dist, + BlockNumber origrlink, GistNSN oldnsn, + Buffer leftchild, bool markfollowright); /* gistget.c */ extern bool gistgettuple(IndexScanDesc scan, ScanDirection dir); @@ -463,90 +463,90 @@ extern bool gistvalidate(Oid opclassoid); extern bytea *gistoptions(Datum reloptions, bool validate); extern bool gistproperty(Oid index_oid, int attno, - IndexAMProperty prop, const char *propname, - bool *res, bool *isnull); + IndexAMProperty prop, const char *propname, + bool *res, bool *isnull); extern bool gistfitpage(IndexTuple *itvec, int len); extern bool gistnospace(Page page, IndexTuple *itvec, int len, OffsetNumber todelete, Size freespace); extern void gistcheckpage(Relation rel, Buffer buf); extern Buffer gistNewBuffer(Relation r); extern bool gistPageRecyclable(Page page); extern void gistfillbuffer(Page page, IndexTuple *itup, int len, - OffsetNumber off); + OffsetNumber off); extern IndexTuple *gistextractpage(Page page, int *len /* out */ ); extern IndexTuple *gistjoinvector( - IndexTuple *itvec, int *len, - IndexTuple *additvec, int addlen); + IndexTuple *itvec, int *len, + IndexTuple *additvec, int addlen); extern IndexTupleData *gistfillitupvec(IndexTuple *vec, int veclen, int *memlen); extern IndexTuple gistunion(Relation r, IndexTuple *itvec, - int len, GISTSTATE *giststate); + int len, GISTSTATE *giststate); extern IndexTuple gistgetadjusted(Relation r, - IndexTuple oldtup, - IndexTuple addtup, - GISTSTATE *giststate); + IndexTuple oldtup, + IndexTuple addtup, + GISTSTATE *giststate); extern IndexTuple gistFormTuple(GISTSTATE *giststate, - Relation r, Datum *attdata, bool *isnull, bool isleaf); + Relation r, Datum *attdata, bool *isnull, bool isleaf); extern OffsetNumber gistchoose(Relation r, Page p, - IndexTuple it, - GISTSTATE *giststate); + IndexTuple it, + GISTSTATE *giststate); extern void GISTInitBuffer(Buffer b, uint32 f); extern void gistdentryinit(GISTSTATE *giststate, int nkey, GISTENTRY *e, - Datum k, Relation r, Page pg, OffsetNumber o, - bool l, bool isNull); + Datum k, Relation r, Page pg, OffsetNumber o, + bool l, bool isNull); extern float gistpenalty(GISTSTATE *giststate, int attno, - GISTENTRY *key1, bool isNull1, - GISTENTRY *key2, bool isNull2); + GISTENTRY *key1, bool isNull1, + GISTENTRY *key2, bool isNull2); extern void gistMakeUnionItVec(GISTSTATE *giststate, IndexTuple *itvec, int len, - Datum *attr, bool *isnull); + Datum *attr, bool *isnull); extern bool gistKeyIsEQ(GISTSTATE *giststate, int attno, Datum a, Datum b); extern void gistDeCompressAtt(GISTSTATE *giststate, Relation r, IndexTuple tuple, Page p, - OffsetNumber o, GISTENTRY *attdata, bool *isnull); + OffsetNumber o, GISTENTRY *attdata, bool *isnull); extern HeapTuple gistFetchTuple(GISTSTATE *giststate, Relation r, - IndexTuple tuple); + IndexTuple tuple); extern void gistMakeUnionKey(GISTSTATE *giststate, int attno, - GISTENTRY *entry1, bool isnull1, - GISTENTRY *entry2, bool isnull2, - Datum *dst, bool *dstisnull); + GISTENTRY *entry1, bool isnull1, + GISTENTRY *entry2, bool isnull2, + Datum *dst, bool *dstisnull); extern XLogRecPtr gistGetFakeLSN(Relation rel); /* gistvacuum.c */ extern IndexBulkDeleteResult *gistbulkdelete(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats, - IndexBulkDeleteCallback callback, - void *callback_state); + IndexBulkDeleteResult *stats, + IndexBulkDeleteCallback callback, + void *callback_state); extern IndexBulkDeleteResult *gistvacuumcleanup(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats); + IndexBulkDeleteResult *stats); /* gistsplit.c */ extern void gistSplitByKey(Relation r, Page page, IndexTuple *itup, - int len, GISTSTATE *giststate, - GistSplitVector *v, - int attno); + int len, GISTSTATE *giststate, + GistSplitVector *v, + int attno); /* gistbuild.c */ extern IndexBuildResult *gistbuild(Relation heap, Relation index, - struct IndexInfo *indexInfo); + struct IndexInfo *indexInfo); extern void gistValidateBufferingOption(const char *value); /* gistbuildbuffers.c */ extern GISTBuildBuffers *gistInitBuildBuffers(int pagesPerBuffer, int levelStep, - int maxLevel); + int maxLevel); extern GISTNodeBuffer *gistGetNodeBuffer(GISTBuildBuffers *gfbb, - GISTSTATE *giststate, - BlockNumber blkno, int level); + GISTSTATE *giststate, + BlockNumber blkno, int level); extern void gistPushItupToNodeBuffer(GISTBuildBuffers *gfbb, - GISTNodeBuffer *nodeBuffer, IndexTuple item); + GISTNodeBuffer *nodeBuffer, IndexTuple item); extern bool gistPopItupFromNodeBuffer(GISTBuildBuffers *gfbb, - GISTNodeBuffer *nodeBuffer, IndexTuple *item); + GISTNodeBuffer *nodeBuffer, IndexTuple *item); extern void gistFreeBuildBuffers(GISTBuildBuffers *gfbb); extern void gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb, - GISTSTATE *giststate, Relation r, - int level, Buffer buffer, - List *splitinfo); + GISTSTATE *giststate, Relation r, + int level, Buffer buffer, + List *splitinfo); extern void gistUnloadNodeBuffers(GISTBuildBuffers *gfbb); #endif /* GIST_PRIVATE_H */ diff --git a/src/include/access/gistscan.h b/src/include/access/gistscan.h index cf9ab2ab56..c02445a698 100644 --- a/src/include/access/gistscan.h +++ b/src/include/access/gistscan.h @@ -18,7 +18,7 @@ extern IndexScanDesc gistbeginscan(Relation r, int nkeys, int norderbys); extern void gistrescan(IndexScanDesc scan, ScanKey key, int nkeys, - ScanKey orderbys, int norderbys); + ScanKey orderbys, int norderbys); extern void gistendscan(IndexScanDesc scan); #endif /* GISTSCAN_H */ diff --git a/src/include/access/hash.h b/src/include/access/hash.h index a1b0ccc898..210351863e 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -343,24 +343,24 @@ typedef HashMetaPageData *HashMetaPage; /* public routines */ extern IndexBuildResult *hashbuild(Relation heap, Relation index, - struct IndexInfo *indexInfo); + struct IndexInfo *indexInfo); extern void hashbuildempty(Relation index); extern bool hashinsert(Relation rel, Datum *values, bool *isnull, - ItemPointer ht_ctid, Relation heapRel, - IndexUniqueCheck checkUnique, - struct IndexInfo *indexInfo); + ItemPointer ht_ctid, Relation heapRel, + IndexUniqueCheck checkUnique, + struct IndexInfo *indexInfo); extern bool hashgettuple(IndexScanDesc scan, ScanDirection dir); extern int64 hashgetbitmap(IndexScanDesc scan, TIDBitmap *tbm); extern IndexScanDesc hashbeginscan(Relation rel, int nkeys, int norderbys); extern void hashrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys, - ScanKey orderbys, int norderbys); + ScanKey orderbys, int norderbys); extern void hashendscan(IndexScanDesc scan); extern IndexBulkDeleteResult *hashbulkdelete(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats, - IndexBulkDeleteCallback callback, - void *callback_state); + IndexBulkDeleteResult *stats, + IndexBulkDeleteCallback callback, + void *callback_state); extern IndexBulkDeleteResult *hashvacuumcleanup(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats); + IndexBulkDeleteResult *stats); extern bytea *hashoptions(Datum reloptions, bool validate); extern bool hashvalidate(Oid opclassoid); @@ -369,52 +369,52 @@ extern bool hashvalidate(Oid opclassoid); /* hashinsert.c */ extern void _hash_doinsert(Relation rel, IndexTuple itup, Relation heapRel); extern OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf, - Size itemsize, IndexTuple itup); + Size itemsize, IndexTuple itup); extern void _hash_pgaddmultitup(Relation rel, Buffer buf, IndexTuple *itups, - OffsetNumber *itup_offsets, uint16 nitups); + OffsetNumber *itup_offsets, uint16 nitups); /* hashovfl.c */ extern Buffer _hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf, bool retain_pin); extern BlockNumber _hash_freeovflpage(Relation rel, Buffer bucketbuf, Buffer ovflbuf, - Buffer wbuf, IndexTuple *itups, OffsetNumber *itup_offsets, - Size *tups_size, uint16 nitups, BufferAccessStrategy bstrategy); + Buffer wbuf, IndexTuple *itups, OffsetNumber *itup_offsets, + Size *tups_size, uint16 nitups, BufferAccessStrategy bstrategy); extern void _hash_initbitmapbuffer(Buffer buf, uint16 bmsize, bool initpage); extern void _hash_squeezebucket(Relation rel, - Bucket bucket, BlockNumber bucket_blkno, - Buffer bucket_buf, - BufferAccessStrategy bstrategy); + Bucket bucket, BlockNumber bucket_blkno, + Buffer bucket_buf, + BufferAccessStrategy bstrategy); extern uint32 _hash_ovflblkno_to_bitno(HashMetaPage metap, BlockNumber ovflblkno); /* hashpage.c */ extern Buffer _hash_getbuf(Relation rel, BlockNumber blkno, - int access, int flags); + int access, int flags); extern Buffer _hash_getbuf_with_condlock_cleanup(Relation rel, - BlockNumber blkno, int flags); + BlockNumber blkno, int flags); extern HashMetaPage _hash_getcachedmetap(Relation rel, Buffer *metabuf, - bool force_refresh); + bool force_refresh); extern Buffer _hash_getbucketbuf_from_hashkey(Relation rel, uint32 hashkey, - int access, - HashMetaPage *cachedmetap); + int access, + HashMetaPage *cachedmetap); extern Buffer _hash_getinitbuf(Relation rel, BlockNumber blkno); extern void _hash_initbuf(Buffer buf, uint32 max_bucket, uint32 num_bucket, - uint32 flag, bool initpage); + uint32 flag, bool initpage); extern Buffer _hash_getnewbuf(Relation rel, BlockNumber blkno, - ForkNumber forkNum); + ForkNumber forkNum); extern Buffer _hash_getbuf_with_strategy(Relation rel, BlockNumber blkno, - int access, int flags, - BufferAccessStrategy bstrategy); + int access, int flags, + BufferAccessStrategy bstrategy); extern void _hash_relbuf(Relation rel, Buffer buf); extern void _hash_dropbuf(Relation rel, Buffer buf); extern void _hash_dropscanbuf(Relation rel, HashScanOpaque so); extern uint32 _hash_init(Relation rel, double num_tuples, - ForkNumber forkNum); + ForkNumber forkNum); extern void _hash_init_metabuffer(Buffer buf, double num_tuples, - RegProcedure procid, uint16 ffactor, bool initpage); + RegProcedure procid, uint16 ffactor, bool initpage); extern void _hash_pageinit(Page page, Size size); extern void _hash_expandtable(Relation rel, Buffer metabuf); extern void _hash_finish_split(Relation rel, Buffer metabuf, Buffer obuf, - Bucket obucket, uint32 maxbucket, uint32 highmask, - uint32 lowmask); + Bucket obucket, uint32 maxbucket, uint32 highmask, + uint32 lowmask); /* hashsearch.c */ extern bool _hash_next(IndexScanDesc scan, ScanDirection dir); @@ -426,7 +426,7 @@ typedef struct HSpool HSpool; /* opaque struct in hashsort.c */ extern HSpool *_h_spoolinit(Relation heap, Relation index, uint32 num_buckets); extern void _h_spooldestroy(HSpool *hspool); extern void _h_spool(HSpool *hspool, ItemPointer self, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern void _h_indexbuild(HSpool *hspool, Relation heapRel); /* hashutil.c */ @@ -434,30 +434,30 @@ extern bool _hash_checkqual(IndexScanDesc scan, IndexTuple itup); extern uint32 _hash_datum2hashkey(Relation rel, Datum key); extern uint32 _hash_datum2hashkey_type(Relation rel, Datum key, Oid keytype); extern Bucket _hash_hashkey2bucket(uint32 hashkey, uint32 maxbucket, - uint32 highmask, uint32 lowmask); + uint32 highmask, uint32 lowmask); extern uint32 _hash_log2(uint32 num); extern uint32 _hash_spareindex(uint32 num_bucket); extern uint32 _hash_get_totalbuckets(uint32 splitpoint_phase); extern void _hash_checkpage(Relation rel, Buffer buf, int flags); extern uint32 _hash_get_indextuple_hashkey(IndexTuple itup); extern bool _hash_convert_tuple(Relation index, - Datum *user_values, bool *user_isnull, - Datum *index_values, bool *index_isnull); + Datum *user_values, bool *user_isnull, + Datum *index_values, bool *index_isnull); extern OffsetNumber _hash_binsearch(Page page, uint32 hash_value); extern OffsetNumber _hash_binsearch_last(Page page, uint32 hash_value); extern BlockNumber _hash_get_oldblock_from_newbucket(Relation rel, Bucket new_bucket); extern BlockNumber _hash_get_newblock_from_oldbucket(Relation rel, Bucket old_bucket); extern Bucket _hash_get_newbucket_from_oldbucket(Relation rel, Bucket old_bucket, - uint32 lowmask, uint32 maxbucket); + uint32 lowmask, uint32 maxbucket); extern void _hash_kill_items(IndexScanDesc scan); /* hash.c */ extern void hashbucketcleanup(Relation rel, Bucket cur_bucket, - Buffer bucket_buf, BlockNumber bucket_blkno, - BufferAccessStrategy bstrategy, - uint32 maxbucket, uint32 highmask, uint32 lowmask, - double *tuples_removed, double *num_index_tuples, - bool bucket_has_garbage, - IndexBulkDeleteCallback callback, void *callback_state); + Buffer bucket_buf, BlockNumber bucket_blkno, + BufferAccessStrategy bstrategy, + uint32 maxbucket, uint32 highmask, uint32 lowmask, + double *tuples_removed, double *num_index_tuples, + bool bucket_has_garbage, + IndexBulkDeleteCallback callback, void *callback_state); #endif /* HASH_H */ diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 62aaa08eff..b88bd8a4d7 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -108,26 +108,26 @@ typedef enum #define HeapScanIsValid(scan) PointerIsValid(scan) extern TableScanDesc heap_beginscan(Relation relation, Snapshot snapshot, - int nkeys, ScanKey key, - ParallelTableScanDesc parallel_scan, - uint32 flags); + int nkeys, ScanKey key, + ParallelTableScanDesc parallel_scan, + uint32 flags); extern void heap_setscanlimits(TableScanDesc scan, BlockNumber startBlk, - BlockNumber endBlk); + BlockNumber endBlk); extern void heapgetpage(TableScanDesc scan, BlockNumber page); extern void heap_rescan(TableScanDesc scan, ScanKey key, bool set_params, - bool allow_strat, bool allow_sync, bool allow_pagemode); + bool allow_strat, bool allow_sync, bool allow_pagemode); extern void heap_rescan_set_params(TableScanDesc scan, ScanKey key, - bool allow_strat, bool allow_sync, bool allow_pagemode); + bool allow_strat, bool allow_sync, bool allow_pagemode); extern void heap_endscan(TableScanDesc scan); extern HeapTuple heap_getnext(TableScanDesc scan, ScanDirection direction); extern bool heap_getnextslot(TableScanDesc sscan, - ScanDirection direction, struct TupleTableSlot *slot); + ScanDirection direction, struct TupleTableSlot *slot); extern bool heap_fetch(Relation relation, Snapshot snapshot, - HeapTuple tuple, Buffer *userbuf); + HeapTuple tuple, Buffer *userbuf); extern bool heap_hot_search_buffer(ItemPointer tid, Relation relation, - Buffer buffer, Snapshot snapshot, HeapTuple heapTuple, - bool *all_dead, bool first_call); + Buffer buffer, Snapshot snapshot, HeapTuple heapTuple, + bool *all_dead, bool first_call); extern void heap_get_latest_tid(TableScanDesc scan, ItemPointer tid); extern void setLastTid(const ItemPointer tid); @@ -137,52 +137,52 @@ extern void FreeBulkInsertState(BulkInsertState); extern void ReleaseBulkInsertStatePin(BulkInsertState bistate); extern void heap_insert(Relation relation, HeapTuple tup, CommandId cid, - int options, BulkInsertState bistate); + int options, BulkInsertState bistate); extern void heap_multi_insert(Relation relation, struct TupleTableSlot **slots, - int ntuples, CommandId cid, int options, - BulkInsertState bistate); + int ntuples, CommandId cid, int options, + BulkInsertState bistate); extern TM_Result heap_delete(Relation relation, ItemPointer tid, - CommandId cid, Snapshot crosscheck, bool wait, - struct TM_FailureData *tmfd, bool changingPart); + CommandId cid, Snapshot crosscheck, bool wait, + struct TM_FailureData *tmfd, bool changingPart); extern void heap_finish_speculative(Relation relation, ItemPointer tid); extern void heap_abort_speculative(Relation relation, ItemPointer tid); extern TM_Result heap_update(Relation relation, ItemPointer otid, - HeapTuple newtup, - CommandId cid, Snapshot crosscheck, bool wait, - struct TM_FailureData *tmfd, LockTupleMode *lockmode); + HeapTuple newtup, + CommandId cid, Snapshot crosscheck, bool wait, + struct TM_FailureData *tmfd, LockTupleMode *lockmode); extern TM_Result heap_lock_tuple(Relation relation, HeapTuple tuple, - CommandId cid, LockTupleMode mode, LockWaitPolicy wait_policy, - bool follow_update, - Buffer *buffer, struct TM_FailureData *tmfd); + CommandId cid, LockTupleMode mode, LockWaitPolicy wait_policy, + bool follow_update, + Buffer *buffer, struct TM_FailureData *tmfd); extern void heap_inplace_update(Relation relation, HeapTuple tuple); extern bool heap_freeze_tuple(HeapTupleHeader tuple, - TransactionId relfrozenxid, TransactionId relminmxid, - TransactionId cutoff_xid, TransactionId cutoff_multi); + TransactionId relfrozenxid, TransactionId relminmxid, + TransactionId cutoff_xid, TransactionId cutoff_multi); extern bool heap_tuple_needs_freeze(HeapTupleHeader tuple, TransactionId cutoff_xid, - MultiXactId cutoff_multi, Buffer buf); + MultiXactId cutoff_multi, Buffer buf); extern bool heap_tuple_needs_eventual_freeze(HeapTupleHeader tuple); extern void simple_heap_insert(Relation relation, HeapTuple tup); extern void simple_heap_delete(Relation relation, ItemPointer tid); extern void simple_heap_update(Relation relation, ItemPointer otid, - HeapTuple tup); + HeapTuple tup); extern void heap_sync(Relation relation); extern TransactionId heap_compute_xid_horizon_for_tuples(Relation rel, - ItemPointerData *items, - int nitems); + ItemPointerData *items, + int nitems); /* in heap/pruneheap.c */ extern void heap_page_prune_opt(Relation relation, Buffer buffer); -extern int heap_page_prune(Relation relation, Buffer buffer, - TransactionId OldestXmin, - bool report_stats, TransactionId *latestRemovedXid); +extern int heap_page_prune(Relation relation, Buffer buffer, + TransactionId OldestXmin, + bool report_stats, TransactionId *latestRemovedXid); extern void heap_page_prune_execute(Buffer buffer, - OffsetNumber *redirected, int nredirected, - OffsetNumber *nowdead, int ndead, - OffsetNumber *nowunused, int nunused); + OffsetNumber *redirected, int nredirected, + OffsetNumber *nowdead, int ndead, + OffsetNumber *nowunused, int nunused); extern void heap_get_root_tuples(Page page, OffsetNumber *root_offsets); /* in heap/syncscan.c */ @@ -194,17 +194,17 @@ extern Size SyncScanShmemSize(void); /* in heap/vacuumlazy.c */ struct VacuumParams; extern void heap_vacuum_rel(Relation onerel, - struct VacuumParams *params, BufferAccessStrategy bstrategy); + struct VacuumParams *params, BufferAccessStrategy bstrategy); /* in heap/heapam_visibility.c */ extern bool HeapTupleSatisfiesVisibility(HeapTuple stup, Snapshot snapshot, - Buffer buffer); + Buffer buffer); extern TM_Result HeapTupleSatisfiesUpdate(HeapTuple stup, CommandId curcid, - Buffer buffer); + Buffer buffer); extern HTSV_Result HeapTupleSatisfiesVacuum(HeapTuple stup, TransactionId OldestXmin, - Buffer buffer); + Buffer buffer); extern void HeapTupleSetHintBits(HeapTupleHeader tuple, Buffer buffer, - uint16 infomask, TransactionId xid); + uint16 infomask, TransactionId xid); extern bool HeapTupleHeaderIsOnlyLocked(HeapTupleHeader tuple); extern bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot); extern bool HeapTupleIsSurelyDead(HeapTuple htup, TransactionId OldestXmin); @@ -215,9 +215,9 @@ extern bool HeapTupleIsSurelyDead(HeapTuple htup, TransactionId OldestXmin); */ struct HTAB; extern bool ResolveCminCmaxDuringDecoding(struct HTAB *tuplecid_data, - Snapshot snapshot, - HeapTuple htup, - Buffer buffer, - CommandId *cmin, CommandId *cmax); + Snapshot snapshot, + HeapTuple htup, + Buffer buffer, + CommandId *cmin, CommandId *cmax); #endif /* HEAPAM_H */ diff --git a/src/include/access/heapam_xlog.h b/src/include/access/heapam_xlog.h index 22cd13c47f..f6cdca83ea 100644 --- a/src/include/access/heapam_xlog.h +++ b/src/include/access/heapam_xlog.h @@ -384,7 +384,7 @@ typedef struct xl_heap_rewrite_mapping } xl_heap_rewrite_mapping; extern void HeapTupleHeaderAdvanceLatestRemovedXid(HeapTupleHeader tuple, - TransactionId *latestRemovedXid); + TransactionId *latestRemovedXid); extern void heap_redo(XLogReaderState *record); extern void heap_desc(StringInfo buf, XLogReaderState *record); @@ -396,25 +396,25 @@ extern const char *heap2_identify(uint8 info); extern void heap_xlog_logical_rewrite(XLogReaderState *r); extern XLogRecPtr log_heap_cleanup_info(RelFileNode rnode, - TransactionId latestRemovedXid); + TransactionId latestRemovedXid); extern XLogRecPtr log_heap_clean(Relation reln, Buffer buffer, - OffsetNumber *redirected, int nredirected, - OffsetNumber *nowdead, int ndead, - OffsetNumber *nowunused, int nunused, - TransactionId latestRemovedXid); + OffsetNumber *redirected, int nredirected, + OffsetNumber *nowdead, int ndead, + OffsetNumber *nowunused, int nunused, + TransactionId latestRemovedXid); extern XLogRecPtr log_heap_freeze(Relation reln, Buffer buffer, - TransactionId cutoff_xid, xl_heap_freeze_tuple *tuples, - int ntuples); + TransactionId cutoff_xid, xl_heap_freeze_tuple *tuples, + int ntuples); extern bool heap_prepare_freeze_tuple(HeapTupleHeader tuple, - TransactionId relfrozenxid, - TransactionId relminmxid, - TransactionId cutoff_xid, - TransactionId cutoff_multi, - xl_heap_freeze_tuple *frz, - bool *totally_frozen); + TransactionId relfrozenxid, + TransactionId relminmxid, + TransactionId cutoff_xid, + TransactionId cutoff_multi, + xl_heap_freeze_tuple *frz, + bool *totally_frozen); extern void heap_execute_freeze_tuple(HeapTupleHeader tuple, - xl_heap_freeze_tuple *xlrec_tp); + xl_heap_freeze_tuple *xlrec_tp); extern XLogRecPtr log_heap_visible(RelFileNode rnode, Buffer heap_buffer, - Buffer vm_buffer, TransactionId cutoff_xid, uint8 flags); + Buffer vm_buffer, TransactionId cutoff_xid, uint8 flags); #endif /* HEAPAM_XLOG_H */ diff --git a/src/include/access/hio.h b/src/include/access/hio.h index 8daa12a5cb..dbaabcc073 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -35,10 +35,10 @@ typedef struct BulkInsertStateData extern void RelationPutHeapTuple(Relation relation, Buffer buffer, - HeapTuple tuple, bool token); + HeapTuple tuple, bool token); extern Buffer RelationGetBufferForTuple(Relation relation, Size len, - Buffer otherBuffer, int options, - BulkInsertStateData *bistate, - Buffer *vmbuffer, Buffer *vmbuffer_other); + Buffer otherBuffer, int options, + BulkInsertStateData *bistate, + Buffer *vmbuffer, Buffer *vmbuffer_other); #endif /* HIO_H */ diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 27d92d4567..c716c7ee26 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -81,7 +81,7 @@ typedef HeapTupleData *HeapTuple; extern CommandId HeapTupleHeaderGetCmin(HeapTupleHeader tup); extern CommandId HeapTupleHeaderGetCmax(HeapTupleHeader tup); extern void HeapTupleHeaderAdjustCmax(HeapTupleHeader tup, - CommandId *cmax, bool *iscombo); + CommandId *cmax, bool *iscombo); /* Prototype for HeapTupleHeader accessors in heapam.c */ extern TransactionId HeapTupleGetUpdateXid(HeapTupleHeader tuple); diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h index 8c9cc37482..27f963e9e8 100644 --- a/src/include/access/htup_details.h +++ b/src/include/access/htup_details.h @@ -740,7 +740,7 @@ struct MinimalTupleData #else /* defined(DISABLE_COMPLEX_MACRO) */ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, - bool *isnull); + bool *isnull); #endif /* defined(DISABLE_COMPLEX_MACRO) */ @@ -775,39 +775,39 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, /* prototypes for functions in common/heaptuple.c */ extern Size heap_compute_data_size(TupleDesc tupleDesc, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern void heap_fill_tuple(TupleDesc tupleDesc, - Datum *values, bool *isnull, - char *data, Size data_size, - uint16 *infomask, bits8 *bit); + Datum *values, bool *isnull, + char *data, Size data_size, + uint16 *infomask, bits8 *bit); extern bool heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc); extern Datum nocachegetattr(HeapTuple tup, int attnum, - TupleDesc att); + TupleDesc att); extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, - bool *isnull); + bool *isnull); extern Datum getmissingattr(TupleDesc tupleDesc, - int attnum, bool *isnull); + int attnum, bool *isnull); extern HeapTuple heap_copytuple(HeapTuple tuple); extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest); extern Datum heap_copy_tuple_as_datum(HeapTuple tuple, TupleDesc tupleDesc); extern HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern HeapTuple heap_modify_tuple(HeapTuple tuple, - TupleDesc tupleDesc, - Datum *replValues, - bool *replIsnull, - bool *doReplace); + TupleDesc tupleDesc, + Datum *replValues, + bool *replIsnull, + bool *doReplace); extern HeapTuple heap_modify_tuple_by_cols(HeapTuple tuple, - TupleDesc tupleDesc, - int nCols, - int *replCols, - Datum *replValues, - bool *replIsnull); + TupleDesc tupleDesc, + int nCols, + int *replCols, + Datum *replValues, + bool *replIsnull); extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern void heap_freetuple(HeapTuple htup); extern MinimalTuple heap_form_minimal_tuple(TupleDesc tupleDescriptor, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern void heap_free_minimal_tuple(MinimalTuple mtup); extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup); extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup); diff --git a/src/include/access/itup.h b/src/include/access/itup.h index 8c3a57a8eb..744ffb6c61 100644 --- a/src/include/access/itup.h +++ b/src/include/access/itup.h @@ -149,13 +149,13 @@ typedef IndexAttributeBitMapData * IndexAttributeBitMap; /* routines in indextuple.c */ extern IndexTuple index_form_tuple(TupleDesc tupleDescriptor, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern Datum nocache_index_getattr(IndexTuple tup, int attnum, - TupleDesc tupleDesc); + TupleDesc tupleDesc); extern void index_deform_tuple(IndexTuple tup, TupleDesc tupleDescriptor, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern IndexTuple CopyIndexTuple(IndexTuple source); extern IndexTuple index_truncate_tuple(TupleDesc sourceDescriptor, - IndexTuple source, int leavenatts); + IndexTuple source, int leavenatts); #endif /* ITUP_H */ diff --git a/src/include/access/multixact.h b/src/include/access/multixact.h index 83ae5b6b79..79e4c8d692 100644 --- a/src/include/access/multixact.h +++ b/src/include/access/multixact.h @@ -100,21 +100,21 @@ typedef struct xl_multixact_truncate extern MultiXactId MultiXactIdCreate(TransactionId xid1, - MultiXactStatus status1, TransactionId xid2, - MultiXactStatus status2); + MultiXactStatus status1, TransactionId xid2, + MultiXactStatus status2); extern MultiXactId MultiXactIdExpand(MultiXactId multi, TransactionId xid, - MultiXactStatus status); + MultiXactStatus status); extern MultiXactId MultiXactIdCreateFromMembers(int nmembers, - MultiXactMember *members); + MultiXactMember *members); extern MultiXactId ReadNextMultiXactId(void); extern bool MultiXactIdIsRunning(MultiXactId multi, bool isLockOnly); extern void MultiXactIdSetOldestMember(void); -extern int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **xids, - bool allow_old, bool isLockOnly); +extern int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **xids, + bool allow_old, bool isLockOnly); extern bool MultiXactIdPrecedes(MultiXactId multi1, MultiXactId multi2); extern bool MultiXactIdPrecedesOrEquals(MultiXactId multi1, - MultiXactId multi2); + MultiXactId multi2); extern void AtEOXact_MultiXact(void); extern void AtPrepare_MultiXact(void); @@ -127,34 +127,34 @@ extern void StartupMultiXact(void); extern void TrimMultiXact(void); extern void ShutdownMultiXact(void); extern void SetMultiXactIdLimit(MultiXactId oldest_datminmxid, - Oid oldest_datoid, - bool is_startup); + Oid oldest_datoid, + bool is_startup); extern void MultiXactGetCheckptMulti(bool is_shutdown, - MultiXactId *nextMulti, - MultiXactOffset *nextMultiOffset, - MultiXactId *oldestMulti, - Oid *oldestMultiDB); + MultiXactId *nextMulti, + MultiXactOffset *nextMultiOffset, + MultiXactId *oldestMulti, + Oid *oldestMultiDB); extern void CheckPointMultiXact(void); extern MultiXactId GetOldestMultiXactId(void); extern void TruncateMultiXact(MultiXactId oldestMulti, Oid oldestMultiDB); extern void MultiXactSetNextMXact(MultiXactId nextMulti, - MultiXactOffset nextMultiOffset); + MultiXactOffset nextMultiOffset); extern void MultiXactAdvanceNextMXact(MultiXactId minMulti, - MultiXactOffset minMultiOffset); + MultiXactOffset minMultiOffset); extern void MultiXactAdvanceOldest(MultiXactId oldestMulti, Oid oldestMultiDB); extern int MultiXactMemberFreezeThreshold(void); extern void multixact_twophase_recover(TransactionId xid, uint16 info, - void *recdata, uint32 len); + void *recdata, uint32 len); extern void multixact_twophase_postcommit(TransactionId xid, uint16 info, - void *recdata, uint32 len); + void *recdata, uint32 len); extern void multixact_twophase_postabort(TransactionId xid, uint16 info, - void *recdata, uint32 len); + void *recdata, uint32 len); extern void multixact_redo(XLogReaderState *record); extern void multixact_desc(StringInfo buf, XLogReaderState *record); extern const char *multixact_identify(uint8 info); extern char *mxid_to_string(MultiXactId multi, int nmembers, - MultiXactMember *members); + MultiXactMember *members); #endif /* MULTIXACT_H */ diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 6c1acd4855..a3583f225b 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -696,26 +696,26 @@ typedef BTScanOpaqueData *BTScanOpaque; */ extern void btbuildempty(Relation index); extern bool btinsert(Relation rel, Datum *values, bool *isnull, - ItemPointer ht_ctid, Relation heapRel, - IndexUniqueCheck checkUnique, - struct IndexInfo *indexInfo); + ItemPointer ht_ctid, Relation heapRel, + IndexUniqueCheck checkUnique, + struct IndexInfo *indexInfo); extern IndexScanDesc btbeginscan(Relation rel, int nkeys, int norderbys); extern Size btestimateparallelscan(void); extern void btinitparallelscan(void *target); extern bool btgettuple(IndexScanDesc scan, ScanDirection dir); extern int64 btgetbitmap(IndexScanDesc scan, TIDBitmap *tbm); extern void btrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys, - ScanKey orderbys, int norderbys); + ScanKey orderbys, int norderbys); extern void btparallelrescan(IndexScanDesc scan); extern void btendscan(IndexScanDesc scan); extern void btmarkpos(IndexScanDesc scan); extern void btrestrpos(IndexScanDesc scan); extern IndexBulkDeleteResult *btbulkdelete(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats, - IndexBulkDeleteCallback callback, - void *callback_state); + IndexBulkDeleteResult *stats, + IndexBulkDeleteCallback callback, + void *callback_state); extern IndexBulkDeleteResult *btvacuumcleanup(IndexVacuumInfo *info, - IndexBulkDeleteResult *stats); + IndexBulkDeleteResult *stats); extern bool btcanreturn(Relation index, int attno); /* @@ -730,7 +730,7 @@ extern void _bt_parallel_advance_array_keys(IndexScanDesc scan); * prototypes for functions in nbtinsert.c */ extern bool _bt_doinsert(Relation rel, IndexTuple itup, - IndexUniqueCheck checkUnique, Relation heapRel); + IndexUniqueCheck checkUnique, Relation heapRel); extern Buffer _bt_getstackbuf(Relation rel, BTStack stack); extern void _bt_finish_split(Relation rel, Buffer bbuf, BTStack stack); @@ -738,15 +738,15 @@ extern void _bt_finish_split(Relation rel, Buffer bbuf, BTStack stack); * prototypes for functions in nbtsplitloc.c */ extern OffsetNumber _bt_findsplitloc(Relation rel, Page page, - OffsetNumber newitemoff, Size newitemsz, IndexTuple newitem, - bool *newitemonleft); + OffsetNumber newitemoff, Size newitemsz, IndexTuple newitem, + bool *newitemonleft); /* * prototypes for functions in nbtpage.c */ extern void _bt_initmetapage(Page page, BlockNumber rootbknum, uint32 level); extern void _bt_update_meta_cleanup_info(Relation rel, - TransactionId oldestBtpoXact, float8 numHeapTuples); + TransactionId oldestBtpoXact, float8 numHeapTuples); extern void _bt_upgrademetapage(Page page); extern Buffer _bt_getroot(Relation rel, int access); extern Buffer _bt_gettrueroot(Relation rel); @@ -755,30 +755,30 @@ extern bool _bt_heapkeyspace(Relation rel); extern void _bt_checkpage(Relation rel, Buffer buf); extern Buffer _bt_getbuf(Relation rel, BlockNumber blkno, int access); extern Buffer _bt_relandgetbuf(Relation rel, Buffer obuf, - BlockNumber blkno, int access); + BlockNumber blkno, int access); extern void _bt_relbuf(Relation rel, Buffer buf); extern void _bt_pageinit(Page page, Size size); extern bool _bt_page_recyclable(Page page); extern void _bt_delitems_delete(Relation rel, Buffer buf, - OffsetNumber *itemnos, int nitems, Relation heapRel); + OffsetNumber *itemnos, int nitems, Relation heapRel); extern void _bt_delitems_vacuum(Relation rel, Buffer buf, - OffsetNumber *itemnos, int nitems, - BlockNumber lastBlockVacuumed); + OffsetNumber *itemnos, int nitems, + BlockNumber lastBlockVacuumed); extern int _bt_pagedel(Relation rel, Buffer buf); /* * prototypes for functions in nbtsearch.c */ extern BTStack _bt_search(Relation rel, BTScanInsert key, Buffer *bufP, - int access, Snapshot snapshot); + int access, Snapshot snapshot); extern Buffer _bt_moveright(Relation rel, BTScanInsert key, Buffer buf, - bool forupdate, BTStack stack, int access, Snapshot snapshot); + bool forupdate, BTStack stack, int access, Snapshot snapshot); extern OffsetNumber _bt_binsrch_insert(Relation rel, BTInsertState insertstate); extern int32 _bt_compare(Relation rel, BTScanInsert key, Page page, OffsetNumber offnum); extern bool _bt_first(IndexScanDesc scan, ScanDirection dir); extern bool _bt_next(IndexScanDesc scan, ScanDirection dir); extern Buffer _bt_get_endpoint(Relation rel, uint32 level, bool rightmost, - Snapshot snapshot); + Snapshot snapshot); /* * prototypes for functions in nbtutils.c @@ -792,7 +792,7 @@ extern void _bt_mark_array_keys(IndexScanDesc scan); extern void _bt_restore_array_keys(IndexScanDesc scan); extern void _bt_preprocess_keys(IndexScanDesc scan); extern bool _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, - int tupnatts, ScanDirection dir, bool *continuescan); + int tupnatts, ScanDirection dir, bool *continuescan); extern void _bt_killitems(IndexScanDesc scan); extern BTCycleId _bt_vacuum_cycleid(Relation rel); extern BTCycleId _bt_start_vacuum(Relation rel); @@ -802,17 +802,17 @@ extern Size BTreeShmemSize(void); extern void BTreeShmemInit(void); extern bytea *btoptions(Datum reloptions, bool validate); extern bool btproperty(Oid index_oid, int attno, - IndexAMProperty prop, const char *propname, - bool *res, bool *isnull); + IndexAMProperty prop, const char *propname, + bool *res, bool *isnull); extern char *btbuildphasename(int64 phasenum); extern IndexTuple _bt_truncate(Relation rel, IndexTuple lastleft, - IndexTuple firstright, BTScanInsert itup_key); -extern int _bt_keep_natts_fast(Relation rel, IndexTuple lastleft, - IndexTuple firstright); + IndexTuple firstright, BTScanInsert itup_key); +extern int _bt_keep_natts_fast(Relation rel, IndexTuple lastleft, + IndexTuple firstright); extern bool _bt_check_natts(Relation rel, bool heapkeyspace, Page page, - OffsetNumber offnum); + OffsetNumber offnum); extern void _bt_check_third_page(Relation rel, Relation heap, - bool needheaptidspace, Page page, IndexTuple newtup); + bool needheaptidspace, Page page, IndexTuple newtup); /* * prototypes for functions in nbtvalidate.c @@ -823,7 +823,7 @@ extern bool btvalidate(Oid opclassoid); * prototypes for functions in nbtsort.c */ extern IndexBuildResult *btbuild(Relation heap, Relation index, - struct IndexInfo *indexInfo); + struct IndexInfo *indexInfo); extern void _bt_parallel_build_main(dsm_segment *seg, shm_toc *toc); #endif /* NBTREE_H */ diff --git a/src/include/access/parallel.h b/src/include/access/parallel.h index e650bb2eef..c00ae6424c 100644 --- a/src/include/access/parallel.h +++ b/src/include/access/parallel.h @@ -60,7 +60,7 @@ extern PGDLLIMPORT bool InitializingParallelWorker; #define IsParallelWorker() (ParallelWorkerNumber >= 0) extern ParallelContext *CreateParallelContext(const char *library_name, - const char *function_name, int nworkers); + const char *function_name, int nworkers); extern void InitializeParallelDSM(ParallelContext *pcxt); extern void ReinitializeParallelDSM(ParallelContext *pcxt); extern void LaunchParallelWorkers(ParallelContext *pcxt); diff --git a/src/include/access/printsimple.h b/src/include/access/printsimple.h index 4d8dd4e67a..be81f36191 100644 --- a/src/include/access/printsimple.h +++ b/src/include/access/printsimple.h @@ -18,6 +18,6 @@ extern bool printsimple(TupleTableSlot *slot, DestReceiver *self); extern void printsimple_startup(DestReceiver *self, int operation, - TupleDesc tupdesc); + TupleDesc tupdesc); #endif /* PRINTSIMPLE_H */ diff --git a/src/include/access/printtup.h b/src/include/access/printtup.h index 8b60eba814..ab78c5e880 100644 --- a/src/include/access/printtup.h +++ b/src/include/access/printtup.h @@ -21,15 +21,15 @@ extern DestReceiver *printtup_create_DR(CommandDest dest); extern void SetRemoteDestReceiverParams(DestReceiver *self, Portal portal); extern void SendRowDescriptionMessage(StringInfo buf, - TupleDesc typeinfo, List *targetlist, int16 *formats); |