Re: Where is the database located in 7.1.2? - Mailing list pgsql-sql

From caldodge@fpcc.net (Calvin Dodge)
Subject Re: Where is the database located in 7.1.2?
Date
Msg-id ca6275f0.0108031606.4bd4bb95@posting.google.com
Whole thread Raw
List pgsql-sql
Raymond Chui <raymond.chui@noaa.gov> wrote in message news:<3B6AAD1B.3EE76D65@noaa.gov>...
> I installed  PostgreSQL 7.1.2 in Redhat 6.2
>
> Now in 7.1.2 when I
>
> cd $PGDATA/data/base
> ls
>
> I only see some directories like 1, 18719, 18725
> I don't see my dbname. Where is my dbname located now in v7.1.2?
> Thank you!

Start psql in the database of your choice.

Type:

select oid,datname from pg_database;

Look at the oids - you'll see that each one corresponds to one of
those funny numbered directories.  For example, one such line on my
system is:

   88721 | phpgroupware

Sure enough, in /var/lib/pgsql/data/base there is a directory called
"88721".

So directory "88721" contains the "phpgroupware" database on my
system.

Calvin

pgsql-sql by date:

Previous
From:
Date:
Subject: Re: [Re: `postgresql.conf' has wrong permissions??? ]
Next
From: Allan Engelhardt
Date:
Subject: Using functions in SQL statements