]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
copy stack related elements to str compiler
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Dec 2023 19:57:38 +0000 (14:57 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Dec 2023 22:08:52 +0000 (17:08 -0500)
commit3164696020dc0e96c98fefeeb3f3445eeddc9902
treefa1f1e197c268d21a1f201234562d6e8fd421338
parent9528b5977d97993df8c8fe47121ddb8a98dee95a
copy stack related elements to str compiler

Fixed issue in stringify for SQL elements, where a specific dialect is not
passed,  where a dialect-specific element such as the PostgreSQL "on
conflict do update" construct is encountered and then fails to provide for
a stringify dialect with the appropriate state to render the construct,
leading to internal errors.

Fixed issue where stringifying or compiling a :class:`.CTE` that was
against a DML construct such as an :func:`_sql.insert` construct would fail
to stringify, due to a mis-detection that the statement overall is an
INSERT, leading to internal errors.

Fixes: #10753
Change-Id: I783eca3fc7bbc1794fedd325d58181dbcc7e0b75
(cherry picked from commit 0248efb761bec4bdcea76bc6bbe3c09934f6b527)
doc/build/changelog/unreleased_20/10753.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
test/sql/test_compiler.py
test/sql/test_cte.py