summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-03-19 10:37:15 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2023-03-19 13:33:23 -0400
commitfa0666cb04174cdd2592ab1327d48e431fe86ffa (patch)
tree020edb674c435b2b3a3ba4e3a4fbdb4556ab93a2 /lib/sqlalchemy/orm/attributes.py
parentb56494ba64f858a60a3314fd549ced4512a5fe19 (diff)
downloadsqlalchemy-fa0666cb04174cdd2592ab1327d48e431fe86ffa.tar.gz
dont render VARCHAR length for PG casts
Fixed critical regression in PostgreSQL dialects such as asyncpg which rely upon explicit casts in SQL in order for datatypes to be passed to the driver correctly, where a :class:`.String` datatype would be cast along with the exact column length being compared, leading to implicit truncation when comparing a ``VARCHAR`` of a smaller length to a string of greater length regardless of operator in use (e.g. LIKE, MATCH, etc.). The PostgreSQL dialect now omits the length from ``VARCHAR`` when rendering these casts. Fixes: #9511 Change-Id: If094146d8cfd989a0b780872f38e86fd41ebfec2
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
0 files changed, 0 insertions, 0 deletions