Problem
When connected to a database, the sidebar only shows the current database name. If you work with several servers — e.g. DEV, QA, STAGE — that each host a database with the same name, there is no way to tell from the UI which server the current session is actually on. It's easy to run a query against the wrong environment.
Proposal
Show a small server label under the database name in the sidebar:
- the bookmark name when the connection was opened from a bookmark (usually far more meaningful than a long, auto-generated hostname), or
- the
host:port taken from the connection string when the connection was not opened from a bookmark.
The label would be returned by the connect / switch-database / connection-info endpoints and preserved when switching databases on the same connection.
Why
This makes it immediately obvious which server you're querying, which is especially valuable when the same database name exists across multiple environments.
I have a working implementation and would be happy to open a PR.
Problem
When connected to a database, the sidebar only shows the current database name. If you work with several servers — e.g.
DEV,QA,STAGE— that each host a database with the same name, there is no way to tell from the UI which server the current session is actually on. It's easy to run a query against the wrong environment.Proposal
Show a small server label under the database name in the sidebar:
host:porttaken from the connection string when the connection was not opened from a bookmark.The label would be returned by the connect / switch-database / connection-info endpoints and preserved when switching databases on the same connection.
Why
This makes it immediately obvious which server you're querying, which is especially valuable when the same database name exists across multiple environments.
I have a working implementation and would be happy to open a PR.