Skip site navigation (1) Skip section navigation (2)

Re: libpq++: trouble getting "copy table from" to work...

From: jtv <jtv(at)xs4all(dot)nl>
To: Carlos Moreno <moreno(at)mochima(dot)com>
Cc: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: libpq++: trouble getting "copy table from" to work...
Date: 2002-04-04 09:08:05
Message-ID: 20020404110805.A11481@xs4all.nl (view raw or flat)
Thread:
Lists: pgsql-interfaces
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


In response to

Responses

pgsql-interfaces by date

Next:From: Carlos MorenoDate: 2002-04-04 09:24:41
Subject: Re: libpq++: trouble getting "copy table from" to work...
Previous:From: Carlos MorenoDate: 2002-04-04 06:57:33
Subject: libpq++: trouble getting "copy table from" to work...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group