Re: problem with PQsendQuery/PQgetResult and COPY FROM statement - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: problem with PQsendQuery/PQgetResult and COPY FROM statement
Date
Msg-id 20060522065430.GA24404@svana.org
Whole thread Raw
In response to problem with PQsendQuery/PQgetResult and COPY FROM statement  (max.poletto@gmail.com)
List pgsql-hackers
On Fri, May 19, 2006 at 11:51:00AM -0700, max.poletto@gmail.com wrote:
> I attempt to execute a "COPY test FROM STDIN" using PQsendQuery.
> Subsequently, after the appropriate poll()/PQconsumeInput/PQisBusy
> calls, PQgetResult returns tens of millions of (invalid?) non-null
> PGresults.  This behavior seems incorrect, and sometimes causes my
> application to exhaust memory and crash.

In addition to the issues other people have pointed out, when using
COPY you transfer the data with PQputCopyData()/PQgetCopyData().

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: String Similarity
Next
From: "Victor B. Wagner"
Date:
Subject: Re: SSL certificate info on SQL level and HSM support for libpq