Re: Field collection in trigger

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Josué Maldonado <josue(at)lamundial(dot)hn>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Field collection in trigger
Date: 2003-09-01 19:33:09
Message-ID: m365kcb8y2.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Josué Maldonado <josue(at)lamundial(dot)hn> writes:

> Hello list,
>
> First of all, excuse me if this is not the right place to ask my question.
>
> Is there a way in postgresql to loop to all the fields of a given
> table and compare the OLD and NEW value for each field. I need to make
> an audit table that must contain only the fields changed after and
> insert/update.

You should be able to do this in a Perl or C trigger. It can't be
done in PL/pgSQL without writing a custom trigger for each table that
hard-codes all the field names.

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2003-09-01 19:42:32 Re: delivering database stand-alone
Previous Message Josué Maldonado 2003-09-01 19:24:11 Field collection in trigger