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 D3D3ED1B1A9 for ; Thu, 24 Jun 2004 07:32:53 -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 58907-07 for ; Thu, 24 Jun 2004 10:32:53 +0000 (GMT) Received: from dyatel.antar.bryansk.ru (unknown [195.239.214.85]) by svr1.postgresql.org (Postfix) with ESMTP id 0D11DD1B1A5 for ; Thu, 24 Jun 2004 07:32:51 -0300 (ADT) Received: from fduch by dyatel.antar.bryansk.ru with local (Exim 4.34 (FreeBSD)) id 1BdRXE-0007zH-2n; Thu, 24 Jun 2004 14:32:48 +0400 Date: Thu, 24 Jun 2004 14:32:48 +0400 From: "Alexander M. Pravking" To: sad Cc: "Gregory S. Williamson" , pgsql-sql@postgresql.org Subject: Re: feature request ? Message-ID: <20040624103248.GH94665@dyatel.antar.bryansk.ru> References: <71E37EF6B7DCC1499CEA0316A256832801057B7C@loki.wc.globexplorer.net> <200406241104.15265.sad@bankir.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200406241104.15265.sad@bankir.ru> User-Agent: Mutt/1.4.2.1i 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/227 X-Sequence-Number: 18172 On Thu, Jun 24, 2004 at 11:04:15AM +0400, sad wrote: > Now you treat NULLs as false. Nope. NULL is neither true, nor false. It's "unknown", or "undefined". fduch=# SELECT 1 WHERE NULL::boolean; ?column? ---------- (0 rows) fduch=# SELECT 1 WHERE NOT NULL::boolean; ?column? ---------- (0 rows) So if you care, you SHOULD use IS [NOT] NULL, as Michael Glaesemann suggested. If you don't want expression to be calculated twice, use a temporary variable. -- Fduch M. Pravking