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

From Andrew Dunstan
Subject Re: Run pgindent now?
Date
Msg-id 5561DB09.8010201@dunslane.net
Whole thread Raw
In response to Re: Run pgindent now?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Run pgindent now?
List pgsql-hackers
On 05/23/2015 11:37 PM, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
>> On Sun, May 24, 2015 at 04:16:07AM +0200, Andres Freund wrote:
>>> -   if (IsA(node, Aggref) || IsA(node, GroupingFunc))
>>> +   if (IsA(node, Aggref) ||IsA(node, GroupingFunc))
>>>
>>> There's a bunch of changes like this. Looks rather odd to me? I don't
>>> recall seing much code looking like that?
>> Wow, that is quite odd.
> No, pgindent has *always* been wonky about lines that contain a typedef
> name but are not variable declarations.  I've gotten in the habit of
> breaking IsA tests like these into two lines:
>
>     if (IsA(node, Aggref) ||
>         IsA(node, GroupingFunc))
>
> just so that it doesn't look weird when pgindent gets done with it.
> You can see similar weirdness around sizeof usages, if you look.

Well, that sounds like something we should try to patch, doesn't it? 
(No, I'm not volunteering.)

cheers

andrew





pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Run pgindent now?
Next
From: Tom Lane
Date:
Subject: Re: Run pgindent now?