pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: 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: Tue, 14 Jan 2020 17:30:21 -0500
Message-ID: <6012.1579041021@sss.pgh.pa.us> (raw)
In-Reply-To: <20200114221814.GA19630@alvherre.pgsql>
References: <20200114221814.GA19630@alvherre.pgsql>

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))

			regards, tom lane





view thread (51+ messages)  latest in thread

Message-ID: <6012.1579041021@sss.pgh.pa.us>
Permalink:  ../6012.1579041021@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6012.1579041021@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, postgres@piotr-stefaniak.me
  Subject: Re: pgindent && weirdness
  In-Reply-To: <6012.1579041021@sss.pgh.pa.us>
  References: <20200114221814.GA19630@alvherre.pgsql> <6012.1579041021@sss.pgh.pa.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