| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера