Re: operator_precedence_warning vs make installcheck

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: operator_precedence_warning vs make installcheck
Date: 2017-02-15 19:47:11
Message-ID: 28618.1487188031@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Claudio Freire 2017-02-15 20:21:50 Re: Sum aggregate calculation for single precsion real
Previous Message Robert Haas 2017-02-15 19:38:28 Re: Should we cacheline align PGXACT?