Re: pgindent behavior we could do without - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pgindent behavior we could do without
Date
Msg-id 20140131162308.GC19957@momjian.us
Whole thread Raw
In response to Re: pgindent behavior we could do without  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Fri, Jan 31, 2014 at 11:18:17AM -0500, Bruce Momjian wrote:
> Yes, it is a shame pgindent has removed many proper empty lines in the
> past and there is no way to re-add them without causing backpatching
> problems.

FYI, the original BSD indent code that added the blank lines kind of
made sense.  If you defined a block of variables or a function, BSD
indent wanted a blank line after that.  When it saw a CPP directive, it
knew that wasn't a blank line, so it forced one.

In our coding, we often want CPP directives with no blank space, hence
the problem.  pg_bsd_indent 1.3 will not longer force a blank line
when it sees a CPP directive, and pgindent will no longer remove those
blank lines.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Fwd: Proposal: variant of regclass
Next
From: Robert Haas
Date:
Subject: Re: Patch: show xid and xmin in pg_stat_activity and pg_stat_replication