Thread
-
[PATCH 1/2] Quote file names in error messages
Kyotaro Horiguchi <horikyota.ntt@gmail.com> — 2025-04-07T05:33:14Z
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 ----Next_Part(Mon_Apr__7_15_27_21_2025_268)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0002-Use-map.dat-file-instead-of-map-file-in-error-messag.patch"