Re: ERROR: array subscript out of range

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: chinchu2005 <chinchu2005(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: array subscript out of range
Date: 2009-04-11 04:03:41
Message-ID: 20090411040340.GH8957@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

chinchu2005 escribió:
>
> 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;

We just had this question on the spanish list. Somebody was kind enough
to write the answers down in the Wiki:
http://wiki.postgresql.org/wiki/Matrices_Multidimensionales_con_funciones

It is all in spanish, but the code examples should be helpful
nonetheless.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2009-04-11 08:49:47 Re: Connect to server PG from laptop java app
Previous Message Pedro Doria Meunier 2009-04-11 01:47:53 Re: Internationalization