When connecting to a database with psql
I can specify the database using a URI:
psql postgres://user:pass@hostname/my_db
But how do I specify the schema?
You can specify it using the options
query parameter:
psql "postgres://user:pass@hostname/my_db?options=--search_path%3Dmy_schema"
%3D
is a URL encoded =
sign. It has to be URL encoded or psql
gets confused.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With