How to implement Auditing/versioning of Table Modifications on PostgreSQL How to implement Auditing/versioning of Table Modifications on PostgreSQL database database

How to implement Auditing/versioning of Table Modifications on PostgreSQL


I would have a copy of each table to hold the versions of that table you wish to keep. It sounds like a bit of a nightmare to maintain and use a global versioning table.

This link in the Postgres documentation shows some audit trigger examples in Postgres.


In global table all columns can be stored in single column as hstore type. I just tried audit and I it is works great, I recommend it. Awesome audit table example tracks all changes in single table by simply adding a trigger onto the tables you want to begin to keep audit history on. all changes are stored in as hstore type- works for v 9.1+ this link