pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedINSERT and UPDATE with non-atomic values
2+ messages / 2 participants
[nested] [flat]
* INSERT and UPDATE with non-atomic values
@ 1999-05-02 03:03 Martin Jackson <mjackson@deskmedia.com>
0 siblings, 1 reply; 2+ messages in thread
From: Martin Jackson @ 1999-05-02 03:03 UTC (permalink / raw)
To: pgsql-sql@hub.org
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
++++++++++++++++++++++++++++++++++++++
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] INSERT and UPDATE with non-atomic values
@ 1999-05-02 09:02 Chris Bitmead <chris.bitmead@bigfoot.com>
parent: Martin Jackson <mjackson@deskmedia.com>
0 siblings, 0 replies; 2+ messages in thread
From: Chris Bitmead @ 1999-05-02 09:02 UTC (permalink / raw)
To: pgsql-sql@hub.org
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-05-02 09:02 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-02 03:03 INSERT and UPDATE with non-atomic values Martin Jackson <mjackson@deskmedia.com>
1999-05-02 09:02 ` Chris Bitmead <chris.bitmead@bigfoot.com>
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