X-Original-To: pgsql-admin@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id B34F8925422 for ; Wed, 28 May 2003 18:12:56 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 57453-02 for ; Wed, 28 May 2003 18:12:52 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by developer.postgresql.org (Postfix) with ESMTP id C752D925407 for ; Wed, 28 May 2003 18:12:52 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id C25DAD6F8; Wed, 28 May 2003 15:12:51 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id A1BBF5C12; Wed, 28 May 2003 15:12:51 -0700 (PDT) Date: Wed, 28 May 2003 15:12:51 -0700 (PDT) From: Stephan Szabo To: Kris Kiger Cc: Subject: Re: Crazy Triggers In-Reply-To: <3ED52490.2050107@musicrebellion.com> Message-ID: <20030528151115.V41165-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/392 X-Sequence-Number: 8954 sszabo@bigpanda.com On Wed, 28 May 2003, Kris Kiger wrote: > This will probably be a quick question for some of you with more > experience than I. When you define a trigger to occur before or after > an event, does this mean that the trigger is spawned as part of the > current event transaction, or is it completed as a seperate transaction > after the event is processed? In advance, thanks for the help! It's part of the same transaction. If I'm remembering the details right, the before triggers happen right before the event, currently non-deferred after triggers happen at the end of the statement that caused the event (although this may change in the future) and deferred after triggers (for deferred foreign keys) happen at the end of the transaction during the commit.