Re: pl/pgsql switch

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: pl/pgsql switch
Дата
Msg-id 20060124205138.GA91099@winnie.fuhr.org
обсуждение исходный текст
Ответ на pl/pgsql switch  ("Luis Silva" <lfs12@hotmail.com>)
Список pgsql-novice
On Tue, Jan 24, 2006 at 05:51:37PM +0000, Luis Silva wrote:
> I there, do we have switch(){ case:} in pl/pgsql. Tks

See the PL/pgSQL documentation, in particular the "Control Structures"
section.  Here's the link for 8.1 (but use the documentation for
whatever version you're running):

http://www.postgresql.org/docs/8.1/interactive/plpgsql-control-structures.html

The documentation shows no switch/case structure but you should be
able to do the same thing with IF-THEN-ELSIF.  However, SQL does
have a CASE expression that you might be able to use:

http://www.postgresql.org/docs/8.1/interactive/functions-conditional.html

--
Michael Fuhr

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

Предыдущее
От: "Luis Silva"
Дата:
Сообщение: pl/pgsql switch
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP