Re: pgindent && weirdness - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgindent && weirdness
Date
Msg-id 6012.1579041021@sss.pgh.pa.us
Whole thread Raw
In response to pgindent && weirdness  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: pgindent && weirdness  (Bruce Momjian <bruce@momjian.us>)
Re: pgindent && weirdness  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rearranging ALTER TABLE to avoid multi-operations bugs
Next
From: Tom Lane
Date:
Subject: Re: planner support functions: handle GROUP BY estimates ?