Why is there no object create date is the catalogs?

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Why is there no object create date is the catalogs?
Date: 2015-05-12 19:51:57
Message-ID: CANu8FizWg8GMSmm_d8X0B6uYi7o535f3vqMD3nqFXqrrYB6huA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can anyone tell me why there is no "relcreated" column in pg_class to track
the creation date of an object?

It seems to me it would make sense to have one as it would facilitate
auditing of when objects are created. In addition, it would also facilitate
the dropping of objects that have exceeded a certain age.

EG: SELECT 'DELETE TABLE ' || relname || ';'
FROM pg_class
WHERE relkind = 'r'
AND relcreated > current_timestamp - INTERVAL ' 1 year';

Adding that column should be relatively easy and would not break backwards
compatiblity with previous versions.
--
*Melvin Davidson*

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2015-05-12 20:14:12 Re: Why is there no object create date is the catalogs?
Previous Message William Dunn 2015-05-12 19:02:36 Re: finding tables about to be vacuum freezed