PostgreSQL how to work with multiple DB from one connection?
See original GitHub issueHello. I’m not very proficient with DBs, just using for work. Sorry that can’t give any technical details.
Before 3.6 I used to check all available DBs on the server in pgadmin and then connect in dbeaver to the correct one.
pgadmin — with these parameters I could see all schemes and execute queries on their tables:
- maintenance db: postgres
- login/password: postgres
For example, I need DB named “db1” (where all data are stored within “db1sm” scheme). Before 3.6 my connection in dbeaver would be:
- db: db1
- login/password: db1_rw
Now in 3.6 I assumed the behavior would be similar to pgadmin, and used its parameters (postgres). I can see now all DBs on the server, but when I want to look at schemes/tables for “db1” I get: org.jkiss.dbeaver.DBException: DBException: Can't access non-default database
.
OKAY. So I click “Set Active”. But nevertheless I can’t see the most important scheme of DB — “db1sm”. I can see it only if I connect with login/password for this DB. But then, I can’t use the same connection to work with other DBs — their lists of schemes all shows “db1sm” instead of their own.
My point:
- Is it normal that within one connection I can work only with one DB? Because “Set active” deactivates previously active DB.
- For all main schemes within DBs we have corresponding users. In pgadmin I can connect under “postgres” and do anything without restriction. In dbeaver3.6 to see the scheme in question I must connect by the scheme user. So to work with DBs I forced to created multiple connections again, like in previous dbeaver version.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top GitHub Comments
Multi-database access is not yet supported in DBeaver. You can access only the default database (the one specified in the connection properties). This is pretty complicated issue because PostgreSQL requires separate network connection for each database. Multi-database feature is tracked in #34.
Just make multiple connections (in Database Navigator view) with the same server address but different database names. You may copy/paste connections to simplify the process.