Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tmXF5-007RSZ-Am for pgsql-general@arkaria.postgresql.org; Mon, 24 Feb 2025 12:07:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tmXF3-0028R7-GU for pgsql-general@arkaria.postgresql.org; Mon, 24 Feb 2025 12:07:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tmXF3-0028QM-1m for pgsql-general@lists.postgresql.org; Mon, 24 Feb 2025 12:07:21 +0000 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tmXEz-000TIS-2t for pgsql-general@lists.postgresql.org; Mon, 24 Feb 2025 12:07:20 +0000 Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-6e68943a295so37985566d6.0 for ; Mon, 24 Feb 2025 04:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1740398838; x=1741003638; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xxu2kYaw8vj/nBARU+5JAuGjsqdr4k6x3dPT/oWNYsU=; b=Rid7D/5y2M4dn7agvrzCz0MkcZu3Oy78ktILV/gRpXe+H/RlvZL1ljIDtbVSFY7BAf gmRV15nfbZ+xBH3nOWMb5soggb8LZMhe+KK5ltwT4jhfxQZ5Mxlg+ud+hF2L1W2qVyRu 75SdjUotlGVS5g+yzhLZgSdvZyLtBg3hZUzaGi7h6aS/UobwirQzFjJDkKmrhAVPdHqC fk4PMn+i50jshrEPM8kCNVF48e/veuHOXDnSw9oltQnMTcI9SgMNIWOCZ33F/4VnidtG eNbomP8NtgDyyWX7SUyEDJczSwKw1rDBOHD9HWI9uCctFm3dCNqmCb+64N2LGZ+lG9QN DO1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740398838; x=1741003638; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xxu2kYaw8vj/nBARU+5JAuGjsqdr4k6x3dPT/oWNYsU=; b=ZcXYXUdHzqetYdUbANc/RiPfRbh3ZyUgGjfJPRgUqv0Y07kIKWKFuhOdmExYbUURGz NB5VUPd53Kb9T0dZGI+uqDpw4f5xjy59xiWEgRjEoBZsbTbIKFO4eg8FwOkwjTfaA6SO btE8uFHUsgUKL86WHOU96bqSZsKaSKXyqI3oySMjhGYpEgV4NREJ/IiX0FCvkMc5E5+4 iO8dHiber1K8X+VahuFD8gWJNzqYCUJrQAiIDfpGiEnbbk+hQdS9H7IiTEjlAd+H/K79 20T7N+tVZAqEn7Uwy4KTIxEMpwJbxNIvq8KdaST3vPn33zOpoPA9pVAEt9SNUZ+Hmz7l F9Hg== X-Forwarded-Encrypted: i=1; AJvYcCUGy7P41xX0/KS7qKzLuU2VYJakttF7xu1iHjDSv29Utb1jpIZVkUj4nNiVKRHlgC0yXb3xOUFy8fIfvwCj@lists.postgresql.org X-Gm-Message-State: AOJu0YxDTfbIrjRXI1NHN2FMi9ykZj2BCyfHv8RW4vFJ2v8sB7Vxujo5 TuQQCnxSMHKTjA+iwAK1Hm1yur+Ka3rW2pzqh8l8H9OM+Iac9meDUw83u5+4q1qaYNutoweDcWP w2BSYXEmw6Q9tcBGlVKatgtAUjIE= X-Gm-Gg: ASbGnctZtLiOpeZ74h2zrwWsbyi9gmxKKxkfSMk0bfvPJnP378gq2NkNcmkwb6vMK25 Q7As3G2hJ1XijmN9pi1pJYq79e+0js8SJ4idKASM2NGgIUdS8Vuguq50qp0x7R1Cv0+oXmULWKG szZKwp6xXt X-Google-Smtp-Source: AGHT+IFhjw5n5hjSBzeoVwFTcfbI6LQyEeaCegnUun3jDm8cG/PSI1OcI1ttQaU7e2zMpTSw0sDOeb+EUvaVRFA5Uvs= X-Received: by 2002:ad4:576b:0:b0:6e6:5fe5:a596 with SMTP id 6a1803df08f44-6e6b0106f69mr146605416d6.19.1740398838258; Mon, 24 Feb 2025 04:07:18 -0800 (PST) MIME-Version: 1.0 References: <20250224023225.197cac12@ardentperf.com> In-Reply-To: From: Matthias Apitz Date: Mon, 24 Feb 2025 13:07:06 +0100 X-Gm-Features: AWEUYZlkY2Hjd--GmzP7ysYVp9nddnZHAeoALs7TsD8_B_aX5kJKQKviqLgwP-U Message-ID: Subject: Re: COLLATION update in 13.1 To: Laurenz Albe Cc: Dominique Devienne , Jeremy Schneider , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000085a2c9062ee22e6a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000085a2c9062ee22e6a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks. I did \l before which gives: 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 | ... But why the ALTER statement needs the spelling different as the output of \l : sisis=3D# ALTER COLLATION "de_DE.UTF-8" REFRESH VERSION; ERROR: collation "de_DE.UTF-8" for encoding "UTF8" does not exist sisis=3D# ALTER COLLATION "de_DE.utf8" REFRESH VERSION; NOTICE: version has not changed ALTER COLLATION ? On Mon, Feb 24, 2025 at 12:57=E2=80=AFPM Laurenz Albe wrote: > On Mon, 2025-02-24 at 12:53 +0100, Matthias Apitz wrote: > > If I understand the other reply from Laurenz Albe right, the correct > procedure would be: > > > > pgsql -Usisis sisis > > sisis=3D# REINDEX (VERBOSE) DATABASE sisis; > > sisis=3D# ALTER COLLATION "de_DE.utf8" REFRESH VERSION; > > ALTER COLLATION > > > > Correct? > > That REINDEX is certainly correct, even though it rebuilds way more > indexes than necessary. > > If the ALTER COLLATION statement is correct or not depends on the > collation you are using. You could look at "\l" and "pg_collation" > to get the name right. > > Yours, > Laurenz Albe > > -- > > *E-Mail Disclaimer* > Der Inhalt dieser E-Mail ist ausschliesslich fuer den > bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat > dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, > dass jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung > oder > Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir bitten Sie, sic= h > in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. > > *CONFIDENTIALITY NOTICE & DISCLAIMER > *This message and any attachment are > confidential and may be privileged or otherwise protected from disclosure > and solely for the use of the person(s) or entity to whom it is intended. > If you have received this message in error and are not the intended > recipient, please notify the sender immediately and delete this message > and > any attachment from your system. If you are not the intended recipient, b= e > advised that any use of this message is prohibited and may be unlawful, > and > you must not copy this message or attachment or disclose the contents to > any other person. > --00000000000085a2c9062ee22e6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks. I did \l before which gives:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 List of databases
=C2=A0 =C2=A0 Name = =C2=A0 =C2=A0| =C2=A0Owner =C2=A0 | Encoding | =C2=A0 Collate =C2=A0 | =C2= =A0 =C2=A0Ctype =C2=A0 =C2=A0| ICU Locale | Locale Provider | =C2=A0 Access= privileges
------------+----------+----------+-------------+-----------= --+------------+-----------------+-----------------------
=C2=A0bar =C2= =A0 =C2=A0 =C2=A0 =C2=A0| foo =C2=A0 =C2=A0 =C2=A0| UTF8 =C2=A0 =C2=A0 | de= _DE.UTF-8 | de_DE.UTF-8 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| libc = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
=C2=A0customers =C2=A0| sisis= =C2=A0 =C2=A0| UTF8 =C2=A0 =C2=A0 | de_DE.UTF-8 | de_DE.UTF-8 | =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| libc =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|
...

