Re: Rule/currval() issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rule/currval() issue
Дата
Msg-id 28457.984594655@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Rule/currval() issue  (Tim Perdue <tim@perdue.net>)
Список pgsql-sql
Tim Perdue <tim@perdue.net> writes:
>> You probably should be using a trigger, not a rule at all.

> OK - so another rule like this one, is probably ill-advised as well? It seems
> a lot easier than going into the triggers:

> CREATE RULE forum_delete_agg AS
>     ON DELETE TO forum
>     DO UPDATE forum_agg_msg_count SET count=count-1
>         WHERE group_forum_id=old.group_forum_id;

That seems OK offhand, although it's hard to guess whether it will be
more or less efficient than a trigger.
        regards, tom lane


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

Предыдущее
От: Tim Perdue
Дата:
Сообщение: Re: Rule/currval() issue
Следующее
От: "Creager, Robert S"
Дата:
Сообщение: RE: Rule/currval() issue