Re: default icu locale for new databases (PG15)

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Robert Sjöblom <robert(dot)sjoblom(at)fortnox(dot)se>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: default icu locale for new databases (PG15)
Date: 2023-01-12 15:38:35
Message-ID: 665febd71c7fc4237020a96eb2f59fe548a28385.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2023-01-12 at 15:56 +0100, Robert Sjöblom wrote:
> When initializing a new database server with a default collation, there
> are a number of different locales available. What's the difference between
>
> 1. se-x-icu
> 2. se-SE-x-icu
> 3. sv-SE-x-icu
>
> ? And, perhaps more importantly, how do I future-proof this so that I'm
> not making a decision today that will make my life worse when upgrading
> from postgres 15 to 16+? For a database with Swedish collation, which
> option is "the best"? Or perhaps "the most foolproof"?

Of the alternatives you list, only "sv-SE-x-icu" makes sense, because "se"
stands for the Sámi or Lapp language, not Swedish.

You could choose between "sv-SE", "sv-FI" and "sv-AX", depending on whether
you are located in Sweden, Finland or the Åland Islands. I don't speak Swedish,
so I don't know how different they are and how they differ from the generic "sv".

I don't think any of these Locales will go away in the forseeable future.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-01-12 15:38:54 Re: Changing displayed time zone in RAISE NOTICE output?
Previous Message Tom Lane 2023-01-12 15:08:14 Re: Intervals and ISO 8601 duration