Fix lc_collate_is_c() when LC_COLLATE != LC_CTYPE.

Jeff Davis <jdavis@postgresql.org>

Commit: 8148e7124d550770e3a9064b9b45b354d783b949
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2024-11-06T22:44:35Z
Releases: 17.1
Fix lc_collate_is_c() when LC_COLLATE != LC_CTYPE.

An unfortunate typo in commit 2d819a08a1 can cause wrong results when
the default collation provider is libc, LC_CTYPE=C, and LC_COLLATE is
a real locale. Users with this combination of settings must REINDEX
all affected indexes.

The same typo can also cause performance degradation when LC_COLLATE=C
and LC_CTYPE is a real locale.

Problem does not exist in master (due to refactoring), so fix only in
version 17.

Reported-by: Drew Callahan
Discussion: https://postgr.es/m/d5081a7f4f6d425c28dd69d1e09b2e78f149e726.camel@j-davis.com

Files

PathChange+/−
src/backend/utils/adt/pg_locale.c modified +2 −2

Discussion