Re: docs: Include database collation check on SQL from alter_collation.sgml - Mailing list pgsql-hackers

From Matheus Alcantara
Subject Re: docs: Include database collation check on SQL from alter_collation.sgml
Date
Msg-id DHSC1UP35NS0.VACTPNXNR7FS@gmail.com
Whole thread
In response to docs: Include database collation check on SQL from alter_collation.sgml  ("Matheus Alcantara" <matheusssilv97@gmail.com>)
List pgsql-hackers
On Thu Apr 9, 2026 at 3:00 PM -03, Matheus Alcantara wrote:
> Hi,
>
> The ALTER COLLATION documentation section include a SQL that can be used
> to identity all collations in the current database that need to be
> refreshed due to a collation version miss match and the objects that
> depend on them. However if there is objects that use the database
> collation these objects are not returned by the query.
>
> The attached patch change the query to include the database collation
> check to report collation version miss match for objects that use the
> database default collation as they are not stored on pg_depend.
>

The proposed SQL on the v1 patch still don't handle the cases where an
index is using the database default collation.

The new v2 attached handle it properly. The new query is based on the
query suggested on Locale data changes wiki page [1] but with some
changes to check the collation version mismatch.


[1] https://wiki.postgresql.org/wiki/Locale_data_changes

--
Matheus Alcantara
EDB: https://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Lakshmi N
Date:
Subject: Re: Show VIRTUAL keyword for virtual generated columns in pg_dump and psql
Next
From: John Mikk
Date:
Subject: POC: Comparison of partitioning key values