Re: dynamic DB descriptions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: dynamic DB descriptions
Дата
Msg-id 25976.1092423918@sss.pgh.pa.us
обсуждение исходный текст
Ответ на dynamic DB descriptions  ("Darren Sunley" <darrensunley@hotmail.com>)
Список pgsql-admin
"Darren Sunley" <darrensunley@hotmail.com> writes:
> I was just wondering if anyone new of a way of pulling out the attribute
> names of a table on the fly.

Basically

select attname from pg_attribute where
  attrelid = (select oid from pg_class where relname = 'foo');

For examples of getting fancier, try running psql with -E option and
do "\d foo".  Also read the "system catalogs" chapter in the documentation.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Pg_dump does not include database search path in backup file
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TOAST tables keeps growing!