]> granicus.if.org Git - postgresql/commitdiff
pg_upgrade: clarify the database names in error files
authorBruce Momjian <bruce@momjian.us>
Wed, 9 Oct 2019 02:16:48 +0000 (22:16 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 9 Oct 2019 02:16:48 +0000 (22:16 -0400)
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
src/bin/pg_upgrade/function.c
src/bin/pg_upgrade/version.c

index 617270f101d4a62f6dd4f188c826a5509ceb7dc7..e7bf48a7394dc0afed9cfbe8e41b932b95cea00a 100644 (file)
@@ -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",
index 0c66d1c0566092869a0d3ffacffd24e77aeb9ad6..3cbaab6a5e205d5135616764c433cecb99c6a900 100644 (file)
@@ -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);
        }
 
index 10cb362e0929dd7e7a4fa47b25e9bb3de838bf42..42f1ce77571878e5bf1ddcc67e139283f7e1a9db 100644 (file)
@@ -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",