When was the database created in Postgres

postgres=#SELECT datname, (pg_stat_file(‘base/’||oid||’/PG_VERSION’)).modification AS datcreated
FROM pg_database;

datname | datcreated
——————-+—————————
template1 | 2014-05-06 15:44:37+05:30
template0 | 2014-05-06 15:44:38+05:30
postgres | 2014-05-06 15:44:38+05:30
abc | 2014-07-01 12:58:31+05:30
xyz | 2014-07-03 11:01:38+05:30

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s