Skip to content

Commit a6fd7b7

Browse files
committed
Post-PG 10 beta1 pgindent run
perltidy run not included.
1 parent 8a94332 commit a6fd7b7

File tree

310 files changed

+3341
-3174
lines changed

Some content is hidden

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

310 files changed

+3341
-3174
lines changed

contrib/bloom/blinsert.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ blbuildempty(Relation index)
165165
BloomFillMetapage(index, metapage);
166166

167167
/*
168-
* Write the page and log it. It might seem that an immediate sync
169-
* would be sufficient to guarantee that the file exists on disk, but
170-
* recovery itself might remove it while replaying, for example, an
171-
* XLOG_DBASE_CREATE or XLOG_TBLSPC_CREATE record. Therefore, we
172-
* need this even when wal_level=minimal.
168+
* Write the page and log it. It might seem that an immediate sync would
169+
* be sufficient to guarantee that the file exists on disk, but recovery
170+
* itself might remove it while replaying, for example, an
171+
* XLOG_DBASE_CREATE or XLOG_TBLSPC_CREATE record. Therefore, we need
172+
* this even when wal_level=minimal.
173173
*/
174174
PageSetChecksumInplace(metapage, BLOOM_METAPAGE_BLKNO);
175175
smgrwrite(index->rd_smgr, INIT_FORKNUM, BLOOM_METAPAGE_BLKNO,

contrib/bloom/blutils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ _PG_init(void)
7575
bl_relopt_tab[i + 1].optname = MemoryContextStrdup(TopMemoryContext,
7676
buf);
7777
bl_relopt_tab[i + 1].opttype = RELOPT_TYPE_INT;
78-
bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[0]) + sizeof(int) * i;
78+
bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[0]) +sizeof(int) * i;
7979
}
8080
}
8181

contrib/btree_gin/btree_gin.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ gin_btree_compare_prefix(FunctionCallInfo fcinfo)
112112
cmp;
113113

114114
cmp = DatumGetInt32(CallerFInfoFunctionCall2(
115-
data->typecmp,
116-
fcinfo->flinfo,
117-
PG_GET_COLLATION(),
118-
(data->strategy == BTLessStrategyNumber ||
119-
data->strategy == BTLessEqualStrategyNumber)
120-
? data->datum : a,
121-
b));
115+
data->typecmp,
116+
fcinfo->flinfo,
117+
PG_GET_COLLATION(),
118+
(data->strategy == BTLessStrategyNumber ||
119+
data->strategy == BTLessEqualStrategyNumber)
120+
? data->datum : a,
121+
b));
122122

123123
switch (data->strategy)
124124
{
@@ -438,16 +438,16 @@ GIN_SUPPORT(numeric, true, leftmostvalue_numeric, gin_numeric_cmp)
438438
*/
439439

440440

441-
#define ENUM_IS_LEFTMOST(x) ((x) == InvalidOid)
441+
#define ENUM_IS_LEFTMOST(x) ((x) == InvalidOid)
442442

443443
PG_FUNCTION_INFO_V1(gin_enum_cmp);
444444

445445
Datum
446446
gin_enum_cmp(PG_FUNCTION_ARGS)
447447
{
448-
Oid a = PG_GETARG_OID(0);
449-
Oid b = PG_GETARG_OID(1);
450-
int res = 0;
448+
Oid a = PG_GETARG_OID(0);
449+
Oid b = PG_GETARG_OID(1);
450+
int res = 0;
451451

452452
if (ENUM_IS_LEFTMOST(a))
453453
{
@@ -460,11 +460,11 @@ gin_enum_cmp(PG_FUNCTION_ARGS)
460460
else
461461
{
462462
res = DatumGetInt32(CallerFInfoFunctionCall2(
463-
enum_cmp,
464-
fcinfo->flinfo,
465-
PG_GET_COLLATION(),
466-
ObjectIdGetDatum(a),
467-
ObjectIdGetDatum(b)));
463+
enum_cmp,
464+
fcinfo->flinfo,
465+
PG_GET_COLLATION(),
466+
ObjectIdGetDatum(a),
467+
ObjectIdGetDatum(b)));
468468
}
469469

470470
PG_RETURN_INT32(res);

contrib/btree_gist/btree_cash.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172172
PG_RETURN_FLOAT8(
173-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
173+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
174174
);
175175
}
176176

contrib/btree_gist/btree_date.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ gbt_date_distance(PG_FUNCTION_ARGS)
182182
key.upper = (GBT_NUMKEY *) &kkk->upper;
183183

