Re: ICU for global collation

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Daniel Verite <daniel(at)manitou-mail(dot)org>
Subject: Re: ICU for global collation
Date: 2022-01-11 11:10:14
Message-ID: eb85668e-0f68-7a6e-fc66-608ec404a6d1@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-01-11 11:18:58 Re: ICU for global collation
Previous Message Julien Rouhaud 2022-01-11 11:08:52 Re: ICU for global collation