X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 40E7DD1C4EC for ; Fri, 19 Mar 2004 15:28:12 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 44716-07 for ; Fri, 19 Mar 2004 11:28:10 -0400 (AST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by svr1.postgresql.org (Postfix) with ESMTP id B4BF5D1B561 for ; Fri, 19 Mar 2004 11:28:05 -0400 (AST) Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1B4Luh-0000v3-00; Fri, 19 Mar 2004 16:27:59 +0100 Received: from [80.131.209.67] (helo=goofy.thiele-intern) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1B4Luh-00006N-00; Fri, 19 Mar 2004 16:27:59 +0100 Date: Fri, 19 Mar 2004 16:27:58 +0100 From: Erik Thiele To: Tom Lane Cc: pgsql-sql@postgresql.org Subject: Re: triggers on commit Message-Id: <20040319162758.0eae6612.erik@thiele-hydraulik.de> In-Reply-To: <24236.1079709236@sss.pgh.pa.us> References: <20040319140445.2c342b28.erik@thiele-hydraulik.de> <24236.1079709236@sss.pgh.pa.us> Organization: Thiele-Hydraulik X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:323d4a9045def897d7bf2e2f3ae17486 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/207 X-Sequence-Number: 17306 On Fri, 19 Mar 2004 10:13:56 -0500 Tom Lane wrote: > Erik Thiele writes: > > now. what i wanted to do is ensure that this is done correctly and > > otherwise abort the transaction. > > of course this check needs to be done at the commit time, because if > > i do it on statement level, it cannot work, since i cannot change > > two tables at the same time. > > I believe "deferred AFTER" triggers are fired just before commit. i don't find this in the documentation. i only know triggers which run before insert/update/delete or directly (!) after, not waiting until commit. cya & thx! erik -- Erik Thiele