Re: simple trigger question ...

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: simple trigger question ...
Date: 2003-04-03 14:26:48
Message-ID: 1049380007.22629.14.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> 'K, that makes it workable ... final question (I hope!) ... RULEs vs
> TRIGGERs? I ended up doing it as a RULE, since I could do it without a
> function ... but is there a reason why that is a Bad Idea? Or in a case
> like this, it doesn't really matter?

Rules are per statement, not per row.

An INSERT INTO ... SELECT ... statement will cause a single execution of
the rule even if you insert several hundred rows.

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-04-03 14:38:07 Re: simple trigger question ...
Previous Message mohamed imdadullah 2003-04-03 14:23:27 Re: Syntax problem!