Re: feature request ?

Поиск
Список
Период
Сортировка
От Radu-Adrian Popescu
Тема Re: feature request ?
Дата
Msg-id 40DB1C79.1000307@aldratech.com
обсуждение исходный текст
Ответ на Re: feature request ?  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: feature request ?  (Geoffrey <esoteric@3times25.net>)
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: feature request ?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: feature request ?