Skip to content

Commit 8255c7a

Browse files
committed
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
1 parent be76af1 commit 8255c7a

File tree

712 files changed

+7437
-7451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

712 files changed

+7437
-7451
lines changed

contrib/amcheck/verify_nbtree.c

+20-20
Original file line numberDiff line numberDiff line change
@@ -126,45 +126,45 @@ PG_FUNCTION_INFO_V1(bt_index_check);
126126
PG_FUNCTION_INFO_V1(bt_index_parent_check);
127127

128128
static void bt_index_check_internal(Oid indrelid, bool parentcheck,
129-
bool heapallindexed, bool rootdescend);
129+
bool heapallindexed, bool rootdescend);
130130
static inline void btree_index_checkable(Relation rel);
131131
static void bt_check_every_level(Relation rel, Relation heaprel,
132-
bool heapkeyspace, bool readonly, bool heapallindexed,
133-
bool rootdescend);
132+
bool heapkeyspace, bool readonly, bool heapallindexed,
133+
bool rootdescend);
134134
static BtreeLevel bt_check_level_from_leftmost(BtreeCheckState *state,
135-
BtreeLevel level);
135+
BtreeLevel level);
136136
static void bt_target_page_check(BtreeCheckState *state);
137137
static BTScanInsert bt_right_page_check_scankey(BtreeCheckState *state);
138138
static void bt_downlink_check(BtreeCheckState *state, BTScanInsert targetkey,
139-
BlockNumber childblock);
139+
BlockNumber childblock);
140140
static void bt_downlink_missing_check(BtreeCheckState *state);
141141
static void bt_tuple_present_callback(Relation index, HeapTuple htup,
142-
Datum *values, bool *isnull,
143-
bool tupleIsAlive, void *checkstate);
142+
Datum *values, bool *isnull,
143+
bool tupleIsAlive, void *checkstate);
144144
static IndexTuple bt_normalize_tuple(BtreeCheckState *state,
145-
IndexTuple itup);
145+
IndexTuple itup);
146146
static bool bt_rootdescend(BtreeCheckState *state, IndexTuple itup);
147147
static inline bool offset_is_negative_infinity(BTPageOpaque opaque,
148-
OffsetNumber offset);
148+
OffsetNumber offset);
149149
static inline bool invariant_l_offset(BtreeCheckState *state, BTScanInsert key,
150-
OffsetNumber upperbound);
150+
OffsetNumber upperbound);
151151
static inline bool invariant_leq_offset(BtreeCheckState *state,
152-
BTScanInsert key,
153-
OffsetNumber upperbound);
152+
BTScanInsert key,
153+
OffsetNumber upperbound);
154154
static inline bool invariant_g_offset(BtreeCheckState *state, BTScanInsert key,
155-
OffsetNumber lowerbound);
155+
OffsetNumber lowerbound);
156156
static inline bool invariant_l_nontarget_offset(BtreeCheckState *state,
157-
BTScanInsert key,
158-
BlockNumber nontargetblock,
159-
Page nontarget,
160-
OffsetNumber upperbound);
157+
BTScanInsert key,
158+
BlockNumber nontargetblock,
159+
Page nontarget,
160+
OffsetNumber upperbound);
161161
static Page palloc_btree_page(BtreeCheckState *state, BlockNumber blocknum);
162162
static inline BTScanInsert bt_mkscankey_pivotsearch(Relation rel,
163-
IndexTuple itup);
163+
IndexTuple itup);
164164
static ItemId PageGetItemIdCareful(BtreeCheckState *state, BlockNumber block,
165-
Page page, OffsetNumber offset);
165+
Page page, OffsetNumber offset);
166166
static inline ItemPointer BTreeTupleGetHeapTIDCareful(BtreeCheckState *state,
167-
IndexTuple itup, bool nonpivot);
167+
IndexTuple itup, bool nonpivot);
168168

169169
/*
170170
* bt_index_check(index regclass, heapallindexed boolean)

contrib/auto_explain/auto_explain.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ void _PG_fini(void);
7777

7878
static void explain_ExecutorStart(QueryDesc *queryDesc, int eflags);
7979
static void explain_ExecutorRun(QueryDesc *queryDesc,
80-
ScanDirection direction,
81-
uint64 count, bool execute_once);
80+
ScanDirection direction,
81+
uint64 count, bool execute_once);
8282
static void explain_ExecutorFinish(QueryDesc *queryDesc);
8383
static void explain_ExecutorEnd(QueryDesc *queryDesc);
8484

contrib/bloom/bloom.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -189,26 +189,26 @@ extern bool blvalidate(Oid opclassoid);
189189

190190
/* index access method interface functions */
191191
extern bool blinsert(Relation index, Datum *values, bool *isnull,
192-
ItemPointer ht_ctid, Relation heapRel,
193-
IndexUniqueCheck checkUnique,
194-
struct IndexInfo *indexInfo);
192+
ItemPointer ht_ctid, Relation heapRel,
193+
IndexUniqueCheck checkUnique,
194+
struct IndexInfo *indexInfo);
195195
extern IndexScanDesc blbeginscan(Relation r, int nkeys, int norderbys);
196196
extern int64 blgetbitmap(IndexScanDesc scan, TIDBitmap *tbm);
197197
extern void blrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys,
198-
ScanKey orderbys, int norderbys);
198+
ScanKey orderbys, int norderbys);
199199
extern void blendscan(IndexScanDesc scan);
200200
extern IndexBuildResult *blbuild(Relation heap, Relation index,
201-
struct IndexInfo *indexInfo);
201+
struct IndexInfo *indexInfo);
202202
extern void blbuildempty(Relation index);
203203
extern IndexBulkDeleteResult *blbulkdelete(IndexVacuumInfo *info,
204-
IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback,
205-
void *callback_state);
204+
IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback,
205+
void *callback_state);
206206
extern IndexBulkDeleteResult *blvacuumcleanup(IndexVacuumInfo *info,
207-
IndexBulkDeleteResult *stats);
207+
IndexBulkDeleteResult *stats);
208208
extern bytea *bloptions(Datum reloptions, bool validate);
209209
extern void blcostestimate(PlannerInfo *root, IndexPath *path,
210-
double loop_count, Cost *indexStartupCost,
211-
Cost *indexTotalCost, Selectivity *indexSelectivity,
212-
double *indexCorrelation, double *indexPages);
210+
double loop_count, Cost *indexStartupCost,
211+
Cost *indexTotalCost, Selectivity *indexSelectivity,
212+
double *indexCorrelation, double *indexPages);
213213

214214
#endif

contrib/btree_gist/btree_utils_num.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -110,26 +110,26 @@ do { \
110110
extern Interval *abs_interval(Interval *a);
111111

112112
extern bool gbt_num_consistent(const GBT_NUMKEY_R *key, const void *query,
113-
const StrategyNumber *strategy, bool is_leaf,
114-
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
113+
const StrategyNumber *strategy, bool is_leaf,
114+
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
115115

116116
extern float8 gbt_num_distance(const GBT_NUMKEY_R *key, const void *query,
117-
bool is_leaf, const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
117+
bool is_leaf, const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
118118

119119
extern GIST_SPLITVEC *gbt_num_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
120-
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
120+
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
121121

122122
extern GISTENTRY *gbt_num_compress(GISTENTRY *entry, const gbtree_ninfo *tinfo);
123123

124124
extern GISTENTRY *gbt_num_fetch(GISTENTRY *entry, const gbtree_ninfo *tinfo);
125125

126126
extern void *gbt_num_union(GBT_NUMKEY *out, const GistEntryVector *entryvec,
127-
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
127+
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
128128

129129
extern bool gbt_num_same(const GBT_NUMKEY *a, const GBT_NUMKEY *b,
130-
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
130+
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
131131

132132
extern void gbt_num_bin_union(Datum *u, GBT_NUMKEY *e,
133-
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
133+
const gbtree_ninfo *tinfo, FmgrInfo *flinfo);
134134

135135
#endif

contrib/btree_gist/btree_utils_var.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,22 @@ extern GBT_VARKEY *gbt_var_key_copy(const GBT_VARKEY_R *u);
5252
extern GISTENTRY *gbt_var_compress(GISTENTRY *entry, const gbtree_vinfo *tinfo);
5353

5454
extern GBT_VARKEY *gbt_var_union(const GistEntryVector *entryvec, int32 *size,
55-
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
55+
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
5656

5757
extern bool gbt_var_same(Datum d1, Datum d2, Oid collation,
58-
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
58+
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
5959

6060
extern float *gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n,
61-
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
61+
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
6262

6363
extern bool gbt_var_consistent(GBT_VARKEY_R *key, const void *query,
64-
StrategyNumber strategy, Oid collation, bool is_leaf,
65-
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
64+
StrategyNumber strategy, Oid collation, bool is_leaf,
65+
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
6666

6767
extern GIST_SPLITVEC *gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
68-
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
68+
Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
6969

7070
extern void gbt_var_bin_union(Datum *u, GBT_VARKEY *e, Oid collation,
71-
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
71+
const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
7272

7373
#endif

contrib/dblink/dblink.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ typedef struct storeInfo
8989
static Datum dblink_record_internal(FunctionCallInfo fcinfo, bool is_async);
9090
static void prepTuplestoreResult(FunctionCallInfo fcinfo);
9191
static void materializeResult(FunctionCallInfo fcinfo, PGconn *conn,
92-
PGresult *res);
92+
PGresult *res);
9393
static void materializeQueryResult(FunctionCallInfo fcinfo,
94-
PGconn *conn,
95-
const char *conname,
96-
const char *sql,
97-
bool fail);
94+
PGconn *conn,
95+
const char *conname,
96+
const char *sql,
97+
bool fail);
9898
static PGresult *storeQueryResult(volatile storeInfo *sinfo, PGconn *conn, const char *sql);
9999
static void storeRow(volatile storeInfo *sinfo, PGresult *res, bool first);
100100
static remoteConn *getConnectionByName(const char *name);
@@ -114,14 +114,14 @@ static char *generate_relation_name(Relation rel);
114114
static void dblink_connstr_check(const char *connstr);
115115
static void dblink_security_check(PGconn *conn, remoteConn *rconn);
116116
static void dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
117-
bool fail, const char *fmt,...) pg_attribute_printf(5, 6);
117+
bool fail, const char *fmt,...) pg_attribute_printf(5, 6);
118118
static char *get_connect_string(const char *servername);
119119
static char *escape_param_str(const char *from);
120120
static void validate_pkattnums(Relation rel,
121-
int2vector *pkattnums_arg, int32 pknumatts_arg,
122-
int **pkattnums, int *pknumatts);
121+
int2vector *pkattnums_arg, int32 pknumatts_arg,
122+
int **pkattnums, int *pknumatts);
123123
static bool is_valid_dblink_option(const PQconninfoOption *options,
124-
const char *option, Oid context);
124+
const char *option, Oid context);
125125
static int applyRemoteGucs(PGconn *conn);
126126
static void restoreLocalGucs(int nestlevel);
127127

contrib/file_fdw/file_fdw.c

+24-24
Original file line numberDiff line numberDiff line change
@@ -117,49 +117,49 @@ PG_FUNCTION_INFO_V1(file_fdw_validator);
117117
* FDW callback routines
118118
*/
119119
static void fileGetForeignRelSize(PlannerInfo *root,
120-
RelOptInfo *baserel,
121-
Oid foreigntableid);
120+
RelOptInfo *baserel,
121+
Oid foreigntableid);
122122
static void fileGetForeignPaths(PlannerInfo *root,
123-
RelOptInfo *baserel,
124-
Oid foreigntableid);
123+
RelOptInfo *baserel,
124+
Oid foreigntableid);
125125
static ForeignScan *fileGetForeignPlan(PlannerInfo *root,
126-
RelOptInfo *baserel,
127-
Oid foreigntableid,
128-
ForeignPath *best_path,
129-
List *tlist,
130-
List *scan_clauses,
131-
Plan *outer_plan);
126+
RelOptInfo *baserel,
127+
Oid foreigntableid,
128+
ForeignPath *best_path,
129+
List *tlist,
130+
List *scan_clauses,
131+
Plan *outer_plan);
132132
static void fileExplainForeignScan(ForeignScanState *node, ExplainState *es);
133133
static void fileBeginForeignScan(ForeignScanState *node, int eflags);
134134
static TupleTableSlot *fileIterateForeignScan(ForeignScanState *node);
135135
static void fileReScanForeignScan(ForeignScanState *node);
136136
static void fileEndForeignScan(ForeignScanState *node);
137137
static bool fileAnalyzeForeignTable(Relation relation,
138-
AcquireSampleRowsFunc *func,
139-
BlockNumber *totalpages);
138+
AcquireSampleRowsFunc *func,
139+
BlockNumber *totalpages);
140140
static bool fileIsForeignScanParallelSafe(PlannerInfo *root, RelOptInfo *rel,
141-
RangeTblEntry *rte);
141+
RangeTblEntry *rte);
142142

143143
/*
144144
* Helper functions
145145
*/
146146
static bool is_valid_option(const char *option, Oid context);
147147
static void fileGetOptions(Oid foreigntableid,
148-
char **filename,
149-
bool *is_program,
150-
List **other_options);
148+
char **filename,
149+
bool *is_program,
150+
List **other_options);
151151
static List *get_file_fdw_attribute_options(Oid relid);
152152
static bool check_selective_binary_conversion(RelOptInfo *baserel,
153-
Oid foreigntableid,
154-
List **columns);
153+
Oid foreigntableid,
154+
List **columns);
155155
static void estimate_size(PlannerInfo *root, RelOptInfo *baserel,
156-
FileFdwPlanState *fdw_private);
156+
FileFdwPlanState *fdw_private);
157157
static void estimate_costs(PlannerInfo *root, RelOptInfo *baserel,
158-
FileFdwPlanState *fdw_private,
159-
Cost *startup_cost, Cost *total_cost);
160-
static int file_acquire_sample_rows(Relation onerel, int elevel,
161-
HeapTuple *rows, int targrows,
162-
double *totalrows, double *totaldeadrows);
158+
FileFdwPlanState *fdw_private,
159+
Cost *startup_cost, Cost *total_cost);
160+
static int file_acquire_sample_rows(Relation onerel, int elevel,
161+
HeapTuple *rows, int targrows,
162+
double *totalrows, double *totaldeadrows);
163163

164164

165165
/*

contrib/intarray/_int_selfuncs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ PG_FUNCTION_INFO_V1(_int_matchsel);
3535

3636

3737
static Selectivity int_query_opr_selec(ITEM *item, Datum *values, float4 *freqs,
38-
int nmncelems, float4 minfreq);
38+
int nmncelems, float4 minfreq);
3939
static int compare_val_int4(const void *a, const void *b);
4040

4141
/*

contrib/jsonb_plpython/jsonb_plpython.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static PyObject *decimal_constructor;
2626

2727
static PyObject *PLyObject_FromJsonbContainer(JsonbContainer *jsonb);
2828
static JsonbValue *PLyObject_ToJsonbValue(PyObject *obj,
29-
JsonbParseState **jsonb_state, bool is_elem);
29+
JsonbParseState **jsonb_state, bool is_elem);
3030

3131
#if PY_MAJOR_VERSION >= 3
3232
typedef PyObject *(*PLyUnicode_FromStringAndSize_t)

contrib/ltree/lquery_op.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ getlexeme(char *start, char *end, int *len)
5050
}
5151

5252
bool
53-
compare_subnode(ltree_level *t, char *qn, int len, int (*cmpptr) (const char *, const char *, size_t), bool anyend)
53+
compare_subnode(ltree_level *t, char *qn, int len, int (*cmpptr) (const char *, const char *, size_t), bool anyend)
5454
{
5555
char *endt = t->name + t->len;
5656
char *endq = qn + len;

contrib/ltree/ltree.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ Datum ltree_textadd(PG_FUNCTION_ARGS);
155155
/* Util function */
156156
Datum ltree_in(PG_FUNCTION_ARGS);
157157

158-
bool ltree_execute(ITEM *curitem, void *checkval,
159-
bool calcnot, bool (*chkcond) (void *checkval, ITEM *val));
158+
bool ltree_execute(ITEM *curitem, void *checkval,
159+
bool calcnot, bool (*chkcond) (void *checkval, ITEM *val));
160160

161161
int ltree_compare(const ltree *a, const ltree *b);
162162
bool inner_isparent(const ltree *c, const ltree *p);
163-
bool compare_subnode(ltree_level *t, char *q, int len,
164-
int (*cmpptr) (const char *, const char *, size_t), bool anyend);
163+
bool compare_subnode(ltree_level *t, char *q, int len,
164+
int (*cmpptr) (const char *, const char *, size_t), bool anyend);
165165
ltree *lca_inner(ltree **a, int len);
166166
int ltree_strncasecmp(const char *a, const char *b, size_t s);
167167

contrib/pageinspect/brinfuncs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef struct brin_column_state
4141

4242

4343
static Page verify_brin_page(bytea *raw_page, uint16 type,
44-
const char *strtype);
44+
const char *strtype);
4545

4646
Datum
4747
brin_page_type(PG_FUNCTION_ARGS)

contrib/pageinspect/rawpage.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
PG_MODULE_MAGIC;
3434

3535
static bytea *get_raw_page_internal(text *relname, ForkNumber forknum,
36-
BlockNumber blkno);
36+
BlockNumber blkno);
3737

3838

3939
/*

0 commit comments

Comments
 (0)