BUG #8696: Type-checking seems to fail on UNIONs with arrays

Поиск
Список
Период
Сортировка
От jp.deplaix@gmail.com
Тема BUG #8696: Type-checking seems to fail on UNIONs with arrays
Дата
Msg-id E1Vutfw-00071Q-UX@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #8696: Type-checking seems to fail on UNIONs with arrays
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8696
Logged by:          Jacques-Pascal Deplaix
Email address:      jp.deplaix@gmail.com
PostgreSQL version: 9.3.2
Operating system:   Linux
Description:

Hi,


I'm wondering why the following examples works:


(SELECT NULL AS test)
UNION
(SELECT array_agg(t.name) AS test FROM foo AS t)
;


(SELECT NULL AS test)
UNION
(SELECT array_agg(t.name) AS test FROM foo AS t)
UNION
(SELECT NULL AS test)
;


but this one:


(SELECT NULL AS test)
UNION
(SELECT NULL AS test)
UNION
(SELECT array_agg(t.name) AS test FROM foo AS t)
;


fails with:
ERROR:  UNION types text and text[] cannot be matched


Is it (as I suppose) a bug or a well known limitation ?

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