Return-Path: owner-postman 
Delivery-Date: Thu, 07 Apr 94 15:21:32 -0700
Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id KAA19379 for postgres-redist; Thu, 7 Apr 1994 10:43:18 -0700
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199404071743.KAA19379@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id KAA19370 for <postgres@postgres.Berkeley.EDU>; Thu, 7 Apr 1994 10:43:18 -0700
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id KAA10376; Thu, 7 Apr 1994 10:42:27 -0700
Message-Id: <199404071742.KAA10376@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
To: SRIRAMK@charlie.usd.edu
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: Copying a file through a C pgm 
Reply-To: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
In-reply-to: Your message of Thu, 7 Apr 1994 12:30:22 -0500 (CDT) 
	     <940407123022.1dc5@charlie.usd.edu> 
Date: Thu, 07 Apr 94 10:42:26 -0700
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-redist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Thu, 07 Apr 94 10:43:18 -0700
Resent-XMts: smtp

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

