Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension - Mailing list pgsql-general

From Merlin Moncure
Subject Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension
Date
Msg-id AANLkTikGx0t6LnbqXMy_PiRd6kMcd9nfUSjmHtgO52AS@mail.gmail.com
Whole thread Raw
In response to Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension  (Samba <saasira@gmail.com>)
Responses Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
On Thu, Dec 2, 2010 at 9:03 AM, Samba <saasira@gmail.com> wrote:
> Thank you  Merlin for your answer,
>
>        I tried that and is working as you said.
>        But when I do
>                    other_array=some_array[1:2];
>        I'm getting the entire
> '{{samba,sarath,sreenivas},{samba,mukhesh,pavan}}';
>
>        not just the second subarray, i.e. '{{samba,mukhesh,pavan}}'.
>
>        Is there any way I can get only the corresponding slice of the array?

sure...some_array[2:2], etc

merlin

pgsql-general by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Full Text Partial Match at begining
Next
From: Merlin Moncure
Date:
Subject: Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension