Re: user creation time for audit

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: "Boyapalli, Kousal" <Kousal(dot)Boyapalli(dot)ext(at)uniper(dot)energy>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: user creation time for audit
Date: 2021-08-30 09:08:52
Message-ID: CAOBaU_Z7ExjLRQ_x5LEFRChS+vwX4X6zODZEt5Bw_zMp79H9jg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 30, 2021 at 4:43 PM Boyapalli, Kousal
<Kousal(dot)Boyapalli(dot)ext(at)uniper(dot)energy> wrote:
>
> We are looking for the user creation date
>
> Tried from both from pg admin and psql by using
>
> select * from pg_catalog.pg_user and /du, /du+ we were able to get the users but is there a way where we can get the creation date

Postgres doesn't keep track of object creation date. There are
multiple discussions about that in the mailing-list archives if you're
interested but mostly the reason is that it's not clear that a single
creation date would suits everyone's need (for instance when doing
backup/restore, should the creation date be reset or not?).

The easy way around that is to track those events yourself with the
rules that suit your needs, which can be done easily using an event
trigger.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vijaykumar Jain 2021-08-30 09:23:52 Re: user creation time for audit
Previous Message Boyapalli, Kousal 2021-08-30 08:21:32 RE: user creation time for audit