Volkan YAZICI <volkan.yazici@gmail.com> writes:
> If there's no data in sync. mode, pqGetCopyData3() is calling
> pqReadData() - just like PQconsumeInput() does. Thus, in my opinion,
> user should call PQconsumeInput() in the program flow while using
> PQgetCopyData() in async. mode.
Yeah, I think you are right --- this is an error in the documentation.
It should read more like
When async is true (not zero), PQgetCopyData will not block waiting for
input; it will return zero if the COPY is still in progress but no
complete row is available. (In this case wait for read-ready and then
call PQconsumeInput before calling PQgetCopyData again.)
Will fix. Thanks for pointing it out.
regards, tom lane