From: Carlos Moreno <moreno@mochima.com>
To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: libpq++: trouble getting "copy table from" to work...
Date: Thu, 04 Apr 2002 01:57:33 -0500
Message-ID: <3CABF95D.5010909@mochima.com> (raw)
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
--
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: moreno@mochima.com
Subject: Re: libpq++: trouble getting "copy table from" to work...
In-Reply-To: <3CABF95D.5010909@mochima.com>
* 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