Re: Rules and Triggers - Mailing list pgsql-sql

From Michael Paesold
Subject Re: Rules and Triggers
Date
Msg-id 007c01c25902$9772b940$4201a8c0@beeblebrox
Whole thread Raw
In response to Re: Rules and Triggers  ("Adam Erickson" <adamre@cox.net>)
Responses Re: Rules and Triggers  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-sql
Adam Erickson wrote:

> Correct me if I'm wrong, but rules constrain the SQL (ie. validation).
> Triggers are carried out after the SQL is executed and the data is
modified.
> So, to answer your question, I think rules come first.  As to which order
> the rules / triggers are executed probably depends on the order you put
them
> in when you created them but I pulled that straight out of my arse.  :)

That would be correct for triggers with AFTER INSERT/UPDATE/DELETE.
But what about triggers BEFORE INSERT/UPDATE/DELETE?

Regards,
Michael



pgsql-sql by date:

Previous
From: "Adam Erickson"
Date:
Subject: Re: Rules and Triggers
Next
From: Kevin Brannen
Date:
Subject: Re: Changing Column Type