Changes to pg_dump/psql following collation "C" in the catalog
Daniel Verite <daniel@manitou-mail.org>
From: "Daniel Verite" <daniel@manitou-mail.org>
To: pgsql-hackers@lists.postgresql.org
Date: 2018-12-21T15:15:17Z
Lists: pgsql-hackers
Hi, One consequence of using the "C" collation in the catalog versus the db collation is that pg_dump -t with a regexp may not find the same tables as before. It happens when these conditions are all met: - the collation of the database is not "C" - the regexp has locale-dependant parts - the names to match include characters that are sensitive to locale-dependant matching For instance a table named "rapport_journée_12" in an fr_FR.UTF-8 db used to be found by pg_dump -t 'rapport_\w+_\d+', and is now missed in the devel version. It seems that to fix that, we could qualify the references to columns such as "relname" and "schema_name" with COLLATE "default" clauses in the queries that use pattern-matching in client-side tools, AFAICS pg_dump and psql. Before going any further with this idea, is there agreement that it's an issue to address and does this look like the best way to do that? Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
Commits
-
Ensure consistent name matching behavior in processSQLNamePattern().
- 478cacb50e48 12.0 landed