"=" operator vs. "IS"

From: Stefan Weiss <spaceman(at)foo(dot)at>
To: pgsql-sql(at)postgresql(dot)org
Subject: "=" operator vs. "IS"
Date: 2004-06-28 22:02:29
Message-ID: 200406290002.29099.spaceman@foo.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dmitri Bichko 2004-06-28 22:17:17 FW: "=" operator vs. "IS"
Previous Message Greg Stark 2004-06-28 19:05:24 Re: Empty array IS NULL?