Re: NULLS and <> : Discrepancies ? - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: NULLS and <> : Discrepancies ?
Date
Msg-id 3A4D16A0.6B3ADD6A@alumni.caltech.edu
Whole thread Raw
In response to NULLS and <> : Discrepancies ?  ("Emmanuel Charpentier,,," <charpent@bacbuc.dyndns.org>)
Responses Re: NULLS and <> : Discrepancies ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Could someone explain to me why not eliminating nulls destroys the
> potential results of the query ? In other words, for any X not null, X
> not in (some NULLs) is false.

You already know the answer: comparisons to NULL always evaluate to
false. You may conclude that this exposes a flaw in SQL9x's definition
of three-value logic, but is the result you should expect for a
standards-compliant SQL implementation.
                     - Thomas

(I was going to say "almost always" rather than "always" but I'm not
recalling a counter example and don't have time to look it up. Sorry
about that... ;)


pgsql-hackers by date:

Previous
From: Patrick Welche
Date:
Subject: Re: GNU readline and BSD license
Next
From: Peter Eisentraut
Date:
Subject: Re: GNU readline and BSD license