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.
pgpGxacZJby5Y.pgp
Description: PGP signature