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)
Список
Дерево обсуждения
to_typemod(type_name) information function Sophie Herold <sophie_h@hemio.de>
Re: to_typemod(type_name) information function Tom Lane <tgl@sss.pgh.pa.us>
Re: to_typemod(type_name) information function Sophie Herold <sophie_h@hemio.de>
Re: to_typemod(type_name) information function Sophie Herold <sophie_h@hemio.de>
Re: to_typemod(type_name) information function Stephen Frost <sfrost@snowman.net>
Re: to_typemod(type_name) information function Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: to_typemod(type_name) information function Tom Lane <tgl@sss.pgh.pa.us>
Re: to_typemod(type_name) information function Andres Freund <andres@anarazel.de>
Re: to_typemod(type_name) information function Sophie Herold <sophie_h@hemio.de>
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 по дате отправления