Re: Rules/Trigges Trade-offs

Поиск
Список
Период
Сортировка
От Jean-Luc Lachance
Тема Re: Rules/Trigges Trade-offs
Дата
Msg-id 3DF0DEA7.14D89064@nsd.ca
обсуждение исходный текст
Ответ на Re: [ADMIN] Syslog  (Jie Liang <jie@stbernard.com>)
Ответы Re: Rules/Trigges Trade-offs  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
Thanks for the info.

Do you mean that if an update affects more than one row I should use
triggers because the rules will be executed only once?

JLL


Richard Huxton wrote:
> 
> On Friday 06 Dec 2002 4:03 pm, Jean-Luc Lachance wrote:
> > Hi all!
> >
> > Is there a guideline on the use of rules compared to triggers when both
> > can be use to achieve the same result?
> 
> If I can use rules I do. Rules rewrite the query so are processed once,
> whereas triggers get processed for every row.
> --
>   Richard Huxton


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Rules/Trigges Trade-offs
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Rules/Trigges Trade-offs