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 7648B3A5B40 for ; Wed, 26 Jan 2005 11:06:58 +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 02555-02 for ; Wed, 26 Jan 2005 11:06:46 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.194]) by svr1.postgresql.org (Postfix) with ESMTP id 7C9663A5B1D for ; Wed, 26 Jan 2005 11:06:47 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id f1so40258rne for ; Wed, 26 Jan 2005 03:06:48 -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:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=HWHMcI8mBWOWxqcLILUXEjfikT2XxMf+daIAqwgKPNJF/+8D/miOPGyOuXxzXthWA+wXEvkPEgx+AVsn/7m1Ft9XWO89qq6e5M4gkof6Dy52eeqgziqw6aHFSeSn/32esHzeT2L/tk8DozxRJtQd6DYwKUvxi2Uc4lGQLfKcgj0= Received: by 10.38.74.18 with SMTP id w18mr184377rna; Wed, 26 Jan 2005 03:06:48 -0800 (PST) Received: by 10.38.81.51 with HTTP; Wed, 26 Jan 2005 03:06:47 -0800 (PST) Message-ID: Date: Wed, 26 Jan 2005 16:06:47 +0500 From: Sibtay Abbas Reply-To: Sibtay Abbas To: Richard Huxton Subject: Re: working with multidimensional arrays in plpgsql Cc: pgsql-sql@postgresql.org In-Reply-To: <41F76311.5030608@archonet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <41F76311.5030608@archonet.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200501/253 X-Sequence-Number: 20041 thank you very much for your reply I did as you specified and it worked fine thankz :) On Wed, 26 Jan 2005 09:29:53 +0000, Richard Huxton wrote: > Sibtay Abbas wrote: > > 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 > > > > DECLARE > > x INTEGER[10][10]; > > > x[3][1] := '20'; ------i have even tried x[3][1] = 20 > > > As you might have observed here, the actual problem is > > how to do assignment to multidimensional array locations using the > > subscript operater. > > Actually, the problem is that the array "x" has been initialised to > NULL. Therefore, you can't set individual values. Try a line like: > x := '{}'; > > -- > Richard Huxton > Archonet Ltd >