Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 09DB09F963A for ; Wed, 3 Oct 2007 12:30:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 73612-07 for ; Wed, 3 Oct 2007 12:30:10 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id 429BC9F963C for ; Wed, 3 Oct 2007 12:30:10 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Id6A7-0003Mw-Ie for pgsql-admin@postgresql.org; Wed, 03 Oct 2007 15:29:23 +0000 Received: from pirus.securax.be ([213.16.46.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Oct 2007 15:29:23 +0000 Received: from milen by pirus.securax.be with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Oct 2007 15:29:23 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: "Milen A. Radev" Subject: Re: Postgres Array Traversing Date: Wed, 03 Oct 2007 18:28:36 +0300 Lines: 27 Message-ID: <4703B524.50108@radev.net> References: <116685ec0710030327v7e35b5d3s7a9202e98be4ad2@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org Cc: yogesh.arora@daffodildb.com X-Gmane-NNTP-Posting-Host: pirus.securax.be User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <116685ec0710030327v7e35b5d3s7a9202e98be4ad2@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/11 X-Sequence-Number: 26925 Yogesh Arora написа: > Hallo All Frnds, > > I have to add an array in my table. and to update the array in a > Procedure called by the trigger. > > In my case Like the Elements of the array are {1,2,5} now i have to > update it to {1,2,5,7} . I.e., Keeping the previous record as such and > appending the new elements. [...] According to the manual (http://www.postgresql.org/docs/current/static/arrays.html#AEN5830) this should work: UPDATE example_table SET an_array_column = an_array_column || 7 WHERE a_key_column = ; P.S. This questions is probably more appropriate for the "pgsql-sql" list. -- Milen A. Radev