Re: pl/pgsql question
От
Tim Perdue
Тема
Re: pl/pgsql question
Дата
Msg-id
3E008003.1030402@perdue.net
Ответ на
Re: pl/pgsql question (Ludwig Lim)
Список
Дерево обсуждения
pl/pgsql question Tim Perdue <tim@perdue.net>
Re: pl/pgsql question Tom Lane <tgl@sss.pgh.pa.us>
Re: pl/pgsql question Ludwig Lim <lud_nowhere_man@yahoo.com>
Re: pl/pgsql question Tim Perdue <tim@perdue.net>
Re: pl/pgsql question "Josh Berkus" <josh@agliodbs.com>
Re: pl/pgsql question Tim Perdue <tim@perdue.net>
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
В списке pgsql-sql по дате отправления