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 C04D7D1B196 for ; Mon, 28 Jun 2004 20:04:14 -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 77681-08 for ; Mon, 28 Jun 2004 23:04:08 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id 39315D1B18E for ; Mon, 28 Jun 2004 20:04:04 -0300 (ADT) Received: (qmail-ldap/ctrl 20460 invoked from network); 28 Jun 2004 23:04:06 -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 23:04:06 -0000 Received: from weyoun ([192.168.15.239]) by bazaar.foomatic.at (8.12.11/8.12.8) with ESMTP id i5SN3CmO000613 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 29 Jun 2004 01:03:12 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Stefan Weiss Organization: Foo Orbital Operations To: pgsql-sql@postgresql.org Subject: Re: FW: "=" operator vs. "IS" Date: Tue, 29 Jun 2004 01:02:24 +0200 User-Agent: KMail/1.4.3 References: <7A4ADADFC8AFF0478D47F63BEDD57CE33A320C@gpmail.gphq.genpathpharma.com> In-Reply-To: <7A4ADADFC8AFF0478D47F63BEDD57CE33A320C@gpmail.gphq.genpathpharma.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200406290102.24885.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/283 X-Sequence-Number: 18228 Re, thanks for all the replies. On Tuesday, 29 June 2004 00:17, Dmitri Bichko wrote: > As far as TRUE and FALSE go, from what I know you can use = to compare > them with boolean columns, unless I misunderstood your question. Sorry, I must have remembered that incorrectly, or maybe I've been thinking of a different DBMS or version. "table.col = TRUE" seems to work fine for me now. I understand that the result of "(anything) = NULL" will always NULL, so it's a waste of breath. That's where the "IS" operator(?) comes in, which allows for comparison with NULL. The only question left is why "IS" can also be used to compare with the TRUE/FALSE keywords (when a simple "=" should be sufficient here), but not to compare two boolean columns. cheers, stefan BTW, I really liked Mike's explanation that "it just IS" ;-)