Open jlowin opened 9 years ago
Ran into the same issue. For schemas that are not in the search_path, tables are identified and can be described, but its methods fail b/c the sql select statement that's composed does not qualify table names with a schema name. For example, for table mytable
that's not in a schema in the search_path, db.tables.mytable.count
fails with this error:
DatabaseError: Execution failed on sql 'select * from mytable;': relation "mytable" does not exist
Any workarounds or tricks? Thanks.
Does this commit address the schema problem reported in this issue? I haven't tested it, but it'd be helpful to know if the problem is resolved.
db.py
will identify all tables across all tables, but can't query them because it only tries to access the unqualified table, without the schema prepended.For example, if I have a schema
s
and a tablet
, callingdb.all()
tries to executeSELECT * FROM t
instead ofSELECT * FROM s.t
. Unless users have configured a postgres search_path (and have unambiguous table names) this query will fail.