pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paesold <mpaesold@gmx.at>
To: Ross J. Reedstrom <reedstrm@rice.edu>
Cc: Adam Erickson <adamre@cox.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Rules and Triggers
Date: Wed, 11 Sep 2002 09:28:57 +0200
Message-ID: <002101c25964$e5e4e460$4201a8c0@beeblebrox> (raw)
References: <ALEKKHACBIAEBNBPFKPCGEJNEKAA.adamre@cox.net>
	<007c01c25902$9772b940$4201a8c0@beeblebrox>
	<20020910232816.GA3983@rice.edu>

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




view thread (8+ messages)

Message-ID: <002101c25964$e5e4e460$4201a8c0@beeblebrox>
Permalink:  ../002101c25964$e5e4e460$4201a8c0@beeblebrox/
Also on:    postgresql.org/message-id/002101c25964$e5e4e460$4201a8c0@beeblebrox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mpaesold@gmx.at, reedstrm@rice.edu, adamre@cox.net
  Subject: Re: Rules and Triggers
  In-Reply-To: <002101c25964$e5e4e460$4201a8c0@beeblebrox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox