summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/postgres.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/databases/postgres.py')
-rw-r--r--lib/sqlalchemy/databases/postgres.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py
index 13714ba3e..92407637f 100644
--- a/lib/sqlalchemy/databases/postgres.py
+++ b/lib/sqlalchemy/databases/postgres.py
@@ -199,7 +199,7 @@ class PGSQLEngine(ansisql.ANSISQLEngine):
self.opts['port'] = str(self.opts['port'])
ansisql.ANSISQLEngine.__init__(self, **params)
-
+
def connect_args(self):
return [[], self.opts]
@@ -277,7 +277,9 @@ class PGSQLEngine(ansisql.ANSISQLEngine):
else:
ischema_names = pg1_ischema_names
- ischema.reflecttable(self, table, ischema_names)
+ # give ischema the given table's engine with which to look up
+ # other tables, not 'self', since it could be a ProxyEngine
+ ischema.reflecttable(table.engine, table, ischema_names)
class PGCompiler(ansisql.ANSICompiler):