Re: ICU for global collation

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: ICU for global collation
Дата
Msg-id eb85668e-0f68-7a6e-fc66-608ec404a6d1@enterprisedb.com
обсуждение исходный текст
Ответ на Re: ICU for global collation  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
On 07.01.22 10:03, Julien Rouhaud wrote:
>> I changed the datcollate, datctype, and the new daticucoll fields to type
>> text (from name).  That way, the daticucoll field can be set to null if it's
>> not applicable.  Also, the limit of 63 characters can actually be a problem
>> if you want to use some combination of the options that ICU locales offer.
>> And for less extreme uses, having variable-length fields will save some
>> storage, since typical locale names are much shorter.
> 
> I understand the need to have daticucoll as text, however it's not clear to me
> why this has to be changed for datcollate and datctype?  IIUC those will only
> ever contain libc-based collation and are still mandatory?

Right.  I just did this for consistency.  It would be strange otherwise 
to have some fields as name and some as text.  Arguably, using "name" 
here was wrong to begin with, since they are not really object names. 
Maybe there used to be a reason to avoid variable-length fields in 
pg_database, but there isn't one now AFAICT.

> - pg_upgrade
> 
> It checks (in check_locale_and_encoding()) the compatibility for each database,
> and it looks like the daticucoll field should also be verified.  Other than
> that I don't think there is anything else needed for the pg_upgrade part as
> everything else should be handled by pg_dump (I didn't look at the changes yet
> given the below problems).

Ok, I have added this and will include it in my next patch submission.

> - CREATE DATABASE

> - initdb

Ok, some work is needed to make these interfaces behave sensibly in 
various combinations.  I will look into that.



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: ICU for global collation
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: ICU for global collation