Re: Precedence of standard comparison operators - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Precedence of standard comparison operators
Date
Msg-id 1142583258.2899141.1424452701561.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to Re: Precedence of standard comparison operators  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Precedence of standard comparison operators
Next
From: Tomas Vondra
Date:
Subject: Re: Combining Aggregates