summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-06-30 10:52:09 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-06-30 10:52:09 -0400
commitb01a415a6d2b9ef563fc085fcba93f440c686af1 (patch)
tree583399693763281af84a91afc1aa81bf760c7734 /lib/sqlalchemy/sql/compiler.py
parentdee57477882f8876fd97071a790fe3d3ee2164c5 (diff)
downloadsqlalchemy-b01a415a6d2b9ef563fc085fcba93f440c686af1.tar.gz
Ensure compiler uses quote_schema hook for translates renders
Fixed regression where the special dotted-schema name handling for the SQL Server dialect would not function correctly if the dotted schema name were used within the ``schema_translate_map`` feature. Fixes: #6697 Change-Id: Idb610755cbf8122e71223d5dd0a17fcb61b1b98d
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 8ae56fd54..67da03683 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -4751,7 +4751,7 @@ class IdentifierPreparer(object):
"Dialect has no default schema name; can't "
"use None as dynamic schema target."
)
- return self.quote(effective_schema)
+ return self.quote_schema(effective_schema)
return re.sub(r"(\[SCHEMA_([^\]]+)\])", replace, statement)