Обсуждение: Table name from directory

Поиск
Список
Период
Сортировка

Table name from directory

От
Jason Armstrong
Дата:
How do I get the name of a database from a directory on disk (eg
$datadir/base/16494)?

--
Jason Armstrong

Re: Table name from directory

От
Tom Lane
Дата:
Jason Armstrong <ja@riverdrums.com> writes:
> How do I get the name of a database from a directory on disk (eg
> $datadir/base/16494)?

That number should match the pg_database.oid column.

            regards, tom lane

Re: Table name from directory

От
Scott Marlowe
Дата:
On Fri, Jan 15, 2010 at 7:59 AM, Jason Armstrong <ja@riverdrums.com> wrote:
> How do I get the name of a database from a directory on disk (eg
> $datadir/base/16494)?

There's a handy little utility called oid2name you can use to do it
from the command line.