Received: from mxzilla2.xs4all.nl (mxzilla2.xs4all.nl [194.109.6.50]) by postgresql.org (Postfix) with ESMTP id 9F27E475B96 for ; Thu, 4 Apr 2002 04:08:06 -0500 (EST) Received: from xs3.xs4all.nl (jtv@xs3.xs4all.nl [194.109.6.44]) by mxzilla2.xs4all.nl (8.12.0/8.12.0) with ESMTP id g34986wG067287; Thu, 4 Apr 2002 11:08:06 +0200 (CEST) Received: (from jtv@localhost) by xs3.xs4all.nl (8.9.0/8.9.0) id LAA12586; Thu, 4 Apr 2002 11:08:06 +0200 (CEST) Date: Thu, 4 Apr 2002 11:08:05 +0200 From: jtv To: Carlos Moreno Cc: pgsql-interfaces Subject: Re: libpq++: trouble getting "copy table from" to work... Message-ID: <20020404110805.A11481@xs4all.nl> Mail-Followup-To: Carlos Moreno , pgsql-interfaces References: <3CABF95D.5010909@mochima.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3CABF95D.5010909@mochima.com>; from moreno@mochima.com on Thu, Apr 04, 2002 at 01:57:33AM -0500 X-Archive-Number: 200204/5 X-Sequence-Number: 2547 On Thu, Apr 04, 2002 at 01:57:33AM -0500, Carlos Moreno wrote: > > PgDatabase db(" ..... "); > db.Exec ("copy deleteme from stdin\n1\tName1\n2\tName2"); There are separate calls to actually feed the data to the backend through stdin. Unfortunately, these calls are in libpq, and libpq++ does not expose them so you can't access them without going "underneath" and coding to the C API. #include ... May I suggest checking out libpqxx, an alternative to libpq++ that does expose 'copy from stdin'? It's at http://members.ams.chello.nl/j.vermeulen31/proj-libpqxx.html The stuff you're looking for is in the TableWriter class. Jeroen