Search Postgresql Archives

Re: libpq in Asynchronous mode and COPY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Leib <michael_i_leib@xxxxxxxxx> writes:
> I'm using v8.4.4 and have an application written using libpq
> in Asynchronous Command Mode and primarily dealing with the
> COPY related apis. I have been successful in getting my application
> working, but have come across an issue that I would like to determine
> if I have done something wrong (probably), it's FAD (functioning as
> designed) or a defect (doubtful).

I think you're expecting one result too many.  In the non-async case,
there is not a separate result returned for PQputCopyEnd, so I'd not
expect one for async mode either.  PQputCopyEnd just returns an integer
status code.  The subsequent PGresult is all you'll get, in either
normal or error cases.

(It may be worth noting that PQputCopyEnd should be expected to succeed,
perhaps after some retries, in any case except where the connection has
been lost entirely.  This does not have anything to do with whether the
server failed the COPY command.)

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux