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

From: jp(dot)deplaix(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8696: Type-checking seems to fail on UNIONs with arrays
Date: 2013-12-23 00:47:16
Message-ID: E1Vutfw-00071Q-UX@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 8696
Logged by: Jacques-Pascal Deplaix
Email address: jp(dot)deplaix(at)gmail(dot)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 ?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Vik Fearing 2013-12-23 01:21:48 Re: BUG #8696: Type-checking seems to fail on UNIONs with arrays
Previous Message timi 2013-12-22 14:09:19 Re: hi,postgresql bug