Re: Last updated time for a Schema of the table

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: paras paliya <paliya(dot)paras(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Last updated time for a Schema of the table
Date: 2020-11-02 12:36:23
Message-ID: 20201102123623.GA2821@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 02, 2020 at 03:23:06PM +0530, paras paliya wrote:
> I need the last updated time or alter time of the table. Like changing the
> column name or adding/deleting a column. Is there any table or view from
> which I can get?

PostgreSQL doesn't keep that information.

You can:
1. set log_statement to ddl (or more) to log all schema changes
2. use event triggers to do whatever you want at the time of change.

Best regards,

depesz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sean McDaniel 2020-11-02 17:37:26 Re: GSSAPI Authentication for pgadmin4 macOS client
Previous Message PALAYRET Jacques 2020-11-02 11:31:25 Re: Last updated time for a Schema of the table