]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure PostgreSQL network address types are not cast as VARCHAR
authorDenis Laxalde <denis@laxalde.org>
Tue, 11 Mar 2025 13:27:13 +0000 (09:27 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Mar 2025 14:06:03 +0000 (10:06 -0400)
commitf0de9dbbb0090aab056e9132fc84b0bfa17cd2bf
treeb621ec62d5e1c7584df2324815c35a9f2e11e9b7
parent1658ce34fcf05d7ec25633431377a066a95b1cdf
Ensure PostgreSQL network address types are not cast as VARCHAR

Fixed issue in PostgreSQL network types :class:`_postgresql.INET`,
:class:`_postgresql.CIDR`, :class:`_postgresql.MACADDR`,
:class:`_postgresql.MACADDR8` where sending string values to compare to
these types would render an explicit CAST to VARCHAR, causing some SQL /
driver combinations to fail.  Pull request courtesy Denis Laxalde.

Fixes: #12060
Closes: #12412
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12412
Pull-request-sha: 029fda7f2d182af71ebc48aef191aa9114927f28

Change-Id: Id4a502ebc119775567cacddbabef2ce9715c1a9f
(cherry picked from commit f91e61e5c80004db6db47f4e13f37553ff22675a)
doc/build/changelog/unreleased_20/12060.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/types.py
test/dialect/postgresql/test_types.py