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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why is there no object create date is the catalogs?
Date: 2015-05-12 20:14:12
Message-ID: 20150512201412.GO2523@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-05-12 21:53:25 Re: Why is there no object create date is the catalogs?
Previous Message Melvin Davidson 2015-05-12 19:51:57 Why is there no object create date is the catalogs?