]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use _generate_columns_plus_names for ddl returning c populate
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Aug 2025 18:47:34 +0000 (14:47 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Aug 2025 22:13:51 +0000 (18:13 -0400)
commita7d86d556e575462ea827b574040eed74ddc7674
tree5a15737f28c6345059a6cef317532815474d6d69
parent5ec17fa601f0d1f254db09a731be5ac8af73e51f
use _generate_columns_plus_names for ddl returning c populate

Improved the implementation of :meth:`.UpdateBase.returning` to use more
robust logic in setting up the ``.c`` collection of a derived statement
such as a CTE.  This fixes issues related to RETURNING clauses that feature
expressions based on returned columns with or without qualifying labels.

Co-authored-by: Juhyeong Ko <dury.ko@gmail.com>
Fixes: #12271
Change-Id: Id0d486d4304002f1affdec2e7662ac2965936f2a
(cherry picked from commit 4c4011b50bf8f2f6acca86b11ae3d900b30034a0)
doc/build/changelog/unreleased_20/12271.rst [new file with mode: 0644]
lib/sqlalchemy/sql/dml.py
lib/sqlalchemy/sql/selectable.py
test/sql/test_returning.py