Re: libpq support for NegotiateProtocolVersion

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: libpq support for NegotiateProtocolVersion
Дата
Msg-id
1a280569-6900-f62d-af34-74d4c457ae5a@enterprisedb.com
Ответ на
Список
Дерево обсуждения
libpq support for NegotiateProtocolVersion Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: libpq support for NegotiateProtocolVersion Nathan Bossart <nathandbossart@gmail.com>
Re: libpq support for NegotiateProtocolVersion Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: libpq support for NegotiateProtocolVersion Jacob Champion <jchampion@timescale.com>
Re: libpq support for NegotiateProtocolVersion Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: libpq support for NegotiateProtocolVersion Jacob Champion <jchampion@timescale.com>
Re: libpq support for NegotiateProtocolVersion Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: libpq support for NegotiateProtocolVersion Jacob Champion <jchampion@timescale.com>
Re: libpq support for NegotiateProtocolVersion Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: libpq support for NegotiateProtocolVersion Jacob Champion <jchampion@timescale.com>
Re: libpq support for NegotiateProtocolVersion Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: libpq support for NegotiateProtocolVersion Jacob Champion <jchampion@timescale.com>
Re: libpq support for NegotiateProtocolVersion Peter Eisentraut <peter.eisentraut@enterprisedb.com>
On 16.11.22 19:35, Jacob Champion wrote:
> On Tue, Nov 15, 2022 at 2:19 AM Peter Eisentraut
>  wrote:
>> I think for the current code, the following would be an appropriate
>> adjustment:
>>
>> diff --git a/src/interfaces/libpq/fe-connect.c
>> b/src/interfaces/libpq/fe-connect.c
>> index 746e9b4f1efc..d15fb96572d9 100644
>> --- a/src/interfaces/libpq/fe-connect.c
>> +++ b/src/interfaces/libpq/fe-connect.c
>> @@ -3412,8 +3412,7 @@ PQconnectPoll(PGconn *conn)
>>                   /* Get the type of request. */
>>                   if (pqGetInt((int *) &areq, 4, conn))
>>                   {
>> -                   /* We'll come back when there are more data */
>> -                   return PGRES_POLLING_READING;
>> +                   goto error_return;
>>                   }
>>                   msgLength -= 4;
>>
>> And then the handling of the 'v' message in my patch would also be
>> adjusted like that.
> 
> Yes -- though that particular example may be dead code, since we
> should have already checked that there are at least four more bytes in
> the buffer.

I have committed this change and the adjusted original patch.  Thanks.



В списке pgsql-hackers по дате отправления
От: Andrew Dunstan
Дата:
От: Japin Li
Дата:
FAQ