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.
char *save;
char *res;
+ /* get the current setting, so we can restore it. */
save = setlocale(category, NULL);
if (!save)
pg_fatal("failed to get the current locale\n");
res = setlocale(category, locale);
if (!res)
- pg_fatal("failed to get system local name for \"%s\"\n", res);
+ pg_fatal("failed to get system locale name for \"%s\"\n", locale);
res = pg_strdup(res);