Re: Rules/Trigges Trade-offs
От | Bruce Momjian |
---|---|
Тема | Re: Rules/Trigges Trade-offs |
Дата | |
Msg-id | 200212061741.gB6Hf7121431@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Rules/Trigges Trade-offs (Jean-Luc Lachance <jllachan@nsd.ca>) |
Список | pgsql-sql |
No, the rule will affect all the rows using one query. --------------------------------------------------------------------------- Jean-Luc Lachance wrote: > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
В списке pgsql-sql по дате отправления: