Re: Triggers and Audit Trail

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Triggers and Audit Trail
Дата
Msg-id 20051229180137.GA53292@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Triggers and Audit Trail  (Jeff Amiel <jamiel@istreamimaging.com>)
Список pgsql-general
On Thu, Dec 29, 2005 at 11:44:26AM -0600, Jeff Amiel wrote:
> >Using triggers, is there a way to loop through the fields of the OLD
> >and NEW records? I haven't found a generic way to get the field name
> >and value that triggered the update other than hard coding if
> >statements to compare every field of the OLD and NEW records.
>
> We (my company) never found a way.  We ended up writing java code that
> analyzed the catalog tables that generated the appropriate 'if'
> statements in the trigger functions  for us....

As far as I know you can't do this yet in PL/pgSQL, but you can in
other languages like PL/Perl and PL/Tcl.

--
Michael Fuhr

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

Предыдущее
От: Jeff Amiel
Дата:
Сообщение: Re: Triggers and Audit Trail
Следующее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: how to add a new column to system table