UNION with more than 2 branches

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема UNION with more than 2 branches
Дата
Msg-id 200704241845.56975.peter_e@gmx.net
обсуждение исходный текст
Ответы Re: UNION with more than 2 branches  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
The resolution to my problem with the select_common_type() error message 
turned out to be that this doesn't work:

postgres=# select null union select null union select 1;
ERROR:  UNION types text and integer cannot be matched

That's because it resolves the first two branches independently, then defaults 
to text if it can't find anything better, and then tries to match text to the 
integer in the third branch.

This should probably be fixed sometime.  Maybe make a note in the TODO list?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


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

Предыдущее
От: August Zajonc
Дата:
Сообщение: Re: Google SoC: column-level privilege subsystem
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Google SoC: column-level privilege subsystem