Re: pl/pgsql question

Поиск
Список
Период
Сортировка
От Tim Perdue
Тема Re: pl/pgsql question
Дата
Msg-id 3E008003.1030402@perdue.net
обсуждение исходный текст
Ответ на Re: pl/pgsql question  (Ludwig Lim <lud_nowhere_man@yahoo.com>)
Ответы Re: pl/pgsql question  ("Josh Berkus" <josh@agliodbs.com>)
Список 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: Christoph Haller
Дата:
Сообщение: Re: Dynamic sql program using libpq
Следующее
От: dnaren@hss.hns.com
Дата:
Сообщение: Error code for database down