aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/pg_upgrade/check.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c
index 2117b7f80d4..60c1fbbf976 100644
--- a/contrib/pg_upgrade/check.c
+++ b/contrib/pg_upgrade/check.c
@@ -333,13 +333,14 @@ static void
check_locale_and_encoding(ControlData *oldctrl,
ControlData *newctrl)
{
- if (strcmp(oldctrl->lc_collate, newctrl->lc_collate) != 0)
+ /* These are often defined with inconsistent case, so use pg_strcasecmp(). */
+ if (pg_strcasecmp(oldctrl->lc_collate, newctrl->lc_collate) != 0)
pg_log(PG_FATAL,
"old and new cluster lc_collate values do not match\n");
- if (strcmp(oldctrl->lc_ctype, newctrl->lc_ctype) != 0)
+ if (pg_strcasecmp(oldctrl->lc_ctype, newctrl->lc_ctype) != 0)
pg_log(PG_FATAL,
"old and new cluster lc_ctype values do not match\n");
- if (strcmp(oldctrl->encoding, newctrl->encoding) != 0)
+ if (pg_strcasecmp(oldctrl->encoding, newctrl->encoding) != 0)
pg_log(PG_FATAL,
"old and new cluster encoding values do not match\n");
}