Re: Looping through Arrays

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Looping through Arrays
Дата
Msg-id b42b73150610111847y140e0fd4wad2bbe38ce1592c7@mail.gmail.com
обсуждение исходный текст
Ответ на Looping through Arrays  (adam lawrence <name_adam@yahoo.com.au>)
Список pgsql-general
On 10/10/06, adam lawrence <name_adam@yahoo.com.au> wrote:
> But now I need to loop through the whole array, not just the one element. I
> want to do something like:
>
> FOR j in ....LOOP
>     FOR i IN array_lower(arrayvar,1) .. array_upper(arrayvar,1) LOOP
>     currentvalue:=arrayvar[j][i];
>     RAISE NOTICE '%', currentvalue;
>     END LOOP;
> END LOOP;
>
>  How to I set the upper and lower bounds for j?

FOR j IN array_lower(arrayvar, 2)..array_upper(arrayvar, 2) LOOP

:-)

merlin

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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: more anti-postgresql FUD
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: more anti-postgresql FUD