"Eliot, Christopher" <[EMAIL PROTECTED]> writes:
> CREATE FUNCTION func1()
> RETURNS VOID AS $$
> DECLARE
>       a INTEGER[2][2][2][200];
> BEGIN
>       a[1][2][1][33] = 0;
>       a[2][1][1][33] = 0;
> END;
> $$ LANGUAGE PLPGSQL;

> When I run this function, I get:
> ERROR:  array subscript out of range.

Yeah.  I'm afraid that declaration is basically just noise: it doesn't
do anything for you that "DECLARE a integer[];" wouldn't do.  If you
want the array actually filled out to the indicated dimensions then
you have to do that by hand.

                        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