Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B1998476648 for ; Tue, 10 Sep 2002 15:43:53 -0400 (EDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 9399A476503 for ; Tue, 10 Sep 2002 15:43:48 -0400 (EDT) Received: (qmail 20970 invoked by uid 0); 10 Sep 2002 19:43:48 -0000 Received: from chello062178186201.1.15.tuwien.teleweb.at (HELO beeblebrox) (62.178.186.201) by mail.gmx.net (mp016-rz3) with SMTP; 10 Sep 2002 19:43:48 -0000 Message-ID: <007c01c25902$9772b940$4201a8c0@beeblebrox> From: "Michael Paesold" To: "Adam Erickson" , References: Subject: Re: Rules and Triggers Date: Tue, 10 Sep 2002 21:45:16 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" 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/75 X-Sequence-Number: 9352 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