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+TgmobHVgxxof4n6s2yRG-bu_mHpbxWwXkPvinHhkJry_up3A@mail.gmail.com
Whole thread
List pgsql-hackers
On Fri, Jul 3, 2026 at 12:09 AM David G. Johnston
<david.g.johnston@gmail.com> wrote:
> I'm not sure how to make the design less problematic: format is optional, and for casts that need a format to succeed
theyprovide a default. 

But that's not how casts work today. some_date::text shares neither
code nor behavior with to_char(some_date, 'some_built_in_constant').
It's completely separate. We're not going to rethink the basic design
of casts for the sake of CAST(...FORMAT...).

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



pgsql-hackers by date:

Previous
From: Shlok Kyal
Date:
Subject: Re: Support EXCEPT for ALL SEQUENCES publications
Next
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Re-read subscription state after lock in AlterSubscription