Re: feature request ?

From: Radu-Adrian Popescu <radu(dot)popescu(at)aldratech(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: sad(at)bankir(dot)ru
Subject: Re: feature request ?
Date: 2004-06-24 18:24:57
Message-ID: 40DB1C79.1000307@aldratech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Bruno Wolff III wrote:
>
> There already is a syntax like this. You can do:
> CASE boolean_expression
> WHEN TRUE THEN whatever
> WHEN FALSE THEN whatever
> ELSE whatever
> END
>

Besides, sad, there's no such thing as a tri-valued boolean.
You either have a boolean(with a true/false value) or a NULL, which is something
completely different and it's _not_ one of the two _values_ that a boolean
object takes. I think you're looking at this completely wrong. If in Java you
receive a Boolean object instance, will you start claiming that that Java has
tri-valued booleans, and the "if" should account for that ?!

You can think of values in plpgsql as wrapper objects that carry a value and
have a "is_null" flag; I have no idea how they're implemented in PostgreSQL or
in any RDMBS in general but this should do it, at least for a naive implementation.

Peace,
--
Radu-Adrian Popescu
CSA, DBA, Developer
Aldrapay MD
Aldratech Ltd.
+40213212243

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2004-06-24 18:41:42 Re: feature request ?
Previous Message Bruno Wolff III 2004-06-24 17:43:05 Re: feature request ?