Skip site navigation (1) Skip section navigation (2)

Re: NULLS and <> : Discrepancies ?

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: "Emmanuel Charpentier,,," <charpent(at)bacbuc(dot)dyndns(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: NULLS and <> : Discrepancies ?
Date: 2000-12-29 22:56:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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... ;)

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2000-12-29 23:43:38
Subject: Re: GNU readline and BSD license
Previous:From: Tom LaneDate: 2000-12-29 22:41:25
Subject: Regress-test failure in current sources

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group