Re: conditional rule not applied

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: conditional rule not applied
Дата
Msg-id dcc563d11001072004g61eb217bjdfe7475737473a59@mail.gmail.com
обсуждение исходный текст
Ответ на conditional rule not applied  (Seb <spluque@gmail.com>)
Список pgsql-general
On Wed, Dec 30, 2009 at 6:39 PM, Seb <spluque@gmail.com> wrote:
> CREATE RULE footwear_nothing_upd AS
>    ON UPDATE TO footwear DO INSTEAD NOTHING;
> CREATE RULE footwear_newshoelaces_upd AS
>    ON UPDATE TO footwear
>    WHERE NEW.sl_name <> OLD.sl_name AND OLD.sl_name IS NULL
>    DO
> INSERT INTO shoelaces (sh_id, sl_name)
>    VALUES(NEW.sh_id, NEW.sl_name);

Isn't that first rule gonna always fire and make the second one a NOOP?

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: After a crash all my tables got wiped, but still using disk space.
Следующее
От: akp geek
Дата:
Сообщение: Index question on postgres