ERROR: array subscript out of range

Поиск
Список
Период
Сортировка
От chinchu2005
Тема ERROR: array subscript out of range
Дата
Msg-id 22992481.post@talk.nabble.com
обсуждение исходный текст
Ответы Re: ERROR: array subscript out of range  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ERROR: array subscript out of range  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
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.


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

Предыдущее
От: Justin
Дата:
Сообщение: Re: Internationalization
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: array subscript out of range