Re: ICU for global collation

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Daniel Verite <daniel@manitou-mail.org>
Date: 2022-02-16T14:25:40Z
Lists: pgsql-hackers

Attachments

On 02.02.22 14:01, Peter Eisentraut wrote:
> Here is the main patch rebased on the various changes that have been 
> committed in the meantime.  There is still some work to be done on the 
> user interfaces of initdb, createdb, etc.
> 
> I have split out the database-level collation version tracking into a 
> separate patch [0].  I think we should get that one in first and then 
> refresh this one.

All that preliminary work has been completed, so here is a new patch.

There isn't actually much left here now except all the new DDL and 
command-line options to set this up and documentation for those.  I have 
given all that another review and I hope it's more intuitive now, but I 
guess there will be other opinions.

I have changed the terminology a bit to match ICU better.  It's now 
called "ICU locale ID" and "locale provider" (instead of "collation"). 
It might actually cover things that are not strictly collations (such as 
the isalpha stuff in text search, maybe, in the future).

One thing that is left that bothers me is that the invocations of 
get_collation_actual_version() have all gotten quite complicated.  I'm 
thinking about ways to refactor that, but I haven't got a great idea yet.

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add CHECK_FOR_INTERRUPTS while restoring changes during decoding.

  2. Improve ICU option handling in CREATE DATABASE

  3. Don't allow creation of database with ICU locale with unsupported encoding

  4. Make locale option behavior more consistent

  5. pg_dump: Dump colliculocale

  6. Remove further unwanted linker flags from perl_embed_ldflags

  7. Doc: document possible need to raise kernel's somaxconn limit.

  8. Reduce warnings with -Wshadow=compatible-local builds

  9. Remove redundant spaces in _outA_Expr() output

  10. Fix outdated --help message for postgres -f

  11. pg_upgrade: Fix version comparison for global ICU support

  12. Silence -Wmaybe-uninitialized compiler warning in dbcommands.c.

  13. Add option to use ICU as global locale provider

  14. DefineCollation() code cleanup

  15. Change collate and ctype fields to type text

  16. Call pg_newlocale_from_collation() also with default collation

  17. Use libc version as a collation version on glibc systems.

  18. Silence -Wmaybe-uninitialized compiler warnings in dbcommands.c.

  19. Make LC_COLLATE and LC_CTYPE database-level settings. Collation and