Re: problem with PQsendQuery/PQgetResult and COPY FROM statement

From: "Massimiliano Poletto" <max(dot)poletto(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: problem with PQsendQuery/PQgetResult and COPY FROM statement
Date: 2006-05-24 21:12:16
Message-ID: d166fa5e0605241412t15e93259x7413a94262051c77@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> If you call it exactly once, it'll say that exactly once. If you keep
> calling it "millions of times", it'll keep saying that.

OK. I wonder, though, why at some point it does in fact return 0.

> Indeed. You forgot to "complete the COPY sequence" before returning
> to the PQgetResult loop. As long as the thing is in COPY mode,
> PQgetResult will return a result saying PGRES_COPY_IN. The point

Got it. Thanks.

max

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Reini Urban 2006-05-24 21:20:30 Re: compiling source code!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Previous Message Andrew Dunstan 2006-05-24 21:06:49 Re: file-locking and postmaster.pid