Re: Nonblocking libpq + openssl = ?

Поиск
Список
Период
Сортировка
От Nikolai Zhubr
Тема Re: Nonblocking libpq + openssl = ?
Дата
Msg-id 57DD41BD.6020805@yandex.ru
обсуждение исходный текст
Ответ на Re: Nonblocking libpq + openssl = ?  (Andres Freund <andres@anarazel.de>)
Список pgsql-general
17.09.2016 3:27, Andres Freund:
[...]
> The relevant user-level API of libpq (PQisBusy) doesn't have a way to
> return "waiting for write". So we'd have to break API compatibility.

I think this is actually not entirely correct.
PQisBusy is fine, I do not see a need to touch it at all.
Rather, the return value of PQConsumeInput could be extended (in fact
has just been extended by me here) as follows:

Old spec:
0 == error
1 == no error

New spec:
0 == error
1 == no error
2 == no error but can't proceed until pending write finished.

Agreed, this is still an incompatible API change, but not excessively
destructive and it should be fairly easy to make adjustments for such
change (unless the usage has already been hopelessly broken).


Thank you,
Regards,
Nikolai

>
> Greetings,
>
> Andres Freund
>
>



В списке pgsql-general по дате отправления:

Предыдущее
От: Deven Phillips
Дата:
Сообщение: Re: Verifying LISTEN subscriptions?
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: question on error during COPY FROM