summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-02-08 11:58:15 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-02-08 13:14:52 -0500
commitc0521e6f0688b794048e44ff3df429249a093b72 (patch)
treed509123bb03c6e938952c4eb6444fd00d5edbc67 /lib/sqlalchemy/dialects/postgresql/base.py
parent80010c63149be411e89c7434a9d52096f9de56b8 (diff)
downloadsqlalchemy-c0521e6f0688b794048e44ff3df429249a093b72.tar.gz
Add identifier_preparer per-execution context for schema translates
Fixed bug where the "schema_translate_map" feature failed to be taken into account for the use case of direct execution of :class:`_schema.DefaultGenerator` objects such as sequences, which included the case where they were "pre-executed" in order to generate primary key values when implicit_returning was disabled. Fixes: #5929 Change-Id: I3fed1d0af28be5ce9c9bb572524dcc8411633f60
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index f067e6537..7e821acde 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -2936,7 +2936,7 @@ class PGExecutionContext(default.DefaultExecutionContext):
return self._execute_scalar(
(
"select nextval('%s')"
- % self.dialect.identifier_preparer.format_sequence(seq)
+ % self.identifier_preparer.format_sequence(seq)
),
type_,
)