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

Commit5cbfce5

Browse files
committed
Initial pgindent and pgperltidy run for v13.
Includes some manual cleanup of places that pgindent messed up,most of which weren't per project style anyway.Notably, it seems some people didn't absorb the style rules ofcommitc9d2977, because there were a bunch of new occurrencesof function calls with a newline just after the left paren, allwith faulty expectations about how the rest of the call would getindented.
1 parent1255466 commit5cbfce5

File tree

198 files changed

+2021
-1788
lines changed

Some content is hidden

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

198 files changed

+2021
-1788
lines changed

‎contrib/adminpack/adminpack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Datum
217217
pg_file_sync(PG_FUNCTION_ARGS)
218218
{
219219
char*filename;
220-
structstatfst;
220+
structstatfst;
221221

222222
filename=convert_and_check_filename(PG_GETARG_TEXT_PP(0));
223223

‎contrib/intarray/_int_bool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ checkcondition_arr(void *checkval, ITEM *item, void *options)
256256
staticbool
257257
checkcondition_bit(void*checkval,ITEM*item,void*siglen)
258258
{
259-
returnGETBIT(checkval,HASHVAL(item->val, (int)(intptr_t)siglen));
259+
returnGETBIT(checkval,HASHVAL(item->val, (int)(intptr_t)siglen));
260260
}
261261

262262
/*
@@ -300,7 +300,7 @@ bool
300300
signconsistent(QUERYTYPE*query,BITVECPsign,intsiglen,boolcalcnot)
301301
{
302302
returnexecute(GETQUERY(query)+query->size-1,
303-
(void*)sign, (void*)(intptr_t)siglen,calcnot,
303+
(void*)sign, (void*)(intptr_t)siglen,calcnot,
304304
checkcondition_bit);
305305
}
306306

‎contrib/ltree/_ltree_gist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ gist_te(ltree_gist *key, ltree *query, int siglen)
407407

408408
typedefstructLtreeSignature
409409
{
410-
BITVECPsign;
411-
intsiglen;
410+
BITVECPsign;
411+
intsiglen;
412412
}LtreeSignature;
413413

414414
staticbool

‎contrib/ltree/ltree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ typedef struct
272272
#defineLTG_GETRNODE(x,siglen) ( LTG_ISONENODE(x) ? LTG_NODE(x) : LTG_RNODE(x, siglen) )
273273

274274
externltree_gist*ltree_gist_alloc(boolisalltrue,BITVECPsign,intsiglen,
275-
ltree*left,ltree*right);
275+
ltree*left,ltree*right);
276276

277277
/* GiST support for ltree[] */
278278

‎contrib/ltree/ltree_gist.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ltree_gist_alloc(bool isalltrue, BITVECP sign, int siglen,
4040
ltree*left,ltree*right)
4141
{
4242
int32size=LTG_HDRSIZE+ (isalltrue ?0 :siglen)+
43-
(left ?VARSIZE(left)+ (right ?VARSIZE(right) :0) :0);
43+
(left ?VARSIZE(left)+ (right ?VARSIZE(right) :0) :0);
4444
ltree_gist*result=palloc(size);
4545

4646
SET_VARSIZE(result,size);
@@ -557,8 +557,8 @@ gist_between(ltree_gist *key, lquery *query, int siglen)
557557

558558
typedefstructLtreeSignature
559559
{
560-
BITVECPsign;
561-
intsiglen;
560+
BITVECPsign;
561+
intsiglen;
562562
}LtreeSignature;
563563

564564
staticbool

‎contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2681,6 +2681,7 @@ JumbleRowMarks(pgssJumbleState *jstate, List *rowMarks)
26812681
foreach(lc,rowMarks)
26822682
{
26832683
RowMarkClause*rowmark=lfirst_node(RowMarkClause,lc);
2684+
26842685
if (!rowmark->pushedDown)
26852686
{
26862687
APP_JUMB(rowmark->rti);

‎contrib/pg_visibility/pg_visibility.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ pg_truncate_visibility_map(PG_FUNCTION_ARGS)
384384
Oidrelid=PG_GETARG_OID(0);
385385
Relationrel;
386386
ForkNumberfork;
387-
BlockNumberblock;
387+
BlockNumberblock;
388388

389389
rel=relation_open(relid,AccessExclusiveLock);
390390

‎contrib/postgres_fdw/connection.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
303303
/*
304304
* Check that non-superuser has used password to establish connection;
305305
* otherwise, he's piggybacking on the postgres server's user
306-
* identity. See also dblink_security_check() in contrib/dblink
307-
*andcheck_conn_params.
306+
* identity. See also dblink_security_check() in contrib/dblink and
307+
* check_conn_params.
308308
*/
309309
if (!superuser_arg(user->userid)&&UserMappingPasswordRequired(user)&&
310310
!PQconnectionUsedPassword(conn))
@@ -361,6 +361,7 @@ UserMappingPasswordRequired(UserMapping *user)
361361
foreach(cell,user->options)
362362
{
363363
DefElem*def= (DefElem*)lfirst(cell);
364+
364365
if (strcmp(def->defname,"password_required")==0)
365366
returndefGetBoolean(def);
366367
}

‎contrib/postgres_fdw/option.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ postgres_fdw_validator(PG_FUNCTION_ARGS)
144144
}
145145
elseif (strcmp(def->defname,"password_required")==0)
146146
{
147-
boolpw_required=defGetBoolean(def);
147+
boolpw_required=defGetBoolean(def);
148148

149149
/*
150150
* Only the superuser may set this option on a user mapping, or
151151
* alter a user mapping on which this option is set. We allow a
152-
* user to clear this option if it's set - in fact, we don't have a
153-
* choice since we can't see the old mapping when validating an
152+
* user to clear this option if it's set - in fact, we don't have
153+
*achoice since we can't see the old mapping when validating an
154154
* alter.
155155
*/
156156
if (!superuser()&& !pw_required)
@@ -204,11 +204,11 @@ InitPgFdwOptions(void)
204204
{"fetch_size",ForeignServerRelationId, false},
205205
{"fetch_size",ForeignTableRelationId, false},
206206
{"password_required",UserMappingRelationId, false},
207+
207208
/*
208209
* sslcert and sslkey are in fact libpq options, but we repeat them
209-
* here to allow them to appear in both foreign server context
210-
* (when we generate libpq options) and user mapping context
211-
* (from here).
210+
* here to allow them to appear in both foreign server context (when
211+
* we generate libpq options) and user mapping context (from here).
212212
*/
213213
{"sslcert",UserMappingRelationId, true},
214214
{"sslkey",UserMappingRelationId, true},

‎doc/src/sgml/mk_feature_tables.pl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@
5555
print" <entry>$feature_id</entry>\n";
5656
}
5757
print" <entry>",
58-
defined($feature_packages{$feature_id}) ?$feature_packages{$feature_id} :"",
59-
"</entry>\n";
58+
defined($feature_packages{$feature_id})
59+
?$feature_packages{$feature_id}
60+
:"",
61+
"</entry>\n";
6062
if ($subfeature_id)
6163
{
6264
print" <entry>$subfeature_name</entry>\n";

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ detoast_attr(struct varlena *attr)
201201
*/
202202
structvarlena*
203203
detoast_attr_slice(structvarlena*attr,
204-
int32sliceoffset,int32slicelength)
204+
int32sliceoffset,int32slicelength)
205205
{
206206
structvarlena*preslice;
207207
structvarlena*result;
@@ -220,12 +220,12 @@ detoast_attr_slice(struct varlena *attr,
220220

221221
/*
222222
* For compressed values, we need to fetch enough slices to decompress
223-
* at least the requested part (when a prefix is requested). Otherwise,
224-
* just fetch all slices.
223+
* at least the requested part (when a prefix is requested).
224+
*Otherwise,just fetch all slices.
225225
*/
226226
if (slicelength>0&&sliceoffset >=0)
227227
{
228-
int32max_size;
228+
int32max_size;
229229

230230
/*
231231
* Determine maximum amount of compressed data needed for a prefix
@@ -253,7 +253,7 @@ detoast_attr_slice(struct varlena *attr,
253253
Assert(!VARATT_IS_EXTERNAL_INDIRECT(redirect.pointer));
254254

255255
returndetoast_attr_slice(redirect.pointer,
256-
sliceoffset,slicelength);
256+
sliceoffset,slicelength);
257257
}
258258
elseif (VARATT_IS_EXTERNAL_EXPANDED(attr))
259259
{
@@ -343,7 +343,8 @@ toast_fetch_datum(struct varlena *attr)
343343
SET_VARSIZE(result,attrsize+VARHDRSZ);
344344

345345
if (attrsize==0)
346-
returnresult;/* Probably shouldn't happen, but just in case. */
346+
returnresult;/* Probably shouldn't happen, but just in
347+
* case. */
347348

348349
/*
349350
* Open the toast relation and its indexes
@@ -387,9 +388,9 @@ toast_fetch_datum_slice(struct varlena *attr, int32 sliceoffset,
387388
VARATT_EXTERNAL_GET_POINTER(toast_pointer,attr);
388389

389390
/*
390-
* It's nonsense to fetch slices of a compressed datum unless when it's
391-
*aprefix -- this isn't lo_* we can't return a compressed datum which
392-
*ismeaningful to toast later.
391+
* It's nonsense to fetch slices of a compressed datum unless when it's a
392+
* prefix -- this isn't lo_* we can't return a compressed datum which is
393+
* meaningful to toast later.
393394
*/
394395
Assert(!VARATT_EXTERNAL_IS_COMPRESSED(toast_pointer)||0==sliceoffset);
395396

‎src/backend/access/gist/gist.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,8 +1347,8 @@ gistfinishsplit(GISTInsertState *state, GISTInsertStack *stack,
13471347
left->buf,right->buf, false, false))
13481348
{
13491349
/*
1350-
* If the parent page was split, the existing downlink might
1351-
*havemoved.
1350+
* If the parent page was split, the existing downlink might have
1351+
* moved.
13521352
*/
13531353
stack->downlinkoffnum=InvalidOffsetNumber;
13541354
}
@@ -1370,9 +1370,10 @@ gistfinishsplit(GISTInsertState *state, GISTInsertStack *stack,
13701370
tuples,2,
13711371
stack->downlinkoffnum,
13721372
left->buf,right->buf,
1373-
true,/* Unlock parent */
1374-
unlockbuf/* Unlock stack->buffer if caller wants that */
1375-
))
1373+
true,/* Unlock parent */
1374+
unlockbuf/* Unlock stack->buffer if caller wants
1375+
* that */
1376+
))
13761377
{
13771378
/*
13781379
* If the parent page was split, the downlink might have moved.

‎src/backend/access/hash/hashutil.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ _hash_spareindex(uint32 num_bucket)
144144
{
145145
uint32splitpoint_group;
146146
uint32splitpoint_phases;
147+
147148
splitpoint_group=pg_ceil_log2_32(num_bucket);
148149

149150
if (splitpoint_group<HASH_SPLITPOINT_GROUPS_WITH_ONE_PHASE)

‎src/backend/access/hash/hashvalidate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ check_hash_func_signature(Oid funcid, int16 amprocnum, Oid argtype)
318318
argtype==XIDOID||argtype==CIDOID))
319319
/* okay, allowed use of hashint4() */ ;
320320
elseif ((funcid==F_HASHINT8||funcid==F_HASHINT8EXTENDED)&&
321-
(argtype==XID8OID))
321+
(argtype==XID8OID))
322322
/* okay, allowed use of hashint8() */ ;
323323
elseif ((funcid==F_TIMESTAMP_HASH||
324324
funcid==F_TIMESTAMP_HASH_EXTENDED)&&

‎src/backend/access/heap/heapam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,8 +2153,8 @@ heap_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples,
21532153
RelationPutHeapTuple(relation,buffer,heaptuples[ndone], false);
21542154

21552155
/*
2156-
* Note that heap_multi_insert is not used for catalog tuples yet,
2157-
*butthis will cover the gap once that is the case.
2156+
* Note that heap_multi_insert is not used for catalog tuples yet, but
2157+
* this will cover the gap once that is the case.
21582158
*/
21592159
if (needwal&&need_cids)
21602160
log_heap_new_cid(relation,heaptuples[ndone]);

‎src/backend/access/index/indexam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ index_opclass_options(Relation indrel, AttrNumber attnum, Datum attoptions,
943943

944944
/* fetch options support procedure if specified */
945945
if (amoptsprocnum!=0)
946-
procid=index_getprocid(indrel,attnum,amoptsprocnum);
946+
procid=index_getprocid(indrel,attnum,amoptsprocnum);
947947

948948
if (!OidIsValid(procid))
949949
{
@@ -953,7 +953,7 @@ index_opclass_options(Relation indrel, AttrNumber attnum, Datum attoptions,
953953
boolisnull;
954954

955955
if (!DatumGetPointer(attoptions))
956-
returnNULL;/* ok, no options, no procedure */
956+
returnNULL;/* ok, no options, no procedure */
957957

958958
/*
959959
* Report an error if the opclass's options-parsing procedure does not

‎src/backend/access/nbtree/nbtpage.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,8 @@ _bt_pagedel(Relation rel, Buffer leafbuf, TransactionId *oldestBtpoXact)
15661566
BTScanInsertitup_key;
15671567
ItemIditemid;
15681568
IndexTupletargetkey;
1569-
BlockNumberleftsib,leafblkno;
1569+
BlockNumberleftsib,
1570+
leafblkno;
15701571
Buffersleafbuf;
15711572

15721573
itemid=PageGetItemId(page,P_HIKEY);
@@ -1777,6 +1778,7 @@ _bt_mark_page_halfdead(Relation rel, Buffer leafbuf, BTStack stack)
17771778
opaque= (BTPageOpaque)PageGetSpecialPointer(page);
17781779

17791780
#ifdefUSE_ASSERT_CHECKING
1781+
17801782
/*
17811783
* This is just an assertion because _bt_lock_subtree_parent should have
17821784
* guaranteed tuple has the expected contents
@@ -2368,7 +2370,8 @@ _bt_lock_subtree_parent(Relation rel, BlockNumber child, BTStack stack,
23682370
Buffer*subtreeparent,OffsetNumber*poffset,
23692371
BlockNumber*topparent,BlockNumber*topparentrightsib)
23702372
{
2371-
BlockNumberparent,leftsibparent;
2373+
BlockNumberparent,
2374+
leftsibparent;
23722375
OffsetNumberparentoffset,
23732376
maxoff;
23742377
Bufferpbuf;
@@ -2439,9 +2442,9 @@ _bt_lock_subtree_parent(Relation rel, BlockNumber child, BTStack stack,
24392442
/*
24402443
* Now make sure that the parent deletion is itself safe by examining the
24412444
* child's grandparent page. Recurse, passing the parent page as the
2442-
* child page (child's grandparent is the parent on the next level up).
2443-
*Ifparent deletion is unsafe, then child deletion must also be unsafe
2444-
*(inwhich case caller cannot delete any pages at all).
2445+
* child page (child's grandparent is the parent on the next level up). If
2446+
* parent deletion is unsafe, then child deletion must also be unsafe (in
2447+
* which case caller cannot delete any pages at all).
24452448
*/
24462449
*topparent=parent;
24472450
*topparentrightsib=opaque->btpo_next;

‎src/backend/access/nbtree/nbtree.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,8 @@ btvacuumpage(BTVacState *vstate, BlockNumber scanblkno)
10911091
void*callback_state=vstate->callback_state;
10921092
Relationrel=info->index;
10931093
boolattempt_pagedel;
1094-
BlockNumberblkno,backtrack_to;
1094+
BlockNumberblkno,
1095+
backtrack_to;
10951096
Bufferbuf;
10961097
Pagepage;
10971098
BTPageOpaqueopaque;

‎src/backend/access/nbtree/nbtsearch.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,10 @@ _bt_search(Relation rel, BTScanInsert key, Buffer *bufP, int access,
156156

157157
/*
158158
* We need to save the location of the pivot tuple we chose in the
159-
* parent page on a stack. If we need to split a page, we'll use
160-
* the stack to work back up to its parent page. If caller ends up
161-
* splitting a page one level down, it usually ends up inserting a
162-
* new pivot tuple/downlink immediately after the location recorded
163-
* here.
159+
* parent page on a stack. If we need to split a page, we'll use the
160+
* stack to work back up to its parent page. If caller ends up
161+
* splitting a page one level down, it usually ends up inserting a new
162+
* pivot tuple/downlink immediately after the location recorded here.
164163
*/
165164
new_stack= (BTStack)palloc(sizeof(BTStackData));
166165
new_stack->bts_blkno=par_blkno;

‎src/backend/access/nbtree/nbtsplitloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static bool _bt_afternewitemoff(FindSplitData *state, OffsetNumber maxoff,
7272
staticbool_bt_adjacenthtid(ItemPointerlowhtid,ItemPointerhighhtid);
7373
staticOffsetNumber_bt_bestsplitloc(FindSplitData*state,intperfectpenalty,
7474
bool*newitemonleft,FindSplitStratstrategy);
75-
staticint_bt_defaultinterval(FindSplitData*state);
75+
staticint_bt_defaultinterval(FindSplitData*state);
7676
staticint_bt_strategy(FindSplitData*state,SplitPoint*leftpage,
7777
SplitPoint*rightpage,FindSplitStrat*strategy);
7878
staticvoid_bt_interval_edges(FindSplitData*state,

‎src/backend/access/rmgrdesc/dbasedesc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dbase_desc(StringInfo buf, XLogReaderState *record)
3535
elseif (info==XLOG_DBASE_DROP)
3636
{
3737
xl_dbase_drop_rec*xlrec= (xl_dbase_drop_rec*)rec;
38-
inti;
38+
inti;
3939

4040
appendStringInfo(buf,"dir");
4141
for (i=0;i<xlrec->ntablespaces;i++)

‎src/backend/access/rmgrdesc/xactdesc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static void
251251
xact_desc_relations(StringInfobuf,char*label,intnrels,
252252
RelFileNode*xnodes)
253253
{
254-
inti;
254+
inti;
255255

256256
if (nrels>0)
257257
{
@@ -269,7 +269,7 @@ xact_desc_relations(StringInfo buf, char *label, int nrels,
269269
staticvoid
270270
xact_desc_subxacts(StringInfobuf,intnsubxacts,TransactionId*subxacts)
271271
{
272-
inti;
272+
inti;
273273

274274
if (nsubxacts>0)
275275
{

‎src/backend/access/spgist/spgvalidate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ spgvalidate(Oid opclassoid)
275275
if ((thisgroup->functionset& (((uint64)1) <<i))!=0)
276276
continue;/* got it */
277277
if (i==SPGIST_OPTIONS_PROC)
278-
continue;/* optional method */
278+
continue;/* optional method */
279279
ereport(INFO,
280280
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
281281
errmsg("operator family \"%s\" of access method %s is missing support function %d for type %s",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp