multiple action rules

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема multiple action rules
Дата
Msg-id 1119483112.8208.23.camel@state.g2switchworks.com
обсуждение исходный текст
Ответы Re: multiple action rules
Список pgsql-general
OK, so I'm trying to make a rule with >1 action.

The docs, not so helpfully, only seem to show a single action rule (at
least in the rules section, not sure about elsewhere)  The syntax
diagram:

CREATE RULE rule_name AS ON event
    TO object [WHERE rule_qualification]
    DO [INSTEAD] [action | (actions) | NOTHING];

seems to imply to me that >2 actions would look like this:

create rule audit_test as on delete to ntest do (
    insert into naudit(id,path) values (OLD.id, OLD.path);
    notify test;
)

But no matter what flavor of syntax I throw at this, I get:

syntax error at or near "insert" at character xxx

So, what's the magic pixie dust I need to sprinkle on this to make it
work?

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

Предыдущее
От: David Mitchell
Дата:
Сообщение: Re: Vacuum advice
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: multiple action rules