From: jtv <jtv@xs4all.nl>
To: Carlos Moreno <moreno@mochima.com>
Cc: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: libpq++: trouble getting "copy table from" to work...
Date: Thu, 4 Apr 2002 11:08:05 +0200
Message-ID: <20020404110805.A11481@xs4all.nl> (raw)
In-Reply-To: <3CABF95D.5010909@mochima.com>
References: <3CABF95D.5010909@mochima.com>
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 <stdplug>
...
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: jtv@xs4all.nl, moreno@mochima.com
Subject: Re: libpq++: trouble getting "copy table from" to work...
In-Reply-To: <20020404110805.A11481@xs4all.nl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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