python - How to specify Schema in psycopg2 connection method ...
stackoverflow.com › questions › 59298580Dec 12, 2019 · When you execute a query using the cursor from that connection, it will search across those schemas mentioned in options i.e., dbo,public in sequence from left to right. You may try something like this: psycopg2.connect (host="localhost", port="5432", user="postgres", password="password", database="database", options="-c search_path=dbo,public")