I have a codebase that relies on a connection to Postgres via a full self-contained connection URL. The Python codebase was working while on PG11 but after switching to PG14 the options in the connection URL are no longer recognized:
postgresql://username:password@host:port/database?&options=-csearch_path=my_schema&target_session_attrs=read-write&connect_timeout=5
specifically this part: ?&options=-csearch_path=my_schema&target_session_attrs=read-write&connect_timeout=5
The search_path is not recognized and therefore the schema my_schema is not set by default.
I have tried many possibilities including, but none seem to work:
- adding encoding to the space like
?&options=-c%20search_path=my_schema - removing the leading & before the options
- removing the -c before search_path
- specifying search_path without options