Search Postgresql Archives

Re: ERROR: array subscript out of range

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

 



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.

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

[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