Thank you all for your input.
We plan to use ALTER USER username SET log_statement = mod when the user
account is created.
Regards,
Anand
--
View this message in context:
http://www.postgresql-archive.org/Audit-based-on-role-tp5976507p5977104.html
Sent from the PostgreSQL - general mailing l
On 08/07/2017 06:59 PM, Melvin Davidson wrote:
> *You can tweak the following query to help you determine if your user is
> a member of role/group 'module_dml'.
> *
> *Then you can use it in a trigger function that does the logging.
>
> SELECT g.rolname as group,
>u.rolname as user,
>
Hello,
On Mon, Aug 07, 2017 at 04:33:21PM -0700, anand086 wrote:
> Hi,
>
> I am postgres newbie.
>
> We are running Postgres 9.6.3 version and have requirement, where we want to
> audit any DML action performed by a user whose has module_dml role granted.
>
> What would be the best way to do
Hi,
I personally don't like the solution from
https://wiki.postgresql.org/wiki/Audit_trigger and here are the reasons why:
* it produces a large table where all the changes, from all tables and
schemas go - audit.logged_actions. So when you would like to read it to
check anything it will be super s
*You can tweak the following query to help you determine if your user is a
member of role/group 'module_dml'.*
*Then you can use it in a trigger function that does the logging.SELECT
g.rolname as group, u.rolname as user, r.admin_option as
admin, g.rolsuper as g_supe
On 08/07/2017 04:47 PM, anand086 wrote:
> Only Insert/Update/Delete sqls are to be audited.
You could get close to what you want, I think, by setting log_statement
= mod for the users of interest, e.g. by doing:
ALTER USER whomever SET log_statement = mod;
See:
https://www.postgresql.org/docs
Only Insert/Update/Delete sqls are to be audited.
--
View this message in context:
http://www.postgresql-archive.org/Audit-based-on-role-tp5976507p5976509.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-general@postgr
On 8/7/2017 4:33 PM, anand086 wrote:
We are running Postgres 9.6.3 version and have requirement, where we want to
audit any DML action performed by a user whose has module_dml role granted.
What would be the best way to do that? I was thinking to write something
likehttps://wiki.postgresql.org/w
Hi,
I am postgres newbie.
We are running Postgres 9.6.3 version and have requirement, where we want to
audit any DML action performed by a user whose has module_dml role granted.
What would be the best way to do that? I was thinking to write something
like https://wiki.postgresql.org/wiki/Audi