summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-01-11 14:35:56 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-01-11 16:44:28 -0500
commit6fbfadc7388dad4576ad99ce597e0878ee1d297f (patch)
tree2aeaeec66050d6377ae719f825b6d5f45ea62252 /lib/sqlalchemy/dialects/postgresql/base.py
parentb301f009e18246db9277a4b9d7e3a1bf01a92ae9 (diff)
downloadsqlalchemy-6fbfadc7388dad4576ad99ce597e0878ee1d297f.tar.gz
- reorganize schema_translate_map to be succinct and gain the performance
back by using an attrgetter for the default case
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py4
1 files changed, 2 insertions, 2 deletions
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