Merge branch 'wip/schema-aware-introspection' into eo-master

Conflicts:
	tenant_schemas/postgresql_backend/introspection.py
This commit is contained in:
Benjamin Dauvergne 2015-04-24 11:08:21 +02:00
commit 8bd62ee84f
1 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ class DatabaseSchemaIntrospection(DatabaseIntrospection):
AND idx.indexrelid = c2.oid
AND c.relname = %s
AND c.relnamespace = n.oid
AND n.name = %s
AND n.nspname = %s
""", [table_name, self.connection.schema_name])
for index, columns, unique, primary in cursor.fetchall():
if index not in constraints:
@ -131,7 +131,7 @@ class DatabaseSchemaIntrospection(DatabaseIntrospection):
AND c1.relnamespace = n.oid
AND c2.relnamespace = n.oid
AND con.relnamespace = n.oid
AND n.name = '%s'
AND n.nspname = '%s'
AND c1.relname = %s
AND con.contype = 'f'""", [self.connection.schema_name, table_name])
relations = {}
@ -169,7 +169,7 @@ class DatabaseSchemaIntrospection(DatabaseIntrospection):
AND attr.attrelid = c.oid
AND attr.attnum = idx.indkey[0]
AND c.relnamespace = n.oid
AND n.name = %s
AND n.nspname = %s
AND c.relname = %s""", [self.connection.schema_name, table_name])
indexes = {}
for row in cursor.fetchall():