Re: determining when a database was created

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ian Lipsky" <postgres(at)merk(dot)caltech(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: determining when a database was created
Date: 2004-06-01 01:46:50
Message-ID: 13893.1086054410@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Ian Lipsky" <postgres(at)merk(dot)caltech(dot)edu> writes:
> How can i determine which directory contains the database files? there
> are a few databases.

The database directory names correspond to the OID column of
pg_database. So:

SELECT datname, oid from pg_database;

(BTW, this is likely to change in 7.5 if tablespaces get done.)

See also the contrib/oid2name tool.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Somasekhar Bangalore 2004-06-01 04:27:54 Re: determining when a database was created
Previous Message Ian Lipsky 2004-06-01 00:49:31 Re: determining when a database was created