From b01a415a6d2b9ef563fc085fcba93f440c686af1 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 30 Jun 2021 10:52:09 -0400 Subject: 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 --- lib/sqlalchemy/sql/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql') 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) -- cgit v1.2.1