Re: Precedence of standard comparison operators

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Precedence of standard comparison operators
Дата
Msg-id 1858736600.2787211.1426104023048.JavaMail.yahoo@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Precedence of standard comparison operators  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Precedence of standard comparison operators  (Greg Stark <stark@mit.edu>)
Re: Precedence of standard comparison operators  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> On Tue, Mar 10, 2015 at 1:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> Another possibility is to leave it on through beta testing
>>>> with the intent to turn it off before 9.5 final; that would
>>>> give us more data about whether there are real issues than
>>>> we're likely to get otherwise.
>>>
>>> To my mind, the fact that we're doing this at all is largely
>>> predicated on the fact that there won't be many real issues.
>>> So I think the goal of the debugging messages ought to be to
>>> let those people who discover that they do have issues track
>>> them down more easily, not to warn people.  Warning is sort of
>>> closing the barn door after the horse has got out: hey, by the
>>> way, I just broke your app.

I don't get this argument at all.  If the new code doesn't cause
your queries to return different results (or update or delete
different rows), you don't get a warning, right?  Or are there
false positives?

If there are no false positives, turning it on is zero impact
(except for any performance impact involved in detecting the
condition) for those who have no problems.  That will probably be
the vast majority of users.  The question is, do we want to quietly
do something new and different for the small percentage of users
who will have a problem, and leave it to them to find out about
this setting and turn on the feature that tells them where the
problems are?  Or would it be more friendly to show the issues so
they can resolve them, and then turn off the warnings once they are
satisfied?

Once users have established that they have no code that has
different semantics under the standard operator precedence, they
may want to turn it off to avoid the need for extra parentheses
where pre-9.5 behavior would be different; but unless there is a
significant performance hit for the check, they may want to leave
it on just as insurance against mistakes.

> Given the lack of enthusiasm about that argument, I've pushed the
> patch with warnings off by default.  It's certainly easy enough
> to change that aspect later if we choose to.

I think it should default to on for several major releases.  Once
the standard behavior is well-established we can default to off.  I
see that as a three to five year interval.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: using CustomScan to inject nodes into the plan
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Precedence of standard comparison operators