Re: feature request ? - Mailing list pgsql-sql

From Radu-Adrian Popescu
Subject Re: feature request ?
Date
Msg-id 40DB1C79.1000307@aldratech.com
Whole thread Raw
In response to Re: feature request ?  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: feature request ?
List 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



pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: feature request ?
Next
From: Stephan Szabo
Date:
Subject: Re: feature request ?