Re: BUG #6087: Unnest with multidimensional arrays

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Maxim Boguk <Maxim(dot)Boguk(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6087: Unnest with multidimensional arrays
Date: 2011-06-30 13:28:02
Message-ID: BANLkTinW=2EXX=p+WbCDsLo1U5srscuFJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jun 30, 2011 at 5:44 AM, Maxim Boguk <Maxim(dot)Boguk(at)gmail(dot)com> wrote:
>
> 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}

not a bug. however if you'd like to submit a patch to clarify that,
feel free...
do you need to be able to cut up arrays like that?

merlin

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stewart Fritts 2011-06-30 13:29:26 Re: BUG #6084: When Updating Tables with Select Into
Previous Message Maxim Boguk 2011-06-30 10:44:30 BUG #6087: Unnest with multidimensional arrays