1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-05 07:41:25 +03:00

Clarify pg_upgrade error message that the 'postgres' database must exist

in the old cluster.
This commit is contained in:
Bruce Momjian
2011-10-28 08:07:30 -04:00
parent ece12659cf
commit 9846dcfb9e

View File

@@ -403,9 +403,14 @@ check_old_cluster_has_new_cluster_dbs(void)
new_cluster.dbarr.dbs[new_dbnum].db_name) == 0) new_cluster.dbarr.dbs[new_dbnum].db_name) == 0)
break; break;
if (old_dbnum == old_cluster.dbarr.ndbs) if (old_dbnum == old_cluster.dbarr.ndbs)
{
if (strcmp(new_cluster.dbarr.dbs[new_dbnum].db_name, "postgres") == 0)
pg_log(PG_FATAL, "The \"postgres\" database must exist in the old cluster\n");
else
pg_log(PG_FATAL, "New cluster database \"%s\" does not exist in the old cluster\n", pg_log(PG_FATAL, "New cluster database \"%s\" does not exist in the old cluster\n",
new_cluster.dbarr.dbs[new_dbnum].db_name); new_cluster.dbarr.dbs[new_dbnum].db_name);
} }
}
} }