From: Jean-Luc Lachance <jllachan@nsd.ca>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Rules/Trigges Trade-offs
Date: Fri, 06 Dec 2002 12:30:15 -0500
Message-ID: <3DF0DEA7.14D89064@nsd.ca> (raw)
References: <7C760DAA511DC74B99E7D22189F786F1906DB0@MAIL01.stbernard.com>
<3C90F994.3080605@joeconway.com>
<3DF0CA63.84F4D48@nsd.ca>
<200212061631.06077.dev@archonet.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jllachan@nsd.ca, dev@archonet.com
Subject: Re: Rules/Trigges Trade-offs
In-Reply-To: <3DF0DEA7.14D89064@nsd.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox