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

From Peter Eisentraut
Subject Re: Proposal: Store "timestamptz" of database creation on "pg_database"
Date
Msg-id 50E591C9.50907@gmx.net
Whole thread Raw
In response to Re: Proposal: Store "timestamptz" of database creation on "pg_database"  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: Proposal: Store "timestamptz" of database creation on "pg_database"
Re: Proposal: Store "timestamptz" of database creation on "pg_database"
List pgsql-hackers
On 1/2/13 11:08 PM, Fabrízio de Royes Mello wrote:
> The attached patch add a new column into 'pg_database' called
> 'datcreated' to store the timestamp of database creation.
>
> If this feature is approved I could extend it to add a column into
> 'pg_class' to store creation timestamp too.

While I'm entirely in favor of this feature in general, I think this is
the wrong way to approach it.  It will end up like the CREATE OR REPLACE
support: We add it for a few commands in one release, for a few more
commands in the next release, for almost all commands in the following
release, and now we're still not done.

If we're going to store object creation time, I think we should do it
for all objects, stored in a separate catalog, like pg_depend or
pg_description, keyed off classid, objectid.  And have a simple C
function to call to update the information stored there.

That would also make storing the modification time, which I'd ask for
next, easier.




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: Proposal: Store "timestamptz" of database creation on "pg_database"
Next
From: Robert Haas
Date:
Subject: Re: pg_retainxlog for inclusion in 9.3?