Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Gavin Flower
On 27/04/13 02:48, Tom Lane wrote: Robert Haas writes: On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane wrote: However, the documentation in libpq.sgml is a bit bogus too, because it counsels trying the PQputCopyEnd() call again, which will not work (since we already changed the asyncStatus). We co

Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Robert Haas
On Fri, Apr 26, 2013 at 10:48 AM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane wrote: >>> However, the documentation in libpq.sgml is a bit bogus too, because it >>> counsels trying the PQputCopyEnd() call again, which will not work >>> (since we already cha

Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Tom Lane
Robert Haas writes: > On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane wrote: >> However, the documentation in libpq.sgml is a bit bogus too, because it >> counsels trying the PQputCopyEnd() call again, which will not work >> (since we already changed the asyncStatus). We could make that say "a >> zero

Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Robert Haas
On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane wrote: > However, the documentation in libpq.sgml is a bit bogus too, because it > counsels trying the PQputCopyEnd() call again, which will not work > (since we already changed the asyncStatus). We could make that say "a > zero result is informational, y

Re: [HACKERS] libpq COPY handling

2013-04-25 Thread Tom Lane
Robert Haas writes: > Noah Misch pointed out something interesting to me: > /* > * PQputCopyEnd - send EOF indication to the backend during COPY IN > * > * After calling this, use PQgetResult() to check command completion status. > * > * Returns 1 if successful, 0 if data could not be sent (o