Re: Rules and conditions

Поиск
Список
Период
Сортировка
От Leif Biberg Kristensen
Тема Re: Rules and conditions
Дата
Msg-id 200912091007.26652.leif@solumslekt.org
обсуждение исходный текст
Ответ на Re: Rules and conditions  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-general
On Wednesday 9. December 2009 09.06.12 Guillaume Lelarge wrote:
> Le mercredi 9 décembre 2009 à 01:52:03, George Silva a écrit :
> > [...]
> > I can't seem to understand why a simples if is not working on the
> > creation of rules.
> >
> > I tried both ways (am i missing something?):
> >
>
> Sure. IF does not exist in SQL, and you can only put SQL statements in a
rule.
> Instead, you can call a stored function written in PL/pgsql which supports
IF
> structure.

Or you can look up the CASE WHEN ... THEN ... ELSE .. END, construct, which
works very much like IF / THEN / ELSE:
<http://www.postgresql.org/docs/current/static/functions-conditional.html>

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

Предыдущее
От: Dan Kortschak
Дата:
Сообщение: Re: how to ensure a client waits for a previous transaction to finish?
Следующее
От: George Silva
Дата:
Сообщение: Re: Rules and conditions