Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe76af1

Browse files
committed
Initial pgindent run for v12.
This is still using the 2.0 version of pg_bsd_indent.I thought it would be good to commit this separately,so as to document the differences between 2.0 and 2.1 behavior.Discussion:https://postgr.es/m/16296.1558103386@sss.pgh.pa.us
1 parent66a4bad commitbe76af1

File tree

221 files changed

+1441
-1310
lines changed

Some content is hidden

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

221 files changed

+1441
-1310
lines changed

‎contrib/amcheck/verify_nbtree.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static inline bool invariant_l_nontarget_offset(BtreeCheckState *state,
160160
OffsetNumberupperbound);
161161
staticPagepalloc_btree_page(BtreeCheckState*state,BlockNumberblocknum);
162162
staticinlineBTScanInsertbt_mkscankey_pivotsearch(Relationrel,
163-
IndexTupleitup);
163+
IndexTupleitup);
164164
staticItemIdPageGetItemIdCareful(BtreeCheckState*state,BlockNumberblock,
165165
Pagepage,OffsetNumberoffset);
166166
staticinlineItemPointerBTreeTupleGetHeapTIDCareful(BtreeCheckState*state,
@@ -1029,7 +1029,7 @@ bt_target_page_check(BtreeCheckState *state)
10291029
/* Fingerprint leaf page tuples (those that point to the heap) */
10301030
if (state->heapallindexed&&P_ISLEAF(topaque)&& !ItemIdIsDead(itemid))
10311031
{
1032-
IndexTuplenorm;
1032+
IndexTuplenorm;
10331033

10341034
norm=bt_normalize_tuple(state,itup);
10351035
bloom_add_element(state->filter, (unsignedchar*)norm,
@@ -1174,7 +1174,7 @@ bt_target_page_check(BtreeCheckState *state)
11741174
*/
11751175
elseif (offset==max)
11761176
{
1177-
BTScanInsertrightkey;
1177+
BTScanInsertrightkey;
11781178

11791179
/* Get item in next/right page */
11801180
rightkey=bt_right_page_check_scankey(state);
@@ -1851,7 +1851,8 @@ bt_tuple_present_callback(Relation index, HeapTuple htup, Datum *values,
18511851
bool*isnull,booltupleIsAlive,void*checkstate)
18521852
{
18531853
BtreeCheckState*state= (BtreeCheckState*)checkstate;
1854-
IndexTupleitup,norm;
1854+
IndexTupleitup,
1855+
norm;
18551856

18561857
Assert(state->heapallindexed);
18571858

@@ -1931,7 +1932,7 @@ bt_normalize_tuple(BtreeCheckState *state, IndexTuple itup)
19311932

19321933
for (i=0;i<tupleDescriptor->natts;i++)
19331934
{
1934-
Form_pg_attributeatt;
1935+
Form_pg_attributeatt;
19351936

19361937
att=TupleDescAttr(tupleDescriptor,i);
19371938

‎contrib/cube/cube.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ cube_a_f8_f8(PG_FUNCTION_ARGS)
156156
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
157157
errmsg("can't extend cube"),
158158
errdetail("A cube cannot have more than %d dimensions.",
159-
CUBE_MAX_DIM)));
159+
CUBE_MAX_DIM)));
160160

161161
if (ARRNELEMS(ll)!=dim)
162162
ereport(ERROR,
@@ -220,7 +220,7 @@ cube_a_f8(PG_FUNCTION_ARGS)
220220
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
221221
errmsg("array is too long"),
222222
errdetail("A cube cannot have more than %d dimensions.",
223-
CUBE_MAX_DIM)));
223+
CUBE_MAX_DIM)));
224224

225225
dur=ARRPTR(ur);
226226

@@ -260,7 +260,7 @@ cube_subset(PG_FUNCTION_ARGS)
260260
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
261261
errmsg("array is too long"),
262262
errdetail("A cube cannot have more than %d dimensions.",
263-
CUBE_MAX_DIM)));
263+
CUBE_MAX_DIM)));
264264

265265
size=IS_POINT(c) ?POINT_SIZE(dim) :CUBE_SIZE(dim);
266266
result= (NDBOX*)palloc0(size);
@@ -1780,7 +1780,7 @@ cube_c_f8(PG_FUNCTION_ARGS)
17801780
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
17811781
errmsg("can't extend cube"),
17821782
errdetail("A cube cannot have more than %d dimensions.",
1783-
CUBE_MAX_DIM)));
1783+
CUBE_MAX_DIM)));
17841784

17851785
if (IS_POINT(cube))
17861786
{
@@ -1828,7 +1828,7 @@ cube_c_f8_f8(PG_FUNCTION_ARGS)
18281828
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
18291829
errmsg("can't extend cube"),
18301830
errdetail("A cube cannot have more than %d dimensions.",
1831-
CUBE_MAX_DIM)));
1831+
CUBE_MAX_DIM)));
18321832

18331833
if (IS_POINT(cube)&& (x1==x2))
18341834
{

‎contrib/file_fdw/file_fdw.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,11 @@ check_selective_binary_conversion(RelOptInfo *baserel,
922922
/* Skip dropped attributes (probably shouldn't see any here). */
923923
if (attr->attisdropped)
924924
continue;
925-
/* Skip generated columns (COPY won't accept them in the column
926-
* list) */
925+
926+
/*
927+
* Skip generated columns (COPY won't accept them in the column
928+
* list)
929+
*/
927930
if (attr->attgenerated)
928931
continue;
929932
*columns=lappend(*columns,makeString(pstrdup(attname)));

‎contrib/intarray/_int_gist.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,41 +212,44 @@ g_int_compress(PG_FUNCTION_ARGS)
212212
*/
213213
for (j=i=len-1;i>0&&lenr>0;i--,j--)
214214
{
215-
intr_end=dr[i];
216-
intr_start=r_end;
217-
while (i>0&&lenr>0&&dr[i-1]==r_start-1)
215+
intr_end=dr[i];
216+
intr_start=r_end;
217+
218+
while (i>0&&lenr>0&&dr[i-1]==r_start-1)
218219
--r_start,--i,--lenr;
219-
dr[2*j]=r_start;
220-
dr[2*j+1]=r_end;
220+
dr[2*j]=r_start;
221+
dr[2*j+1]=r_end;
221222
}
222223
/* just copy the rest, if any, as trivial ranges */
223224
for (;i >=0;i--,j--)
224-
dr[2*j]=dr[2*j+1]=dr[i];
225+
dr[2*j]=dr[2*j+1]=dr[i];
225226

226227
if (++j)
227228
{
228229
/*
229230
* shunt everything down to start at the right place
230231
*/
231-
memmove((void*)&dr[0], (void*)&dr[2*j],2*(len-j)*sizeof(int32));
232+
memmove((void*)&dr[0], (void*)&dr[2*j],2*(len-j)*sizeof(int32));
232233
}
234+
233235
/*
234236
* make "len" be number of array elements, not ranges
235237
*/
236-
len=2*(len-j);
238+
len=2*(len-j);
237239
cand=1;
238240
while (len>MAXNUMRANGE*2)
239241
{
240242
min=PG_INT64_MAX;
241243
for (i=2;i<len;i+=2)
242-
if (min> ((int64)dr[i]- (int64)dr[i-1]))
244+
if (min> ((int64)dr[i]- (int64)dr[i-1]))
243245
{
244-
min= ((int64)dr[i]- (int64)dr[i-1]);
246+
min= ((int64)dr[i]- (int64)dr[i-1]);
245247
cand=i;
246248
}
247249
memmove((void*)&dr[cand-1], (void*)&dr[cand+1], (len-cand-1)*sizeof(int32));
248250
len-=2;
249251
}
252+
250253
/*
251254
* check sparseness of result
252255
*/

‎contrib/intarray/_int_tool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ internal_size(int *a, int len)
298298
for (i=0;i<len;i+=2)
299299
{
300300
if (!i||a[i]!=a[i-1])/* do not count repeated range */
301-
size+= (int64)(a[i+1])- (int64)(a[i])+1;
301+
size+= (int64)(a[i+1])- (int64)(a[i])+1;
302302
}
303303

304-
if (size> (int64)INT_MAX||size< (int64)INT_MIN)
304+
if (size> (int64)INT_MAX||size< (int64)INT_MIN)
305305
return-1;/* overflow */
306306
return (int)size;
307307
}

‎contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,9 @@ pgss_store(const char *query, uint64 queryId,
11531153
queryId=pgss_hash_string(query,query_len);
11541154

11551155
/*
1156-
* If we are unlucky enough to get a hash of zero(invalid), use queryID
1157-
* as 2 instead, queryID 1 is already in use for normal statements.
1156+
* If we are unlucky enough to get a hash of zero(invalid), use
1157+
* queryID as 2 instead, queryID 1 is already in use for normal
1158+
* statements.
11581159
*/
11591160
if (queryId==UINT64CONST(0))
11601161
queryId=UINT64CONST(2);

‎contrib/pgcrypto/imath.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ mp_int_mod(mp_int a, mp_int m, mp_int c)
11381138
}
11391139

11401140
mp_result
1141-
mp_int_div_value(mp_inta,mp_smallvalue,mp_intq,mp_small*r)
1141+
mp_int_div_value(mp_inta,mp_smallvalue,mp_intq,mp_small*r)
11421142
{
11431143
mpz_tvtmp;
11441144
mp_digitvbuf[MP_VALUE_DIGITS(value)];
@@ -1819,7 +1819,7 @@ mp_int_root(mp_int a, mp_small b, mp_int c)
18191819
}
18201820

18211821
mp_result
1822-
mp_int_to_int(mp_intz,mp_small*out)
1822+
mp_int_to_int(mp_intz,mp_small*out)
18231823
{
18241824
assert(z!=NULL);
18251825

@@ -1850,7 +1850,7 @@ mp_int_to_int(mp_int z, mp_small * out)
18501850
}
18511851

18521852
mp_result
1853-
mp_int_to_uint(mp_intz,mp_usmall*out)
1853+
mp_int_to_uint(mp_intz,mp_usmall*out)
18541854
{
18551855
assert(z!=NULL);
18561856

‎contrib/pgcrypto/imath.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ mp_resultmp_int_div(mp_int a, mp_int b, mp_int q, mp_int r);
218218
/** Sets `q` and `*r` to the quotent and remainder of `a / value`. Division by
219219
powers of 2 is detected and handled efficiently. The remainder is pinned to
220220
`0 <= *r < b`. Either of `q` or `r` may be NULL. */
221-
mp_resultmp_int_div_value(mp_inta,mp_smallvalue,mp_intq,mp_small*r);
221+
mp_resultmp_int_div_value(mp_inta,mp_smallvalue,mp_intq,mp_small*r);
222222

223223
/** Sets `q` and `r` to the quotient and remainder of `a / 2^p2`. This is a
224224
special case for division by powers of two that is more efficient than
@@ -246,7 +246,7 @@ mp_resultmp_int_expt_full(mp_int a, mp_int b, mp_int c);
246246
The remainder is pinned to `0 <= r < value`. */
247247
staticinline
248248
mp_result
249-
mp_int_mod_value(mp_inta,mp_smallvalue,mp_small*r)
249+
mp_int_mod_value(mp_inta,mp_smallvalue,mp_small*r)
250250
{
251251
returnmp_int_div_value(a,value,0,r);
252252
}
@@ -339,11 +339,11 @@ mp_int_sqrt(mp_int a, mp_int c)
339339

340340
/** Returns `MP_OK` if `z` is representable as `mp_small`, else `MP_RANGE`.
341341
If `out` is not NULL, `*out` is set to the value of `z` when `MP_OK`. */
342-
mp_resultmp_int_to_int(mp_intz,mp_small*out);
342+
mp_resultmp_int_to_int(mp_intz,mp_small*out);
343343

344344
/** Returns `MP_OK` if `z` is representable as `mp_usmall`, or `MP_RANGE`.
345345
If `out` is not NULL, `*out` is set to the value of `z` when `MP_OK`. */
346-
mp_resultmp_int_to_uint(mp_intz,mp_usmall*out);
346+
mp_resultmp_int_to_uint(mp_intz,mp_usmall*out);
347347

348348
/** Converts `z` to a zero-terminated string of characters in the specified
349349
`radix`, writing at most `limit` characters to `str` including the

‎contrib/pgstattuple/pgstattuple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ pgstat_heap(Relation rel, FunctionCallInfo fcinfo)
339339

340340
InitDirtySnapshot(SnapshotDirty);
341341

342-
nblocks=hscan->rs_nblocks;/* # blocks to be scanned */
342+
nblocks=hscan->rs_nblocks;/* # blocks to be scanned */
343343

344344
/* scan the relation */
345345
while ((tuple=heap_getnext(scan,ForwardScanDirection))!=NULL)

‎contrib/postgres_fdw/postgres_fdw.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ postgresExecForeignInsert(EState *estate,
18581858
if (fmstate->aux_fmstate)
18591859
resultRelInfo->ri_FdwState=fmstate->aux_fmstate;
18601860
rslot=execute_foreign_modify(estate,resultRelInfo,CMD_INSERT,
1861-
slot,planSlot);
1861+
slot,planSlot);
18621862
/* Revert that change */
18631863
if (fmstate->aux_fmstate)
18641864
resultRelInfo->ri_FdwState=fmstate;
@@ -1934,11 +1934,11 @@ postgresBeginForeignInsert(ModifyTableState *mtstate,
19341934
booldoNothing= false;
19351935

19361936
/*
1937-
* If the foreign table we are about to insert routed rows into is also
1938-
*anUPDATE subplan result rel that will be updated later, proceeding
1939-
*withthe INSERT will result in the later UPDATE incorrectly modifying
1940-
*thoserouted rows, so prevent the INSERT --- it would be nice if we
1941-
*couldhandle this case; but for now, throw an error for safety.
1937+
* If the foreign table we are about to insert routed rows into is also an
1938+
* UPDATE subplan result rel that will be updated later, proceeding with
1939+
* the INSERT will result in the later UPDATE incorrectly modifying those
1940+
* routed rows, so prevent the INSERT --- it would be nice if we could
1941+
* handle this case; but for now, throw an error for safety.
19421942
*/
19431943
if (plan&&plan->operation==CMD_UPDATE&&
19441944
(resultRelInfo->ri_usesFdwDirectModify||
@@ -3169,7 +3169,7 @@ adjust_foreign_grouping_path_cost(PlannerInfo *root,
31693169
if (!grouping_is_sortable(root->parse->groupClause)||
31703170
!pathkeys_contained_in(pathkeys,root->group_pathkeys))
31713171
{
3172-
Pathsort_path;/* dummy for result of cost_sort */
3172+
Pathsort_path;/* dummy for result of cost_sort */
31733173

31743174
cost_sort(&sort_path,
31753175
root,
@@ -3191,7 +3191,7 @@ adjust_foreign_grouping_path_cost(PlannerInfo *root,
31913191
* add 1/4th of that default.
31923192
*/
31933193
doublesort_multiplier=1.0+ (DEFAULT_FDW_SORT_MULTIPLIER
3194-
-1.0)*0.25;
3194+
-1.0)*0.25;
31953195

31963196
*p_startup_cost *=sort_multiplier;
31973197
*p_run_cost *=sort_multiplier;
@@ -3773,6 +3773,7 @@ store_returning_result(PgFdwModifyState *fmstate,
37733773
fmstate->retrieved_attrs,
37743774
NULL,
37753775
fmstate->temp_cxt);
3776+
37763777
/*
37773778
* The returning slot will not necessarily be suitable to store
37783779
* heaptuples directly, so allow for conversion.
@@ -6059,8 +6060,8 @@ add_foreign_final_paths(PlannerInfo *root, RelOptInfo *input_rel,
60596060
/*
60606061
* Grouping and aggregation are not supported with FOR UPDATE/SHARE,
60616062
* so the input_rel should be a base, join, or ordered relation; and
6062-
* if it's an ordered relation, its input relation should be a base
6063-
*orjoin relation.
6063+
* if it's an ordered relation, its input relation should be a base or
6064+
* join relation.
60646065
*/
60656066
Assert(input_rel->reloptkind==RELOPT_BASEREL||
60666067
input_rel->reloptkind==RELOPT_JOINREL||

‎src/backend/access/common/heaptuple.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,8 @@ expand_tuple(HeapTuple *targetHeapTuple,
787787
}
788788

789789
/*
790-
* Now walk the missing attributes. If there is a missing value
791-
*makespace for it. Otherwise, it's going to be NULL.
790+
* Now walk the missing attributes. If there is a missing value make
791+
* space for it. Otherwise, it's going to be NULL.
792792
*/
793793
for (attnum=firstmissingnum;
794794
attnum<natts;

‎src/backend/access/gin/ginvacuum.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,17 +394,17 @@ ginVacuumPostingTree(GinVacuumState *gvs, BlockNumber rootBlkno)
394394
* There is at least one empty page. So we have to rescan the tree
395395
* deleting empty pages.
396396
*/
397-
Bufferbuffer;
397+
Bufferbuffer;
398398
DataPageDeleteStackroot,
399-
*ptr,
400-
*tmp;
399+
*ptr,
400+
*tmp;
401401

402402
buffer=ReadBufferExtended(gvs->index,MAIN_FORKNUM,rootBlkno,
403403
RBM_NORMAL,gvs->strategy);
404404

405405
/*
406-
* Lock posting tree root for cleanup to ensure there are no concurrent
407-
* inserts.
406+
* Lock posting tree root for cleanup to ensure there are no
407+
*concurrentinserts.
408408
*/
409409
LockBufferForCleanup(buffer);
410410

‎src/backend/access/gin/ginxlog.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ ginRedoRecompress(Page page, ginxlogRecompressDataLeaf *data)
205205
while (segno<a_segno)
206206
{
207207
/*
208-
* Once modification is started and page tail is copied, we've
209-
*tocopy unmodified segments.
208+
* Once modification is started and page tail is copied, we've to
209+
* copy unmodified segments.
210210
*/
211211
segsize=SizeOfGinPostingList(oldseg);
212212
if (tailCopy)
@@ -257,12 +257,12 @@ ginRedoRecompress(Page page, ginxlogRecompressDataLeaf *data)
257257
}
258258

259259
/*
260-
* We're about to start modification of the page. So, copy tail of the
261-
* page if it's not done already.
260+
* We're about to start modification of the page. So, copy tail of
261+
*thepage if it's not done already.
262262
*/
263263
if (!tailCopy&&segptr!=segmentend)
264264
{
265-
inttailSize=segmentend-segptr;
265+
inttailSize=segmentend-segptr;
266266

267267
tailCopy= (Pointer)palloc(tailSize);
268268
memcpy(tailCopy,segptr,tailSize);
@@ -304,7 +304,7 @@ ginRedoRecompress(Page page, ginxlogRecompressDataLeaf *data)
304304
segptr= (Pointer)oldseg;
305305
if (segptr!=segmentend&&tailCopy)
306306
{
307-
intrestSize=segmentend-segptr;
307+
intrestSize=segmentend-segptr;
308308

309309
Assert(writePtr+restSize <=PageGetSpecialPointer(page));
310310
memcpy(writePtr,segptr,restSize);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp