public inbox for [email protected]
help / color / mirror / Atom feedFrom: =?utf-8?B?em91cmVubGk=?= <[email protected]>
To: =?utf-8?B?cGdzcWwtaGFja2Vycw==?= <[email protected]>
Subject: [PATCH] libpq: Fix incorrect message type in getBackendKeyData() comment
Date: Thu, 26 Feb 2026 11:01:29 +0800
Message-ID: <[email protected]> (raw)
Hi all,
This is a trivial fix for the comment of getBackendKeyData() function in fe-protocol3.c.
The comment incorrectly stated that the BackendKeyData message type is 'v', when in fact it is 'K' as defined in protocol.h. This fix corrects the comment to match the actual message type used in the protocol.
No functional changes are involved.
Patch is attached below.
Thanks,
zourenli
<[email protected]>
Attachments:
[application/octet-stream] v1-0001-fix-incorrect-message-type-in-getBackendKeyData-comment.patch (1.2K, 3-v1-0001-fix-incorrect-message-type-in-getBackendKeyData-comment.patch)
download | inline diff:
From 301c54c5345b2931b3cd4742bce179d798ca1a8a Mon Sep 17 00:00:00 2001
From: zourenli <[email protected]>
Date: Thu, 26 Feb 2026 10:54:23 +0800
Subject: [PATCH] libpq: Fix incorrect message type in getBackendKeyData()
comment
The getBackendKeyData function comment incorrectly stated that the
BackendKeyData message type is 'v', when in fact it is 'K' as defined
in protocol.h. This fix corrects the comment to match the actual
message type used in the protocol.
---
src/interfaces/libpq/fe-protocol3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c
index 8c1fda5caf0..66397bde555 100644
--- a/src/interfaces/libpq/fe-protocol3.c
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -1612,9 +1612,9 @@ getParameterStatus(PGconn *conn)
/*
* parseInput subroutine to read a BackendKeyData message.
- * Entry: 'v' message type and length have already been consumed.
+ * Entry: 'K' message type and length have already been consumed.
* Exit: returns 0 if successfully consumed message.
- * returns EOF if not enough data.
+ * returns EOF if not enough data.
*/
static int
getBackendKeyData(PGconn *conn, int msgLength)
--
2.32.0
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [PATCH] libpq: Fix incorrect message type in getBackendKeyData() comment
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox