Re: [HACKERS] operator_precedence_warning vs make installcheck - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: [HACKERS] operator_precedence_warning vs make installcheck
Date
Msg-id CAMkU=1xo6Tz4kf_Gsv3LAZ7Qhn6+jjoJV0td7aJsXno5XH=odQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] operator_precedence_warning vs make installcheck  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Feb 15, 2017 at 11:47 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
I wrote:
> We could possibly prevent the difference by having exprLocation look
> through such nodes.  I'm not sure offhand if there are cases where
> that would be worse than before.  We've definitely made some other
> hacks to hide the difference between operator_precedence_warning on
> and off.

After some study I concluded the best fix is just to make the AEXPR_PAREN
node have the same reportable location as its child node to begin with.
None of the code dealing with precedence errors was using the location
of the left parenthesis, so there's no good reason to store that.

Pushed a fix along that line.

                        regards, tom lane

Thanks.

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Patch to implement pg_current_logfile() function
Next
From: "David G. Johnston"
Date:
Subject: Re: [HACKERS] [PROPOSAL] Temporal query processing with range types