Re: PostgreSQL trigger on user logon

From: Steve Midgley <science(at)misuse(dot)org>
To: Kevin Tu <kevintu888(at)gmail(dot)com>
Cc: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL trigger on user logon
Date: 2022-03-18 19:58:02
Message-ID: CAJexoS+tj=HNSs2N1trTM0CRS2y4xsAt-5tLsGdvQbmvDmepqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Mar 18, 2022 at 7:47 AM Kevin Tu <kevintu888(at)gmail(dot)com> wrote:

> Hi team,
>
> We're switching over from Oracle to PostgreSQL, and apologies in advance
> if this is too newbie a question, but can we write a trigger in Posgres to
> record user logon for audit purposes? I'd thought there would be some
> "after/before logon trigger" that'll achieve this, but I've been googling
> around to no avail.
>
> This was discussed here last year. The net-net is to use this plugin:
https://github.com/splendiddata/login_hook

There were other options discussed - you can browse the thread here:
https://www.postgresql.org/message-id/CAN0SRDFZ-cDbuiu-_8oA4W1pU_oYkksydj8f2o7%2BO7XUwUfN4w%40mail.gmail.com

Hopefully that helps!
Steve

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Laurenz Albe 2022-03-18 22:48:41 Re: How to explicitly lock and unlock tables in pgsql?
Previous Message Merlin Moncure 2022-03-18 16:38:21 Re: How to explicitly lock and unlock tables in pgsql?