You just need to log DDL, correct?
Why not just edit postgres.conf and set log_statement to 'ddl'.
See http://www.postgresql.org/docs/9.0/static/runtime-config-logging.html
If you need to include username, database, etc, take a look at
log_line_prefix on the same page.
Ken
On Wed, Jan 26, 2011
We'll do that - thanks again.
-Original Message-
From: Scott Marlowe [mailto:scott.marl...@gmail.com]
Sent: January-27-11 3:58 PM
To: Lawrence Cohan
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Adding ddl audit trigger
On Thu, Jan 27, 2011 at 1:47 PM, Lawrence Cohan
On Thu, Jan 27, 2011 at 1:47 PM, Lawrence Cohan wrote:
> That should do it for our dev environment however on production systems it
> would be a little bit harder (quite a few hops/approval/restore) to get to
> and grep the log files.
Sounds like you need a process to scrub logs and ship them o
...@gmail.com]
Sent: January-27-11 3:31 PM
To: Lawrence Cohan
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Adding ddl audit trigger
On Wed, Jan 26, 2011 at 2:29 PM, Lawrence Cohan wrote:
> Trying to get some DDL auditing in a development environment by adding
> triggers to pg_proc, pg
On Wed, Jan 26, 2011 at 2:29 PM, Lawrence Cohan wrote:
> 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:
Yep, can't do it just yet. For now you've got
log_statement='ddl';
which can be
guilla...@lelarge.info (Guillaume Lelarge) writes:
> Le 26/01/2011 23:13, Tom Lane a écrit :
>> Guillaume Lelarge writes:
>>> Le 26/01/2011 22:29, Lawrence Cohan a écrit :
All I need is to at least be able and save a userid(current_user),
>>> timestamp, action, and the name of the object and
@postgresql.org
Subject: Re: [GENERAL] Adding ddl audit trigger
Le 26/01/2011 23:13, Tom Lane a écrit :
> Guillaume Lelarge writes:
>> Le 26/01/2011 22:29, Lawrence Cohan a écrit :
>>> All I need is to at least be able and save a userid(current_user),
>>> timestamp, action, and the
Hello
2011/1/26 El Co :
> 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 ac
Le 26/01/2011 23:13, Tom Lane a écrit :
> Guillaume Lelarge writes:
>> Le 26/01/2011 22:29, Lawrence Cohan a écrit :
>>> 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 th
Guillaume Lelarge writes:
> Le 26/01/2011 22:29, Lawrence Cohan a écrit :
>> 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.
> Nope, sorry. You can't add
Le 26/01/2011 22:29, Lawrence Cohan a écrit :
> 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 ther
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
ne
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
13 matches
Mail list logo