Re: problem with PQsendQuery/PQgetResult and COPY FROM statement

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: max(dot)poletto(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: problem with PQsendQuery/PQgetResult and COPY FROM statement
Date: 2006-05-22 06:54:30
Message-ID: 20060522065430.GA24404@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 19, 2006 at 11:51:00AM -0700, max(dot)poletto(at)gmail(dot)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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Victor B. Wagner 2006-05-22 06:55:59 Re: SSL certificate info on SQL level and HSM support for libpq
Previous Message Christopher Kings-Lynne 2006-05-22 03:15:42 Re: String Similarity