Re: when was a db/schema created ? - Mailing list pgsql-general

From Josh Kupershmidt
Subject Re: when was a db/schema created ?
Date
Msg-id CAK3UJRE_Ae050xLrs8+2DfLVXcbD85YH9_DPA0AHFqK3c7M+eA@mail.gmail.com
Whole thread Raw
In response to when was a db/schema created ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
On Mon, Sep 17, 2012 at 2:16 PM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
> Is there a way to determine when a DB was created (create database...)?

If you don't have the CREATE DATABASE statement in your logs, you could try

  SELECT oid FROM pg_database WHERE datname = 'name of your database';

Then check the creation time of the directory with that OID in your
$PGDATA directory, under ./base/.

Josh


pgsql-general by date:

Previous
From: "Daniel Serodio (lists)"
Date:
Subject: Re: RFE: Column aliases in WHERE clauses
Next
From: Mike Christensen
Date:
Subject: Re: RFE: Column aliases in WHERE clauses