Postgres的预审系统?

How to implement pre-audit system for a web-app? I mean when the data changes made by regular users are saved for review and only after that they can be applied (or rejected) to main tables.
How to organize and keep in sync relations between data table and preliminary table, when the table name is changed for example, or worse, table structure?
How to validate submitted data for constraints?
Is there something similar that I can use, or read about?