Re: Proposal: Store "timestamptz" of database creation on "pg_database"

Bernd Helmle <mailings@oopsware.de>

From: Bernd Helmle <mailings@oopsware.de>
To: Robert Haas <robertmhaas@gmail.com>, Stephen Frost <sfrost@snowman.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Josh Berkus <josh@agliodbs.com>, pgsql-hackers@postgresql.org
Date: 2013-01-03T10:28:15Z
Lists: pgsql-hackers

--On 2. Januar 2013 23:04:43 -0500 Robert Haas <robertmhaas@gmail.com> 
wrote:

> TBH, I don't think anyone has any business changing the creation
> timestamp.  Ever.  For me, the fact that pg_dump wouldn't preserve
> this information would be a feature, not a bug.  I mostly meant to
> point out that someone could bypass it if they cared enough, not to
> recommend it.  Honestly, I'd probably *rather* store this information
> someplace where it couldn't be changed via SQL *at all*.  But I don't
> think we have such a place, so I'm happy enough to store it in the
> catalogs, with the associated risks of catalog hackery that entails.

This is exactly what Informix does, it stores creation or modification 
dates of a table in its system catalog (systables.created, to be specific). 
Any export/import of tables doesn't preserve the dates, if you restore a 
database (or table), the creation date is adjusted. I'm not aware of any 
SQL interface to influence this.

-- 
Thanks

	Bernd