Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 69D03475932 for ; Fri, 9 Aug 2002 00:39:50 -0400 (EDT) Received: from ferda.ied.com (xtreme10-98.aci.on.ca [209.50.81.98]) by postgresql.org (Postfix) with ESMTP id 774F14758F7 for ; Fri, 9 Aug 2002 00:39:49 -0400 (EDT) Received: from [127.0.0.2] (localhost.localdomain [127.0.0.1]) by ferda.ied.com (8.11.6/8.11.6) with ESMTP id g794cLR03274 for ; Fri, 9 Aug 2002 00:38:21 -0400 Date: Fri, 9 Aug 2002 00:38:20 -0400 (EDT) From: h012@ied.com To: pgsql-sql@postgresql.org Subject: expressions operating on arrays Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/158 X-Sequence-Number: 9004 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 -- -- Gospel of Jesus is the saving power of God for all who believe -- ## To some, nothing is impossible. ## http://Honza.Vicherek.com/