working with multidimensional arrays in plpgsql - Mailing list pgsql-general

From Sibtay Abbas
Subject working with multidimensional arrays in plpgsql
Date
Msg-id bd6a3551050125234024c79b82@mail.gmail.com
Whole thread Raw
Responses Re: working with multidimensional arrays in plpgsql
List pgsql-general
hello everyone

i am having problem with multidimensional arrays in plpgsql following
is the source code of the function which i am trying to run

CREATE OR REPLACE FUNCTION test() RETURNS VOID AS $$
DECLARE
x INTEGER[10][10];
tmp VARCHAR(40);
BEGIN
x[3][1] := '20';               ------i have even tried x[3][1] = 20
tmp := x[3][1];
RAISE NOTICE '%', tmp;
RETURN;
END;
$$LANGUAGE 'plpgsql';

As you might have observed here, the actual problem is
how to do assignment to multidimensional array locations using the
subscript operater.

Thank you

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: text field constraint advice
Next
From: Sibtay Abbas
Date:
Subject: Re: working with multidimensional arrays in plpgsql