Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8148e71

Browse files
committed
Fix lc_collate_is_c() when LC_COLLATE != LC_CTYPE.
An unfortunate typo in commit2d819a0 can cause wrong results whenthe default collation provider is libc, LC_CTYPE=C, and LC_COLLATE isa real locale. Users with this combination of settings must REINDEXall affected indexes.The same typo can also cause performance degradation when LC_COLLATE=Cand LC_CTYPE is a real locale.Problem does not exist in master (due to refactoring), so fix only inversion 17.Reported-by: Drew CallahanDiscussion:https://postgr.es/m/d5081a7f4f6d425c28dd69d1e09b2e78f149e726.camel@j-davis.com
1 parentb7467ab commit8148e71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/pg_locale.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,9 +1370,9 @@ lc_collate_is_c(Oid collation)
13701370
}
13711371
elseif (default_locale.provider==COLLPROVIDER_LIBC)
13721372
{
1373-
localeptr=setlocale(LC_CTYPE,NULL);
1373+
localeptr=setlocale(LC_COLLATE,NULL);
13741374
if (!localeptr)
1375-
elog(ERROR,"invalidLC_CTYPE setting");
1375+
elog(ERROR,"invalidLC_COLLATE setting");
13761376
}
13771377
else
13781378
elog(ERROR,"unexpected collation provider '%c'",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp