Re: why the need for is null? - Mailing list pgsql-general

From Christopher Browne
Subject Re: why the need for is null?
Date
Msg-id m3llorp7ti.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to why the need for is null?  (Baldur Norddahl <bbn-pgsql.general@clansoft.dk>)
List pgsql-general
In an attempt to throw the authorities off his trail, bbn-pgsql.general@clansoft.dk (Baldur Norddahl) transmitted:
> How come "X=null" is not the same as "X is null"?

Because NULL is not really a "value" in SQL.  Nothing can ever be
equal to a NULL, and that includes another NULL.

In Some Pseudo-SQL Database Systems, NULL is treated as a sort of
"zero" value, which is contrary to the SQL standards.

I seem to recall that in Microsoft's port of Sybase SQL Server,
there's some syntactic sugar that "x = NULL" is treated as if it were
querying "x is NULL."

It would presumably be _possible_ to modify PostgreSQL's query parser
to handle "x = NULL" similarly; feel free to submit a patch to that
end, if you consider it a vital change to make.
--
output = reverse("ac.notelrac.teneerf" "@" "454aa")
http://www.ntlug.org/~cbbrowne/oses.html
Rules  of the  Evil Overlord  #212. "I  will not  send  out battalions
composed wholly of robots or  skeletons against heroes who have qualms
about killing living beings.  <http://www.eviloverlord.com/>

pgsql-general by date:

Previous
From: Lynn.Tilby@asu.edu
Date:
Subject: Cursor Not Found
Next
From: Lynn.Tilby@asu.edu
Date:
Subject: Re: Installing Postgres w/RH9