]> 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)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 28 May 2025 20:56:07 +0000 (22:56 +0200)
commit06f0f5f42c0cc3c136971b0a14ce740d2fb87dd7
tree728b5325a75cf4cc14c5496cea75e865057aa7d7
parent6082e55a8a10a79ec1f1d0ce87cdd6551b3f81b1
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
(cherry picked from commit 0642541c6371d19c8d28ff0bdaf6ab3822715a6d)
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