pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Add option to use ICU as global locale provider
Date: Fri, 18 Mar 2022 17:27:49 +0800
Message-ID: <20220318092749.363m4uv6rq24lctz@jrouhaud> (raw)
In-Reply-To: <20220318074051.n46mkwp2zkbxeesf@jrouhaud>
References: <E1nUnH5-0006aR-MX@gemulon.postgresql.org>
	<YjPn5+Y9Gj58PlEW@paquier.xyz>
	<20220318031244.tu3wwlyxxabzq3iu@jrouhaud>
	<CA+hUKGK1rLK_4jGbRWiXMx_nrH4NzS6FqXF0sZxGivrQYMh1EA@mail.gmail.com>
	<20220318063648.4ja6rxlyzvc3viio@jrouhaud>
	<20220318074051.n46mkwp2zkbxeesf@jrouhaud>

(moving to -hackers)

On Fri, Mar 18, 2022 at 03:40:51PM +0800, Julien Rouhaud wrote:
> On Fri, Mar 18, 2022 at 02:36:48PM +0800, Julien Rouhaud wrote:
> > On Fri, Mar 18, 2022 at 06:15:47PM +1300, Thomas Munro wrote:
> > >
> > > No idea what's happening here but one observation is that that animal
> > > is running an older distro that shipped with ICU 5.0.  Commit b8f9a2a6
> > > may hold a clue...
> >
> > Right.  I'm setting up a similar podman environment, hopefully more info soon.
> 
> And indeed b8f9a2a6 is the problem.  We would need some form of
> icu_set_collation_attributes() on the frontend side if we want to detect such a
> problem on older ICU version at the expected moment rather than when
> bootstrapping the info.  A similar check is also needed in createdb().

I'm attaching a patch that fixes both issues for me with ICU 50.  Note that
there's already a test that would have failed for CREATE DATABASE if initdb
tests didn't fail first, so no new test needed.

I ended up copy/pasting icu_set_collation_attributes() in initdb.c.  There
shouldn't be new attributes added in old ICU versions, and there are enough
differences to make it work in the frontend that it didn't seems worth to have
a single function.

Attachments:

  v1-0001-Fix-global-icu-collations-for-ICU-54.patch (text/plain, 0B) download

view thread (22+ messages)  latest in thread

Message-ID: <20220318092749.363m4uv6rq24lctz@jrouhaud>
Permalink:  ../20220318092749.363m4uv6rq24lctz@jrouhaud/
Also on:    postgresql.org/message-id/20220318092749.363m4uv6rq24lctz@jrouhaud

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rjuju123@gmail.com, thomas.munro@gmail.com, michael@paquier.xyz, peter@eisentraut.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Add option to use ICU as global locale provider
  In-Reply-To: <20220318092749.363m4uv6rq24lctz@jrouhaud>
  References: <E1nUnH5-0006aR-MX@gemulon.postgresql.org> <YjPn5+Y9Gj58PlEW@paquier.xyz> <20220318031244.tu3wwlyxxabzq3iu@jrouhaud> <CA+hUKGK1rLK_4jGbRWiXMx_nrH4NzS6FqXF0sZxGivrQYMh1EA@mail.gmail.com> <20220318063648.4ja6rxlyzvc3viio@jrouhaud> <20220318074051.n46mkwp2zkbxeesf@jrouhaud> <20220318092749.363m4uv6rq24lctz@jrouhaud>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox