Skip to content

Commit da1c0ac

Browse files
committed
pg_upgrade: Tweak translatable strings
"\r" (for progress output) must not be inside a translatable string (gettext gets upset). In passing, move the minimum supported version number to a separate argument, so that we don't have to retranslate this string every year now.
1 parent 09ed73f commit da1c0ac

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/bin/pg_upgrade/check.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ check_cluster_versions(void)
289289
*/
290290

291291
if (GET_MAJOR_VERSION(old_cluster.major_version) < 902)
292-
pg_fatal("This utility can only upgrade from PostgreSQL version 9.2 and later.\n");
292+
pg_fatal("This utility can only upgrade from PostgreSQL version %s and later.\n",
293+
"9.2");
293294

294295
/* Only current PG version is supported as a target */
295296
if (GET_MAJOR_VERSION(new_cluster.major_version) != GET_MAJOR_VERSION(PG_VERSION_NUM))

src/bin/pg_upgrade/util.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ end_progress_output(void)
4747
* nicely.
4848
*/
4949
if (log_opts.isatty)
50-
pg_log(PG_REPORT, "\r%-*s", MESSAGE_WIDTH, "");
50+
{
51+
printf("\r");
52+
pg_log(PG_REPORT, "%-*s", MESSAGE_WIDTH, "");
53+
}
5154
else if (log_opts.verbose)
5255
pg_log(PG_REPORT, "%-*s", MESSAGE_WIDTH, "");
5356
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy