Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vutg6-0007Ed-Ib for pgsql-bugs@arkaria.postgresql.org; Mon, 23 Dec 2013 00:47:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vutg5-00039J-ML for pgsql-bugs@arkaria.postgresql.org; Mon, 23 Dec 2013 00:47:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vutg5-00039D-1G for pgsql-bugs@postgresql.org; Mon, 23 Dec 2013 00:47:25 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vutg3-000639-0B for pgsql-bugs@postgresql.org; Mon, 23 Dec 2013 00:47:24 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vutg2-0000fb-93 for pgsql-bugs@postgresql.org; Mon, 23 Dec 2013 00:47:22 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1Vutfw-00071Q-UX for pgsql-bugs@postgresql.org; Mon, 23 Dec 2013 00:47:17 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8696: Type-checking seems to fail on UNIONs with arrays To: pgsql-bugs@postgresql.org From: jp.deplaix@gmail.com Message-Id: Date: Mon, 23 Dec 2013 00:47:16 +0000 X-Pg-Spam-Score: -1.5 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 ? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs