From: ikedarintarof <ikedarintarof@oss.nttdata.com>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: pgsql-hackers@postgresql.org
Subject: Re: doc: modify the comment in function libpqrcv_check_conninfo()
Date: Thu, 27 Jun 2024 16:09:37 +0900
Message-ID: <9c15a4b74d09348d03b02934fc429c94@oss.nttdata.com> (raw)
In-Reply-To: <CAGECzQRjJkCQ9AUQA_7kJw8c4iUwVAXPfD_VQu+-DVcd-LCT8A@mail.gmail.com>
References: <6a1ca81b27fec4da0ccdfaaaec787982@oss.nttdata.com>
<CAGECzQRjJkCQ9AUQA_7kJw8c4iUwVAXPfD_VQu+-DVcd-LCT8A@mail.gmail.com>
Thank you for your comment!
I've added the must_use_password argument. A new patch is attached.
On 2024-06-26 23:36, Jelte Fennema-Nio wrote:
> On Wed, 26 Jun 2024 at 14:53, ikedarintarof
> <ikedarintarof@oss.nttdata.com> wrote:
>> The function 'libpqrcv_check_conninfo()' returns 'void', but the
>> comment
>> above says that the function returns true or false.
>> I've attached a patch to modify the comment.
>
> Agreed that the current comment is wrong, but the new comment should
> mention the must_use_password argument. Because only if
> must_use_password is true, will it throw an error.
Attachments:0001-modify-the-commnet-in-libpqrcv_check_conninfo.patch (text/x-diff, 1.3K) download
From 18c302625176a38ecf95ede0bd0e5a4104358823 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] modify the commnet in libpqrcv_check_conninfo()
---
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.cindex 02f12f2921..252e97a19b 100644--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c@@ -309,8 +309,9 @@ bad_connection:
* local filesystem access to be attempted.
*
* 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 it can and must_use_password is false, it will do nothing.+ * If must_use_password is true, the function checks whther a password is + * provided and decides an error should be raised.
*/
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, postgres@jeltef.nl
Subject: Re: doc: modify the comment in function libpqrcv_check_conninfo()
In-Reply-To: <9c15a4b74d09348d03b02934fc429c94@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