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 A78D0D1E0D0 for ; Fri, 19 Mar 2004 15:13:57 +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 38409-05 for ; Fri, 19 Mar 2004 11:13:57 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id BBA2AD1BC54 for ; Fri, 19 Mar 2004 11:13:52 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i2JFDuLA024237; Fri, 19 Mar 2004 10:13:57 -0500 (EST) To: Erik Thiele Cc: pgsql-sql@postgresql.org Subject: Re: triggers on commit In-reply-to: <20040319140445.2c342b28.erik@thiele-hydraulik.de> References: <20040319140445.2c342b28.erik@thiele-hydraulik.de> Comments: In-reply-to Erik Thiele message dated "Fri, 19 Mar 2004 14:04:45 +0100" Date: Fri, 19 Mar 2004 10:13:56 -0500 Message-ID: <24236.1079709236@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/206 X-Sequence-Number: 17305 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. regards, tom lane