From d9e4bef8cbdf53a57849035c5e78b6f181df4e1f Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Tue, 18 Jan 2022 08:58:38 +0900 Subject: [PATCH] Enhance pgproto. Allow to show ParameterStatus's parameter name and value. --- src/tools/pgproto/read.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tools/pgproto/read.c b/src/tools/pgproto/read.c index 5153356a4..c7fb54885 100644 --- a/src/tools/pgproto/read.c +++ b/src/tools/pgproto/read.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2018 Tatsuo Ishii - * Copyright (c) 2018-2021 PgPool Global Development Group + * Copyright (c) 2018-2022 PgPool Global Development Group * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby @@ -163,8 +163,12 @@ read_until_ready_for_query(PGconn *conn, int timeout, int wait_for_ready_for_que break; case 'S': /* Parameter status */ - fprintf(stderr, "<= BE ParameterStatus\n"); - read_and_discard(conn); + fprintf(stderr, "<= BE ParameterStatus("); + len = read_int32(conn); + p = read_string(conn); + fprintf(stderr, "name: \"%s\"", p); + p = read_string(conn); + fprintf(stderr, " value: \"%s\")\n", p); break; case 'T': /* Row Description */ -- 2.39.5