From: hubert depesz lubaczewski <depesz@depesz.com>
To: paras paliya <paliya.paras@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Last updated time for a Schema of the table
Date: Mon, 2 Nov 2020 13:36:23 +0100
Message-ID: <20201102123623.GA2821@depesz.com> (raw)
In-Reply-To: <CABXYxWnKgb6QLgo_9siBQwJpME-ouJqhzDcUsCvsM4dA+K7Bzw@mail.gmail.com>
References: <CABXYxWnKgb6QLgo_9siBQwJpME-ouJqhzDcUsCvsM4dA+K7Bzw@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: depesz@depesz.com, paliya.paras@gmail.com
Subject: Re: Last updated time for a Schema of the table
In-Reply-To: <20201102123623.GA2821@depesz.com>
References: <CABXYxWnKgb6QLgo_9siBQwJpME-ouJqhzDcUsCvsM4dA+K7Bzw@mail.gmail.com> <20201102123623.GA2821@depesz.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox