Hello all,
Need ur help.I dont know wats wrong with the following fucntion.
create or replace function twoarray() returns setof integer as
'
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;
return next a[i][j];
end loop;
end loop;
return;
end;
'
language 'plpgsql';

when i execute the following statement i get an error saying 'array
subscript out of range'

select * from twoarray();
ERROR: array subscript out of range
CONTEXT: PL/pgSQL function "twoarray" line 8 at assignment

Help me,please 
-- 
View this message in context: 
http://www.nabble.com/ERROR%3A-array-subscript-out-of-range-tp22992481p22992481.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
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