Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group