Re: PQconsumeInput() usage in PQgetCopyData() - Mailing list pgsql-novice

From Tom Lane
Subject Re: PQconsumeInput() usage in PQgetCopyData()
Date
Msg-id 25796.1118068102@sss.pgh.pa.us
Whole thread Raw
In response to PQconsumeInput() usage in PQgetCopyData()  (Volkan YAZICI <volkan.yazici@gmail.com>)
List pgsql-novice
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

pgsql-novice by date:

Previous
From: Volkan YAZICI
Date:
Subject: Re: phppgadmin
Next
From:
Date:
Subject: CRON Jobs and Backups