Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres schemas are not supported #56

Open
jlowin opened this issue Jan 15, 2015 · 2 comments
Open

Postgres schemas are not supported #56

jlowin opened this issue Jan 15, 2015 · 2 comments

Comments

@jlowin
Copy link

jlowin commented Jan 15, 2015

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 table t, calling db.all() tries to execute SELECT * FROM t instead of SELECT * FROM s.t. Unless users have configured a postgres search_path (and have unambiguous table names) this query will fail.

@emiliom
Copy link

emiliom commented Jul 17, 2015

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.

@emiliom
Copy link

emiliom commented Jan 9, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants