Re: BUG #3259: Problem with automatic string cast

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3259: Problem with automatic string cast
Дата
Msg-id 17031.1178030183@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #3259: Problem with automatic string cast  ("Thomas" <thbley@gmail.com>)
Ответы Re: BUG #3259: Problem with automatic string cast  (Thomas Bley <thomas.bley@simple-groupware.de>)
Список pgsql-bugs
"Thomas" <thbley@gmail.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Thomas"
Дата:
Сообщение: BUG #3259: Problem with automatic string cast
Следующее
От: Thomas Bley
Дата:
Сообщение: Re: BUG #3259: Problem with automatic string cast