Re: implement CAST(expr AS type FORMAT 'template') - Mailing list pgsql-hackers

From Robert Haas
Subject Re: implement CAST(expr AS type FORMAT 'template')
Date
Msg-id CA+TgmoZwNgFXnPmJpmh=iexoYPFLJyN-g4+WM0YiE76ECucgqQ@mail.gmail.com
Whole thread
List pgsql-hackers
On Wed, Jul 15, 2026 at 11:41 AM jian he <jian.universality@gmail.com> wrote:
> We can document that this approach provides an error-safe way to
> evaluate these to_* functions.
> (After we refactored these to_* function to be error safe).

That's true. Of course, we could also just have variants of those
functions that return NULL instead of signaling an error, or whatever
we want the behavior to be.

I don't know what the right thing to do is here. I'm not deeply
opposed to this feature, but I'm not deeply in favor of it either.
There's no big problem with it, but also no particular reason to do
it.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Paul A Jungwirth
Date:
Subject: Re: SQL:2011 Application Time Update & Delete
Next
From: Srinath Reddy Sadipiralla
Date:
Subject: Re: walsummarizer can get stuck when switching timelines