Re: to_regtype() Raises Error

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: Erik Wienhold <ewie(at)ewie(dot)name>, Vik Fearing <vik(at)postgresfriends(dot)org>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: to_regtype() Raises Error
Date: 2023-09-18 02:58:44
Message-ID: CAKFQuwaxsAbuFk9Jwiw-=qoS5yTFax8v8ZY7iNm8AB5nF15oLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sunday, September 17, 2023, Chapman Flack <chap(at)anastigmatix(dot)net> wrote:

>
> In this one, both identifiers are part of the type name, and the
> separator a little more flamboyant.
>
> select to_regtype('character /* hi!
> am I part of the type name? /* what, me too? */ ok! */ -- huh!
> varying');
> to_regtype
> -------------------
> character varying
>

So, maybe we should be saying:

Parses a string of text, extracts a potential type name from it, and
translates that name into an OID. Failure to extract a valid potential
type name results in an error while a failure to determine that the
extracted name is known to the system results in a null output.

I take specific exception to describing your example as a “textual type
name”.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2023-09-18 03:11:02 Re: SQL:2011 application time
Previous Message Chapman Flack 2023-09-18 02:44:13 Re: to_regtype() Raises Error