Subject: Copying a file through a C pgm

From: [email-masked]
Date: Thu, 7 Apr 1994 12:30:22 -0500 (CDT)

I need to copy a Unix file into a Postgres Class.   I am able to
do this easily as a command at the Postgres prompt. 

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 ?

Sriram Kal

[email-masked]

---

From: [email-masked] (Paul M. Aoki)
Date: Thu, 07 Apr 94 10:42:26 -0700

> 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  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki