ALTER COLLATION ... REFRESH VERSION - sample script outdated - Mailing list pgsql-docs

From PG Doc comments form
Subject ALTER COLLATION ... REFRESH VERSION - sample script outdated
Date
Msg-id 162159253478.13685.8891467480521577037@wrigleys.postgresql.org
Whole thread Raw
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/sql-altercollation.html
Description:

The sample script that is given in section "Notes" finds only libc
collations. If you omit joining "pg_depend" you also find outdated ICU
collations. Like this:

DO  $BODY$
DECLARE
    r   RECORD;
BEGIN
    FOR r IN (
        SELECT n.nspname, c.collname
          FROM pg_collation c JOIN pg_namespace n ON c.collnamespace =
n.oid
         WHERE c.collversion <> pg_collation_actual_version(c.oid)
    ) LOOP
        EXECUTE format('ALTER COLLATION %I.%I REFRESH VERSION;', r.nspname,
r.collname);
        RAISE NOTICE 'ALTER COLLATION %.% REFRESH VERSION;', r.nspname,
r.collname;
    END LOOP;
END;
$BODY$;

pgsql-docs by date:

Previous
From: Jürgen Purtz
Date:
Subject: Re: Additional Chapter for Tutorial
Next
From: Fujii Masao
Date:
Subject: Re: more detailed description of tup_returned and tup_fetched