Skip to content

Commit b334612

Browse files
committed
Pre-beta2 mechanical code beautification.
Run pgindent and pgperltidy. It seems we're still some ways away from all committers doing this automatically. Now that we have a buildfarm animal that will whine about poorly-indented code, we'll try to keep the tree more tidy. Discussion: https://postgr.es/m/3156045.1687208823@sss.pgh.pa.us
1 parent 877bf52 commit b334612

File tree

11 files changed

+39
-37
lines changed

11 files changed

+39
-37
lines changed

src/backend/executor/execUtils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,8 +1354,8 @@ ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate)
13541354
Bitmapset *
13551355
ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate)
13561356
{
1357-
Bitmapset *ret;
1358-
MemoryContext oldcxt;
1357+
Bitmapset *ret;
1358+
MemoryContext oldcxt;
13591359

13601360
oldcxt = MemoryContextSwitchTo(GetPerTupleMemoryContext(estate));
13611361

src/backend/libpq/hba.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,9 +2693,8 @@ load_hba(void)
26932693
if (!ok)
26942694
{
26952695
/*
2696-
* File contained one or more errors, so bail out.
2697-
* MemoryContextDelete is enough to clean up everything, including
2698-
* regexes.
2696+
* File contained one or more errors, so bail out. MemoryContextDelete
2697+
* is enough to clean up everything, including regexes.
26992698
*/
27002699
MemoryContextDelete(hbacxt);
27012700
return false;
@@ -3057,9 +3056,8 @@ load_ident(void)
30573056
if (!ok)
30583057
{
30593058
/*
3060-
* File contained one or more errors, so bail out.
3061-
* MemoryContextDelete is enough to clean up everything, including
3062-
* regexes.
3059+
* File contained one or more errors, so bail out. MemoryContextDelete
3060+
* is enough to clean up everything, including regexes.
30633061
*/
30643062
MemoryContextDelete(ident_context);
30653063
return false;

src/backend/replication/logical/tablesync.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
12531253
WalRcvExecResult *res;
12541254
char originname[NAMEDATALEN];
12551255
RepOriginId originid;
1256-
UserContext ucxt;
1256+
UserContext ucxt;
12571257
bool must_use_password;
12581258
bool run_as_owner;
12591259

@@ -1437,8 +1437,8 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
14371437
}
14381438

14391439
/*
1440-
* Make sure that the copy command runs as the table owner, unless
1441-
* the user has opted out of that behaviour.
1440+
* Make sure that the copy command runs as the table owner, unless the
1441+
* user has opted out of that behaviour.
14421442
*/
14431443
run_as_owner = MySubscription->runasowner;
14441444
if (!run_as_owner)
@@ -1482,7 +1482,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
14821482
res->err)));
14831483
walrcv_clear_result(res);
14841484

1485-
if(!run_as_owner)
1485+
if (!run_as_owner)
14861486
RestoreUserContext(&ucxt);
14871487

14881488
table_close(rel, NoLock);

src/backend/storage/file/fd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ pg_fsync(int fd)
415415
int
416416
pg_fsync_no_writethrough(int fd)
417417
{
418-
int rc;
418+
int rc;
419419

420420
if (!enableFsync)
421421
return 0;
@@ -456,7 +456,7 @@ pg_fsync_writethrough(int fd)
456456
int
457457
pg_fdatasync(int fd)
458458
{
459-
int rc;
459+
int rc;
460460

461461
if (!enableFsync)
462462
return 0;
@@ -500,6 +500,7 @@ pg_flush_data(int fd, off_t offset, off_t nbytes)
500500
return;
501501

502502
retry:
503+
503504
/*
504505
* sync_file_range(SYNC_FILE_RANGE_WRITE), currently linux specific,
505506
* tells the OS that writeback for the specified blocks should be

src/backend/storage/ipc/standby.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,9 +1197,9 @@ standby_redo(XLogReaderState *record)
11971197
/*
11981198
* The startup process currently has no convenient way to schedule
11991199
* stats to be reported. XLOG_RUNNING_XACTS records issued at a
1200-
* regular cadence, making this a convenient location to report
1201-
* stats. While these records aren't generated with wal_level=minimal,
1202-
* stats also cannot be accessed during WAL replay.
1200+
* regular cadence, making this a convenient location to report stats.
1201+
* While these records aren't generated with wal_level=minimal, stats
1202+
* also cannot be accessed during WAL replay.
12031203
*/
12041204
pgstat_report_stat(true);
12051205
}

src/backend/storage/smgr/md.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,10 @@ mdzeroextend(SMgrRelation reln, ForkNumber forknum,
564564
Assert(segstartblock + numblocks <= RELSEG_SIZE);
565565

566566
/*
567-
* If available and useful, use posix_fallocate() (via FileFallocate())
568-
* to extend the relation. That's often more efficient than using
569-
* write(), as it commonly won't cause the kernel to allocate page
570-
* cache space for the extended pages.
567+
* If available and useful, use posix_fallocate() (via
568+
* FileFallocate()) to extend the relation. That's often more
569+
* efficient than using write(), as it commonly won't cause the kernel
570+
* to allocate page cache space for the extended pages.
571571
*
572572
* However, we don't use FileFallocate() for small extensions, as it
573573
* defeats delayed allocation on some filesystems. Not clear where

src/backend/utils/adt/pgstatfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
601601
values[26] = CStringGetTextDatum(beentry->st_gssstatus->gss_princ);
602602
values[27] = BoolGetDatum(beentry->st_gssstatus->gss_enc); /* GSS Encryption in use */
603603
values[28] = BoolGetDatum(beentry->st_gssstatus->gss_delegation); /* GSS credentials
604-
* delegated */
604+
* delegated */
605605
}
606606
else
607607
{

src/bin/initdb/t/001_initdb.pl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@
113113

114114
command_like(
115115
[
116-
'initdb', '--no-sync', '-A', 'trust',
116+
'initdb', '--no-sync',
117+
'-A', 'trust',
117118
'--locale-provider=icu', '--locale=und',
118-
'--lc-collate=C', '--lc-ctype=C', '--lc-messages=C',
119-
'--lc-numeric=C', '--lc-monetary=C', '--lc-time=C',
119+
'--lc-collate=C', '--lc-ctype=C',
120+
'--lc-messages=C', '--lc-numeric=C',
121+
'--lc-monetary=C', '--lc-time=C',
120122
"$tempdir/data4"
121123
],
122124
qr/^\s+ICU locale:\s+und\n/ms,

src/bin/scripts/t/020_createdb.pl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@
8989

9090
$node2->command_ok(
9191
[
92-
'createdb', '-T', 'template0', '--locale-provider', 'icu',
93-
'--locale', 'en', '--lc-collate', 'C', '--lc-ctype', 'C',
94-
'foobar57'
92+
'createdb', '-T',
93+
'template0', '--locale-provider',
94+
'icu', '--locale',
95+
'en', '--lc-collate',
96+
'C', '--lc-ctype',
97+
'C', 'foobar57'
9598
],
96-
'create database with locale as ICU locale'
97-
);
99+
'create database with locale as ICU locale');
98100
}
99101
else
100102
{

src/include/utils/backend_status.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ typedef struct PgBackendGSSStatus
7777
char gss_princ[NAMEDATALEN]; /* GSSAPI Principal used to auth */
7878
bool gss_auth; /* If GSSAPI authentication was used */
7979
bool gss_enc; /* If encryption is being used */
80-
bool gss_delegation; /* If credentials delegated */
80+
bool gss_delegation; /* If credentials delegated */
8181

8282
} PgBackendGSSStatus;
8383

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy