| From: | Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> |
|---|---|
| To: | anand086 <anand086(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Audit based on role |
| Date: | 2017-08-08 10:57:40 |
| Message-ID: | 20170808105740.GA1830@zakirov.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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 that? I was thinking to write something
> like https://wiki.postgresql.org/wiki/Audit_trigger, but I am not sure on
> how to integrate "user whose has module_dml role granted" into the function.
>
> Instead of trigger is there any better way to achieve this?
>
Did you try pgaudit extension?
https://github.com/pgaudit/pgaudit
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ertan Küçükoğlu | 2017-08-08 14:56:04 | ZeosLib database components - uuid inserts using libpq |
| Previous Message | pinker | 2017-08-08 10:07:00 | Re: Audit based on role |