Re: BUG #3822: Nonstandard precedence for comparison operators - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #3822: Nonstandard precedence for comparison operators
Date
Msg-id 4773C3E9.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to BUG #3822: Nonstandard precedence for comparison operators  ("Pedro Gimeno" <pgsql-001@personal.formauri.es>)
Responses Re: BUG #3822: Nonstandard precedence for comparison operators
List pgsql-bugs
>>> On Mon, Dec 17, 2007 at  1:58 PM, in message
<200712171958.lBHJwOBb037317@wwwmaster.postgresql.org>, "Pedro Gimeno"
<pgsql-001@personal.formauri.es> wrote:=20
=20
> Description:        Nonstandard precedence for comparison operators
=20
> The operators <>, <=3D and >=3D are expected to have the same precedence =
as =3D, <
> and >, but according to the docs (and matching actual behaviour) they have
> the same precedence as e.g. ||.
>=20
> This leads to surprises
=20
> Of course the same applies to !=3D since it is converted to <>.
>=20
> Now being picky, the precedence of < and > should be the same as that of =
=3D
> (for comparison, not for assignment), which makes a difference in rare ca=
ses
=20
Everything Pedro said in this post matched my understanding of the
SQL specification.  I went back and read those sections closely,
and I can't find any basis for interpreting the spec any other way.
This seems like a pretty serious point of non-compliance to me.
=20
That said, bringing PostgreSQL into compliance with the standard
would undoubtedly break some people's existing applications.  It
seems to call for the same phased approach as the standard
conforming string literals, with GUCs to control warnings for
problem constructs and legacy versus standard runtime behavior.
=20
-Kevin
=20

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3841: core dump in uuid-ossp
Next
From: Tom Lane
Date:
Subject: Re: BUG #3822: Nonstandard precedence for comparison operators