Re: Precedence of standard comparison operators

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Precedence of standard comparison operators
Date: 2015-02-20 19:22:22
Message-ID: 54E7896E.8030903@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/19/15 10:48 AM, Tom Lane wrote:
> I've not really experimented with this at all; it would be useful for
> example to see how many regression tests break as a gauge for how
> troublesome such changes would be. I thought I'd ask whether there's
> any chance at all of such a change getting accepted before doing any
> serious work on it.

I think we should try to do it, but we need a way for users to see what
is going on. If we just put into the release notes, "the precedences of
>= and <= have been changed, but we don't expect this to cause many
problems", there might be wide-spread panic.

One way would be to have a knob that warns/logs/debugs when it sees an
<= or >= call in a place that would change meaning. Perhaps in
transformAExprOp(). This might be an expensive check, but it wouldn't
have to be on all the time. We could also add a flag to the A_Expr node
that remember whether the expression was parenthesized, so that users
could update their code with parentheses to shut the warning up.

I think this would be a standard_conforming_strings-like transition.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan de Visser 2015-02-20 19:28:26 Re: Idea: closing the loop for "pg_ctl reload"
Previous Message Tomas Vondra 2015-02-20 18:16:14 Re: Combining Aggregates