Re: implement CAST(expr AS type FORMAT 'template')

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: implement CAST(expr AS type FORMAT 'template')
Date: 2026-07-15 17:24:30
Message-ID: CA+TgmoZwNgFXnPmJpmh=iexoYPFLJyN-g4+WM0YiE76ECucgqQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 15, 2026 at 11:41 AM jian he <jian(dot)universality(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Srinath Reddy Sadipiralla 2026-07-15 17:42:48 Re: walsummarizer can get stuck when switching timelines
Previous Message Paul A Jungwirth 2026-07-15 17:21:19 Re: SQL:2011 Application Time Update & Delete