diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-08-18 14:46:04 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-08-18 14:46:34 -0400 |
| commit | 4f0bda7c455a642b505d6133002c4a5fb1e88876 (patch) | |
| tree | 4da78018f48a59dc150908ab8c2183c0b16f64c6 /lib/sqlalchemy/sql/compiler.py | |
| parent | 5cbf8be95d1ad00285dce9a0418337ea66194051 (diff) | |
| download | sqlalchemy-4f0bda7c455a642b505d6133002c4a5fb1e88876.tar.gz | |
Fixed regression dating back to 0.7.9 whereby the name of a CTE might
not be properly quoted if it was referred to in multiple FROM clauses.
Also in 0.8.3, 0.7.11. [ticket:2801]
Conflicts:
doc/build/changelog/changelog_09.rst
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
| -rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 5f286a331..01959ee18 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -913,7 +913,7 @@ class SQLCompiler(engine.Compiled): # we've generated a same-named CTE that we are enclosed in, # or this is the same CTE. just return the name. if cte in existing_cte._restates or cte is existing_cte: - return cte_name + return self.preparer.format_alias(cte, cte_name) elif existing_cte in cte._restates: # we've generated a same-named CTE that is # enclosed in us - we take precedence, so |
