Re: Precedence of standard comparison operators

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Precedence of standard comparison operators
Date: 2015-03-10 16:37:19
Message-ID: CA+TgmoaHtuLea5uH7Vg-8rXZ_ch-TWKxt9gynkdxRqyNmYU8jQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 10, 2015 at 12:11 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
>> Andres Freund <andres(at)anarazel(dot)de> writes:
>>> On February 26, 2015 10:29:18 PM CET, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>>>> My suggestion was to treat this like the standard_conforming_string
>>>> change. That is, warn for many years before changing.
>
>>> I don't think scs is a good example to follow.
>
>> Yeah. For one thing, there wouldn't be any way to suppress the warning
>> other than to parenthesize your code, which I would find problematic
>> because it would penalize standard-conforming queries. I'd prefer an
>> arrangement whereby once you fix your code to be standard-conforming,
>> you're done.
>
>> A possible point of compromise would be to leave the warning turned on
>> by default, at least until we get a better sense of how this would
>> play out in the real world. I continue to suspect that we're making
>> a mountain out of, if not a molehill, at least a hillock. I think most
>> sane people would have parenthesized their queries to start with rather
>> than go look up whether IS DISTINCT FROM binds tighter than <= ...
>
> This thread seems to have died off without any clear resolution. I'd
> hoped somebody would try the patch on some nontrivial application to
> see if it broke anything or caused any warnings, but it doesn't seem
> like that is happening.
>
> Do we have consensus on doing this? Should we have the warning on
> by default, or off?

I vote for defaulting the warning to off. If that proves to be too
problematic, I'd take that as a sign that this whole change is not as
low-impact as we're hoping, and maybe consider a rethink.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2015-03-10 16:45:06 Re: Precedence of standard comparison operators
Previous Message Robert Haas 2015-03-10 16:32:34 Re: proposal: disallow operator "=>" and use it for named parameters