Re: Where do my local data bases go? - Mailing list pgsql-novice

From Jean-Yves F. Barbier
Subject Re: Where do my local data bases go?
Date
Msg-id 20120130094401.5abfaf3b@anubis.defcon1
Whole thread Raw
In response to Where do my local data bases go?  (Kevin Goulding <kevingoulding@gmail.com>)
Responses Re: Where do my local data bases go?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
On Mon, 30 Jan 2012 01:26:07 -0700
Kevin Goulding <kevingoulding@gmail.com> wrote:

>
> My question is -- how do I find where on my hard drive the newly created
> database ends up?

In Linux, files are in:
/var/lib/postgresql/Pg_version_Nb/main/base/OID_of_DB
(don't know for OSX)

This is the default path for initiating a DB.

> I have searched the names, with no luck.  Could it have
> to do with the OID number

Yep.

> (what is an "OID")?

Pg internal (integer) that represent any object (internals, tables,
columns, etc).

Pg supplies an utilitary that pairs OID and DB real name:
/usr/lib/postgresql/9.1/bin/oid2name
if you need to often use it, make a symlink into /usr/local/bin.

JY
--
    ***
  *******
 *********
 ****** Confucious say: "Is stuffy inside fortune cookie."
  *******
    ***

pgsql-novice by date:

Previous
From: Kevin Goulding
Date:
Subject: Where do my local data bases go?
Next
From: Angus
Date:
Subject: Re: Install & Launch PgAdmin on CentOS 6.2 with PostgreSQL 8.4.9