Re: where is the output - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: where is the output
Date
Msg-id 20051221183228.GA2013@svana.org
Whole thread Raw
In response to where is the output  (ohp@pyrenet.fr)
List pgsql-hackers
On Wed, Dec 21, 2005 at 07:16:28PM +0100, ohp@pyrenet.fr wrote:
> In PHP (Apache Module)
>
> I try pg_exec("COPY blah TO STDOUT WITH blah");
> It runs  for ever...
>
> How can I get the output of COPY in PHP?

You need to use the API functions for copy. In C they are:

PQgetCopyData
PQputCopyData
PQputCopyEnd

I'm sure PHP has these functions, or perhaps the older versions:

PQgetline
PQputline
PQendcopy

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: ohp@pyrenet.fr
Date:
Subject: where is the output
Next
From: Tom Lane
Date:
Subject: Re: replicating tsearch2 across versions of postgres