Re: Rules/Trigges Trade-offs - Mailing list pgsql-sql

From Jean-Luc Lachance
Subject Re: Rules/Trigges Trade-offs
Date
Msg-id 3DF0DEA7.14D89064@nsd.ca
Whole thread Raw
In response to Re: [ADMIN] Syslog  (Jie Liang <jie@stbernard.com>)
Responses Re: Rules/Trigges Trade-offs  (Bruce Momjian <pgman@candle.pha.pa.us>)
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Rules/Trigges Trade-offs
Next
From: Bruce Momjian
Date:
Subject: Re: Rules/Trigges Trade-offs