Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b5bce6c

Browse files
committed
Final pgindent + perltidy run for 9.6.
1 parent 05d8dec commit b5bce6c

File tree

26 files changed

+175
-151
lines changed

26 files changed

+175
-151
lines changed

src/backend/access/brin/brin_validate.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ brinvalidate(Oid opclassoid)
264264
continue; /* got it */
265265
ereport(INFO,
266266
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
267-
errmsg("brin operator class \"%s\" is missing support function %d",
268-
opclassname, i)));
267+
errmsg("brin operator class \"%s\" is missing support function %d",
268+
opclassname, i)));
269269
result = false;
270270
}
271271

src/backend/access/gin/ginvalidate.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ ginvalidate(Oid opclassoid)
243243
continue; /* don't need both, see check below loop */
244244
ereport(INFO,
245245
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
246-
errmsg("gin operator class \"%s\" is missing support function %d",
247-
opclassname, i)));
246+
errmsg("gin operator class \"%s\" is missing support function %d",
247+
opclassname, i)));
248248
result = false;
249249
}
250250
if (!opclassgroup ||

src/backend/access/gist/gistvalidate.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ gistvalidate(Oid opclassoid)
261261
continue; /* optional methods */
262262
ereport(INFO,
263263
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
264-
errmsg("gist operator class \"%s\" is missing support function %d",
265-
opclassname, i)));
264+
errmsg("gist operator class \"%s\" is missing support function %d",
265+
opclassname, i)));
266266
result = false;
267267
}
268268

src/backend/access/hash/hashvalidate.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ hashvalidate(Oid opclassoid)
186186
{
187187
ereport(INFO,
188188
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
189-
errmsg("hash operator family \"%s\" lacks support function for operator %s",
190-
opfamilyname,
191-
format_operator(oprform->amopopr))));
189+
errmsg("hash operator family \"%s\" lacks support function for operator %s",
190+
opfamilyname,
191+
format_operator(oprform->amopopr))));
192192
result = false;
193193
}
194194
}

src/backend/access/heap/heapam.c

