summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-04-01 12:46:41 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-04-01 13:41:44 -0400
commit115e4d1a491173276821bdafd967666d71cdb7a8 (patch)
tree4fa5098fe0855a41c49be48dc16da7ae0dcb129f /lib/sqlalchemy/sql/compiler.py
parent3a29d65f73c6e705f486588068172d45017285fa (diff)
downloadsqlalchemy-115e4d1a491173276821bdafd967666d71cdb7a8.tar.gz
Apply quoting to render_derived() names
Fixed bug in new :meth:`_functions.FunctionElement.render_derived` feature where column names rendered out explicitly in the alias SQL would not have proper quoting applied for case sensitive names and other non-alphanumeric names. Fixes: #6183 Change-Id: I33e2534affc6e1f449f564750028fd027cb0f352
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r--lib/sqlalchemy/sql/compiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 276209103..32530629b 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -2662,7 +2662,7 @@ class SQLCompiler(Compiled):
", ".join(
"%s%s"
% (
- col.name,
+ self.preparer.quote(col.name),
" %s"
% self.dialect.type_compiler.process(
col.type, **kwargs