Re: Run pgindent now? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Run pgindent now?
Date
Msg-id 28424.1432589652@sss.pgh.pa.us
Whole thread Raw
In response to Re: Run pgindent now?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Run pgindent now?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Run pgindent now?  (Bruce Momjian <bruce@momjian.us>)
Re: Run pgindent now?  (Robert Haas <robertmhaas@gmail.com>)
Re: Run pgindent now?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Mon, May 25, 2015 at 04:52:38PM -0300, Alvaro Herrera wrote:
>> Something is wrong.  See aclchk.c changes.

> Yes, this is what I was concerned about.  "aclitem" was a typedef in 9.0
> and 9.1, and the use of that as a typedef in 9.4 is certainly odd:

>     -       aclitem.ai_grantor = grantorId;
>     +       aclitem.    ai_grantor = grantorId;

Yeah.  I think we might've gotten rid of that typedef partially in order
to fix this.

A different strategy we could consider is "use HEAD's typedef list
even in the back branches".  This would in some situations lead to
inferior-looking results in the back branches, but that's probably better
than inferior results in HEAD.  (In any case, we want the same typedef
list across all branches.  Then anyplace where the results diverge, there
must have been non-pgindent code changes, so that back-patching would
require manual fixups anyway.)

A longer-term fix would be to make pgindent less stupid about this sort
of usage, but nobody's yet volunteered to dig into the guts of that code.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Run pgindent now?
Next
From: Heikki Linnakangas
Date:
Subject: Re: Buggy logic in nodeIndexscan.c queue handling