Re: feature request ? - Mailing list pgsql-sql

From Alexander M. Pravking
Subject Re: feature request ?
Date
Msg-id 20040624103248.GH94665@dyatel.antar.bryansk.ru
Whole thread Raw
In response to Re: feature request ?  (sad <sad@bankir.ru>)
Responses Re: feature request ?
List pgsql-sql
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


pgsql-sql by date:

Previous
From: sad
Date:
Subject: Re: feature request ?
Next
From: "Iain"
Date:
Subject: Re: feature request ?