Re: feature request ?

From: "Alexander M(dot) Pravking" <fduch(at)antar(dot)bryansk(dot)ru>
To: sad <sad(at)bankir(dot)ru>
Cc: "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: feature request ?
Date: 2004-06-24 10:32:48
Message-ID: 20040624103248.GH94665@dyatel.antar.bryansk.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message sad 2004-06-24 12:55:26 Re: feature request ?
Previous Message Iain 2004-06-24 10:32:25 Re: feature request ?