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 1tmZvR-007nAc-1R for pgsql-general@arkaria.postgresql.org; Mon, 24 Feb 2025 14:59:17 +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 1tmZvQ-003f05-2o for pgsql-general@arkaria.postgresql.org; Mon, 24 Feb 2025 14:59:16 +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 1tmZvP-003ezx-O5 for pgsql-general@lists.postgresql.org; Mon, 24 Feb 2025 14:59:15 +0000 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tmZvM-000Ud0-2m for pgsql-general@postgresql.org; Mon, 24 Feb 2025 14:59:14 +0000 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-5fc6fe05460so2772005eaf.1 for ; Mon, 24 Feb 2025 06:59:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740409153; x=1741013953; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=4CBj5kl0G1mycnbKsYF00Y3gqWWA12fTplkaQi6rI/g=; b=GF+FPOMwhmUrDbyO0FAyWaBDsAcd6QMjuLgXf0s2YkPa2O+1/L6PQt8bjGGiJqZqx/ m3BZsGA/wVS3MXJjxB2nnQ7HejuBtccN9dGWFioZCXr54UlX22vI/E2Z0gJiOEHe9X66 B6giJfzTy3zxcPd+MUVWX/xeKI0zmpLq8u0vmF5jNF6+U1m18ukWIqkEevX+bCzDOOon sctiZZbE7eXzFKUwDsb9xFJbHkMjf8a+1nAOEuw7x98mlVqJZYnCEiRlug6idNzbQO1r ElrhBb9JjCuMEYnV4M3O2YSjbTYW9YuKmXTGrufsGVKi9Fu86hQ4PJi3YxoIpkBFkCrh N2Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740409153; x=1741013953; h=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=4CBj5kl0G1mycnbKsYF00Y3gqWWA12fTplkaQi6rI/g=; b=G/UYDDLfDTpxwHmtut8GYReArFc3w3k1Hf3/aqZlw5jNN/RuOBCSD+zKbax9/bUNZU uEFHPSPU5zjorHGsctECSGcjn7kGN9m/8JfSSzHAFdxIPpAhVTX5XSNrJEGs5it7Yrrr f1B+Jnxt42JjellJiRZaYK9kzckdgVBJETT5DLpUed0nHcoTIurcVxFL9zqSWDaVEhjp CmXr0oGlj29KqgiToj4EXAMmXVX4kXsaFYkmxsrnzbYp/ev1jwF9LWMPXUAXzHM2G5a1 2GvAWtjT9hjexK6lgGUHigyn9Q5/hPQQNvl8J5zt/oB2xLJxmsC1MoIw1VaKfqtjai40 hm1A== X-Gm-Message-State: AOJu0YxguZPSfHjgFjTxYLb+5mS16Kd+z4YY7ZYB//Ln6o08L0VFWa2X lw0f09uBdgwE0DBmTrRBlWaBS/eNjN9YHkI9VFIH5lDtnGJ0s/1/F6OR//VdUB3yyS3KeZij5i1 qAEGRWpc1LLlSxIrmy6YUhHDFNW25wtZH X-Gm-Gg: ASbGncvtQ/cK1KTdDletYZDMYwMJte4CBsuiwa0Xq72BVNtGbInuMvUYoG0P97r4tNU 42EuRXmJo/4S7t1sjVhpceHGRMMRyEII0uSomYXrA/W7eY31RJWkZcw6BqZI3ADaosZZT7G1oWm Ea8oeZ+VRwaSgJu8Y9hdh1iWQSeVPldNATk/JsXt8dQA== X-Google-Smtp-Source: AGHT+IHgRoe55yZB6pIhxtZafN1KqwBTgG+8Q5hGQU/RB2ejsihcHlrW96GIFssZrCfhmp+gMwwoP1KuyZeDQ3nnxx8= X-Received: by 2002:a05:6808:318b:b0:3f4:9ae:cd73 with SMTP id 5614622812f47-3f4246b70cdmr12160687b6e.9.1740409153225; Mon, 24 Feb 2025 06:59:13 -0800 (PST) MIME-Version: 1.0 References: <20250224023225.197cac12@ardentperf.com> In-Reply-To: From: Ron Johnson Date: Mon, 24 Feb 2025 09:59:00 -0500 X-Gm-Features: AWEUYZlISXOd4dxEb9uVFEL8t38AG8Yi_-hH2de4wSRh6Mt2czBroCC0VZLO-0k Message-ID: Subject: Re: COLLATION update in 13.1 To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000578cd5062ee49566" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000578cd5062ee49566 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 24, 2025 at 6:53=E2=80=AFAM Matthias Apitz wrote: [snip] > pgsql -Usisis sisis > > sisis=3D# REINDEX (VERBOSE) DATABASE sisis; > sisis=3D# ALTER COLLATION "de_DE.utf8" REFRESH VERSION; > ALTER COLLATION > > Correct? > > Just reindex those with text columns. create or replace view dba.all_indices_types as select tbcl.relnamespace::regnamespace::text||'.'||tbcl.relname as table_name , ndcl.relname as index_name , array_agg(ty.typname order by att.attnum) as index_types from pg_class ndcl inner join pg_index nd on (ndcl.oid =3D nd.indexrelid and ndcl.relkind =3D 'i') inner join pg_class tbcl on (nd.indrelid =3D tbcl.oid and tbcl.relkind =3D 'r') inner join pg_attribute att on att.attrelid =3D nd.indexrelid inner join pg_type ty on att.atttypid =3D ty.oid where tbcl.relnamespace::regnamespace::text !=3D 'pg_catalog' group by tbcl.relnamespace::regnamespace::text||'.'||tbcl.relname , ndcl.relname order by 1, 2; select * from dba.all_indices_types where index_types && '{"text","varchar","char"}'; (This view might not handle indices on the parents of declared-partition tables.) --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000578cd5062ee49566 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Feb 24, 2025 at 6:53=E2=80=AFAM M= atthias Apitz <gurucubano@g= ooglemail.com> wrote:
[snip]=C2=A0
pgsql -Usisis sisis
s=
isis=3D# REINDEX (VERBOSE) DATABASE sisis;
sisis=3D# ALTER COLLATION &qu= ot;de_DE.utf8" REFRESH VERSION;
ALTER COLLATION

