Re: BUG #5799: failed to find conversion function from unknown to text - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5799: failed to find conversion function from unknown to text
Date
Msg-id 304.1292942563@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5799: failed to find conversion function from unknown to text  ("Sandro Santilli" <strk@keybit.net>)
List pgsql-bugs
"Sandro Santilli" <strk@keybit.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

pgsql-bugs by date:

Previous
From: Dave Page
Date:
Subject: Re: BUG #5752: installer does not give proper os privileges on folders
Next
From: "Carlo Curatolo"
Date:
Subject: BUG #5800: "corrupted" error messages (encoding problem ?)