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

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

From: Carlos Moreno <moreno(at)mochima(dot)com>
To: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: libpq++: trouble getting "copy table from" to work...
Date: 2002-04-04 06:57:33
Message-ID: 3CABF95D.5010909@mochima.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi,

I'm trying to insert several records into a table in one shot
(from a C++ program, that is).

All my attempts to use "copy from" have failed.  Is it
possible??  I've tried things like:

PgDatabase db(" ..... ");
db.Exec ("copy deleteme from stdin\n1\tName1\n2\tName2");

And similar things  (with a ; after stdin, with a \n. or
\n\\. at the end of the string -- they all fail with an
ErrorMessage() indicating a syntax error in the statement.

I even tried creating a temporary file and then using
copy from 'filename' -- but I get an error message saying
that I need superuser access to be allowed to copy from
and to regular files...

Help?!!  :-(


Thanks,

Carlos
-- 




Responses

pgsql-interfaces by date

Next:From: jtvDate: 2002-04-04 09:08:05
Subject: Re: libpq++: trouble getting "copy table from" to work...
Previous:From: Bruce MomjianDate: 2002-04-04 06:44:31
Subject: Re: PyGreSQL bug

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