Re: Order changes in PG16 since ICU introduction

Tatsuo Ishii <ishii@sraoss.co.jp>

From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: pgsql@j-davis.com
Cc: daniel@manitou-mail.org, peter.eisentraut@enterprisedb.com, andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Date: 2023-06-08T00:30:33Z
Lists: pgsql-hackers
Hi,

> On Wed, 2023-06-07 at 23:50 +0200, Daniel Verite wrote:
>> The simplest way to obtain that in v16 is to teach initdb that
>> --locale=C without the --locale-provider option implies that
>> --locale-provider=libc ([1])
> 
> As I replied in that subthread, that creates a worse problem: if you
> only change the provider when the locale is C, then what about when the
> locale is *not* C?
> 
>   export LANG=en_US.UTF-8
>   initdb -D data --locale=fr_FR.UTF-8
>   ...
>     provider:    icu
>     ICU locale:  en-US
> 
> I believe that case is an order of magnitude worse than the other cases
> you brought up in that subthread.
> 
> It also leaves the fundamental problem in place that LOCALE only
> applies to the libc provider, which multiple people have agreed is not
> acceptable.

Daniels comment:
>> Yes it's a special case but when doing initdb --locale=C, a user does
>> not need or want an ICU locale. They want the same thing than what v15
>> does with the same arguments: a template0 database with
>> datlocprovider='c', datcollate='C', datctype='C', dateiculocale=NULL.

So in this case the only way to keep the same behavior in v16 with "initdb
--locale=C" (--no-locale) in v15 is, bulding PostgreSQL --without-icu?

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Introduce "builtin" collation provider.

  2. ICU: do not convert locale 'C' to 'en-US-u-va-posix'.

  3. initdb: change default --locale-provider back to libc.

  4. CREATE DATABASE: make LOCALE apply to all collation providers.

  5. Remove read-only server settings lc_collate and lc_ctype

  6. ICU: use uloc_getDefault() for initdb.

  7. Doc fixes for commit 1e16af8ab5.

  8. Doc: fix some rendering problems in the PDF docs build.

  9. Doc improvements for language tags and custom ICU collations.

  10. ICU: check for U_STRING_NOT_TERMINATED_WARNING.

  11. Reduce icu_validation_level default to WARNING.

  12. Revert "ICU: do not convert locale 'C' to 'en-US-u-va-posix'."

  13. Fix initdb --no-locale.

  14. Avoid character classification in regex escape parsing.