+7-6
Original file line numberDiff line numberDiff line change
@@ -4571,7 +4571,7 @@ heap_lock_tuple(Relation relation, HeapTuple tuple,
45714571
ItemId lp;
45724572
Page page;
45734573
Buffer vmbuffer = InvalidBuffer;
4574-
BlockNumber block;
4574+
BlockNumber block;
45754575
TransactionId xid,
45764576
xmax;
45774577
uint16 old_infomask,
@@ -5643,7 +5643,7 @@ static HTSU_Result
56435643
heap_lock_updated_tuple_rec(Relation rel, ItemPointer tid, TransactionId xid,
56445644
LockTupleMode mode)
56455645
{
5646-
HTSU_Result result;
5646+
HTSU_Result result;
56475647
ItemPointerData tupid;
56485648
HeapTupleData mytup;
56495649
Buffer buf;
@@ -6698,6 +6698,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
66986698
if (tuple->t_infomask & HEAP_MOVED)
66996699
{
67006700
xid = HeapTupleHeaderGetXvac(tuple);
6701+
67016702
/*
67026703
* For Xvac, we ignore the cutoff_xid and just always perform the
67036704
* freeze operation. The oldest release in which such a value can
@@ -8841,9 +8842,9 @@ heap_xlog_lock(XLogReaderState *record)
88418842
*/
88428843
if (xlrec->flags & XLH_LOCK_ALL_FROZEN_CLEARED)
88438844
{
8844-
RelFileNode rnode;
8845+
RelFileNode rnode;
88458846
Buffer vmbuffer = InvalidBuffer;
8846-
BlockNumber block;
8847+
BlockNumber block;
88478848
Relation reln;
88488849

88498850
XLogRecGetBlockTag(record, 0, &rnode, NULL, &block);
@@ -8914,9 +8915,9 @@ heap_xlog_lock_updated(XLogReaderState *record)
89148915
*/
89158916
if (xlrec->flags & XLH_LOCK_ALL_FROZEN_CLEARED)
89168917
{
8917-
RelFileNode rnode;
8918+
RelFileNode rnode;
89188919
Buffer vmbuffer = InvalidBuffer;
8919-
BlockNumber block;
8920+
BlockNumber block;
89208921
Relation reln;
89218922

89228923
XLogRecGetBlockTag(record, 0, &rnode, NULL, &block);

src/backend/access/heap/tuptoaster.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,7 @@ toast_delete_datum(Relation rel, Datum value)
16671667
HeapTuple toasttup;
16681668
int num_indexes;
16691669
int validIndex;
1670-
SnapshotData SnapshotToast;
1670+
SnapshotData SnapshotToast;
16711671

16721672
if (!VARATT_IS_EXTERNAL_ONDISK(attr))
16731673
return;
@@ -1734,7 +1734,7 @@ toastrel_valueid_exists(Relation toastrel, Oid valueid)
17341734
int num_indexes;
17351735
int validIndex;
17361736
Relation *toastidxs;
1737-
SnapshotData SnapshotToast;
1737+
SnapshotData SnapshotToast;
17381738

17391739
/* Fetch a valid index relation */
17401740
validIndex = toast_open_indexes(toastrel,
@@ -1819,7 +1819,7 @@ toast_fetch_datum(struct varlena * attr)
18191819
int32 chunksize;
18201820
int num_indexes;
18211821
int validIndex;
1822-
SnapshotData SnapshotToast;
1822+
SnapshotData SnapshotToast;
18231823

18241824
if (!VARATT_IS_EXTERNAL_ONDISK(attr))
18251825
elog(ERROR, "toast_fetch_datum shouldn't be called for non-ondisk datums");
@@ -1998,7 +1998,7 @@ toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length)
19981998
int32 chcpyend;
19991999
int num_indexes;
20002000
int validIndex;
2001-
SnapshotData SnapshotToast;
2001+
SnapshotData SnapshotToast;
20022002

20032003
if (!VARATT_IS_EXTERNAL_ONDISK(attr))
20042004
elog(ERROR, "toast_fetch_datum_slice shouldn't be called for non-ondisk datums");
@@ -2094,7 +2094,7 @@ toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length)
20942094
init_toast_snapshot(&SnapshotToast);
20952095
nextidx = startchunk;
20962096
toastscan = systable_beginscan_ordered(toastrel, toastidxs[validIndex],
2097-
&SnapshotToast, nscankeys, toastkey);
2097+
&SnapshotToast, nscankeys, toastkey);
20982098
while ((ttup = systable_getnext_ordered(toastscan, ForwardScanDirection)) != NULL)
20992099
{
21002100
/*

src/backend/commands/variable.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ assign_client_encoding(const char *newval, void *extra)
776776
*/
777777
ereport(ERROR,
778778
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
779-
errmsg("cannot change client_encoding in a parallel worker")));
779+
errmsg("cannot change client_encoding in a parallel worker")));
780780
}
781781

782782
/* We do not expect an error if PrepareClientEncoding succeeded */

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ libpqrcv_get_conninfo(void)
129129
{
130130
PQconninfoOption *conn_opts;
131131
PQconninfoOption *conn_opt;
132-
PQExpBufferData buf;
132+
PQExpBufferData buf;
133133
char *retval;
134134

135135
Assert(streamConn != NULL);
@@ -145,7 +145,7 @@ libpqrcv_get_conninfo(void)
145145
/* build a clean connection string from pieces */
146146
for (conn_opt = conn_opts; conn_opt->keyword != NULL; conn_opt++)
147147
{
148-
bool obfuscate;
148+
bool obfuscate;
149149

150150
/* Skip debug and empty options */
151151
if (strchr(conn_opt->dispchar, 'D') ||

src/backend/replication/syncrep.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,11 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit)
193193
ResetLatch(MyLatch);
194194

195195
/*
196-
* Acquiring the lock is not needed, the latch ensures proper barriers.
197-
* If it looks like we're done, we must really be done, because once
198-
* walsender changes the state to SYNC_REP_WAIT_COMPLETE, it will never
199-
* update it again, so we can't be seeing a stale value in that case.
196+
* Acquiring the lock is not needed, the latch ensures proper
197+
* barriers. If it looks like we're done, we must really be done,
198+
* because once walsender changes the state to SYNC_REP_WAIT_COMPLETE,
199+
* it will never update it again, so we can't be seeing a stale value
200+
* in that case.
200201
*/
201202
if (MyProc->syncRepState == SYNC_REP_WAIT_COMPLETE)
202203
break;

src/backend/tsearch/spell.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ getNextFlagFromString(IspellDict *Conf, char **sflagset, char *sflag)
433433
if (Conf->flagMode == FM_LONG && maxstep > 0)
434434
ereport(ERROR,
435435
(errcode(ERRCODE_CONFIG_FILE_ERROR),
436-
errmsg("invalid affix flag \"%s\" with \"long\" flag value", sbuf)));
436+
errmsg("invalid affix flag \"%s\" with \"long\" flag value",
437+
sbuf)));
437438

