From c0521e6f0688b794048e44ff3df429249a093b72 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 8 Feb 2021 11:58:15 -0500 Subject: 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 --- lib/sqlalchemy/dialects/postgresql/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/postgresql/base.py') 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_, ) -- cgit v1.2.1