]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Improve PostgreSQL custom operators
authorFederico Caselli <cfederico87@gmail.com>
Fri, 26 May 2023 22:36:04 +0000 (00:36 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Sat, 27 May 2023 18:44:39 +0000 (20:44 +0200)
commitcf4dec5ac476cf9a2179f9f2b16d46fe95d1f18d
treee35565725fe4f04fcc632cff22a45c84a7923d88
parent9f9668c801a28c99d78c5e9daca98cbd701e88ee
Improve PostgreSQL custom operators

Unified the custom PostgreSQL operator definitions, since they are
shared among multiple different data types.

Use proper precedence on PostgreSQL specific operators, such as ``@>``.
Previously the precedence was wrong, leasing to wrong parenthesis when
rending against and ``ANY`` or ``ALL`` construct.

Fixes: #9041
Fixes: #9836
Change-Id: I1c1d8b4c2d58d53c51c2e6d4934ac1ed83bda5d3
doc/build/changelog/unreleased_20/9041.rst [new file with mode: 0644]
doc/build/changelog/unreleased_20/9836.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/array.py
lib/sqlalchemy/dialects/postgresql/hstore.py
lib/sqlalchemy/dialects/postgresql/json.py
lib/sqlalchemy/dialects/postgresql/operators.py [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/ranges.py
lib/sqlalchemy/engine/interfaces.py
setup.cfg
test/dialect/postgresql/test_types.py