From 6fbfadc7388dad4576ad99ce597e0878ee1d297f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 11 Jan 2016 14:35:56 -0500 Subject: - reorganize schema_translate_map to be succinct and gain the performance back by using an attrgetter for the default case --- lib/sqlalchemy/dialects/postgresql/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 3b3d65155..266cfb912 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1481,7 +1481,7 @@ class PGIdentifierPreparer(compiler.IdentifierPreparer): raise exc.CompileError("Postgresql ENUM type requires a name.") name = self.quote(type_.name) - effective_schema = self._get_effective_schema(type_) + effective_schema = self.schema_for_object(type_) if not self.omit_schema and use_schema and \ effective_schema is not None: @@ -1579,7 +1579,7 @@ class PGExecutionContext(default.DefaultExecutionContext): column._postgresql_seq_name = seq_name = name if column.table is not None: - effective_schema = self.connection._get_effective_schema( + effective_schema = self.connection.schema_for_object( column.table) else: effective_schema = None -- cgit v1.2.1