Skip site navigation (1) Skip section navigation (2)

Re: trigger ddl actions in a table

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: trigger ddl actions in a table
Date: 2007-11-15 15:38:28
Message-ID: 20071115153828.GF20228@crankycanuck.ca (view raw or flat)
Thread:
Lists: pgsql-admin
On Thu, Nov 15, 2007 at 04:29:51PM +0100, "König, Monika" wrote:
> I can see all ddl in my log files, but 
> 	- there are even the errors in and 
> 	- i can't use it for a select

There are logging options that should allow you to collect the DDL and then
parse it.  You could then load it into a table.  But to answer your
question,

> Is there an possibility for having such an system-action table??

you cannot today have triggers on system tables, and AFAIK nobody has
contributed a DDL-audit capability yet.  IMO the safest (i.e. least subject
to attack) way to do this would be to pull it out of the WAL on another
machine.  Given that we already have PITR, the data must be in there (maybe
not with a wallclock time, but with relative time).  It seems this is
something that could be added, if someone were to do the work.  I am not
aware that anyone is doing it at the moment, but I bet there are developers
who will work for sponsorship :)

A

-- 
Andrew Sullivan
Old sigs will return after re-constitution of blue smoke

In response to

pgsql-admin by date

Next:From: Andrew SullivanDate: 2007-11-15 15:39:52
Subject: Re: functions pg_get...
Previous:From: Campbell, LanceDate: 2007-11-15 15:37:47
Subject: Re: cached memory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group