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

From Massimiliano Poletto
Subject Re: problem with PQsendQuery/PQgetResult and COPY FROM statement
Date
Msg-id d166fa5e0605241412t15e93259x7413a94262051c77@mail.gmail.com
Whole thread Raw
In response to Re: problem with PQsendQuery/PQgetResult and COPY FROM statement  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: problem with PQsendQuery/PQgetResult and COPY FROM statement
List 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


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: XLogArchivingActive
Next
From: Alvaro Herrera
Date:
Subject: Re: