1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-01 01:04:50 +03:00

Fix potential coredump on bad locale value in pg_upgrade.

Thinko in error report (and a typo in the message text, too).  We're
failing anyway, but it would be good to print something useful first.
Noted while reviewing a patch to make pg_upgrade's locale code laxer.
This commit is contained in:
Tom Lane 2014-01-30 18:10:06 -05:00
parent 3e71ce1e9a
commit 62acbdaae4

View File

@ -979,7 +979,7 @@ get_canonical_locale_name(int category, const char *locale)
res = setlocale(category, locale); res = setlocale(category, locale);
if (!res) if (!res)
pg_log(PG_FATAL, "failed to get system local name for \"%s\"\n", res); pg_log(PG_FATAL, "failed to get system locale name for \"%s\"\n", locale);
res = pg_strdup(res); res = pg_strdup(res);