From: | Tim Perdue <tim(at)perdue(dot)net> |
---|---|
To: | Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com> |
Cc: | PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: pl/pgsql question |
Date: | 2002-12-18 14:02:43 |
Message-ID: | 3E008003.1030402@perdue.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | dnaren | 2002-12-18 15:52:00 | Error code for database down |
Previous Message | Christoph Haller | 2002-12-18 10:21:59 | Re: Dynamic sql program using libpq |