Re: Query to get name a data type of a view

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Query to get name a data type of a view
Дата
Msg-id CAKFQuwbmRcw8R+WGVMtc36cOTsQ_oSJBXw7WFi43VDEurSLOOQ@mail.gmail.com
обсуждение исходный текст
Ответ на Query to get name a data type of a view  (stan <stanb@panix.com>)
Список pgsql-general
On Friday, May 22, 2020, stan <stanb@panix.com> wrote:
When I run the following query,


SELECT column_name,data_type
FROM information_schema.columns
WHERE table_name = 'mfg_part_view';


I get the following result:

 column_name  |     data_type     
 --------------+-------------------
  mfg          | USER-DEFINED
  mfg_part_no  | character varying
  unit         | USER-DEFINED


I need to return the name, and data type of each column for the specified
view.

Use the pg_catalog schema “tables” directly instead of the SQL standard information_schema view.  The later doesn’t provide detail of PostgreSQL-specific features by definition.

David J.

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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: Query returns no rows in pg_basebackup cluster
Следующее
От: Tim Kane
Дата:
Сообщение: Re: btree_gist extension - gbt_cash_union return type