Skip to content

Commit e87c14b

Browse files
committed
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
1 parent c9d94ea commit e87c14b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/interfaces/libpq/fe-trace.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,15 @@ pqTraceOutput_RowDescription(FILE *f, const char *message, int *cursor, bool reg
578578
static void
579579
pqTraceOutput_NegotiateProtocolVersion(FILE *f, const char *message, int *cursor)
580580
{
581+
int nparams;
582+
581583
fprintf(f, "NegotiateProtocolVersion\t");
582584
pqTraceOutputInt32(f, message, cursor, false);
583-
pqTraceOutputInt32(f, message, cursor, false);
585+
nparams = pqTraceOutputInt32(f, message, cursor, false);
586+
for (int i = 0; i < nparams; i++)
587+
{
588+
pqTraceOutputString(f, message, cursor, false);
589+
}
584590
}
585591

586592
static void

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy