From: John Coers <coers@intrinsity.com>
To: pgsql-docs@postgresql.org
Subject: COPY Question
Date: Wed, 04 Apr 2001 16:13:35 -0500
Message-ID: <3ACB8E7F.C12A50CA@intrinsity.com> (raw)
Hi,
I am writing a C program that accesses a 7.0.3 database using libpq. I would like to
be able to do a fprintf through some file pointer or pipe TO the database via a PQexec call of COPY.
I have been unable to figure out if this is possible. I see where I can do this via stdin,
but I don't want the user to make the entry, I want the executable to do it and still enjoy
the performance of the COPY command.
I see that the COPY docs mention using a pipe instead of stdin:
"stdin Specifies that input comes from a pipe or terminal"
However, I can find no other info regarding doing a printf through a pipe directly to the db using COPY.
Is there a way to tell the COPY command to accept a file pointer or pipe or whatever other than stdin as it's input
when copying TO the db?
Thanks!
--
John Coers Intrinsity, Inc.
coers@intrinsity.com Austin, Texas
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-docs@postgresql.org
Cc: coers@intrinsity.com
Subject: Re: COPY Question
In-Reply-To: <3ACB8E7F.C12A50CA@intrinsity.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