Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Robert Haas
On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us 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).

Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Robert Haas
On Fri, Apr 26, 2013 at 10:48 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: However, the documentation in libpq.sgml is a bit bogus too, because it counsels trying the PQputCopyEnd() call

Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Gavin Flower
On 27/04/13 02:48, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] libpq COPY handling

2013-04-25 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

[HACKERS] libpq COPY handling

2013-04-22 Thread Robert Haas
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 (only possible * in nonblock