Re: Add PQsendSyncMessage() to libpq
От | Anton Kirilov |
---|---|
Тема | Re: Add PQsendSyncMessage() to libpq |
Дата | |
Msg-id | 0F969A73-6C80-4C16-B326-B9E65C3C67E4@gmail.com обсуждение исходный текст |
Ответ на | Re: Add PQsendSyncMessage() to libpq (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: Add PQsendSyncMessage() to libpq
|
Список | pgsql-hackers |
Hello,
On Thu, 4 May 2023, 11:36 Alvaro Herrera, <alvherre@alvh.no-ip.org> wrote:
On 2023-May-04, Anton Kirilov wrote:
If you want to make sure it's fully flushed, your only option is to have
the call block.
Surely PQflush() returning 0 would signify that the output buffer has been fully flushed? Which means that there is another, IMHO simpler option than introducing an extra flag - make the new function return the same values as PQflush(), i.e. 0 for no error and fully flushed output, -1 for error, and 1 for partial flush (so that the user may start polling for write readiness). Of course, the function would never return 1 (but would block instead) unless the user has called PQsetnonblocking() beforehand.
Best wishes,
Anton Kirilov
В списке pgsql-hackers по дате отправления: