Skip to content

Toronto-Big-Data-Innovation-Team/bdit_audit-trigger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PostgreSQL Audit Triggers

We have tables that might change regularly. We want to automate storing the changes to these tables, hence an audit table and an audit trigger. Based on Audit_trigger_91plus with some improvements from pg-audit-trigger.

How to use it

We currently have this set up in the gis schema. To see which tables are being logged SELECT * FROM gis.audited_tables_list.

To start logging a table run SELECT gis.audit_table('gis.table_name').

Any change to a tables' rows (INSERT, DELETE, UPDATE, TRUNCATE) will be stored in gis.logged_actions, including the timestamp of the action, the action, and the data stored before the operation.

About

Simple, easily customised trigger-based auditing for PostgreSQL (Postgres). See also pgaudit.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PLpgSQL 100.0%