diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2017-03-06 19:12:40 -0500 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@awstats.zzzcomputing.com> | 2017-03-06 19:12:40 -0500 |
| commit | b54cefc379dcb99bcaf39094b29093f1e4be9b2b (patch) | |
| tree | 10b6ae1745498360705e9b79fd3aea16121e2bca /lib/sqlalchemy/sql | |
| parent | 3a6b75870bdc7aa8fe70296cc3fc94ea06f16417 (diff) | |
| parent | f4c4f784cde8e51301b09f187d2f086bfae47453 (diff) | |
| download | sqlalchemy-b54cefc379dcb99bcaf39094b29093f1e4be9b2b.tar.gz | |
Merge "Don't cache savepoint identifiers"
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index aeb40030f..bfa22c206 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -2933,7 +2933,13 @@ class IdentifierPreparer(object): return self.quote(name or alias.name) def format_savepoint(self, savepoint, name=None): - return self.quote(name or savepoint.ident) + # Running the savepoint name through quoting is unnecessary + # for all known dialects. This is here to support potential + # third party use cases + ident = name or savepoint.ident + if self._requires_quotes(ident): + ident = self.quote_identifier(ident) + return ident @util.dependencies("sqlalchemy.sql.naming") def format_constraint(self, naming, constraint): |