438439
*sflag = '\0';
439440
}
@@ -1263,8 +1264,9 @@ NIImportOOAffixes(IspellDict *Conf, const char *filename)
12631264
else if (STRNCMP(s, "default") != 0)
12641265
ereport(ERROR,
12651266
(errcode(ERRCODE_CONFIG_FILE_ERROR),
1266-
errmsg("Ispell dictionary supports only \"default\", "
1267-
"\"long\", and \"num\" flag value")));
1267+
errmsg("Ispell dictionary supports only "
1268+
"\"default\", \"long\", "
1269+
"and \"num\" flag values")));
12681270
}
12691271
}
12701272

src/backend/utils/adt/jsonb.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1849,9 +1849,9 @@ jsonb_object_agg_transfn(PG_FUNCTION_ARGS)
18491849
single_scalar = false;
18501850

18511851
/*
1852-
* values can be anything, including structured and null, so we treat
1853-
* them as in json_agg_transfn, except that single scalars are always
1854-
* pushed as WJB_VALUE items.
1852+
* values can be anything, including structured and null, so we treat them
1853+
* as in json_agg_transfn, except that single scalars are always pushed as
1854+
* WJB_VALUE items.
18551855
*/
18561856

18571857
while ((type = JsonbIteratorNext(&it, &v, false)) != WJB_DONE)

src/backend/utils/adt/tsquery.c

+16-15
Original file line numberDiff line numberDiff line change
@@ -430,15 +430,16 @@ pushStop(TSQueryParserState state)
430430

431431
#define STACKDEPTH 32
432432

433-
typedef struct OperatorElement {
434-
int8 op;
435-
int16 distance;
433+
typedef struct OperatorElement
434+
{
435+
int8 op;
436+
int16 distance;
436437
} OperatorElement;
437438

438439
static void
439440
pushOpStack(OperatorElement *stack, int *lenstack, int8 op, int16 distance)
440441
{
441-
if (*lenstack == STACKDEPTH) /* internal error */
442+
if (*lenstack == STACKDEPTH) /* internal error */
442443
elog(ERROR, "tsquery stack too small");
443444

444445
stack[*lenstack].op = op;
@@ -449,20 +450,20 @@ pushOpStack(OperatorElement *stack, int *lenstack, int8 op, int16 distance)
449450

450451
static void
451452
cleanOpStack(TSQueryParserState state,
452-
OperatorElement *stack, int *lenstack, int8 op)
453+
OperatorElement *stack, int *lenstack, int8 op)
453454
{
454-
int opPriority = OP_PRIORITY(op);
455+
int opPriority = OP_PRIORITY(op);
455456

456-
while(*lenstack)
457+
while (*lenstack)
457458
{
458459
/* NOT is right associative unlike to others */
459460
if ((op != OP_NOT && opPriority > OP_PRIORITY(stack[*lenstack - 1].op)) ||
460-
(op == OP_NOT && opPriority >= OP_PRIORITY(stack[*lenstack - 1].op)))
461+
(op == OP_NOT && opPriority >= OP_PRIORITY(stack[*lenstack - 1].op)))
461462
break;
462463

463464
(*lenstack)--;
464465
pushOperator(state, stack[*lenstack].op,
465-
stack[*lenstack].distance);
466+
stack[*lenstack].distance);
466467
}
467468
}
468469

@@ -480,7 +481,7 @@ makepol(TSQueryParserState state,
480481
ts_tokentype type;
481482
int lenval = 0;
482483
char *strval = NULL;
483-
OperatorElement opstack[STACKDEPTH];
484+
OperatorElement opstack[STACKDEPTH];
484485
int lenstack = 0;
485486
int16 weight = 0;
486487
bool prefix;
@@ -503,7 +504,7 @@ makepol(TSQueryParserState state,
503504
makepol(state, pushval, opaque);
504505
break;
505506
case PT_CLOSE:
506-
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */);
507+
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */ );
507508
return;
508509
case PT_ERR:
509510
default:
@@ -514,7 +515,7 @@ makepol(TSQueryParserState state,
514515
}
515516
}
516517

517-
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */);
518+
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */ );
518519
}
519520

520521
static void
@@ -845,8 +846,8 @@ infix(INFIX *in, int parentPriority, bool rightPhraseOp)
845846

