From: Alexander M. Pravking <fduch@antar.bryansk.ru>
To: sad <sad@bankir.ru>
Cc: Gregory S. Williamson <gsw@globexplorer.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: feature request ?
Date: Thu, 24 Jun 2004 14:32:48 +0400
Message-ID: <20040624103248.GH94665@dyatel.antar.bryansk.ru> (raw)
In-Reply-To: <200406241104.15265.sad@bankir.ru>
References: <71E37EF6B7DCC1499CEA0316A256832801057B7C@loki.wc.globexplorer.net>
<200406241104.15265.sad@bankir.ru>
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
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: fduch@antar.bryansk.ru, sad@bankir.ru, gsw@globexplorer.com
Subject: Re: feature request ?
In-Reply-To: <20040624103248.GH94665@dyatel.antar.bryansk.ru>
* 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