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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ERROR: failed to find conversion function from unknown to text
Date: 2026-01-29 01:24:19
Message-ID: 1127584.1769649859@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

jian he <jian(dot)universality(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-01-29 01:25:13 Re: pg_stat_statements: add missing tests for nesting_level
Previous Message Tom Lane 2026-01-29 01:20:24 Decoupling our alignment assumptions about int64 and double