transparently log a right error - Mailing list pgsql-general

From Jean-Yves F. Barbier
Subject transparently log a right error
Date
Msg-id 4B0EA525.8040402@gmail.com
Whole thread Raw
Responses Re: transparently log a right error
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: How are blobs (oid) stored?
Next
From: Jérôme Etévé
Date:
Subject: Re: How are blobs (oid) stored?