Re: trigger function in plpgsql (newbie)

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: trigger function in plpgsql (newbie)
Дата
Msg-id Pine.BSF.4.21.0110281000510.76258-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на trigger function in plpgsql (newbie)  (Gunnar Lindholm <gunnar@gunix.mine.nu>)
Список pgsql-general
On Sun, 28 Oct 2001, Gunnar Lindholm wrote:

> create trigger trigger_happy AFTER INSERT ON  T2
>     for each ROW EXECUTE PROCEDURE func_cal();

I think the only problem is that you want a BEFORE INSERT trigger, not
an AFTER INSERT trigger (before triggers can modify the row that is
inserted directly, since the row hasn't been inserted yet).  You may
also want to consider doing this for UPDATE as well since otherwise
the v1*v2 value won't be updated unless you do it manually.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: trigger function in plpgsql (newbie)
Следующее
От: Peter Pilsl
Дата:
Сообщение: Re: function given current output-row