]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Simplify postgresql index reflection query
authorFederico Caselli <cfederico87@gmail.com>
Wed, 28 May 2025 20:03:51 +0000 (22:03 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Tue, 3 Jun 2025 20:15:31 +0000 (20:15 +0000)
commit703a323329b420fefec2b8a0a5f5f87ea3dc49d0
tree0e6ecee3d6e11363f91eb525da70f69109f3e2ee
parent9128189eaacf05a8479b27ef5b2e77f27f2f5ec3
Simplify postgresql index reflection query

Match on python side the values of `pg_am` and `pg_opclass`
to avoid joining them in the main query.
Since both queries have a limited size and are generally
stable their value can be cached using the inspector
cache.

Change-Id: I7074e88dc9ffb8f9c53c3cc12f1a7b72eec7fe8c
lib/sqlalchemy/dialects/postgresql/base.py