Re: Patch: Add parse_type Function - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Patch: Add parse_type Function
Date
Msg-id 2312D04F-C4AA-4A91-83DB-0B415C9B884B@justatheory.com
Whole thread Raw
In response to Re: Patch: Add parse_type Function  (Erik Wienhold <ewie@ewie.name>)
Responses Re: Patch: Add parse_type Function
List pgsql-hackers
On Feb 20, 2024, at 21:09, Erik Wienhold <ewie@ewie.name> wrote:

> The references are printed as "???" right now.  Can be fixed with
> xreflabel="format_type" and xreflabel="to_regtype" on those <entry>
> elements.

Thanks.

> The docs show parameter name "type" but pg_proc.data does not define
> proargnames.  So the to_regtypemod() cannot be called using named
> notation:
>
> test=> select to_regtypemod(type => 'int'::text);
> ERROR:  function to_regtypemod(type => text) does not exist

Yes, this format is identical to that of to_regtype():

david=# select to_regtype(type => 'int'::text);
ERROR:  function to_regtype(type => text) does not exist

> +        Parses a string of text, extracts a potential type name from it, and
>> +        translates its typmod, the modifier for the type, if any. Failure to
>
> s/typmod, the modifier of the type/type modifier/
>
> Because format_type() already uses "type modifier" and I think it helps
> searchability to use the same wording.

Yes, definitely better wording, thanks. V8 attached.

Best,

David




Attachment

pgsql-hackers by date:

Previous
From: Maxim Orlov
Date:
Subject: Re: POC: GROUP BY optimization
Next
From: Vladimir Sitnikov
Date:
Subject: Re: When extended query protocol ends?