Re: Rules and actions involving multiple rows - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Rules and actions involving multiple rows
Date
Msg-id 20030706053905.GA19974@dcc.uchile.cl
Whole thread Raw
In response to Rules and actions involving multiple rows  (Jason Godden <jasongodden@optushome.com.au>)
List pgsql-general
On Sun, Jul 06, 2003 at 02:48:59PM +1000, Jason Godden wrote:

> In the past I've always used triggers to fire before or after events however I
> see that the same thing can be achieved through rules (for logging etc...) so
> I created a rule which fires on update (not DO INSTEAD) however it only seems
> to work for a single row - whereas the triggers work for all rows updated in
> a transaction.

Rules are a once-per-statement thing, and thus appear to be "for a
single row."  Triggers can be once-per-row or once-per-statement.  Only
you know what is more appropiate in your scenario...

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Limitate a mirar... y algun dia veras"

pgsql-general by date:

Previous
From: Jason Godden
Date:
Subject: Rules and actions involving multiple rows
Next
From:
Date:
Subject: Re: PostGreSql equivalents to mssql