Re: ERROR: failed to find conversion function from unknown to text

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: jian he <jian.universality@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-01-29T01:24:19Z
Lists: pgsql-hackers
jian he <jian.universality@gmail.com> writes:
> select cast(NULL::text as unknown);
> ERROR:  failed to find conversion function from unknown to text

Is there a good reason why that shouldn't be an error?
I certainly don't like the cast pathway you suggest adding
to make it not be one --- that seems likely to cause lots of
not-very-desirable behaviors.

			regards, tom lane