X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D0CF5D1B170 for ; Mon, 28 Jun 2004 19:28:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64551-05 for ; Mon, 28 Jun 2004 22:28:10 +0000 (GMT) Received: from lithium.sunwave.net (lithium.sunwave.net [64.141.16.21]) by svr1.postgresql.org (Postfix) with ESMTP id 718D8D1B191 for ; Mon, 28 Jun 2004 19:28:06 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by lithium.sunwave.net (Postfix) with ESMTP id DCFB844300; Mon, 28 Jun 2004 15:28:08 -0700 (PDT) Received: from lithium.sunwave.net ([127.0.0.1]) by localhost (lithium.sunwave.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17699-01-50; Mon, 28 Jun 2004 15:28:08 -0700 (PDT) Received: from starbucks.in.sunwave.net (fw1-et-1.sunwave.net [64.141.16.15]) by lithium.sunwave.net (Postfix) with ESMTP id A6ED5441C0; Mon, 28 Jun 2004 15:28:08 -0700 (PDT) From: Michael A Nachbaur To: Stefan Weiss Subject: Re: "=" operator vs. "IS" Date: Mon, 28 Jun 2004 15:28:08 -0700 User-Agent: KMail/1.6.1 Cc: pgsql-sql@postgresql.org References: <200406290002.29099.spaceman@foo.at> In-Reply-To: <200406290002.29099.spaceman@foo.at> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200406281528.08526.mike@nachbaur.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/281 X-Sequence-Number: 18226 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. -- Michael A. Nachbaur http://nachbaur.com/pgpkey.asc