Re: pgsql: pgindent: preserve blank lines around #else/#endif - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: pgindent: preserve blank lines around #else/#endif
Date
Msg-id 20140213220728.GW6342@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: pgsql: pgindent: preserve blank lines around #else/#endif  (Bruce Momjian <bruce@momjian.us>)
List pgsql-committers
Bruce Momjian wrote:
> On Thu, Feb 13, 2014 at 03:52:02PM -0500, Tom Lane wrote:
> > >> else if (def->defnamespace == NULL)
> > >> continue;
> > >> +
> > >> else if (pg_strcasecmp(def->defnamespace, namspace) != 0)
> > >> continue;
> > >>
> > >> This seems an odd change to be making.
> >
> > > I just tested pgindent in head against that file in 9.3 and head and
> > > didn't see that additional blank line, which is certainly odd.
> >
> > It doesn't do that for me either.
>
> We have to expand our pgindent testing in the southern hemisphere.  ;-)

Ah, I see how it happened -- I first messed up and called it by passing
pgindent itself as the first parameter:

/pgsql/source/HEAD/src/tools/pgindent/pgindent src/tools/pgindent/pgindent src/backend/access/common/reloptions.c #
morefiles 
(I probably used !! instead of !* to invoke the prior command arguments)

I then realized the mistake and removed that argument and used --typedef:
/pgsql/source/HEAD/src/tools/pgindent/pgindent --typedef=src/tools/pgindent/typedefs.list
src/backend/access/common/reloptions.c

This leads to the diff I posted, perhaps because the "continue" is seen
as a typedef in the first run (not real sure about this.  But if the
typedef list is wrong, anything can happen, right?)

Therefore please disregard the report.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: docs: improve CREATE FUNCTION docs about language case and quoti
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Separate multixact freezing parameters from xid's