Re: Adding ddl audit trigger

Поиск
Список
Период
Сортировка
От Lawrence Cohan
Тема Re: Adding ddl audit trigger
Дата
Msg-id 965AA5440EAC094E9F722519E285ACED725C0B992A@WWCEXCHANGE.web.web.com
обсуждение исходный текст
Ответ на Re: Adding ddl audit trigger  (Scott Marlowe <scott.marlowe@gmail.com>)
Ответы Re: Adding ddl audit trigger
Список pgsql-general
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. 


Many thanks for the suggestion,
Lawrence Cohan.

-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@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 <LCohan@web.com> 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 set by user, db, or for the whole cluster in postgresql.conf.

You can use the log_line_prefix to see what user did what to which
database.  Then you can just grep for alter / create / drop etc. and
see what's happened.  not as slick or elegant as ddl triggers, but at
least it's there.

Attention:
The information contained in this message and or attachments is intended only for the person or entity to which it is
addressedand may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other
useof, or taking of any action in reliance upon, this information by persons or entities other than the intended
recipientis prohibited. If you received this in error, please contact the sender and delete the material from any
systemand destroy any copies. 

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: resizing a varchar column on 8.3.8
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Adding ddl audit trigger