Re: Why is there no object create date is the catalogs? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Why is there no object create date is the catalogs?
Date
Msg-id 20150512201412.GO2523@alvh.no-ip.org
Whole thread Raw
In response to Why is there no object create date is the catalogs?  (Melvin Davidson <melvin6925@gmail.com>)
List 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 by date:

Previous
From: Melvin Davidson
Date:
Subject: Why is there no object create date is the catalogs?
Next
From: Adrian Klaver
Date:
Subject: Re: Why is there no object create date is the catalogs?