Tom Lane wrote:
"Albe Laurenz" <[EMAIL PROTECTED]> writes:
Richard Broersma Jr wrote:
A rule would only
execute one additional statement. So if you can do it with a rule
conveniently, the rule will probably be faster.
I find this unlikely. The overhead involved in setting up a rule
is prob
>> A trigger FOR EACH STATEMENT will execute the trigger function
>> for each row affacted by the statement.
>
> Huh? That would be true for a FOR EACH ROW trigger, but a STATEMENT
> trigger fires once per statement.
Argh. I intended to write FOR EACH ROW.
Thanks for the correction.
>> A rule w
"Albe Laurenz" <[EMAIL PROTECTED]> writes:
> Richard Broersma Jr wrote:
>> My understanding is that Triggers offer better performance
>> than rules do.
> A trigger FOR EACH STATEMENT will execute the trigger function
> for each row affacted by the statement.
Huh? That would be true for a FOR EAC
Richard Broersma Jr wrote:
> --- Alfred Zhao <[EMAIL PROTECTED]> wrote:
>> Suppose I want to update a statistics table S after an
>> insertion into an activity table A. In order to update S
>> automatically, I can either create a rule on A or create
>> an after trigger on A. What's the performance
--- Alfred Zhao <[EMAIL PROTECTED]> wrote:
> Suppose I want to update a statistics table S after an insertion into an
> activity table A. In order to update S automatically, I can either create a
> rule on A or create an after trigger on A. What's the performance
> implication on using rule vs trig
Suppose I want to update a statistics table S after an insertion into an
activity table A. In order to update S automatically, I can either create a
rule on A or create an after trigger on A. What's the performance
implication on using rule vs trigger? Thanks in advance.
Alfred
---
On Mon, 30 Jul 2001, will trillich wrote:
> i have a solution using RULES and PLGPSQL functions (instead of
> triggers) for insert-unless-found, using perl lingo:
>
> # perlish pseudoCode
> unless (select(tbl.fld == val)) { insert tbl.fld = val };
>
> i'd love to hear the skinny on
i have a solution using RULES and PLGPSQL functions (instead of
triggers) for insert-unless-found, using perl lingo:
# perlish pseudoCode
unless (select(tbl.fld == val)) { insert tbl.fld = val };
i'd love to hear the skinny on why the following is a bad idea,
which i presume it i