Re: Getting table metadata

Поиск
Список
Период
Сортировка
От ntinos@aueb.gr
Тема Re: Getting table metadata
Дата
Msg-id courier.41EE1A47.00001D9C@red.servers.aueb.gr
обсуждение исходный текст
Ответ на Re: Getting table metadata  ("Dann Corbit" <DCorbit@connx.com>)
Список pgsql-general
>
> SELECT * FROM pg_attribute WHERE attrelid=<the table oid>;
>
> The problem I'm running into however, is that given a table name, there
> doesn't seem to be any way to get the table oid. Is there some function
> or query that does this?

I think a way to get the table oid is:

select oid from pg_class where relname=<table_name>

Ntinos Katsaros

В списке pgsql-general по дате отправления:

Предыдущее
От: Thomas F.O'Connell
Дата:
Сообщение: Re: PL/PgSQL Index Usage with Trigger Variables
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: Getting table metadata