| От | Tom Lane |
|---|---|
| Тема | Re: Stalled post to pgsql-general |
| Дата | |
| Msg-id | 16411.1291218204@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Stalled post to pgsql-general (Samba <saasira@gmail.com>) |
| Список | pgsql-general |
Samba <saasira@gmail.com> writes:
> REPOST!
Please fix the subject line to be something useful when you resend a
message.
>> I'm trying to assign the individual sub arrays to other array elements
>> like:
>>
>> other-array VARCHAR[];
>>
>> other_array=some_array[1];
>>
>> and I'm expecting to get '{samba,sarath,sreenivas}' for index 1 and *{samba,mukhesh,pavan}
>> *for index 2;*
>> *however, I'm getting NULL.
You need to use array slice syntax if you want to extract a sub-array
rather than a single element. Try something like some_array[1:1]. See
http://www.postgresql.org/docs/9.0/static/arrays.html#ARRAYS-ACCESSING
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера