From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Subject: Re: pgindent && weirdness
Date: Wed, 15 Jan 2020 11:46:09 -0500
Message-ID: <20200115164609.GA7201@momjian.us> (raw)
In-Reply-To: <6012.1579041021@sss.pgh.pa.us>
References: <20200114221814.GA19630@alvherre.pgsql>
<6012.1579041021@sss.pgh.pa.us>
On Tue, Jan 14, 2020 at 05:30:21PM -0500, Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > I just ran pgindent over some patch, and noticed that this hunk ended up
> > in my working tree:
>
> > - if (IsA(leftop, Var) && IsA(rightop, Const))
> > + if (IsA(leftop, Var) &&IsA(rightop, Const))
>
> Yeah, it's been doing that for decades. I think the triggering
> factor is the typedef name (Var, here) preceding the &&.
>
> It'd be nice to fix properly, but I've tended to take the path
> of least resistance by breaking such lines to avoid the ugliness:
>
> if (IsA(leftop, Var) &&
> IsA(rightop, Const))
In the past I would use a post-processing step after BSD indent to fix
up these problems.
--
Bruce Momjian <bruce@momjian.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 +
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, postgres@piotr-stefaniak.me
Subject: Re: pgindent && weirdness
In-Reply-To: <20200115164609.GA7201@momjian.us>
References: <20200114221814.GA19630@alvherre.pgsql> <6012.1579041021@sss.pgh.pa.us> <20200115164609.GA7201@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox