Re: modifying new tuple on insert in c trigger

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: modifying new tuple on insert in c trigger
Дата
Msg-id m3lm3ojqxs.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на modifying new tuple on insert in c trigger  ("Damjan Pipan" <damjan.pipan@siol.net>)
Список pgsql-general
"Damjan Pipan" <damjan.pipan@siol.net> writes:

> Hello!
>
> I'm trying to write a c trigger function which would change an
> attribute of tuple being inserted. I have read this value
> from some other table and now I have a problem, because
> even if I change the tuple with SPI_modifytuple and return
> modified tuple it does not show in db (it did not change the tuple)
> but tuple is inserted.

Is it a BEFORE or AFTER trigger?  If it's modifying the inserted tuple
it needs to be BEFORE.

-Doug

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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: Bug with sequence
Следующее
От: Çagil Seker
Дата:
Сообщение: Re: Bug with sequence