I use psql
to connect to multiple databases which contain multiple schemas. I usually use just one schema per db. Is it possible to set the default schema for a particular db via some psql
config option or envariable?
Question posted in PostgreSQL
The official documentation can be found here.
The official documentation can be found here.
2
Answers
You can use the env variable PGDATABASE to specify the default database.
Maybe you can place it in your .bashrc
You can set the parameter
search_path
for each database: