Re: Proposal: Store "timestamptz" of database creation on "pg_database" - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: Store "timestamptz" of database creation on "pg_database"
Date
Msg-id 1035.1356581634@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: Store "timestamptz" of database creation on "pg_database"  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Proposal: Store "timestamptz" of database creation on "pg_database"  (Stephen Frost <sfrost@snowman.net>)
Re: Proposal: Store "timestamptz" of database creation on "pg_database"  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Re: Proposal: Store "timestamptz" of database creation on "pg_database"  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Re: Proposal: Store "timestamptz" of database creation on "pg_database"  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Josh Berkus (josh@agliodbs.com) wrote:
>> On 12/26/12 4:48 PM, Fabr�zio de Royes Mello wrote:
>>> This proposal is about add a column "datcreated" on "pg_database" to store
>>> the "timestamp" of the database creation.

>> I agree that it would be useful.  However, if we're going to get
>> into created dates, we should at least consider adding them to the
>> other catalogs, particularly pg_class.

> I was thinking more-or-less the same thing.

This has been debated, and rejected, before.

To mention just one problem, are we going to add nonstandard,
non-backwards-compatible syntax to every single kind of CREATE to allow
pg_dump to preserve the creation dates?  Another interesting question is
whether we should likewise track the last ALTER time, or perhaps whether
a sufficiently major ALTER redefinition should update the creation time.

I'm inclined to think that anyone who really needs this should be
pointed at event triggers.  That feature (if it gets in) will allow
people to track creation/DDL-change times with exactly the behavior
they want.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: buffer assertion tripping under repeat pgbench load
Next
From: Stephen Frost
Date:
Subject: Re: Proposal: Store "timestamptz" of database creation on "pg_database"