agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Paul M. Aoki <aoki@postgres.Berkeley.EDU>
To: SRIRAMK@charlie.usd.edu
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: Copying a file through a C pgm
Date: Thu, 07 Apr 94 10:42:26 -0700
Message-ID: <199404071742.KAA10376@faerie.CS.Berkeley.EDU> (raw)
In-Reply-To: <940407123022.1dc5@charlie.usd.edu>

SRIRAMK@charlie.usd.edu writes:
> However, I want to embed copy in one PQexec command, *in a C program* and
> transfer the whole file into a class.  How do I do this ?

this is described in the reference manual in the section on libpq.

you can also look at the source for bin/monitor.c for a more
complete example.  look for the routines that handle copy in/out
(they have pretty obvious names).
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki




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: postgres@postgres.berkeley.edu
  Cc: aoki@postgres.Berkeley.EDU, SRIRAMK@charlie.usd.edu
  Subject: Re: Copying a file through a C pgm
  In-Reply-To: <199404071742.KAA10376@faerie.CS.Berkeley.EDU>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox