Обсуждение: Adding modified and creation datetime to system catalogs

Поиск
Список
Период
Сортировка

Adding modified and creation datetime to system catalogs

От
Thom Brown
Дата:
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

Re: Adding modified and creation datetime to system catalogs

От
Tom Lane
Дата:
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

Re: Adding modified and creation datetime to system catalogs

От
Thom Brown
Дата:

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