C=
orrect?

= Just reindex those with text columns.

create or replace view dba.all_indices_types as
=C2=A0 = =C2=A0 select tbcl.relnamespace::regnamespace::text||'.'||tbcl.reln= ame as table_name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 , ndcl.relna= me as index_name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 , array_agg(t= y.typname order by att.attnum) as index_types
=C2=A0 =C2=A0 from pg_clas= s ndcl
=C2=A0 =C2=A0 =C2=A0 =C2=A0 inner join pg_index nd
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 on (ndcl.oid =3D nd.indexrelid and ndcl.rel= kind =3D 'i')
=C2=A0 =C2=A0 =C2=A0 =C2=A0 inner join pg_class tb= cl
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 on (nd.indrelid =3D tbcl.oi= d and tbcl.relkind =3D 'r')
=C2=A0 =C2=A0 =C2=A0 =C2=A0 inner jo= in pg_attribute att
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 on att.att= relid =3D nd.indexrelid
=C2=A0 =C2=A0 =C2=A0 =C2=A0 inner join pg_type t= y
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 on att.atttypid =3D ty.oid=C2=A0 =C2=A0 where tbcl.relnamespace::regnamespace::text !=3D 'pg_ca= talog'
=C2=A0 =C2=A0 group by tbcl.relnamespace::regnamespace::text|= |'.'||tbcl.relname
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 , n= dcl.relname
=C2=A0 =C2=A0 order by 1, 2;
select * from dba.all_indices_types where index_types &&= amp; '{"text","varchar","char"}';

(This view might not handle indices on the par= ents of declared-partition tables.)

--
Death to <Redacted>, and butter sauce.
Don'= ;t boil me, I'm still alive.
<Redacted> lobster!
--000000000000578cd5062ee49566--