Content-Length: 4010772 | pFad | http://github.com/tonybelloni/postgres/commit/c7b8998ebbf310a156aa38022555a24d98fdbfb4

8C Phase 2 of pgindent updates. · tonybelloni/postgres@c7b8998 · GitHub
Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c7b8998

Browse files
committedJun 21, 2017
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ff wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
1 parent f669c09 commit c7b8998

File tree

1,107 files changed

+3435
-3516
lines changed

Some content is hidden

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

1,107 files changed

+3435
-3516
lines changed
 

‎contrib/pg_buffercache/pg_buffercache_pages.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pg_buffercache_pages(PG_FUNCTION_ARGS)
6666
FuncCallContext *funcctx;
6767
Datum result;
6868
MemoryContext oldcontext;
69-
BufferCachePagesContext *fctx; /* User function context. */
69+
BufferCachePagesContext *fctx; /* User function context. */
7070
TupleDesc tupledesc;
7171
TupleDesc expected_tupledesc;
7272
HeapTuple tuple;

‎contrib/pg_standby/pg_standby.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ int maxwaittime = 0; /* how long are we prepared to wait for? */
4444
int keepfiles = 0; /* number of WAL files to keep, 0 keep all */
4545
int maxretries = 3; /* number of retries on restore command */
4646
bool debug = false; /* are we debugging? */
47-
bool need_cleanup = false; /* do we need to remove files from
48-
* archive? */
47+
bool need_cleanup = false; /* do we need to remove files from
48+
* archive? */
4949

5050
#ifndef WIN32
5151
static volatile sig_atomic_t signaled = false;
@@ -59,8 +59,8 @@ char *restartWALFileName; /* the file from which we can restart restore */
5959
char *priorWALFileName; /* the file we need to get from archive */
6060
char WALFilePath[MAXPGPATH * 2]; /* the file path including archive */
6161
char restoreCommand[MAXPGPATH]; /* run this to restore */
62-
char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to
63-
* get from archive */
62+
char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to get
63+
* from archive */
6464

6565
/*
6666
* Two types of failover are supported (smart and fast failover).
@@ -582,7 +582,7 @@ main(int argc, char **argv)
582582
* There's no way to trigger failover via signal on Windows.
583583
*/
584584
(void) pqsignal(SIGUSR1, sighandler);
585-
(void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */
585+
(void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */
586586
(void) pqsignal(SIGQUIT, sigquit_handler);
587587
#endif
588588

There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/tonybelloni/postgres/commit/c7b8998ebbf310a156aa38022555a24d98fdbfb4

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy