Re: pgindent behavior we could do without

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: pgindent behavior we could do without
Date: 2014-01-31 16:23:08
Message-ID: 20140131162308.GC19957@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-01-31 16:23:17 Re: Patch: show xid and xmin in pg_stat_activity and pg_stat_replication
Previous Message Robert Haas 2014-01-31 16:19:35 Re: Fwd: Proposal: variant of regclass