Adding modified and creation datetime to system catalogs

Started by Thom Brownover 16 years ago3 messagesgeneral
Jump to latest
#1Thom Brown
thombrown@gmail.com

I was looking around for ways to find out the creation date of a database or
a table, but there doesn't appear to be any functions or available metadata
to provide this information. Unless there's a way I haven't seen yet, does
anyone see any problem with adding a creationdatetime and modifieddatetime
column to catalogs such as pg_database and pg_tables (but also maybe
pg_views, pg_language, pg_type etc)? Or should this be stored separately
with oids indices with associated datetiimes? I imagine it would be useful,
and I've seen this on other RDBMS' (except for modified date and time).

An example of where I was intending to use this a short while ago was to get
a list of tables and sort them by date created to review the oldest tables
for relevance.

Hopefully my suggestion is completely unnecessary and there will already be
a way to identify these pieces of information.

Thanks

Thom

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thom Brown (#1)
Re: Adding modified and creation datetime to system catalogs

Thom Brown <thombrown@gmail.com> writes:

I was looking around for ways to find out the creation date of a database or
a table, but there doesn't appear to be any functions or available metadata
to provide this information. Unless there's a way I haven't seen yet, does
anyone see any problem with adding a creationdatetime and modifieddatetime
column to catalogs such as pg_database and pg_tables (but also maybe
pg_views, pg_language, pg_type etc)?

This has been proposed before, and rejected before, many times. Please
see the archives.

regards, tom lane

#3Thom Brown
thombrown@gmail.com
In reply to: Tom Lane (#2)
Re: Adding modified and creation datetime to system catalogs

This has been proposed before, and rejected before, many times. Please
see the archives.

regards, tom lane

I couldn't find any record of this being mentioned before when I had a look
before writing my message, but I'll take your word for it.

Thanks

Thom