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

Re: how can I find out the numeric directory name of each database in PostgreSQL 8.3

From: Justin Yao <justin(at)snooth(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how can I find out the numeric directory name of each database in PostgreSQL 8.3
Date: 2008-09-25 15:21:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
forget it..... I am really sorry about that.
it works for me, too.

when I did :

dbname=> \d pg_database
     Table "pg_catalog.pg_database"
     Column     |   Type    | Modifiers
  datname       | name      | not null
  datdba        | oid       | not null
  encoding      | integer   | not null
  datistemplate | boolean   | not null
  datallowconn  | boolean   | not null
  datconnlimit  | integer   | not null
  datlastsysoid | oid       | not null
  datfrozenxid  | xid       | not null
  dattablespace | oid       | not null
  datconfig     | text[]    |
  datacl        | aclitem[] |
     "pg_database_datname_index" UNIQUE, btree (datname), tablespace 
     "pg_database_oid_index" UNIQUE, btree (oid), tablespace "pg_global"
     pg_sync_pg_database AFTER INSERT OR DELETE OR UPDATE ON pg_database 
Tablespace: "pg_global"

I didn't find the Column "oid", I take granted to think it may not work, 
but I didn't issue a command to have a try.

Really sorry about that.

But the question is, why there's no column named "oid" and it still works?


Tom Lane wrote:
> Justin Yao <justin(at)snooth(dot)com> writes:
>> In PostgreSQL 7.x, I can use SQL:
>> select datname, oid from pg_database
>> to find out the numeric directory name under $PGDATA/base for each 
>> database. But it doesn't work for PostgreSQL 8.3.
> It works for me ... what problem are you having?
> 			regards, tom lane

In response to


pgsql-general by date

Next:From: Hoover, JeffreyDate: 2008-09-25 15:27:12
Subject: Re: The planner hates me.
Previous:From: Mark MielkeDate: 2008-09-25 15:10:44
Subject: Re: PostgreSQL future ideas

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