Search Postgresql Archives

Re: Looping through Arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/10/06, adam lawrence <name_adam@xxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux