Search Postgresql Archives

transparently log a right error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux