]> 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:05:39 +0000 (10:05 -0400)
commitf91e61e5c80004db6db47f4e13f37553ff22675a
tree71397cd5b8b2f30344eec2ba12075b7ee5dafa4a
parentdfc3bf988b27ab980d8da91fe38cbf152ae486a9
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
doc/build/changelog/unreleased_20/12060.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/types.py
test/dialect/postgresql/test_types.py