From: Chris Bitmead <chris.bitmead@bigfoot.com>
To: pgsql-sql@hub.org
Subject: Re: [SQL] INSERT and UPDATE with non-atomic values
Date: Sun, 02 May 1999 09:02:08 +0000
Message-ID: <372C1490.5ED90AE1@bigfoot.com> (raw)
References: <372BC08A.F711AB1@deskmedia.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: chris.bitmead@bigfoot.com, pgsql-sql@hub.org
Subject: Re: [SQL] INSERT and UPDATE with non-atomic values
In-Reply-To: <372C1490.5ED90AE1@bigfoot.com>
References: <372BC08A.F711AB1@deskmedia.com> <372C1490.5ED90AE1@bigfoot.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox