]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add collation_schema parameter for schema-qualified PostgreSQL collations
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 21 Jul 2026 19:34:02 +0000 (15:34 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 24 Jul 2026 18:58:41 +0000 (14:58 -0400)
commit8cabfe9532c1429ea8aaba1cd85ef68efa0868f9
tree2d2414d77ee3571138e4737bc0dd4b9a9ecb16d5
parent44ed6bd4b71c2be522cd35623f5502bb263f5f69
Add collation_schema parameter for schema-qualified PostgreSQL collations

Added a new parameter String.collation_schema (and the corresponding
postgresql.DOMAIN.collation_schema and ColumnOperators.collate.collation_schema),
allowing a PostgreSQL schema-qualified collation name to be specified
explicitly, rather than embedding the schema name within the collation
string itself, which previously rendered incorrectly. As part of this
change, all collation-name rendering across DDL and the collate()
construct now consistently uses the dialect's identifier preparer for
quoting, rather than several separate, inconsistent hand-quoting code
paths; as a side effect, simple lowercase collation names such as
"utf8" are no longer unconditionally quoted in generated DDL.

Fixes: #9693
Change-Id: I6f7214d525d1df44c9049b92820745fc9ad16ce8
18 files changed:
doc/build/changelog/migration_21.rst
doc/build/changelog/unreleased_21/9693.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/named_types.py
lib/sqlalchemy/sql/_elements_constructors.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/default_comparator.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/operators.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/sql/type_api.py
test/dialect/postgresql/test_compiler.py
test/dialect/postgresql/test_types.py
test/sql/test_compare.py
test/sql/test_compiler.py
test/sql/test_operators.py
test/sql/test_quote.py
test/sql/test_types.py