Select all table column names for a specified tablename (per the system catalogs)

Поиск
Список
Период
Сортировка
От kevin kempter
Тема Select all table column names for a specified tablename (per the system catalogs)
Дата
Msg-id E9AEE096-D4FD-4A3E-9FD5-FF134747B040@kevinkempterllc.com
обсуждение исходный текст
Ответы Re: Select all table column names for a specified tablename (per the system catalogs)  (Joshua Drake <jd@commandprompt.com>)
Список pgsql-admin
Hi List;

I want to pull the list of column names from the system catalogs for a
specified table. I only want column names, I want to exclude any index
names, or other non-column name rows.  I got this far (see below)
however this query produces additional rows with attname's like
tableoid, cmax, xmax ctid, etc.

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

Any thoughts ?

Thanks in advance...



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

Предыдущее
От: "Tena Sakai"
Дата:
Сообщение: Re: question on pg_ctl
Следующее
От: Joshua Drake
Дата:
Сообщение: Re: Select all table column names for a specified tablename (per the system catalogs)