184184
PG_RETURN_FLOAT8(
185-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
185+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
186186
);
187187
}
188188

contrib/btree_gist/btree_enum.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ static bool
3232
gbt_enumgt(const void *a, const void *b, FmgrInfo *flinfo)
3333
{
3434
return DatumGetBool(
35-
CallerFInfoFunctionCall2(enum_gt, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
35+
CallerFInfoFunctionCall2(enum_gt, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
3636
);
3737
}
3838
static bool
3939
gbt_enumge(const void *a, const void *b, FmgrInfo *flinfo)
4040
{
4141
return DatumGetBool(
42-
CallerFInfoFunctionCall2(enum_ge, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
42+
CallerFInfoFunctionCall2(enum_ge, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
4343
);
4444
}
4545
static bool
@@ -74,12 +74,12 @@ gbt_enumkey_cmp(const void *a, const void *b, FmgrInfo *flinfo)
7474
return 0;
7575

7676
return DatumGetInt32(
77-
CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid, ObjectIdGetDatum(ia->upper), ObjectIdGetDatum(ib->upper))
77+
CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid, ObjectIdGetDatum(ia->upper), ObjectIdGetDatum(ib->upper))
7878
);
7979
}
8080

8181
return DatumGetInt32(
82-
CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid, ObjectIdGetDatum(ia->lower), ObjectIdGetDatum(ib->lower))
82+
CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid, ObjectIdGetDatum(ia->lower), ObjectIdGetDatum(ib->lower))
8383
);
8484
}
8585

@@ -94,7 +94,7 @@ static const gbtree_ninfo tinfo =
9494
gbt_enumle,
9595
gbt_enumlt,
9696
gbt_enumkey_cmp,
97-
NULL /* no KNN support at least for now */
97+
NULL /* no KNN support at least for now */
9898
};
9999

100100

contrib/btree_gist/btree_float4.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ gbt_float4_distance(PG_FUNCTION_ARGS)
163163
key.upper = (GBT_NUMKEY *) &kkk->upper;
164164

165165
PG_RETURN_FLOAT8(
166-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
166+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
167167
);
168168
}
169169

contrib/btree_gist/btree_float8.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172172
PG_RETURN_FLOAT8(
173-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
173+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
174174
);
175175
}
176176

contrib/btree_gist/btree_inet.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ gbt_inet_consistent(PG_FUNCTION_ARGS)
133133
key.upper = (GBT_NUMKEY *) &kkk->upper;
134134

135135
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query,
136-
&strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
136+
&strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
137137
}
138138

139139

contrib/btree_gist/btree_int2.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ gbt_int2_distance(PG_FUNCTION_ARGS)
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172172
PG_RETURN_FLOAT8(
173-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
173+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
174174
);
175175
}
176176

contrib/btree_gist/btree_int4.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ gbt_int4_distance(PG_FUNCTION_ARGS)
171171
key.upper = (GBT_NUMKEY *) &kkk->upper;
172172

173173
PG_RETURN_FLOAT8(
174-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
174+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
175175
);
176176
}
177177

contrib/btree_gist/btree_int8.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ gbt_int8_distance(PG_FUNCTION_ARGS)
171171
key.upper = (GBT_NUMKEY *) &kkk->upper;
172172

173173
PG_RETURN_FLOAT8(
174-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
174+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
175175
);
176176
}
177177

contrib/btree_gist/btree_interval.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ gbt_intv_distance(PG_FUNCTION_ARGS)
245245
key.upper = (GBT_NUMKEY *) &kkk->upper;
246246

247247
PG_RETURN_FLOAT8(
248-
gbt_num_distance(&key, (void *) query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
248+
gbt_num_distance(&key, (void *) query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
249249
);
250250
}
251251

contrib/btree_gist/btree_oid.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ gbt_oid_distance(PG_FUNCTION_ARGS)
171171
key.upper = (GBT_NUMKEY *) &kkk->upper;
172172

173173
PG_RETURN_FLOAT8(
174-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
174+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
175175
);
176176
}
177177

contrib/btree_gist/btree_time.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ gbt_time_distance(PG_FUNCTION_ARGS)
235235
key.upper = (GBT_NUMKEY *) &kkk->upper;
236236

237237
PG_RETURN_FLOAT8(
238-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
238+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
239239
);
240240
}
241241

contrib/btree_gist/btree_ts.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ gbt_ts_distance(PG_FUNCTION_ARGS)
283283
key.upper = (GBT_NUMKEY *) &kkk->upper;
284284

285285
PG_RETURN_FLOAT8(
286-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
286+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
287287
);
288288
}
289289

@@ -328,7 +328,7 @@ gbt_tstz_distance(PG_FUNCTION_ARGS)
328328
qqq = tstz_to_ts_gmt(query);
329329

330330
PG_RETURN_FLOAT8(
331-
gbt_num_distance(&key, (void *) &qqq, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
331+
gbt_num_distance(&key, (void *) &qqq, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
332332
);
333333
}
334334

contrib/btree_gist/btree_utils_num.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ typedef struct
4242

4343
/* Methods */
4444

45-
bool (*f_gt) (const void *, const void *, FmgrInfo *); /* greater than */
46-
bool (*f_ge) (const void *, const void *, FmgrInfo *); /* greater or equal */
47-
bool (*f_eq) (const void *, const void *, FmgrInfo *); /* equal */
48-
bool (*f_le) (const void *, const void *, FmgrInfo *); /* less or equal */
49-
bool (*f_lt) (const void *, const void *, FmgrInfo *); /* less than */
50-
int (*f_cmp) (const void *, const void *, FmgrInfo *); /* key compare function */
51-
float8 (*f_dist) (const void *, const void *, FmgrInfo *); /* key distance function */
45+
bool (*f_gt) (const void *, const void *, FmgrInfo *); /* greater than */
46+
bool (*f_ge) (const void *, const void *, FmgrInfo *); /* greater or equal */
47+
bool (*f_eq) (const void *, const void *, FmgrInfo *); /* equal */
48+
bool (*f_le) (const void *, const void *, FmgrInfo *); /* less or equal */
49+
bool (*f_lt) (const void *, const void *, FmgrInfo *); /* less than */
50+
int (*f_cmp) (const void *, const void *, FmgrInfo *); /* key compare function */
51+
float8 (*f_dist) (const void *, const void *, FmgrInfo *); /* key distance function */
5252
} gbtree_ninfo;
5353

5454

contrib/btree_gist/btree_utils_var.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ typedef struct
2525
{
2626
const gbtree_vinfo *tinfo;
2727
Oid collation;
28-
FmgrInfo *flinfo;
28+
FmgrInfo *flinfo;
2929
} gbt_vsrt_arg;
3030

3131

@@ -402,8 +402,8 @@ gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n,
402402
*res = 0.0;
403403
else if (!(((*tinfo->f_cmp) (nk.lower, ok.lower, collation, flinfo) >= 0 ||
404404
gbt_bytea_pf_match(ok.lower, nk.lower, tinfo)) &&
405-
((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 ||
406-
gbt_bytea_pf_match(ok.upper, nk.upper, tinfo))))
405+
((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 ||
406+
gbt_bytea_pf_match(ok.upper, nk.upper, tinfo))))
407407
{
408408
Datum d = PointerGetDatum(0);
409409
double dres;

contrib/btree_gist/btree_utils_var.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ typedef struct
3434

3535
/* Methods */
3636

37-
bool (*f_gt) (const void *, const void *, Oid, FmgrInfo *); /* greater than */
38-
bool (*f_ge) (const void *, const void *, Oid, FmgrInfo *); /* greater equal */
39-
bool (*f_eq) (const void *, const void *, Oid, FmgrInfo *); /* equal */
40-
bool (*f_le) (const void *, const void *, Oid, FmgrInfo *); /* less equal */
41-
bool (*f_lt) (const void *, const void *, Oid, FmgrInfo *); /* less than */
42-
int32 (*f_cmp) (const void *, const void *, Oid, FmgrInfo *); /* compare */
37+
bool (*f_gt) (const void *, const void *, Oid, FmgrInfo *); /* greater than */
38+
bool (*f_ge) (const void *, const void *, Oid, FmgrInfo *); /* greater equal */
39+
bool (*f_eq) (const void *, const void *, Oid, FmgrInfo *); /* equal */
40+
bool (*f_le) (const void *, const void *, Oid, FmgrInfo *); /* less equal */
41+
bool (*f_lt) (const void *, const void *, Oid, FmgrInfo *); /* less than */
42+
int32 (*f_cmp) (const void *, const void *, Oid, FmgrInfo *); /* compare */
4343
GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */
4444
} gbtree_vinfo;
4545

contrib/btree_gist/btree_uuid.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ gbt_uuid_consistent(PG_FUNCTION_ARGS)
150150

151151
PG_RETURN_BOOL(
152152
gbt_num_consistent(&key, (void *) query, &strategy,
153-
GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
153+
GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
154154
);
155155
}
156156

0 commit comments

Comments
 (0)