libpq: Handle NegotiateProtocolVersion message
Peter Eisentraut <peter@eisentraut.org>
libpq: Handle NegotiateProtocolVersion message
Before, receiving a NegotiateProtocolVersion message would result in a
confusing error message like
expected authentication request from server, but received v
This adds proper handling of this protocol message and produces an
on-topic error message from it.
Reviewed-by: Jacob Champion <jchampion@timescale.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/f9c7862f-b864-8ef7-a861-c4638c83e209%40enterprisedb.com
Files
| Path | Change | +/− |
|---|---|---|
| src/interfaces/libpq/fe-connect.c | modified | +17 −5 |
| src/interfaces/libpq/fe-protocol3.c | modified | +55 −0 |
| src/interfaces/libpq/libpq-int.h | modified | +1 −0 |
Discussion
- libpq support for NegotiateProtocolVersion 13 messages · 2022-10-13 → 2022-11-17