]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
ensure CITEXT is not cast as VARCHAR
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 12 Jul 2023 13:32:10 +0000 (09:32 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 12 Jul 2023 15:14:09 +0000 (11:14 -0400)
commitd7ee73ff81ed69df43756240670bd98f3b1c3302
tree43d01de6243fdc1a053ef7e7eb5bf59cd84aef16
parent28a66ac2fcee27a938c791fbb62d0220164e42df
ensure CITEXT is not cast as VARCHAR

Fixed issue where comparisons to the :class:`_postgresql.CITEXT` datatype
would cast the right side to ``VARCHAR``, leading to the right side not
being interpreted as a ``CITEXT`` datatype, for the asyncpg, psycopg3 and
pg80000 dialects.   This led to the :class:`_postgresql.CITEXT` type being
essentially unusable for practical use; this is now fixed and the test
suite has been corrected to properly assert that expressions are rendered
correctly.

Fixes: #10096
Change-Id: I49129e50261cf09942c0c339d581ce17a26d8181
doc/build/changelog/unreleased_20/10096.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/pg8000.py
lib/sqlalchemy/dialects/postgresql/psycopg.py
lib/sqlalchemy/dialects/postgresql/types.py
test/dialect/postgresql/test_types.py