Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BF86E475DF8 for ; Wed, 11 Sep 2002 03:27:31 -0400 (EDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 673884759F5 for ; Wed, 11 Sep 2002 03:27:30 -0400 (EDT) Received: (qmail 359 invoked by uid 0); 11 Sep 2002 07:27:29 -0000 Received: from chello062178186201.1.15.tuwien.teleweb.at (HELO beeblebrox) (62.178.186.201) by mail.gmx.net (mp009-rz3) with SMTP; 11 Sep 2002 07:27:29 -0000 Message-ID: <002101c25964$e5e4e460$4201a8c0@beeblebrox> From: "Michael Paesold" To: "Ross J. Reedstrom" Cc: "Adam Erickson" , References: <007c01c25902$9772b940$4201a8c0@beeblebrox> <20020910232816.GA3983@rice.edu> Subject: Re: Rules and Triggers Date: Wed, 11 Sep 2002 09:28:57 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/79 X-Sequence-Number: 9356 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