Re: Rules and Triggers - Mailing list pgsql-sql

From Michael Paesold
Subject Re: Rules and Triggers
Date
Msg-id 002101c25964$e5e4e460$4201a8c0@beeblebrox
Whole thread Raw
In response to Re: Rules and Triggers  ("Adam Erickson" <adamre@cox.net>)
List pgsql-sql
Ross J. Reedstrom wrote:

> An important thing to remember about rules vs. triggers: Rules operate
> on an SQL _query_ that involves the table (or view) that the rule is
> attached to, whereas triggers operate on the individual _tuples_ of the
> table they are attached to. Rules act to rewrite the incoming query,
> at the very earliest step: just after parsing, but before planning and
> optimizing. So rules _always_ act first. Triggers act when storage gets
> hit: when the optimizer has choosen a plan, and passes it to the executor
> for, well, execution.
> 
> Ross

Thanks alot, again I understand a little bit more.

You're great, guys!

Regards, Michael Paesold



pgsql-sql by date:

Previous
From: "Andres Sommerhoff"
Date:
Subject: R-Tree, GiST or B-Tree? I will need it?
Next
From: "Beth Gatewood"
Date:
Subject: writing a function to mimic mysql last_insert_id