From: Thomas Munro Date: Mon, 19 Aug 2024 09:21:03 +0000 (+1200) Subject: Fix harmless LC_COLLATE[_MASK] confusion. X-Git-Tag: REL_17_RC1~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1cc73d15ea58ddc15f91269493811cef99987cb8;p=thirdparty%2Fpostgresql.git Fix harmless LC_COLLATE[_MASK] confusion. Commit ca051d8b101 called newlocale(LC_COLLATE, ...) instead of newlocale(LC_COLLATE_MASK, ...), in code reached only on FreeBSD. They have the same value on that OS, explaining why it worked. Fix. Back-patch to 14, where ca051d8b101 landed. --- diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c index 8d0ea4d31dd..1c57f12695e 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -1779,7 +1779,7 @@ get_collation_actual_version(char collprovider, const char *collcollate) locale_t loc; /* Look up FreeBSD collation version. */ - loc = newlocale(LC_COLLATE, collcollate, NULL); + loc = newlocale(LC_COLLATE_MASK, collcollate, NULL); if (loc) { collversion =