X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 724BB3A3C2D for ; Wed, 5 Jan 2005 20:53:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47502-06 for ; Wed, 5 Jan 2005 20:53:17 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 044B43A3BA4 for ; Wed, 5 Jan 2005 20:53:18 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j05KrGr6000953; Wed, 5 Jan 2005 15:53:16 -0500 (EST) To: drdani@mazsola.iit.uni-miskolc.hu Cc: pgsql-sql@postgresql.org Subject: Re: plpsql function problem In-reply-to: References: Comments: In-reply-to drdani@mazsola.iit.uni-miskolc.hu message dated "Wed, 05 Jan 2005 20:45:21 +0100" Date: Wed, 05 Jan 2005 15:53:16 -0500 Message-ID: <952.1104958396@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/20 X-Sequence-Number: 19808 drdani@mazsola.iit.uni-miskolc.hu writes: > function > . > insert into table1 ... --> trigger function (runs after insert) > . > insert into table2 ... > . > select from table2 ... not found > . > This info looks to be unavailable inside the function. Can it be made > availabel or must this whole thing reorgenized? If it's an AFTER trigger, the trigger is currently not fired until the end of the entire command (ie, whatever interactive command called your function). So the SELECT isn't seeing the result because it hasn't happened yet. This will change in PG 8.0. regards, tom lane