pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
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:55:25 -0400
Message-ID: <12243.1495058125@sss.pgh.pa.us> (raw)
In-Reply-To: <20170517211347.6g2bbx2fsjffd2sz@alvherre.pgsql>
References: <20170517211347.6g2bbx2fsjffd2sz@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (22+ messages)  latest in thread

Message-ID: <12243.1495058125@sss.pgh.pa.us>
Permalink:  ../12243.1495058125@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12243.1495058125@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, postgres@piotr-stefaniak.me, peter.eisentraut@2ndquadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.
  In-Reply-To: <12243.1495058125@sss.pgh.pa.us>

* 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