Re: determining when a database was created - Mailing list pgsql-admin

From Tom Lane
Subject Re: determining when a database was created
Date
Msg-id 13893.1086054410@sss.pgh.pa.us
Whole thread Raw
In response to Re: determining when a database was created  ("Ian Lipsky" <postgres@merk.caltech.edu>)
List pgsql-admin
"Ian Lipsky" <postgres@merk.caltech.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

pgsql-admin by date:

Previous
From: "Ian Lipsky"
Date:
Subject: Re: determining when a database was created
Next
From: "Somasekhar Bangalore"
Date:
Subject: Re: determining when a database was created