BUG #8226: Inconsistent unnesting of arrays

From: ddebernardy(at)yahoo(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8226: Inconsistent unnesting of arrays
Date: 2013-06-12 08:58:48
Message-ID: E1UmgtE-0002si-0x@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: 8226
Logged by: Denis de Bernardy
Email address: ddebernardy(at)yahoo(dot)com
PostgreSQL version: 9.2.4
Operating system: OSX
Description:

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=# 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
---+---+---
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=# select 1 as a, unnest('{2,3}'::int[]) as b, unnest('{4,5}'::int[])
as c order by a, b, c;
a | b | c
---+---+---
1 | 2 | 4
1 | 3 | 5
(2 rows)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Greg Stark 2013-06-12 10:05:02 Re: BUG #8226: Inconsistent unnesting of arrays
Previous Message Jeff Frost 2013-06-11 22:29:59 Re: BUG #8225: logging options don't change after reload