Re: Help with tracking!

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Help with tracking!
Дата
Msg-id 4BCBEFAC.3050502@postnewspapers.com.au
обсуждение исходный текст
Ответ на Help with tracking!  (Đỗ Ngọc Trí Cường<seminoob@gmail.com>)
Ответы Re: Help with tracking!  (Yeb Havinga <yebhavinga@gmail.com>)
Re: Help with tracking!  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
Đỗ Ngọc Trí Cường wrote:
> Dear all,
>
> I've a problem but I search all the help file and can't find the solution.
>
> I want to track all action of a specify role on all or one schema in
> database.
>
> Can you help me?

You can use statement-level logging, though there are no facilities in
statement-level logging to restrict what is logged to only one role's
activity.

You can use the usual audit triggers on database tables, which is what I
would recommend. Audit triggers in PostgreSQL cannot track reads
(SELECTs), only INSERT/UPDATE/DELETE and in 8.4 also TRUNCATE. They
cannot track ALTER/RENAME/DROP table, changes to sequences, etc. It is
trivial to write an audit trigger that only records anything when a user
is a member of a particular role.

--
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

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

Предыдущее
От: Đỗ Ngọc Trí Cường
Дата:
Сообщение: Help with tracking!
Следующее
От: Yeb Havinga
Дата:
Сообщение: Re: Help with tracking!