Received: from mailhost.intrinsity.com (gw.evsx.com [208.246.32.130]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f34LDc897823 for ; Wed, 4 Apr 2001 17:13:38 -0400 (EDT) (envelope-from coers@intrinsity.com) Received: from victoria.eng.evsx.com (victoria.eng.evsx.com [192.168.1.29]) by mailhost.intrinsity.com (Postfix) with ESMTP id 86B693F3A6 for ; Wed, 4 Apr 2001 16:13:35 -0500 (CDT) Received: from intrinsity.com (IDENT:coers@fortyacres.eng.evsx.com [192.168.1.116]) by victoria.eng.evsx.com (8.10.1/8.10.1) with ESMTP id f34LDZ912661 for ; Wed, 4 Apr 2001 16:13:35 -0500 (CDT) Message-ID: <3ACB8E7F.C12A50CA@intrinsity.com> Date: Wed, 04 Apr 2001 16:13:35 -0500 From: John Coers Reply-To: coers@intrinsity.com X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-docs@postgresql.org Subject: COPY Question Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200104/11 X-Sequence-Number: 581 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