Re: COLLATION update in 13.1 - Mailing list pgsql-general

From Matthias Apitz
Subject Re: COLLATION update in 13.1
Date
Msg-id CAHzebO8SMasPTACdMASnSXY29WzuOEe1GBW+xgqBOn6pf+mPrQ@mail.gmail.com
Whole thread Raw
In response to Re: COLLATION update in 13.1  (Dominique Devienne <ddevienne@gmail.com>)
Responses Re: COLLATION update in 13.1
Re: COLLATION update in 13.1
List pgsql-general
Thanks. I tried a lot of combinations. Based on the output of \l

                                                  List of databases
    Name    |  Owner   | Encoding |   Collate   |    Ctype    | ICU Locale | Locale Provider |   Access privileges
------------+----------+----------+-------------+-------------+------------+-----------------+-----------------------
 bar        | foo      | UTF8     | de_DE.UTF-8 | de_DE.UTF-8 |            | libc            |
 customers  | sisis    | UTF8     | de_DE.UTF-8 | de_DE.UTF-8 |            | libc            |
...

postgres=# ALTER COLLATION "de_DE.UTF8" REFRESH VERSION;
ERROR:  collation "de_DE.UTF8" for encoding "UTF8" does not exist

yours (Dominique) seems to work:

postgres=# ALTER COLLATION "de_DE.utf8" REFRESH VERSION;
NOTICE:  version has not changed
ALTER COLLATION

If I understand the other reply from Laurenz Albe right, the correct procedure would be:

pgsql -Usisis sisis
sisis=# REINDEX (VERBOSE) DATABASE sisis;
sisis=# ALTER COLLATION "de_DE.utf8" REFRESH VERSION;
ALTER COLLATION

Correct?



On Mon, Feb 24, 2025 at 12:35 PM Dominique Devienne <ddevienne@gmail.com> wrote:
On Mon, Feb 24, 2025 at 12:33 PM Matthias Apitz <gurucubano@googlemail.com> wrote:
Thanks for your hint, Jeremy. But this does not work either:

postgres=# SELECT collname, collversion FROM pg_collation where collname = 'de_DE.utf8';
  collname  | collversion
------------+-------------
 de_DE.utf8 | 2.38
(1 row)

postgres=# ALTER COLLATION de_DE.utf8 REFRESH VERSION;
ERROR:  schema "de_de" does not exist

What do I wrong?

Missing quotes.  ALTER COLLATION "de_DE.utf8" REFRESH VERSION;

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Default Value Retention After Dropping Default
Next
From: Laurenz Albe
Date:
Subject: Re: COLLATION update in 13.1