From: Stefan Weiss <spaceman@foo.at>
To: pgsql-sql@postgresql.org
Subject: "=" operator vs. "IS"
Date: Tue, 29 Jun 2004 00:02:29 +0200
Message-ID: <200406290002.29099.spaceman@foo.at> (raw)
Hi.
I'm just curious - why is it not possible to use the "=" operator to
compare values with NULL? I suspect that the SQL standard specified
it that way, but I can't see any ambiguity in an expression like "AND
foo.bar = NULL". Is it because NULL does not "equal" any value, and the
expression should be read as "foo.bar is unknown"? Or is there something
else I'm missing?
If it's the "unknown" part, then why can't I use "=" to compare with
TRUE or FALSE?
cheers,
stefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: spaceman@foo.at
Subject: Re: "=" operator vs. "IS"
In-Reply-To: <200406290002.29099.spaceman@foo.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox