Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension
Дата
Msg-id AANLkTi=28F+1rvOfeey=beGMOo2geUf2=fxa5bLLn6gO@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
On Thu, Dec 2, 2010 at 12:20 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
> 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

by the way, see:
http://archives.postgresql.org/pgsql-general/2010-04/msg01041.php (and
responses) for a more in depth treatment of the issue.

merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension
Следующее
От: "Andrus"
Дата:
Сообщение: Re: How to find correct locale name for CREATEDATABASE