I have to create postgresql user in postgresql 9.0 and give grant on my database xxx and whose all log of insert and update operation should be stored in one external log file so that i can have all information about his operations performed on my database. How i can achieved this in my postgresql 9.0. please suggest me any way.
1 Answer
Have a look at the Postgresql wiki page where there are comprehensive examples of audit mechanisms for both Postgresql 9.0 and 9.1+
- PG 9.0: https://wiki.postgresql.org/wiki/Audit_trigger
- PG 9.1+: https://wiki.postgresql.org/wiki/Audit_trigger_91plus, with more code from Craig Ringer at https://github.com/2ndQuadrant/audit-trigger
auditing
. What have you learned about auditing so far?