Matthias Leopold wrote:
> hi,
>
> how can i "easily" log changes to individual fields in a table without
> naming these fields explicitly? i looked at the auditing example in
> http://www.postgresql.org/docs/8.3/static/plpgsql-trigger.html, which
> looks promising, but i can't think of a way to "easily" query the table
> when i want to know when a certain field changed. i was thinking of
> adding a field in the audit table which contains the names of all the
> fields which changed, but i don't know who to "easily" get these names.
> for some reason i think that there might already exist well known
> solutions for my problem so i dare to ask here.
>
> thx for advice
>
> matthias
>
>
Postgres 9.0 will allow you to execute trigger only when the column of
your choice is changed:
http://www.postgresql.org/docs/9.0/static/sql-createtrigger.html
Look at the "WHEN" part.
--
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com
The Leader in Integrated Media Intelligence Solutions