Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1irloC-0007Re-33 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jan 2020 16:46:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1irloA-0001It-9l for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jan 2020 16:46:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1irlo9-0001Im-Td for pgsql-hackers@lists.postgresql.org; Wed, 15 Jan 2020 16:46:18 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1irlo4-0006Ud-HX for pgsql-hackers@lists.postgresql.org; Wed, 15 Jan 2020 16:46:16 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1irlo1-0002Gr-Fk; Wed, 15 Jan 2020 11:46:09 -0500 Date: Wed, 15 Jan 2020 11:46:09 -0500 From: Bruce Momjian To: Tom Lane Cc: Alvaro Herrera , Pg Hackers , Piotr Stefaniak Subject: Re: pgindent && weirdness Message-ID: <20200115164609.GA7201@momjian.us> References: <20200114221814.GA19630@alvherre.pgsql> <6012.1579041021@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6012.1579041021@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Jan 14, 2020 at 05:30:21PM -0500, Tom Lane wrote: > Alvaro Herrera 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 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 +