unnest on multi-dimensional arrays - Mailing list pgsql-general

From Zev Benjamin
Subject unnest on multi-dimensional arrays
Date
Msg-id 5296EB26.7080704@strangersgate.com
Whole thread Raw
List pgsql-general
It appears that unnest, when called on a multi-dimensional array,
effectively flattens the array first.  For example:

=> select * from unnest(array[array[1, 2], array[2, 3]]);
  unnest
--------
       1
       2
       2
       3
(4 rows)

while I would have expect something like the following:

=> select * from unnest(array[array[1, 2], array[2, 3]]);
  unnest
--------
    {1, 2}
    {2, 3}
(2 rows)

Is there any way to get the latter behavior?


Zev


pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: Use environment variables in postgresql.conf
Next
From: David Johnston
Date:
Subject: Re: Full Stored Procedure Support, any time soon ?