"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