"Michael Pilling" <Michael(dot)Pilling(at)dsto(dot)defence(dot)gov(dot)au> wrote:
> A reasonable programmer would expect != NULL, <> NULL and IS NOT
> NULL to be synonyms.
Only if that programmer was not aware of the SQL standard and had
not worked much with a standard-conforming database.
NULL is conceptually intended to indicate "unknown" or "not
applicable". If you have a person table with a date_of_birth
column, which contains NULL for a number of rows for which the date
of birth is unknown, can you say that all such people have the same
date of birth? No; for any such person, the result of comparing
their date of birth to anyone else's (whether or not the other one
is NULL) is UNKNOWN.
You might want to read up on IS [NOT] DISTINCT FROM. In the SQL
language, while NULL is not known to be equal to NULL, you *can* say
that NULL IS NOT DISTINCT FROM NULL.
This is most definitely not a bug in the software. The
documentation does cover it here:
http://www.postgresql.org/docs/9.0/interactive/functions-comparison.html
Is there something you would add to that?
-Kevin