Re: to_typemod(type_name) information function

Поиск
Список
Период
Сортировка
От Sophie Herold
Тема Re: to_typemod(type_name) information function
Дата
Msg-id 47f80325-30f9-d0cf-17a0-55986579d9d5@hemio.de
обсуждение исходный текст
Ответ на Re: to_typemod(type_name) information function  (Sophie Herold <sophie_h@hemio.de>)
Ответы Re: to_typemod(type_name) information function
Re: to_typemod(type_name) information function
Re: to_typemod(type_name) information function
Список pgsql-hackers
Hi,

the following patch allows to retrieve the typemod. Without this patch,
it does not seem to be possible to generate the first column.

  SELECT format_type(to_regtype(t), pg_to_typemod(t)),
         format_type(to_regtype(t), NULL)
  FROM (VALUES
    ('INTERVAL SECOND (5)'),
    ('Varchar(17)'),
    ('timestamptz (2)')) AS x(t);
           format_type         |       format_type
  -----------------------------+--------------------------
   interval second(5)          | interval
   character varying(17)       | character varying
   timestamp(2) with time zone | timestamp with time zone

I did not find any advice on how to choose a new OID for pg_proc.

Best,
Sophie

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: View with duplicate GROUP BY entries
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: to_typemod(type_name) information function