Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
Date: 2017-05-21 15:14:34
Message-ID: 20170521151434.GD17369@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Sun, May 21, 2017 at 10:12:20AM -0400, Tom Lane wrote:
> Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me> writes:
> > On 2017-05-21 03:00, Tom Lane wrote:
> >> I wrote:
> >>> Also, I found two places where an overlength comment line is simply busted
> >>> altogether --- notice that a character is missing at the split point:
>
> >> I found the cause of that: you need to apply this patch:
>
> > I have been analyzing this and came to different conclusions.
>
> Well, the code as it stands breaks those two comments (and a third one
> I'd failed to notice before). With the patch I propose, the only changes
> are that those comments are left unmolested. So even aside from the
> fact that this code is visibly unsafe, it does correspond to the symptom.

Frankly, I found it ironic that the BSD indent code, which was designed
to improve code clarity, was so confusingly written. I went with the
sed script (and later Perl script) wrapper solution because the BSD
indent code was so confusing to me.

It seems like a "The Cobbler's children have no shoes" syndrome:

https://english.stackexchange.com/questions/159004/the-cobblers-children-have-no-shoes

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-05-21 15:46:11 pgsql: Fix contrib/sepgsql regression tests for partition NOT NULL chan
Previous Message Tom Lane 2017-05-21 14:12:20 Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-05-21 15:37:57 Re: Variable substitution in psql backtick expansion
Previous Message Tom Lane 2017-05-21 14:12:20 Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)