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 89809D1B56B for ; Wed, 13 Aug 2003 14:23:04 +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 24539-09 for ; Wed, 13 Aug 2003 11:21:32 -0300 (ADT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by svr1.postgresql.org (Postfix) with SMTP id 097AAD1B52C for ; Wed, 13 Aug 2003 11:22:52 -0300 (ADT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Wed Aug 13 16:22:55 2003 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id QAA25554; Wed, 13 Aug 2003 16:22:55 +0200 (METDST) Message-ID: <3F3A49BE.8BA38DAA@rodos.fzk.de> Date: Wed, 13 Aug 2003 16:22:54 +0200 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org, surrano@mailbox.hu Subject: Re: Order of triggers - totally lost Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char 9C hex) in message header 'Received' Received: \234by rodos.fzk.de... ^ X-Archive-Number: 200308/134 X-Sequence-Number: 14750 > The docs say in trigger-datachanges.html: > > "Changes made by query Q are visible by queries that are started after query > Q, no matter whether they are started inside Q (during the execution of Q) > or after Q is done. > > This is true for triggers as well ..." > > Trying to understand that, I have a feeling that the update in A_BIUD should > already see the results of the preceding insert, including the results of > triggers activated by that insert. I've seen that PostgreSQL Weekly News - July 25th 2003 Even though we are nearing release, it doesn't hurt to look ahead, as evidenced by several additions to the TODO list this week: delay resolution of array expression type to assignment coercion can be performed on empty array expressions, have AFTER triggers execute after the appropriate SQL statement in a function, not at the end of the function, more details on possible tablespace definitions were added, add PL/PHP, allow PL/pgSQL to name columns by ordinal position (e.g. rec.(3)), and prevent COMMENT ON DATABASE from using a database name. Some of these already have folks working on them, however if you are interested in lending a hand please don't be afraid to speak up. Looks like this passage about AFTER triggers is what you're expecting, but is not implemented yet. > > 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: > No ideas, sorry. Maybe move over to the [HACKERS] list for more professional support. Regards, Christoph