Re: pgindent && weirdness

Tom Lane <[email protected]> Tue, 14 Jan 2020 17:30:21 -0500
Newsgroups gmane.comp.db.postgresql.devel.general
Message-ID <[email protected]>
Alvaro Herrera <[email protected]> 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