X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D79153A5A01 for ; Wed, 26 Jan 2005 07:03:00 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78568-02 for ; Wed, 26 Jan 2005 07:02:51 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by svr1.postgresql.org (Postfix) with ESMTP id B50003A2C2C for ; Wed, 26 Jan 2005 07:02:50 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id f1so17420rne for ; Tue, 25 Jan 2005 23:02:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=WWPF+SKwb+OMdrQUwYbeAX0XO5RAce5hi5tPn3w2oWeU3Ri/O2KZz8YUyBm0n6ACQvcYlUQJJTV6PVoR6LcXaMKyNH3fLXU2RCyXv85rZk3LloFogQAX8+gUQgV4icfdB41mGc5CHnP+Y5OhHDkGubPUz1kWtX8bOzL4tINTzIY= Received: by 10.39.1.23 with SMTP id d23mr81011rni; Tue, 25 Jan 2005 23:02:50 -0800 (PST) Received: by 10.38.81.51 with HTTP; Tue, 25 Jan 2005 23:02:50 -0800 (PST) Message-ID: Date: Wed, 26 Jan 2005 12:02:50 +0500 From: Sibtay Abbas Reply-To: Sibtay Abbas To: pgsql-sql@postgresql.org Subject: working with multidimensional arrays in plpgsql Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200501/245 X-Sequence-Number: 20033 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