Re: BUG #5799: failed to find conversion function from unknown to text

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sandro Santilli" <strk(at)keybit(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5799: failed to find conversion function from unknown to text
Date: 2010-12-21 14:42:43
Message-ID: 304.1292942563@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Sandro Santilli" <strk(at)keybit(dot)net> writes:
> SELECT a, b, ST_RelateMatch(a,b) FROM
> ( SELECT '101202FFF' as a, 'TTTTTTFFF' as b) as f;
> Results in:
> ERROR: failed to find conversion function from unknown to text

Cast those unknown literals to text explicitly, ie

SELECT a, b, ST_RelateMatch(a,b) FROM
( SELECT '101202FFF'::text as a, 'TTTTTTFFF'::text as b) as f;

We don't support doing it the other way because retroactively deciding
at the top level that the sub-select's outputs should have been text
might change the semantics of the sub-select (consider cases involving
DISTINCT for example).

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Carlo Curatolo 2010-12-21 15:47:03 BUG #5800: "corrupted" error messages (encoding problem ?)
Previous Message Dave Page 2010-12-21 11:51:30 Re: BUG #5752: installer does not give proper os privileges on folders