working with multidimensional arrays in plpgsql

From: Sibtay Abbas <sibtay(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: working with multidimensional arrays in plpgsql
Date: 2005-01-26 07:02:50
Message-ID: bd6a3551050125230248d49296@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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-sql by date

  From Date Subject
Next Message Din Adrian 2005-01-26 08:13:52 private table
Previous Message Greg Stark 2005-01-26 06:26:44 Re: same question little different test MSSQL vrs Postgres