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 637CDD1B191 for ; Mon, 28 Jun 2004 19:04:18 -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 54290-06 for ; Mon, 28 Jun 2004 22:04:11 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id 754C8D1B18A for ; Mon, 28 Jun 2004 19:04:06 -0300 (ADT) Received: (qmail-ldap/ctrl 10727 invoked from network); 28 Jun 2004 22:04:07 -0000 Received: from unknown (HELO bazaar.foomatic.at) ([213.129.239.202]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 28 Jun 2004 22:04:07 -0000 Received: from weyoun ([192.168.15.239]) by bazaar.foomatic.at (8.12.11/8.12.8) with ESMTP id i5SM3GM0000588 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 29 Jun 2004 00:03:16 +0200 Content-Type: text/plain; charset="iso-8859-15" From: Stefan Weiss Organization: Foo Orbital Operations To: pgsql-sql@postgresql.org Subject: "=" operator vs. "IS" Date: Tue, 29 Jun 2004 00:02:29 +0200 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200406290002.29099.spaceman@foo.at> 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/278 X-Sequence-Number: 18223 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