Why do subselects in target lists behave differently wrt implicit casts?

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Why do subselects in target lists behave differently wrt implicit casts?
Дата
Msg-id 40EC3355.80801@mascari.com
обсуждение исходный текст
Ответы Re: Why do subselects in target lists behave differently wrt implicit casts?
Список pgsql-general
This is a really trivial question, but I'm curious. Why do
subselects in target lists behave differently than simple queries?

Ex:

[lexus] create temporary table bar (key varchar(32) not null);
CREATE TABLE
[lexus] insert into bar select '';
INSERT 1319585 1
[lexus] insert into bar select (select '') as key;
ERROR:  failed to find conversion function from "unknown" to
character varying
[lexus] insert into bar select (select ''::text) as key;
INSERT 1319586 1

Just curious,

Mike Mascari




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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Help with query: indexes on timestamps
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Getting user who fired a trigger