Re: pgsql: pgindent: preserve blank lines around #else/#endif

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: pgindent: preserve blank lines around #else/#endif
Date: 2014-02-13 22:07:28
Message-ID: 20140213220728.GW6342@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 # more files
(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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2014-02-13 22:39:01 pgsql: Separate multixact freezing parameters from xid's
Previous Message Bruce Momjian 2014-02-13 22:07:11 pgsql: docs: improve CREATE FUNCTION docs about language case and quoti