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

From Tom Lane
Subject Re: Run pgindent now?
Date
Msg-id 27128.1432605839@sss.pgh.pa.us
Whole thread Raw
In response to Re: Run pgindent now?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Tue, May 26, 2015 at 01:15:17AM +0200, Andres Freund wrote:
>> Maybe I'm missing something major here, but why? Afaict it's just only
>> used for formatting decisions that could be made without it just as well?

> Uh, well, formatting decisions is what pgindent does.  It is about
> identifying variable declarations.

It's conceivable that a tool could incorporate automatic identification
of typedef names ... but I wonder how well that would work in the face of
typedefs that are system-specific and exist nowhere in the system headers
of the machine the tool is being run on.  We do certainly have code that
references such typedefs; conditionally of course, but pgindent has to
indent everything not only what gets compiled on the machine it runs on.

Again, this is about getting reproducible indentation results.  We've
mostly been talking about the cross-PG-branch aspects of that, but it
also has to work across developer platforms.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: brin regression test intermittent failures
Next
From: Andres Freund
Date:
Subject: Re: problems on Solaris