diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-03-08 13:40:12 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-03-08 13:41:29 -0500 |
commit | 26b819e534bd51e32e31a1e3324d4a1e7b849d67 (patch) | |
tree | b7057c6e173d093bad4c5a53134628b40166c2ff /lib/sqlalchemy/sql/compiler.py | |
parent | e4caa9668c3b7797290a9c0150e69b51489d75fe (diff) | |
download | sqlalchemy-26b819e534bd51e32e31a1e3324d4a1e7b849d67.tar.gz |
pop the stack that we pushed
Fixed regression caused by :ticket:`7760` where the new capabilities of
:class:`.TextualSelect` were not fully implemented within the compiler
properly, leading to issues with composed INSERT constructs such as "INSERT
FROM SELECT" and "INSERT...ON CONFLICT" when combined with CTE and textual
statements.
Fixes: #7798
Change-Id: Ia2ce92507e574dd36fd26dd38ec9dd2713584467
(cherry picked from commit c36965ab211183764357456fff1640418586ed97)
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 6be8ae281..7780d3782 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -1664,6 +1664,8 @@ class SQLCompiler(Compiled): nesting_level = len(self.stack) if not toplevel else None text = self._render_cte_clause(nesting_level=nesting_level) + text + self.stack.pop(-1) + return text def visit_null(self, expr, **kw): |