| От | Tom Lane |
|---|---|
| Тема | Re: NULL value in subselect in UNION causes error |
| Дата | |
| Msg-id | 28688.1169844084@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | NULL value in subselect in UNION causes error (Jan Wieck <JanWieck@Yahoo.com>) |
| Ответы |
Re: NULL value in subselect in UNION causes error
|
| Список | pgsql-hackers |
Jan Wieck <JanWieck@Yahoo.com> writes:
> Checked it against HEAD and 8.2:
> postgres=# select 1, 1, 1 union select * from (select 2, null, 2) two;
> ERROR: failed to find conversion function from "unknown" to integer
It's always done that. The SQL spec would tell you that you have to
cast the null to some specific type. We allow untyped nulls in contexts
where we can derive a type from reasonably nearby context, but an
integer two levels up and over in another union arm isn't very nearby
IMHO. So I'm not particularly concerned about making this work ...
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера