aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2025-02-24 12:03:25 -0500
committerRobert Haas <rhaas@postgresql.org>2025-02-24 12:06:21 -0500
commite87c14b19ed458f6e07d2df338e5000453ad785d (patch)
treea9898ca7c295bdaae698cfddf01af00af0e45d32 /src
parentc9d94ea2158b7b16f8a7edbb18e504068771c91f (diff)
downloadpostgresql-e87c14b19ed458f6e07d2df338e5000453ad785d.tar.gz
postgresql-e87c14b19ed458f6e07d2df338e5000453ad785d.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpq/fe-trace.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-trace.c b/src/interfaces/libpq/fe-trace.c
index 641e70f321c..a45f0d85587 100644
--- a/src/interfaces/libpq/fe-trace.c
+++ b/src/interfaces/libpq/fe-trace.c
@@ -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