How to target PostgreSQL schema in SQLAlchemy DB URI?

Viewed 835

I understand that I can set search_path for the db role used to log in, but is there a way to specify the schema at the URI level or something to that effect? I may be mistaken due to my PostgreSQL experience being only with the JDBC driver.

My current URI fails:

postgresql://app_user:pw@localhost/dev_db?currentSchema=app

psycopg2 is complaining about currentSchema being an invalid option

sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) invalid dsn: invalid connection option "currentSchema"
 (Background on this error at: http://sqlalche.me/e/f405)
0 Answers
Related