846847
in->curpol++;
847848
if (priority < parentPriority ||
848-
/* phrase operator depends on order */
849-
(op == OP_PHRASE && rightPhraseOp))
849+
/* phrase operator depends on order */
850+
(op == OP_PHRASE && rightPhraseOp))
850851
{
851852
needParenthesis = true;
852853
RESIZEBUF(in, 2);
@@ -916,7 +917,7 @@ tsqueryout(PG_FUNCTION_ARGS)
916917
nrm.cur = nrm.buf = (char *) palloc(sizeof(char) * nrm.buflen);
917918
*(nrm.cur) = '\0';
918919
nrm.op = GETOPERAND(query);
919-
infix(&nrm, -1 /* lowest priority */, false);
920+
infix(&nrm, -1 /* lowest priority */ , false);
920921

921922
PG_FREE_IF_COPY(query, 0);
922923
PG_RETURN_CSTRING(nrm.buf);

src/backend/utils/adt/tsquery_cleanup.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ normalize_phrase_tree(NODE *node)
406406

407407
if (node->valnode->qoperator.oper == OP_NOT)
408408
{
409-
NODE *orignode = node;
409+
NODE *orignode = node;
410410

411411
/* eliminate NOT sequence */
412412
while (node->valnode->type == QI_OPR &&
@@ -430,8 +430,8 @@ normalize_phrase_tree(NODE *node)
430430
node->right = normalize_phrase_tree(node->right);
431431

432432
/*
433-
* if subtree contains only nodes with higher "priority" then
434-
* we are done. See comment near NODE_PRIORITY()
433+
* if subtree contains only nodes with higher "priority" then we are
434+
* done. See comment near NODE_PRIORITY()
435435
*/
436436
if (NODE_PRIORITY(node) <= NODE_PRIORITY(node->right) &&
437437
NODE_PRIORITY(node) <= NODE_PRIORITY(node->left))

src/backend/utils/sort/tuplesort.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,18 @@ struct Tuplesortstate
299299
* Function to read a stored tuple from tape back into memory. 'len' is
300300
* the already-read length of the stored tuple. Create a palloc'd copy,
301301
* initialize tuple/datum1/isnull1 in the target SortTuple struct, and
302-
* decrease state->availMem by the amount of memory space consumed.
303-
* (See batchUsed notes for details on how memory is handled when
304-
* incremental accounting is abandoned.)
302+
* decrease state->availMem by the amount of memory space consumed. (See
303+
* batchUsed notes for details on how memory is handled when incremental
304+
* accounting is abandoned.)
305305
*/
306306
void (*readtup) (Tuplesortstate *state, SortTuple *stup,
307307
int tapenum, unsigned int len);
308308

309309
/*
310310
* Function to move a caller tuple. This is usually implemented as a
311311
* memmove() shim, but function may also perform additional fix-up of
312-
* caller tuple where needed. Batch memory support requires the
313-
* movement of caller tuples from one location in memory to another.
312+
* caller tuple where needed. Batch memory support requires the movement
313+
* of caller tuples from one location in memory to another.
314314
*/
315315
void (*movetup) (void *dest, void *src, unsigned int len);
316316

src/bin/pg_dump/pg_dump.c

+7-6
Original file line numberDiff line numberDiff line change
@@ -6042,15 +6042,16 @@ getOwnedSeqs(Archive *fout, TableInfo tblinfo[], int numTables)
60426042
* We need to dump the components that are being dumped for the table
60436043
* and any components which the sequence is explicitly marked with.
60446044
*
6045-
* We can't simply use the set of components which are being dumped for
6046-
* the table as the table might be in an extension (and only the
6045+
* We can't simply use the set of components which are being dumped
6046+
* for the table as the table might be in an extension (and only the
60476047
* non-extension components, eg: ACLs if changed, security labels, and
6048-
* policies, are being dumped) while the sequence is not (and therefore
6049-
* the definition and other components should also be dumped).
6048+
* policies, are being dumped) while the sequence is not (and
6049+
* therefore the definition and other components should also be
6050+
* dumped).
60506051
*
60516052
* If the sequence is part of the extension then it should be properly
6052-
* marked by checkExtensionMembership() and this will be a no-op as the
6053-
* table will be equivalently marked.
6053+
* marked by checkExtensionMembership() and this will be a no-op as
6054+
* the table will be equivalently marked.
60546055
*/
60556056
seqinfo->dobj.dump = seqinfo->dobj.dump | owning_tab->dobj.dump;
60566057

0 commit comments

Comments
 (0)