]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
support subscript for hstore
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 31 Oct 2025 18:08:05 +0000 (14:08 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 Nov 2025 01:11:49 +0000 (21:11 -0400)
commit143d2a78c774d3f20fa8c6970baa9366a6afebf4
tree00ce27b503a618bac0183f0cbb646680e4d27fe7
parent5b9d175416425dfb70272890923b6b1313d8ed69
support subscript for hstore

Added support for PostgreSQL 14+ HSTORE subscripting syntax. When connected
to PostgreSQL 14 or later, HSTORE columns now automatically use the native
subscript notation ``hstore_col['key']`` instead of the arrow operator
``hstore_col -> 'key'`` for both read and write operations. This provides
better compatibility with PostgreSQL's native HSTORE subscripting feature
while maintaining backward compatibility with older PostgreSQL versions.

as part of this change we add a new parameter to custom_op "visit_name"
which allows a custom op to refer to a specific visit method in a
dialect's compiler.

Fixes: #12948
Change-Id: Id98d333fe78e31d9c7679cb2902f1c7e458d6e11
doc/build/changelog/unreleased_21/12948.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/operators.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/operators.py
test/dialect/postgresql/test_compiler.py
test/dialect/postgresql/test_query.py
test/dialect/postgresql/test_types.py
test/sql/test_operators.py