On Sun, Aug 09, 2015 at 07:16:02PM -0400, Tom Lane wrote: > Noah Misch <n...@leadboat.com> writes: > > On Sun, Aug 09, 2015 at 06:44:58PM -0400, Tom Lane wrote: > >> So for our > >> purposes, it's better to keep BETWEEN and friends as binding slightly > >> tighter than '<' than to make them the same precedence. Same precedence > >> risks breaking things that weren't broken before. > > > It does risk that. Same deal with making "=" have the same precedence as > > "<" > > instead of keeping it slightly lower. > > Agreed, but in that case I think our hand is forced by the SQL standard.
In SQL:2008 and SQL:2011 at least, "=", "<" and "BETWEEN" are all in the same boat. They have no precedence relationships to each other; SQL sidesteps the question by requiring parentheses. They share a set of precedence relationships to other constructs. SQL does not imply whether to put them in one %nonassoc precedence group or in a few, but we can contemplate whether users prefer an error or prefer the 9.4 behavior for affected queries. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers