Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CDE68475B85 for ; Wed, 18 Dec 2002 09:02:25 -0500 (EST) Received: from sccmmhc01.mchsi.com (sccmmhc01.mchsi.com [204.127.203.183]) by postgresql.org (Postfix) with ESMTP id 4C897475AA1 for ; Wed, 18 Dec 2002 09:02:25 -0500 (EST) Received: from perdue.net ([12.216.72.93]) by sccmmhc01.mchsi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021218140228.ZQCF18244.sccmmhc01.mchsi.com@perdue.net>; Wed, 18 Dec 2002 14:02:28 +0000 Message-ID: <3E008003.1030402@perdue.net> Date: Wed, 18 Dec 2002 08:02:43 -0600 From: Tim Perdue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021123 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ludwig Lim Cc: PostgreSQL Mailing List Subject: Re: pl/pgsql question References: <20021218042933.1012.qmail@web80310.mail.yahoo.com> In-Reply-To: <20021218042933.1012.qmail@web80310.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/220 X-Sequence-Number: 10808 Ludwig Lim wrote: > Try changing the "AFTER" to "BEFORE" > > CREATE TRIGGER projtask_insert_depend_trig BEFORE... > > Changes made to the "NEW" will not be reflect in the > AFTER trigger since, the row is already inserted. Thanks, however this seems to present a different problem now. FOR dependon IN SELECT * FROM project_depend_vw WHERE project_task_id=NEW.project_task_id LOOP That loop apparently does not find any matching rows, which would have been inserted just before this row was, inside the same transaction. It was successfully finding those rows before, when the trigger was AFTER INSERT. If I manually select those rows after the query is committed, I am able to pull up the matching rows. Tim