Re: Trigger and arguments question

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Trigger and arguments question
Дата
Msg-id 4296E675.2090701@magproductions.nl
обсуждение исходный текст
Ответ на Trigger and arguments question  (Hervé Inisan <typo3@self-access.com>)
Ответы Re: Trigger and arguments question  (Hervé Inisan <typo3@self-access.com>)
Список pgsql-general
Hervé Inisan wrote:
> Hi everybody!
>
> I have a trigger like this:
>
> CREATE TRIGGER mytrigger
>    AFTER INSERT OR UPDATE OR DELETE
>    ON myschema.mytable
>    FOR EACH ROW
>    EXECUTE PROCEDURE myschema.myfunction(myarg);
>
> It sends an argument to myfunction(), and I can retrieve this value in
> TG_ARGV[0]. Fine.
> What I'm trying to do is using TG_ARGV[0] to point to a field in NEW or OLD.
> Is it possible?

You'll be missing OLD and NEW on INSERT and DELETE respectively, I'm
afraid. You may want to split your triggers for different events.

--
Alban Hertroys
MAG Productions

T: +31(0)53 4346874
F: +31(0)53 4346876
E: alban@magproductions.nl
W: http://www.magproductions.nl


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

Предыдущее
От: Douglas McNaught
Дата:
Сообщение: Re: Visual Studio 2005 .Net -> Npgsql -> Postgresql
Следующее
От: Nageshwar Rao
Дата:
Сообщение: relocation error-urgent