From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Precedence of standard comparison operators |
Date: | 2015-02-20 19:41:41 |
Message-ID: | 27182.1424461301@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> 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.
We had this discussion back in 2007 :-(.
I don't believe there is any practical way for us to generate useful
warnings here; as I said to Kevin, I don't think that Bison exposes
sufficient information to detect when a parsing decision was made
differently than before because of precedence. If there's going to be
an insistence on that then I suspect we'll spend another 8 years not
conforming to spec.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2015-02-20 19:58:54 | failures with tuplesort and ordered set aggregates (due to 5cefbf5a6c44) |
Previous Message | Heikki Linnakangas | 2015-02-20 19:34:31 | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0 |