Re: Move defaults toward ICU in 16?

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Move defaults toward ICU in 16?
Date: 2023-03-09 09:36:28
Message-ID: 0ad3543a-40d9-17f9-794f-75ea0106544a@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08.03.23 06:55, Jeff Davis wrote:
> On Fri, 2023-03-03 at 21:45 -0800, Jeff Davis wrote:
>>>>    0002: update template0 in new cluster (as described above)
>
> I think 0002 is about ready and I plan to commit it soon unless someone
> has more comments.

0002 seems fine to me.

> I'm holding off on 0001 for now, because you objected. But I still
> think 0001 is a good idea so I'd like to hear more before I withdraw
> it.

Let's come back to that after dealing with the other two.

>>>>    0003: default initdb to use ICU
>
> This is also about ready, and I plan to commit this soon after 0002.

This seems mostly ok to me. I have a few small comments.

+ default, ICU obtains the ICU locale from the ICU default collator.

This seems to be a fancy way of saying, the default ICU locale will be
set to something that approximates what you have set your operating
system to. Which is what we want, I think. Can we say this in a more
user-friendly way?

+static void
+check_icu_locale()

should be check_icu_locale(void)

+ if (U_ICU_VERSION_MAJOR_NUM >= 54)
+ {

If we're going to add more of these mysterious version checks, could we
add a comment about what they are for?

However, I suspect what this chunk is doing is some sort of
canonicalization/language-tag conversion, which per the other thread, I
have some questions about.

How about for this patch, we skip this part and just do the else branch

+ icu_locale = pg_strdup(default_locale);

and then put the canonicalization business into the canonicalization
patch set?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-03-09 09:36:49 Re: Time delayed LR (WAS Re: logical replication restrictions)
Previous Message Daniel Gustafsson 2023-03-09 09:35:18 Re: Doc: Rework contrib appendix -- informative titles, tweaked sentences