Re: column information from view

Поиск
Список
Период
Сортировка
От Sebastian P. Luque
Тема Re: column information from view
Дата
Msg-id 87efdv3erc.fsf@gmail.com
обсуждение исходный текст
Ответ на Re: column information from view  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: column information from view
Список pgsql-general
On Fri, 14 Sep 2018 14:47:07 -0700,
Adrian Klaver <adrian.klaver@aklaver.com> wrote:

> SELECT cols.ordinal_position, cols.column_name,
>   col_description(cl.oid, cols.ordinal_position::INT)
> FROM pg_class cl, information_schema.columns cols
> WHERE cols.table_catalog='aquaculture' AND cols.table_schema ilike
> 'pg_temp%' AND
>   cols.table_name = 'c_data' AND cols.table_name = cl.relname
> ORDER BY cols.ordinal_position::INT;

>  ordinal_position | column_name | col_description
> ------------------+----------------+-----------------
>                 1 | source_id | NULL
>                 2 | geography_desc | NULL

Exactly, except that the column descriptions reside in the persistent
view whereas the above pulls them from the temporary view, which are all
NULL.

Always learning something here.

Thanks,
-- 
Seb


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: commit timestamps and replication
Следующее
От: Sebastian P. Luque
Дата:
Сообщение: Re: column information from view