chinchu2005 <chinchu2...@gmail.com> writes:
> declare
> i integer;
> j integer;
> a integer[][];
> begin
> for i in 1..10 loop
> for j in 1..2 loop
> a[i][j]:=i*j;

This isn't going to work --- it implies dynamically resizing the array,
and plpgsql isn't smart enough to do that for a multidimensional array.
Do you actually need a 2-D array here?  If so you'll have to initialize
it to the right dimensions to start with, eg with
        a := '{{1,2,3,4,5,6,7,8,9,10},{1,2,3,4,5,6,7,8,9,10}}';

                        regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to