Re: to_regtype() Raises Error - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: to_regtype() Raises Error
Date
Msg-id 57E1FDDC-5A38-452D-82D7-A44DA2E13862@justatheory.com
Whole thread Raw
In response to Re: to_regtype() Raises Error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sep 17, 2023, at 19:28, Tom Lane <tgl@sss.pgh.pa.us> wrote:

>> No, that is precisely the point.  The result should be null instead of
>> an error.
>
> Yeah, ideally so, but the cost/benefit of making it happen seems
> pretty unattractive for now.  See the soft-errors thread at [1],
> particularly [2] (but searching in that thread for references to
> regclassin, regtypein, and to_reg* will find additional detail).

For my purposes I’m wrapping it in an exception-catching PL/pgSQL function, but it might be worth noting the condition
inwhich it *will* raise an error on the docs. 

Best,

David


Attachment

pgsql-hackers by date:

Previous
From: Erik Wienhold
Date:
Subject: Re: to_regtype() Raises Error
Next
From: Peter Geoghegan
Date:
Subject: Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan