From 1634d361577aab30c7d90336c96b969a2f5e5811 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 8 Oct 2019 22:16:48 -0400 Subject: [PATCH] pg_upgrade: clarify the database names in error files Previously, the "Database:" label in the error file was unclear if the label was a status report or the problem was _in_ the database. New text is "In database:". Reported-by: Justin Pryzby Discussion: https://postgr.es/m/20191002172337.GC9680@telsasoft.com Backpatch-through: head --- src/bin/pg_upgrade/check.c | 8 ++++---- src/bin/pg_upgrade/function.c | 2 +- src/bin/pg_upgrade/version.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c index 617270f101..e7bf48a739 100644 --- a/src/bin/pg_upgrade/check.c +++ b/src/bin/pg_upgrade/check.c @@ -858,7 +858,7 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster) output_path, strerror(errno)); if (!db_used) { - fprintf(script, "Database: %s\n", active_db->db_name); + fprintf(script, "In database: %s\n", active_db->db_name); db_used = true; } fprintf(script, " %s.%s\n", @@ -937,7 +937,7 @@ check_for_tables_with_oids(ClusterInfo *cluster) output_path, strerror(errno)); if (!db_used) { - fprintf(script, "Database: %s\n", active_db->db_name); + fprintf(script, "In database: %s\n", active_db->db_name); db_used = true; } fprintf(script, " %s.%s\n", @@ -1046,7 +1046,7 @@ check_for_reg_data_type_usage(ClusterInfo *cluster) output_path, strerror(errno)); if (!db_used) { - fprintf(script, "Database: %s\n", active_db->db_name); + fprintf(script, "In database: %s\n", active_db->db_name); db_used = true; } fprintf(script, " %s.%s.%s\n", @@ -1137,7 +1137,7 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster) output_path, strerror(errno)); if (!db_used) { - fprintf(script, "Database: %s\n", active_db->db_name); + fprintf(script, "In database: %s\n", active_db->db_name); db_used = true; } fprintf(script, " %s.%s.%s\n", diff --git a/src/bin/pg_upgrade/function.c b/src/bin/pg_upgrade/function.c index 0c66d1c056..3cbaab6a5e 100644 --- a/src/bin/pg_upgrade/function.c +++ b/src/bin/pg_upgrade/function.c @@ -256,7 +256,7 @@ check_loadable_libraries(void) } if (was_load_failure) - fprintf(script, _("Database: %s\n"), + fprintf(script, _("In database: %s\n"), old_cluster.dbarr.dbs[os_info.libraries[libnum].dbnum].db_name); } diff --git a/src/bin/pg_upgrade/version.c b/src/bin/pg_upgrade/version.c index 10cb362e09..42f1ce7757 100644 --- a/src/bin/pg_upgrade/version.c +++ b/src/bin/pg_upgrade/version.c @@ -157,7 +157,7 @@ old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster) strerror(errno)); if (!db_used) { - fprintf(script, "Database: %s\n", active_db->db_name); + fprintf(script, "In database: %s\n", active_db->db_name); db_used = true; } fprintf(script, " %s.%s.%s\n", @@ -258,7 +258,7 @@ old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster) strerror(errno)); if (!db_used) { - fprintf(script, "Database: %s\n", active_db->db_name); + fprintf(script, "In database: %s\n", active_db->db_name); db_used = true; } fprintf(script, " %s.%s.%s\n", -- 2.40.0