Re: Losing my latin on Ordering...

Поиск
Список
Период
Сортировка
От Dominique Devienne
Тема Re: Losing my latin on Ordering...
Дата
Msg-id CAFCRh-8FFfaaJ9UT_3HOXpr4ZnC5eDyo=MzGLTD2474=TJG_wA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Losing my latin on Ordering...  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Losing my latin on Ordering...  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
On Tue, Feb 14, 2023 at 12:35 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
On 2023-Feb-14, Dominique Devienne wrote:
> Honestly, who expects the same prefix to sort differently based on what
> comes after, in left-to-right languages?
Look, we don't define the collation rules. 

Ok, ok, sorry. To you, Laurenz, and everyone.
I obviously disagree with these rules, but I'm a nobody, so who cares :)
 
> So the "C" collation is fine with general UTF-8 encoding?
> I.e. it will be codepoint ordered OK?

Sure, just make sure to use the definition of C that uses UTF-8 encoding
(I think it's typically called C.UTF-8).
 
OK, so for new DBs, sounds like we need to

CREATE DATABASE ... WITH LOCALE 'C.UTF-8' ENCODING UTF8 

Correct?

But what about existing DBs? Can the collation be changed a posteriori?
ALTER DATABASE does not seem to support the same options.

We don't want to have to sprinkle COLLATE "C" all over the place in the code.
And there are quite a few DBs out there already. What to do about them?

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Losing my latin on Ordering...
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Losing my latin on Ordering...