Re: Why is there no object create date is the catalogs?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Why is there no object create date is the catalogs?
Дата
Msg-id 20150512201412.GO2523@alvh.no-ip.org
обсуждение исходный текст
Ответ на Why is there no object create date is the catalogs?  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
Melvin Davidson wrote:
> 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.

But why -- you can implement that using event triggers.  See the
pg_event_trigger_ddl_commands() function in the docs.
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=b488c580aef4e05f39be5daaab6464da5b22a494
http://www.postgresql.org/docs/devel/static/event-trigger-definition.html

... oh, the facility is only two days old, I forgot.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-general по дате отправления:

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Why is there no object create date is the catalogs?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Why is there no object create date is the catalogs?