X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 810BBD1C4BA for ; Wed, 13 Aug 2003 15:41:25 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 34763-01 for ; Wed, 13 Aug 2003 12:39:48 -0300 (ADT) Received: from mail.deltav.hu (oldmail.deltav.hu [213.163.0.192]) by svr1.postgresql.org (Postfix) with ESMTP id 53A6CD1B56B for ; Wed, 13 Aug 2003 12:41:14 -0300 (ADT) Received: from fejleszt4 ([213.163.10.103]) by mail.deltav.hu (Netscape Messaging Server 3.6) with SMTP id AAAD15 for ; Wed, 13 Aug 2003 17:41:12 +0200 Message-ID: <003e01c361b1$37d02780$0403a8c0@fejleszt4> From: "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" To: References: <001001c36183$4f636570$0403a8c0@fejleszt4> <200308130754.32211.jgardner@jonathangardner.net> Subject: Re: Order of triggers - totally lost Date: Wed, 13 Aug 2003 17:40:26 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/138 X-Sequence-Number: 14754 Dear Jonathan, Thanks for your will to help. It would be a bit difficult to clean up everything as much as possible (while keeping the problem) and send the skeleton. It looks like the A_AU trigger I mentioned solved the problem. Actually, the situation I painted is much much simplified compared to the real one (about 20 or more tables are accessed during that "simple 1-line update"). What I'd probably use best, are some generic guidelines: * what is sure about trigger execution order? (Cristoph Haller partially answered my question, quoting future plans) * are there generic recommendations what kind of things to put in before and after triggers? * how about FOR EACH STATEMENT triggers? (we only use FOR EACH ROW triggers) G. ------------------------------- cut here ------------------------------- ----- Original Message ----- From: "Jonathan Gardner" Sent: Wednesday, August 13, 2003 4:54 PM -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 13 August 2003 03:11, SZÛCS Gábor wrote: > > What may be wrong? Any ideas to re-organize parts of the triggers? > May putting the update to an A_AU trigger help? I tried it, still > have problems (not sure it's still the trigger order), but the > trigger order is still strange for me: I'd need some solid code to solve this. Can you send the create statements and the insert statement that started it all? I get the feeling that you may have more triggers than you really need.