From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.
Date: Wed, 17 May 2017 17:13:47 -0400
Message-ID: <20170517211347.6g2bbx2fsjffd2sz@alvherre.pgsql> (raw)
In-Reply-To: <VI1PR03MB11996853FB1EC6319A48BA76F2E70@VI1PR03MB1199.eurprd03.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Piotr Stefaniak wrote:
> On 2017-05-17 17:55, Peter Eisentraut wrote:
> > On 5/17/17 10:14, Tom Lane wrote:
> >> What I was concerned about was that pgindent will reindent the second
> >> line so that it's impossible to tell whether the spacing is correct.
> >
> > pgindent moving string continuations to the left is a completely
> > terrible behavior anyway and we should look into changing that. Just
> > look at the mess it makes out of SELECT queries in pg_dump.c.
>
> 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).
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:
elog(ERROR, "this message is very long"
"and the second line may get over the 80 chars limit if we let it");
but I suppose some we would like the opening quote to line up with the
parens:
elog(ERROR, "this message is very long "
"and the second line may get over the 80 chars limit if we let it");
I vote that the first form is best, even if it would cause me some pain
because my vim config doesn't line up continuations like that. (Not sure
I can tweak it to work that way.)
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: alvherre@2ndquadrant.com, postgres@piotr-stefaniak.me, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.
In-Reply-To: <20170517211347.6g2bbx2fsjffd2sz@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox