Correct documentation for protocol version

Dave Cramer <davecramer@gmail.com>

From: Dave Cramer <davecramer@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-04-10T09:52:14Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Do not hardcode PG_PROTOCOL_LATEST in NegotiateProtocolVersion

Attachments

Greetings,

The current docs say that if a client asks for a protocol that the backend
doesn't support, it will return the newest minor version.
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 patch to fix the docs.


Dave Cramer