mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
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
This commit is contained in:
@@ -685,6 +685,7 @@ extern void pqParseInput3(PGconn *conn);
|
||||
extern int pqGetErrorNotice3(PGconn *conn, bool isError);
|
||||
extern void pqBuildErrorMessage3(PQExpBuffer msg, const PGresult *res,
|
||||
PGVerbosity verbosity, PGContextVisibility show_context);
|
||||
extern int pqGetNegotiateProtocolVersion3(PGconn *conn);
|
||||
extern int pqGetCopyData3(PGconn *conn, char **buffer, int async);
|
||||
extern int pqGetline3(PGconn *conn, char *s, int maxlen);
|
||||
extern int pqGetlineAsync3(PGconn *conn, char *buffer, int bufsize);
|
||||
|
||||
Reference in New Issue
Block a user