transparently log a right error

Поиск
Список
Период
Сортировка
От Jean-Yves F. Barbier
Тема transparently log a right error
Дата
Msg-id 4B0EA525.8040402@gmail.com
обсуждение исходный текст
Ответы Re: transparently log a right error  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
Hi list,

How could I transparently log an error where user miss a right,
I know how to write a RULE, but not this way:

ie:
* user don't have a direct access to tables but to procedures that
   manipulates tables.

* He try to make a: SELECT * FROM table5
   which normally returns: "ERROR: right refused for relation table5"

* I wanna log the user's name into a separate table, but still
   having PG reporting the usual error (NOT using regular logs)

something like:
INSERT INTO security.crime(default, session_user, 'SELECT', 'table5');

Of course, if it could be generic, it would be better :)

JY
--
No one born with a mouth and a need is "innocent".
        -- Greg Bear

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How are blobs (oid) stored?
Следующее
От: Jérôme Etévé
Дата:
Сообщение: Re: How are blobs (oid) stored?