Re: null != null ??? - Mailing list pgsql-general

From Tom Lane
Subject Re: null != null ???
Date
Msg-id 24842.1004114055@sss.pgh.pa.us
Whole thread Raw
In response to Re: null != null ???  (Thomas Lockhart <lockhart@fourpalms.org>)
List pgsql-general
Thomas Lockhart <lockhart@fourpalms.org> writes:
> Yes, this is an explicit feature in our parser to help out poor MSAccess
> souls who have a product which generates illegal SQL queries. We put in
> a specific rule to convert "anything=NULL" to "anything IS NULL", which
> *is* legal syntax.

It should also be noted that as of 7.2, this transformation is optional
(see "transform_null_equals" runtime parameter), and the default is NOT
to make the transformation --- ie, as of 7.2 the default behavior is
SQL-spec-compliant:

regression=# select null = null;
 ?column?
----------

(1 row)

regression=# set transform_null_equals TO 1;
SET VARIABLE
regression=# select null = null;
 ?column?
----------
 t
(1 row)

regression=#

            regards, tom lane

pgsql-general by date:

Previous
From: Fran Fabrizio
Date:
Subject: Re: null != null ???
Next
From: "Eric Ridge"
Date:
Subject: UNIQUE constraint violations and transactions