Last updated time for a Schema of the table
Hi All,
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?
Thanks,
Paras
Hello,
I don't think so, as far as I know.
But, you can put in place some triggesr to do that.
i.e. https://www.postgresql.org/docs/13/plpgsql-trigger.html https://wiki.postgresql.org/wiki/Audit_trigger
and so on
Regards
De: "paras paliya" <paliya.paras@gmail.com>
À: pgsql-general@postgresql.org
Envoyé: Lundi 2 Novembre 2020 10:53:06
Objet: Last updated time for a Schema of the table
Hi All,
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?
Thanks,
Paras
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