The following bug has been logged on the website:
Bug reference: 8226
Logged by: Denis de Bernardy
Email address: [email protected]
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)
--
Sent via pgsql-bugs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs