Re: Precedence of standard comparison operators

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Precedence of standard comparison operators
Дата
Msg-id 1142583258.2899141.1424452701561.JavaMail.yahoo@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Precedence of standard comparison operators  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> One of the reasons I want to make these operators %nonassoc is
> so you get an error on cases like these --- if you actually meant
> this, you'll be forced to parenthesize one way or the other.

I could live with that versus a configurable warning.  It's simpler 
and makes it less likely that someone will accidentally get 
incorrect results without realizing it.  If we confirm that the 
standard specifies a left-to-right evaluation (which I seem to 
recall, but wouldn't trust that memory without confirmation), we 
could consider loosening it up five or ten years down the road, 
once everyone has code that works with this stricter 
implementation.

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



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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: Precedence of standard comparison operators
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Combining Aggregates