Re: Rules and Triggers

From: "Michael Paesold" <mpaesold(at)gmx(dot)at>
To: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Cc: "Adam Erickson" <adamre(at)cox(dot)net>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Rules and Triggers
Date: 2002-09-11 07:28:57
Message-ID: 002101c25964$e5e4e460$4201a8c0@beeblebrox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Goran Buzic 2002-09-11 12:21:22 Re: POSIX-style regular expressions
Previous Message Andres Sommerhoff 2002-09-11 03:43:59 R-Tree, GiST or B-Tree? I will need it?