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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Fri, 29 Dec 2000 22:56:32 +0000
  • Message-id: <3A4D16A0.6B3ADD6A@alumni.caltech.edu> <text/plain>

> 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... ;)



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group