Re: Trigger function that works with both updates and deletes?

Поиск
Список
Период
Сортировка
Искать
От
Harvey, Allan AC
Тема
Re: Trigger function that works with both updates and deletes?
Дата
Msg-id
E97A5BB7699CAD48BE2711E7124711656F2DC9@ntlmsg03.onesteel.com
Ответ на
Список
Дерево обсуждения
Trigger function that works with both updates and deletes? novnov <novnovice@gmail.com>
Re: Trigger function that works with both updates and deletes? Michael Fuhr <mike@fuhr.org>
Re: Trigger function that works with both updates and deletes? novnov <novnovice@gmail.com>
Re: Trigger function that works with both updates and deletes? "Harvey, Allan AC" <HarveyA@OneSteel.com>
> Second, while I could write two trigger functions, one dealing with
> add/update, the other with deletes, it's probably neater to 
> have a single
> trigger function and have it discriminate "am I being called 
> for a delete,
> or an add/update?" I don't know how to determine the type 
> record change.
I use trigger arguments and determine what to do by:

        if TG_ARGV[0] = 'value'
        then
            ....
        end if;

Allan


The material contained in this email may be confidential, privileged or copyrighted. If you are not the intended recipient, use, disclosure or copying of this information is prohibited. If you have received this document in error, please advise the sender and delete the document. Neither OneSteel nor the sender accept responsibility for any viruses contained in this email or any attachments.
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: pg_restore out of memory
От: Steve Atkins
Дата:
FAQ