Adding ddl audit trigger - Mailing list pgsql-general

From El Co
Subject Adding ddl audit trigger
Date
Msg-id 702620.23587.qm@web111404.mail.gq1.yahoo.com
Whole thread Raw
Responses Re: Adding ddl audit trigger
Re: Adding ddl audit trigger
List pgsql-general

Trying to get some DDL auditing in a development environment by adding triggers to pg_proc, pg_class,pg_type,pg_trigger and getting the following error:

 

ERROR: permission denied: "pg_proc" is a system catalog

SQL state: 42501

 

Is there any way to achieve DDL auditing in Postgres and trace any new/dropped/changed object into a table? All I need is to at least be able and save a userid(current_user), timestamp, action, and the name of the object and this could be done easily by adding triggers to these pg catalogs.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting the name of the timezone, adjusted for daylight saving
Next
From: Lawrence Cohan
Date:
Subject: Adding ddl audit trigger