From: ikedarintarof <ikedarintarof@oss.nttdata.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: doc: modify the comment in function libpqrcv_check_conninfo()
Date: Tue, 09 Jul 2024 15:56:34 +0900
Message-ID: <7d845121f0ea99e68b4403b9cd6f86ac@oss.nttdata.com> (raw)
In-Reply-To: <2faf37e9-3941-43b5-93e8-f54965b250df@oss.nttdata.com>
References: <6a1ca81b27fec4da0ccdfaaaec787982@oss.nttdata.com>
<CAGECzQRjJkCQ9AUQA_7kJw8c4iUwVAXPfD_VQu+-DVcd-LCT8A@mail.gmail.com>
<9c15a4b74d09348d03b02934fc429c94@oss.nttdata.com>
<CAGECzQQ+bpYVuF6GpVdc9vzHOObs5HJLmj5YohOb2d-ctmCffg@mail.gmail.com>
<c380192faada009af9aa5bfcd06e140d@oss.nttdata.com>
<CAGECzQRPygEJr3Ed2p7QsUsBkecUa0mpiE3zMOEh5_NtvAfgRw@mail.gmail.com>
<202ec279-c307-48b9-9920-730fb1221d27@oss.nttdata.com>
<d5f5fb21f27c17c400a4dbe386d008a8@oss.nttdata.com>
<2faf37e9-3941-43b5-93e8-f54965b250df@oss.nttdata.com>
> - * Validate connection info string, and determine whether it might
> cause
> - * local filesystem access to be attempted.
> + * The function
> + * 1. validates connection info string and
> + * 2. checks a password is provided if must_use_password is true.
>
> IMO, "Validate connection info string" is sufficient. The mention of
> must_use_password is redundant since it's explained in the latter part
> of
> the comment.
That is reasonable for me. I've removed the second one.
The modified patch is attached.
Regards,
Rintaro Ikeda
Attachments:v4-0001-modify-the-commnet-in-libpqrcv_check_conninfo.patch (text/x-diff, 1.4K) download
From 7a88ad7f306519648ad98eaf03e501e66ba9d5ea Mon Sep 17 00:00:00 2001
From: Rintaro Ikeda <51394766+rinikeda@users.noreply.github.com>
Date: Thu, 27 Jun 2024 16:04:08 +0900
Subject: [PATCH v4] modify the commnet in libpqrcv_check_conninfo()
---
.../replication/libpqwalreceiver/libpqwalreceiver.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.cindex 02f12f2921..6c42c209d2 100644--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c@@ -305,12 +305,12 @@ bad_connection:
}
/*
- * Validate connection info string, and determine whether it might cause- * local filesystem access to be attempted.+ * Validate connection info string.
*
* If the connection string can't be parsed, this function will raise
- * an error and will not return. If it can, it will return true if this- * connection string specifies a password and false otherwise.+ * an error. If must_use_password is true, the function raises an error+ * if no password is provided in the connection string. In any other case+ * it successfully completes.
*/
static void
libpqrcv_check_conninfo(const char *conninfo, bool must_use_password)
--
2.39.3 (Apple Git-146)
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: pgsql-hackers@postgresql.org
Cc: ikedarintarof@oss.nttdata.com, masao.fujii@oss.nttdata.com, postgres@jeltef.nl, robertmhaas@gmail.com
Subject: Re: doc: modify the comment in function libpqrcv_check_conninfo()
In-Reply-To: <7d845121f0ea99e68b4403b9cd6f86ac@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox