Re: pgsql: Add standard collation UNICODE
| От | Jeff Davis |
|---|---|
| Тема | Re: pgsql: Add standard collation UNICODE |
| Дата | |
| Msg-id | a806bf1edc08639bc58c6a5ade725049a4f61398.camel@j-davis.com обсуждение исходный текст |
| Ответ на | Re: pgsql: Add standard collation UNICODE ("Jonathan S. Katz" <jkatz@postgresql.org>) |
| Список | pgsql-committers |
On Fri, 2023-03-10 at 11:52 -0800, Jonathan S. Katz wrote:
>
> The capitals should be first.
That is not true in a lot of natural language locales, whether libc or
ICU. The following return true for me (collencoding UTF-8):
select 'abc' collate "en_US" < 'ABC' collate "en_US";
select 'abc' collate "fr_FR" < 'ABC' collate "fr_FR";
select 'abc' collate "de_DE" < 'ABC' collate "de_DE";
select 'abc' collate "de_AT" < 'ABC' collate "de_AT";
select 'abc' collate "es_ES" < 'ABC' collate "es_ES";
select 'abc' collate "en-US-x-icu" < 'ABC' collate "en-US-x-icu";
select 'abc' collate "fr-CA-x-icu" < 'ABC' collate "fr-CA-x-icu";
select 'abc' collate "ja-JP-x-icu" < 'ABC' collate "ja-JP-x-icu";
select 'abc' collate "tr-TR-x-icu" < 'ABC' collate "tr-TR-x-icu";
There are some cases that return false, as well:
select 'abc' collate "ja_JP" < 'ABC' collate "ja_JP";
select 'abc' collate "fr_CA" < 'ABC' collate "fr_CA";
select 'abc' collate "en-US-u-va-posix-x-icu" <
'ABC' collate "en-US-u-va-posix-x-icu";
The cases where it's false appear to be more common in libc locales,
but most libc locales that I tested still sort lowercase first.
Regards,
Jeff Davis
В списке pgsql-committers по дате отправления: