From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "hamann(dot)w(at)t-online(dot)de" <hamann(dot)w(at)t-online(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Table create time |
Date: | 2017-08-31 14:54:37 |
Message-ID: | CAB7nPqSbc4beiR2zMwqjT0aVmXCMjiddSGQ+8jKw-CuMYSwHuA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Aug 31, 2017 at 10:21 PM, Melvin Davidson <melvin6925(at)gmail(dot)com> wrote:
> Wolfgang, as David said, a column in pg_class for the creation time of a table does not exist. I long ago requested that feature as it is
> in other DB's (Oracle & MS SQL Server), but the main reason that it was not done was that no one was interested in doing it.
Is there any need for a column in pg_class for that? You could just
create an event trigger looking for CREATE TABLE as filter_value:
https://www.postgresql.org/docs/9.6/static/sql-createeventtrigger.html
And then have this event trigger just save the timestamp value of
now() in a custom table with the name and/or OID of the relation
involved.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-08-31 15:19:19 | Re: Table create time |
Previous Message | Achilleas Mantzios | 2017-08-31 13:45:28 | Re: Table create time |