Re: Where do my local data bases go?

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Where do my local data bases go?
Date: 2012-01-30 08:44:01
Message-ID: 20120130094401.5abfaf3b@anubis.defcon1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, 30 Jan 2012 01:26:07 -0700
Kevin Goulding <kevingoulding(at)gmail(dot)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."
*******
***

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Angus 2012-01-30 09:56:37 Re: Install & Launch PgAdmin on CentOS 6.2 with PostgreSQL 8.4.9
Previous Message Kevin Goulding 2012-01-30 08:26:07 Where do my local data bases go?