Look at contrib/intarray. You'll get an index access as a bonus Oleg On Fri, 9 Aug 2002 [EMAIL PROTECTED] wrote:
> > > Hi, > > I would like to say: > > create table test1 (array1 int4[]); > insert into test1 values ('{123,234,345}'); > insert into test1 values ('{456,567,678}'); > > now what I don't know how to do: > > -- consider contents of array: > select * from test1 where array1 CONTAINS 567; > > -- APPEND '789' to array in second row: > update test1 set array1=(select array1 from test1 where array1 CONTAINS > '567' UNION select '789'); > > > How do I go about expressing and operating on the contents of an array ? > > > Thanks, > > John > > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster