Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Piotr Stefaniak <postgres@piotr-stefaniak.me>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-05-17T21:55:25Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Piotr Stefaniak wrote:
>> If I remember correctly, it tries to right-align string literals to
>> whatever -l ("Maximum length of an output line") was set to.
> Yeah, it does that (for error messages too).
Piotr's version seems to at least do this more consistently than the
old version; for instance I notice this diff from Bruce's run:
@@ -1864,8 +1864,8 @@ describeOneTableDetails(const char *schemaname,
if (verbose)
printfPQExpBuffer(&buf,
"SELECT inhparent::pg_catalog.regclass,"
- " pg_get_expr(c.relpartbound, inhrelid),"
- " pg_get_partition_constraintdef(inhrelid)"
+ " pg_get_expr(c.relpartbound, inhrelid),"
+ " pg_get_partition_constraintdef(inhrelid)"
" FROM pg_catalog.pg_class c"
" JOIN pg_catalog.pg_inherits"
" ON c.oid = inhrelid"
(Again, untabified for clarity.) However, it didn't do anything to any of
the horribly-formatted queries in pg_dump.c, so it's mostly following the
same rule as before.
> I'm not sure what's the behavior we do want. One choice is that the
> continuation string opening quote should line up with the opening quote
> in the previous line. So for instance:
Yeah, I'd vote for that one too. If you want to line things up with
a function call paren, you can always start the whole literal on a fresh
line, as in the above example.
regards, tom lane
Commits
-
Manually un-break a few URLs that pgindent used to insist on splitting.
- 780b3a4c43fd 10.0 landed
-
Remove entab and associated detritus.
- 81f056c7256f 10.0 landed
-
Phase 3 of pgindent updates.
- 382ceffdf7f6 10.0 landed
-
Phase 2 of pgindent updates.
- c7b8998ebbf3 10.0 landed
-
Initial pgindent run with pg_bsd_indent version 2.0.
- e3860ffa4dd0 10.0 landed
-
Adjust pgindent script to use pg_bsd_indent 2.0.
- 8ff6d4ec7840 10.0 landed
-
Final pgindent run with old pg_bsd_indent (version 1.3).
- 9ef2dbefc7fb 10.0 landed
-
Re-run pgindent.
- 651902deb155 10.0 landed
-
Preventive maintenance in advance of pgindent run.
- c079673dcb7f 10.0 cited