From 9752e745322f7c8d2be68aa982546aaac8074f75 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: Mon, 7 Apr 2025 14:33:14 +0900
Subject: [PATCH 1/2] Quote file names in error messages

Correct omission of double quotes around file names in newly-added
error messages.
---
 src/bin/pg_dump/pg_dumpall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index cdb8d84f064..c112d5d22b8 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -523,7 +523,7 @@ main(int argc, char *argv[])
 
 		OPF = fopen(global_path, PG_BINARY_W);
 		if (!OPF)
-			pg_fatal("could not open global.dat file: %s", strerror(errno));
+			pg_fatal("could not open global.dat file: \"%s\"", strerror(errno));
 	}
 	else if (filename)
 	{
@@ -1663,7 +1663,7 @@ dumpDatabases(PGconn *conn, ArchiveFormat archDumpFormat)
 		/* Create a map file (to store dboid and dbname) */
 		map_file = fopen(map_file_path, PG_BINARY_W);
 		if (!map_file)
-			pg_fatal("could not open map file: %s", strerror(errno));
+			pg_fatal("could not open map file: \"%s\"", strerror(errno));
 	}
 
 	for (i = 0; i < PQntuples(res); i++)
-- 
2.43.5

