pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gordon A. Runkle <gar@no-spam-integrated-dynamics.com>
To: pgsql-docs@postgresql.org
Subject: Re: COPY Question
Date: Wed, 04 Apr 2001 18:11:13 -0400
Message-ID: <9ag5q6$tuk$1@news.tht.net> (raw)
References: <3ACB8E7F.C12A50CA@intrinsity.com>

In article <3ACB8E7F.C12A50CA@intrinsity.com>, "John Coers"
<coers@intrinsity.com> wrote:

> 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.

If you're on UNIX, look at the popen(3) call.

Gordon.
-- 
It doesn't get any easier, you just go faster.
   -- Greg LeMond



view thread (2+ messages)

Message-ID: <9ag5q6$tuk$1@news.tht.net>
Permalink:  ../9ag5q6$tuk$1@news.tht.net/
Also on:    postgresql.org/message-id/9ag5q6$tuk$1@news.tht.net

 · 

reply

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: gar@no-spam-integrated-dynamics.com
  Subject: Re: COPY Question
  In-Reply-To: <9ag5q6$tuk$1@news.tht.net>

* 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