But why the ALTER statement = needs the spelling different as the output of \l :

sisis=3D# ALTER COLLATION "de_DE.UTF-8" REFRESH VERSION;
ERRO= R: =C2=A0collation "de_DE.UTF-8" for encoding "UTF8" do= es not exist

sisis=3D# ALTER COLLATION "d= e_DE.utf8" REFRESH VERSION;
NOTICE: =C2=A0version has not changedALTER COLLATION

?


=
On Mon, Feb 24, 2025 at 12:57=E2=80=AFPM Laurenz Albe <laurenz.albe@cybertec.at> wro= te:
On Mon, 2025= -02-24 at 12:53 +0100, Matthias Apitz wrote:
> If I understand the other reply from Laurenz Albe right, the correct p= rocedure would be:
>
> pgsql -Usisis sisis
> sisis=3D# REINDEX (VERBOSE) DATABASE sisis;
> sisis=3D# ALTER COLLATION "de_DE.utf8" REFRESH VERSION;
> ALTER COLLATION
>
> Correct?

That REINDEX is certainly correct, even though it rebuilds way more
indexes than necessary.

If the ALTER COLLATION statement is correct or not depends on the
collation you are using.=C2=A0 You could look at "\l" and "p= g_collation"
to get the name right.

Yours,
Laurenz Albe

--

*E-Mail Disclaimer*
Der Inhalt dieser E-Mail ist ausschliesslich fuer den
bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat <= br> dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder=
Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir bitten Sie, sich =
in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen.

*CONFIDENTIALITY NOTICE & DISCLAIMER
*This message and any attachment are
confidential and may be privileged or otherwise protected from disclosure <= br> and solely for the use of the person(s) or entity to whom it is intended. <= br> If you have received this message in error and are not the intended
recipient, please notify the sender immediately and delete this message and=
any attachment from your system. If you are not the intended recipient, be =
advised that any use of this message is prohibited and may be unlawful, and=
you must not copy this message or attachment or disclose the contents to any other person.
--00000000000085a2c9062ee22e6a--