working with multidimensional arrays in plpgsql

From: Sibtay Abbas <sibtay(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: working with multidimensional arrays in plpgsql
Date: 2005-01-26 07:40:24
Message-ID: bd6a3551050125234024c79b82@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sibtay Abbas 2005-01-26 07:50:38 Re: working with multidimensional arrays in plpgsql
Previous Message Michael Fuhr 2005-01-26 07:08:36 Re: text field constraint advice