Commit 1634d361 authored by Bruce Momjian's avatar Bruce Momjian

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
parent 6c9fb69f
...@@ -858,7 +858,7 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster) ...@@ -858,7 +858,7 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
output_path, strerror(errno)); output_path, strerror(errno));
if (!db_used) 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; db_used = true;
} }
fprintf(script, " %s.%s\n", fprintf(script, " %s.%s\n",
...@@ -937,7 +937,7 @@ check_for_tables_with_oids(ClusterInfo *cluster) ...@@ -937,7 +937,7 @@ check_for_tables_with_oids(ClusterInfo *cluster)
output_path, strerror(errno)); output_path, strerror(errno));
if (!db_used) 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; db_used = true;
} }
fprintf(script, " %s.%s\n", fprintf(script, " %s.%s\n",
...@@ -1046,7 +1046,7 @@ check_for_reg_data_type_usage(ClusterInfo *cluster) ...@@ -1046,7 +1046,7 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
output_path, strerror(errno)); output_path, strerror(errno));
if (!db_used) 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; db_used = true;
} }
fprintf(script, " %s.%s.%s\n", fprintf(script, " %s.%s.%s\n",
...@@ -1137,7 +1137,7 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster) ...@@ -1137,7 +1137,7 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster)
output_path, strerror(errno)); output_path, strerror(errno));
if (!db_used) 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; db_used = true;
} }
fprintf(script, " %s.%s.%s\n", fprintf(script, " %s.%s.%s\n",
......
...@@ -256,7 +256,7 @@ check_loadable_libraries(void) ...@@ -256,7 +256,7 @@ check_loadable_libraries(void)
} }
if (was_load_failure) 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); old_cluster.dbarr.dbs[os_info.libraries[libnum].dbnum].db_name);
} }
......
...@@ -157,7 +157,7 @@ old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster) ...@@ -157,7 +157,7 @@ old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster)
strerror(errno)); strerror(errno));
if (!db_used) 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; db_used = true;
} }
fprintf(script, " %s.%s.%s\n", fprintf(script, " %s.%s.%s\n",
...@@ -258,7 +258,7 @@ old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster) ...@@ -258,7 +258,7 @@ old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster)
strerror(errno)); strerror(errno));
if (!db_used) 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; db_used = true;
} }
fprintf(script, " %s.%s.%s\n", fprintf(script, " %s.%s.%s\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment