]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Reflect index's column operator class on PostgreSQL
authorDenis Laxalde <denis@laxalde.org>
Wed, 28 May 2025 19:37:36 +0000 (15:37 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Wed, 28 May 2025 19:37:36 +0000 (15:37 -0400)
commit0642541c6371d19c8d28ff0bdaf6ab3822715a6d
tree4e3779a849c710477790181d7cc4476649cf306c
parentc8e558b4f5c8880443a931b9d78423327d3bda91
Reflect index's column operator class on PostgreSQL

Fill the `postgresql_ops` key of PostgreSQL's `dialect_options` returned by get_multi_indexes() with a mapping from column names to the operator class, if it's not the default for respective data type.

As we need to join on ``pg_catalog.pg_opclass``, the table definition is added to ``postgresql.pg_catalog``.

Fixes #8664.

Closes: #12504
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12504
Pull-request-sha: 8fdf93e1b27c371f52990d5fda8b2fdf79ec23eb

Change-Id: I8789c1e9d15f8cc9a7205f492ec730570f19bbcc
doc/build/changelog/unreleased_20/8664.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/pg_catalog.py
test/dialect/postgresql/test_reflection.py