Re: feature request ?

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: feature request ?
Дата
Msg-id DDFC5701-C59F-11D8-B2C1-000A95C88220@myrealbox.com
обсуждение исходный текст
Ответ на Re: feature request ?  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: feature request ?
Список pgsql-sql
On Jun 24, 2004, at 2:12 AM, Josh Berkus wrote:

> Sad,
>
>> since BOOL expression has three possible values: TRUE,FALSE,NULL
>> plpgsql IF control structure should have three alternate blocks:
>> THEN,ELSE,NULL
>>
>> shouldn't it ?
>
> No, why?
>
> How would you construct a tri-valued IF/THEN?     Doesn't seem too 
> likely to
> me, as well as being different from every other programming language in
> existance ...

Creating a new control structure to do handle this seems odd. However, 
one could easily have the same effect using a nested if. Using the 
pl/pgsql ELSIF construct, it's pretty straightforward.

IF foo IS NULLTHEN ...
ELSIF fooTHEN ...
ELSE ...
END IF;


Michael Glaesemann
grzm myrealbox com



В списке pgsql-sql по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: feature request ?
Следующее
От: sad
Дата:
Сообщение: Re: feature request ?