Received: from tech.com.au (IDENT:root@techpt.lnk.telstra.net [139.130.75.122]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA26832 for ; Sun, 2 May 1999 05:02:06 -0400 (EDT) (envelope-from chris.bitmead@bigfoot.com) Received: from bigfoot.com (chris@localhost [127.0.0.1]) by tech.com.au (8.8.7/8.8.7) with ESMTP id TAA13412 for ; Sun, 2 May 1999 19:02:09 +1000 Sender: chris@tech.com.au Message-ID: <372C1490.5ED90AE1@bigfoot.com> Date: Sun, 02 May 1999 09:02:08 +0000 From: Chris Bitmead X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@hub.org Subject: Re: [SQL] INSERT and UPDATE with non-atomic values References: <372BC08A.F711AB1@deskmedia.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit create table foo (bar int4[]); insert into foo values('{1,2,3}'); update foo set bar[2] = 4; update foo set bar = '{5,4,4,4,5}'; I don't think you can extend a dynamic array without setting the entire array (like the last example), which is probably a bit unfortunate. If you're using arrays you may want to check out the stuff in pgsql/contrib/array as well. Martin Jackson wrote: > > Hello all, > > I am using PostgreSQL in large part because it supports arrays as > attributes. I have spent the better part of the last couple days trying > to figure out how one would UPDATE dynamically sized arrays. Also, is > there an easy way of getting the size of a dynamic array? > > Thanks in advance. > > -- > Martin Jackson: mjackson@deskmedia.com > ++++++++++++++++++++++++++++++++++++++ > Computer Info. Science Major > Minnesota State University, Mankato > ++++++++++++++++++++++++++++++++++++++ -- Chris Bitmead http://www.bigfoot.com/~chris.bitmead mailto:chris.bitmead@bigfoot.com