Re: PQconsumeInput() usage in PQgetCopyData()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PQconsumeInput() usage in PQgetCopyData()
Дата
Msg-id 25796.1118068102@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PQconsumeInput() usage in PQgetCopyData()  (Volkan YAZICI <volkan.yazici@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Volkan YAZICI
Дата:
Сообщение: Re: phppgadmin
Следующее
От:
Дата:
Сообщение: CRON Jobs and Backups