Re: get last timestamp of table ddl

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: get last timestamp of table ddl
Date: 2021-11-24 14:29:58
Message-ID: 43b5097e-7a30-fc99-bdb4-1420cf3ef388@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 24/11/21 3:53 μ.μ., Luca Ferrari wrote:
> Hi all,
> I think I already know the answer, however I came across this table in
> Oracle <https://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2005.htm#i1583352>
> that has two columns that triggered my attention: CREATED and
> LAST_DDL_TIME.
That would be handy .. :(
> Apart from being dates (in the Oracle way), they store the time of
> creation and last modification to the table structure.
> I don't have any particular use case except from blaming someone about
> a change in the database structure, however I'm curious: is there a
> smarter way to achieve this in PostgreSQL than simply relying on logs
> and commit timestamps?
You mean like trying to correlate pg_class.xmin with some timestamp via track_commit_timestamp or other means?
>
> Luca
>
>

--
Achilleas Mantzios
DBA, Analyst, IT Lead
IT DEPT
Dynacom Tankers Mgmt

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aleš Zelený 2021-11-24 16:47:40 RPM package issue
Previous Message hubert depesz lubaczewski 2021-11-24 14:10:27 Re: How to set alias data type?