1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

libpq: Trace all NegotiateProtocolVersion fields

Previously, the names of the unsupported protocol options were not
traced. Since NegotiateProtocolVersion has not really been used yet,
that has not mattered much, but we hope to use it eventually, so let's
fix this.

Author: Jelte Fennema-Nio <postgres@jeltef.nl>
Discussion: https://postgr.es/m/CAGECzQTfc_O+HXqAo5_-xG4r3EFVsTefUeQzSvhEyyLDba-O9w@mail.gmail.com
This commit is contained in:
Robert Haas
2025-02-24 12:03:25 -05:00
parent c9d94ea215
commit e87c14b19e

View File

@ -578,9 +578,15 @@ pqTraceOutput_RowDescription(FILE *f, const char *message, int *cursor, bool reg
static void
pqTraceOutput_NegotiateProtocolVersion(FILE *f, const char *message, int *cursor)
{
int nparams;
fprintf(f, "NegotiateProtocolVersion\t");
pqTraceOutputInt32(f, message, cursor, false);
pqTraceOutputInt32(f, message, cursor, false);
nparams = pqTraceOutputInt32(f, message, cursor, false);
for (int i = 0; i < nparams; i++)
{
pqTraceOutputString(f, message, cursor, false);
}
}
static void