summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-01-08 22:01:52 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-01-08 22:10:42 -0500
commit1c9252b3a4f1e232e887a7a8bf21b29d449e3776 (patch)
tree8f3a3a92462c1bacb197a78da3a553cb04a9f351 /lib/sqlalchemy/dialects/postgresql
parent7302f06596e0f14e3567788785fc16ecd3cdd9a8 (diff)
downloadsqlalchemy-ticket_2685.tar.gz
- inline get_effective_schema and preparer setup to get profilesticket_2685
back down
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index fdd5458b3..3b3d65155 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -1578,8 +1578,11 @@ class PGExecutionContext(default.DefaultExecutionContext):
name = "%s_%s_seq" % (tab, col)
column._postgresql_seq_name = seq_name = name
- effective_schema = self.connection._get_effective_schema(
- column.table.schema)
+ if column.table is not None:
+ effective_schema = self.connection._get_effective_schema(
+ column.table)
+ else:
+ effective_schema = None
if effective_schema is not None:
exc = "select nextval('\"%s\".\"%s\"')" % \