Correct mismatched verb in a message

Started by Kyotaro Horiguchi9 months ago2 messages
#1Kyotaro Horiguchi
horikyota.ntt@gmail.com
1 attachment(s)

Hello.

The recent commit 1495eff7bdb introduced a message using a plural verb
for a singular subject.

pg_log_info("number of restored databases are %d", num_db_restore);

~~~

The attached patch fixes that issue.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachments:

0001-Fix-verb-agreement-in-count-message.patchtext/x-patch; charset=us-asciiDownload
From a4aa43c6b4a0d069a0869853275931c8afcda299 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: Mon, 7 Apr 2025 13:21:59 +0900
Subject: [PATCH] Fix verb agreement in count message

Correct a plural verb used by mistake.
---
 src/bin/pg_dump/pg_restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index b3dbde0d044..fe33b283a01 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -1254,7 +1254,7 @@ restore_all_databases(PGconn *conn, const char *dumpdirpath,
 	}
 
 	/* Log number of processed databases. */
-	pg_log_info("number of restored databases are %d", num_db_restore);
+	pg_log_info("number of restored databases is %d", num_db_restore);
 
 	/* Free dbname and dboid list. */
 	simple_oid_string_list_destroy(&dbname_oid_list);
-- 
2.43.5

#2Michael Paquier
michael@paquier.xyz
In reply to: Kyotaro Horiguchi (#1)
Re: Correct mismatched verb in a message

On Mon, Apr 07, 2025 at 03:13:59PM +0900, Kyotaro Horiguchi wrote:

The recent commit 1495eff7bdb introduced a message using a plural verb
for a singular subject.

pg_log_info("number of restored databases are %d", num_db_restore);

~~~

The attached patch fixes that issue.

Nice catch. I'll go fix this one.
--
Michael