Re: Correct documentation for protocol version
От | Fujii Masao |
---|---|
Тема | Re: Correct documentation for protocol version |
Дата | |
Msg-id | e2993eeb-bdca-437d-8f18-5e681945486c@oss.nttdata.com обсуждение исходный текст |
Ответ на | Correct documentation for protocol version (Dave Cramer <davecramer@gmail.com>) |
Ответы |
Re: Correct documentation for protocol version
|
Список | pgsql-hackers |
On 2025/04/10 18:52, Dave Cramer wrote: > Greetings, > > The current docs say that if a client asks for a protocol that the backend doesn't support, it will return the newest minorversion. https://www.postgresql.org/docs/current/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-NEGOTIATEPROTOCOLVERSION <https://www.postgresql.org/docs/current/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-NEGOTIATEPROTOCOLVERSION> > > However that isn't what it returns. It actually returns the entire newest protocol that it supports. Attached is a patchto fix the docs. As far as I read the code, the server returns the protocol version requested by the client if it's less than or equal to the latest version the server supports. Otherwise, it returns the latest supported version. So the proposed description doesn't seem accurate either, does it? + Major is in the upper 16 bits and the lower in the low 16 bits. To match the style of similar descriptions, how about rephrasing it as: "The most significant 16 bits are the major version number, and the least significant 16 bits are the minor version number”? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: