I have a postgres database with multiple schemas. When I connect to the database from a shell with psql
and I run \\dt
it uses the default connection s
if playing with psql inside docker exec it like this:
docker exec -e "PGOPTIONS=--search_path=<your_schema>" -it docker_pg psql -U user db_name
Do you want to change database?
\l - to display databases
\c - connect to new database
Update.
I've read again your question. To display schemas
\dn - list of schemas
To change schema, you can try
SET search_path TO
quick solution could be:
SELECT your_db_column_name from "your_db_schema_name"."your_db_tabel_name";