Skip site navigation (1) Skip section navigation (2)

BUG #6087: Unnest with multidimensional arrays

From: "Maxim Boguk" <Maxim(dot)Boguk(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6087: Unnest with multidimensional arrays
Date: 2011-06-30 10:44:30
Message-ID: 201106301044.p5UAiUUN005623@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      6087
Logged by:          Maxim Boguk
Email address:      Maxim(dot)Boguk(at)gmail(dot)com
PostgreSQL version: 9.0
Operating system:   Linux
Description:        Unnest with multidimensional arrays
Details: 

I not sure is it actual bug or intended behaviour.
In documentation unnest described as:
"expand an array to a set of rows".

However in case of multidimensional arrays documentation is misleading or
actual behaviour is wrong.

Test case:

postgres=# select unnest(array[[1,2], [3,4], [5,6]]);
 unnest
--------
      1
      2
      3
      4
      5
      6
(6 rows)

I think correct result must be:
unnest
------------
{1,2}
{3,4}
{5,6}

Responses

pgsql-bugs by date

Next:From: Merlin MoncureDate: 2011-06-30 13:28:02
Subject: Re: BUG #6087: Unnest with multidimensional arrays
Previous:From: DennisDate: 2011-06-30 07:32:00
Subject: BUG #6086: Segmentation fault

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group