conn = psycopg2.connect(host="localhost", port="5432", dbname="test", user="postgresql", password="postgresql", options="-c search_path=postgresql,test")
其中options参数:
-c search_path=postgresql,test
postgresql 是账号
test 就是指定的 schema
conn = psycopg2.connect(host="localhost", port="5432", dbname="test", user="postgresql", password="postgresql", options="-c search_path=postgresql,test")
其中options参数:
-c search_path=postgresql,test
postgresql 是账号
test 就是指定的 schema