]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use plainto_tsquery for PG match
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 18 May 2022 20:06:29 +0000 (16:06 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 22 May 2022 19:25:58 +0000 (15:25 -0400)
commit719197dd9399b4436aeaba3e2f44761292036ad6
treee96ab9de424d9faa5add9105260fd5471cdf6fa6
parent0620614f95f62f35396e63c636cae98a0759f3ab
use plainto_tsquery for PG match

The :meth:`.Operators.match` operator now uses ``plainto_tsquery()`` for
PostgreSQL full text search, rather than ``to_tsquery()``. The rationale
for this change is to provide better cross-compatibility with match on
other database backends.    Full support for all PostgreSQL full text
functions remains available through the use of :data:`.func` in
conjunction with :meth:`.Operators.bool_op` (an improved version of
:meth:`.Operators.op` for boolean operators).

Additional doc updates here apply to 1.4 so will backport these
out to a separate commit.

Fixes: #7086
Change-Id: I1946075daf5d9c558e85f73f1bf852604b3b1b8c
doc/build/changelog/migration_20.rst
doc/build/changelog/unreleased_20/7086.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/sql/operators.py
test/dialect/postgresql/test_compiler.py
test/dialect/postgresql/test_query.py
test/ext/mypy/plain_files/sql_operations.py
test/sql/test_operators.py