Skip site navigation (1) Skip section navigation (2)

logging table changes

From: Matthias Leopold <matthias(at)aic(dot)at>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: logging table changes
Date: 2010-09-09 09:53:15
Message-ID: 4C88AE8B.6060102@aic.at (view raw or flat)
Thread:
Lists: pgsql-novice
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

Responses

pgsql-novice by date

Next:From: Henk van LingenDate: 2010-09-09 14:40:02
Subject: Re: Forcing the right queryplan
Previous:From: Josh KupershmidtDate: 2010-09-08 19:20:50
Subject: Re: Postgresql security checks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group