aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numutils.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2024-08-15 10:44:15 -0400
committerRobert Haas <rhaas@postgresql.org>2024-08-15 10:44:15 -0400
commit516b87502dc1f99adb5126aa70cc796d53648c92 (patch)
tree3ebdbd34cb1ed9bd9fdf0c04468cd5f1ee09b42d /src/backend/utils/adt/numutils.c
parent8dc28d7eb868b6ce5a51614628bf46fc63c7e90c (diff)
downloadpostgresql-516b87502dc1f99adb5126aa70cc796d53648c92.tar.gz
postgresql-516b87502dc1f99adb5126aa70cc796d53648c92.zip
Do not hardcode PG_PROTOCOL_LATEST in NegotiateProtocolVersion
We shouldn't ask the client to use a protocol version later than the one that they requested. To avoid that, if the client requests a version newer than the latest one we support, set FrontendProtocol to the latest version we support, not the requested version. Then, use that value when building the NegotiateProtocolVersion message. (It seems good on general principle to avoid setting FrontendProtocol to a version we don't support, anyway.) None of this really matters right now, because we only support a single protocol version, but if that ever changes, we'll need this. Jelte Fennema-Nio, reviewed by me and incorporating some of my proposed wording Discussion: https://postgr.es/m/CAGECzQTyXDNtMXdq2L-Wp=OvOCPa07r6+U_MGb==h90MrfT+fQ@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/numutils.c')
0 files changed, 0 insertions, 0 deletions