I'm attempting to audit a PostgreSQL database and found this blog here to accomplish this http://doublebyteblog.wordpress.com/2014/02/11/quick-guide-to-auditing-a-postgresql-database/comment-page-1/#comment-114
Everything works as per the post. The only thing missing is the query to create the sp procedure to monitor every table in the database. Towards the end the author has this
CREATE TRIGGER fr_frame_audit
AFTER INSERT OR UPDATE OR DELETE ON fr_frame
FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func();
In the example above, I created a trigger for auditing table ‘fr_frame’ (of course you can create a sp procedure to generate these statements, if you want to generate a trigger for auditing every table in the database…
Can someone help me with creating the sp procedure to monitor every table?