Re: proposal: psql: show current user in prompt

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: psql: show current user in prompt
Дата
Msg-id CAFj8pRCKVzcq7E6f8bqsD0TYc6BFyh3PfsZdhxtEobFmpMxx3g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: psql: show current user in prompt  (Jelte Fennema <postgres@jeltef.nl>)
Ответы Re: proposal: psql: show current user in prompt  (Jelte Fennema <postgres@jeltef.nl>)
Список pgsql-hackers


út 29. 8. 2023 v 14:11 odesílatel Jelte Fennema <postgres@jeltef.nl> napsal:
On Mon, 28 Aug 2023 at 15:00, Pavel Stehule <pavel.stehule@gmail.com> wrote:
+                       minServerMajor = 1600;
+                       serverMajor = PQserverVersion(pset.db) / 100;

Instead of using the server version, we should instead use the
protocol version negotiation that's provided by the
NegotiateProtocolVersion message type. We should bump the requested
protocol version from 3.0 to 3.1 and check that the server supports
3.1. Otherwise proxies or connection poolers might get this new
message type, without knowing what to do with them.

I checked this part and this part of the code, and it looks like current libpq doesn't allow optional requirements of higher protocol version number.

With the current state of NegotiateProtocolVersion handling I am not able to connect to any older servers, because there is no fallback implementation.

My personal feeling from this area is that the protocol design is done, but it is not implemented on libpq level. My feelings can be wrong. The protocol number is hardcoded in libpq, so I cannot change it from the client side.

But maybe I don't see some possibility?

Regards

Pavel


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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Testing autovacuum wraparound (including failsafe)
Следующее
От: Jelte Fennema
Дата:
Сообщение: Re: proposal: psql: show current user in prompt