Re: BUG #3259: Problem with automatic string cast

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas" <thbley(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3259: Problem with automatic string cast
Date: 2007-05-01 14:36:23
Message-ID: 17031.1178030183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Thomas" <thbley(at)gmail(dot)com> writes:
> select * from (select 'years' as recurrence) p where recurrence = 'years'
> it gives:
> ERROR: failed to find conversion function from "unknown" to text

Try casting the unknown value to some specific type, eg

regression=# select * from (select 'years'::text as recurrence) p where recurrence = 'years';
recurrence
------------
years
(1 row)

Do you have a less artificial example where not resolving the
subselect's output type is a problem? We could change it to
force the type to text sooner, but I'm afraid that that would
break other people's usages.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Bley 2007-05-01 17:03:25 Re: BUG #3259: Problem with automatic string cast
Previous Message Thomas 2007-05-01 13:21:44 BUG #3259: Problem with automatic string cast