pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael A Nachbaur <mike@nachbaur.com>
To: Stefan Weiss <spaceman@foo.at>
Cc: pgsql-sql@postgresql.org
Subject: Re: "=" operator vs. "IS"
Date: Mon, 28 Jun 2004 15:28:08 -0700
Message-ID: <200406281528.08526.mike@nachbaur.com> (raw)
In-Reply-To: <200406290002.29099.spaceman@foo.at>
References: <200406290002.29099.spaceman@foo.at>

On June 28, 2004 03:02 pm, Stefan Weiss wrote:
> 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?

As far as I have been able to tell, it is one of those quirks about SQL that 
you shouldn't bother trying to understand.  It just IS.  <rimshot/>

-- 
Michael A. Nachbaur <mike@nachbaur.com>
http://nachbaur.com/pgpkey.asc



view thread (15+ messages)  latest in thread

Message-ID: <200406281528.08526.mike@nachbaur.com>
Permalink:  ../200406281528.08526.mike@nachbaur.com/
Also on:    postgresql.org/message-id/200406281528.08526.mike@nachbaur.com

 · 

reply

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: mike@nachbaur.com, spaceman@foo.at
  Subject: Re: "=" operator vs. "IS"
  In-Reply-To: <200406281528.08526.mike@nachbaur.com>

* 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