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

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: Vik Fearing <vik@postgresfriends.org>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-08-04T03:10:06Z
Lists: pgsql-hackers
hi.
one more question:

For binary coercible type casts, no formatted related function for it,
should we error out?
For example, should the following error out or return text '1'.

select cast('1'::text as text format 'YYYY'::text);