Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UmgtO-0007p9-9p for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Jun 2013 08:58:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UmgtN-0006xa-Kv for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Jun 2013 08:58:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UmgtM-0006xU-Mx for pgsql-bugs@postgresql.org; Wed, 12 Jun 2013 08:58:56 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UmgtK-0006xd-6U for pgsql-bugs@postgresql.org; Wed, 12 Jun 2013 08:58:56 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UmgtJ-0000G7-Fc for pgsql-bugs@postgresql.org; Wed, 12 Jun 2013 08:58:53 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UmgtE-0002si-0x for pgsql-bugs@postgresql.org; Wed, 12 Jun 2013 08:58:48 +0000 Date: Wed, 12 Jun 2013 08:58:48 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #8226: Inconsistent unnesting of arrays To: pgsql-bugs@postgresql.org From: ddebernardy@yahoo.com X-Pg-Spam-Score: 0.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: 8226 Logged by: Denis de Bernardy Email address: ddebernardy@yahoo.com PostgreSQL version: 9.2.4 Operating system: OSX Description:=20=20=20=20=20=20=20=20 It looks like unnest() in a select statement doesn't behave consistently based on the number of elements in the array. This works as expected: denis=3D# select 1 as a, unnest('{2,3}'::int[]) as b, unnest('{4,5,6}'::int= []) as c order by a, b, c; a | b | c=20 ---+---+--- 1 | 2 | 4 1 | 2 | 5 1 | 2 | 6 1 | 3 | 4 1 | 3 | 5 1 | 3 | 6 (6 rows) This doesn't (it's missing (1,3,4) and (1,2,5)): denis=3D# select 1 as a, unnest('{2,3}'::int[]) as b, unnest('{4,5}'::int[]) as c order by a, b, c; a | b | c=20 ---+---+--- 1 | 2 | 4 1 | 3 | 5 (2 rows) --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs