Received: from mail.ngi.de ([195.243.0.227]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA91149 for ; Fri, 12 Nov 1999 13:03:24 -0500 (EST) (envelope-from michael@fam-meskes.de) Received: from p3E9D3E61.dip0.t-ipconnect.de (root@p3E9D3E61.dip0.t-ipconnect.de [62.157.62.97]) by mail.ngi.de (8.9.3/8.9.3) with ESMTP id SAA11734 for ; Fri, 12 Nov 1999 18:56:30 +0100 (CET) (envelope-from michael@fam-meskes.de) Received: (from michael@localhost) by tanja.fam-meskes.de (8.9.3/8.9.3/Debian 8.9.3-6) id RAA00631 for pgsql-interfaces@postgresql.org; Fri, 12 Nov 1999 17:10:45 +0100 Date: Fri, 12 Nov 1999 17:10:44 +0100 From: Michael Meskes To: PostgreSQL Interfaces Subject: Re: [INTERFACES] my problems with ecpg and arrays Message-ID: <19991112171044.A623@fam-meskes.de> Mail-Followup-To: PostgreSQL Interfaces Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i On Mon, Nov 08, 1999 at 10:39:12AM -0600, Coleman, Andrew wrote: > I'm having problems loading (insert into ..) a c array into a postgres > table. > I have tried all the variations on syntax I can think of, and searched for > the > answer... and either didn't find it or didn't recognize it.. I'm afraid you find a real problem here. I just didn't think about inserting arrays. If you give ecpg an array of int it inserts every single value as one int. That means: insert into foo(bar) values(:intarray) is equal to: for (i=0;i