Re: Add standard collation UNICODE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add standard collation UNICODE
Дата
Msg-id 3046556.1677975036@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add standard collation UNICODE  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> On Sun, 2023-03-05 at 08:27 +1300, Thomas Munro wrote:
>> It's created for UTF-8 only, and UTF-8 sorts the same way as the
>> encoded code points, when interpreted as a sequence of unsigned char
>> by memcmp(), strcmp() etc.  Seems right?

> Right, makes sense.

> Though in principle, shouldn't someone using another encoding also be
> able to use ucs_basic? I'm not sure if that's a practical problem or
> not; I'm just curious. Does ICU provide a locale for sorting by code
> point?

ISTM we could trivially allow it in LATIN1 encoding as well;
strcmp would still have the effect of sorting by unicode code points.

Given the complete lack of field demand for making it work in
other encodings, I'm unexcited about spending more effort than that.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Request for comment on setting binary format output per session
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Request for comment on setting binary format output per session