From: Tim Perdue <tim@perdue.net>
To: Ludwig Lim <lud_nowhere_man@yahoo.com>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: pl/pgsql question
Date: Wed, 18 Dec 2002 08:02:43 -0600
Message-ID: <3E008003.1030402@perdue.net> (raw)
In-Reply-To: <20021218042933.1012.qmail@web80310.mail.yahoo.com>
References: <20021218042933.1012.qmail@web80310.mail.yahoo.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tim@perdue.net, lud_nowhere_man@yahoo.com
Subject: Re: pl/pgsql question
In-Reply-To: <3E008003.1030402@perdue.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox