How to show all databases for data source / host?
I know this is discussed a few times already. But it seems there is no solution or I am just missing it.
Is it not possible to list all databases for a host? In my current case for PostgreSQL.
This is pgAdmin
I basically like to have the same for DataGrip so that I don't have to create a new entry for each database on the host.
I tried by omitting a specific database name in the connection. But this does not give me a list of DBs.
Any help here?
Please sign in to leave a comment.
Correct, there is no solution currently, please follow the https://youtrack.jetbrains.com/issue/DBE-2287
Ok. Will do so. Just as a note, the link should be trimmed. It contains a trailing space that renders it invalid.
Sorry for double posting. But was not sure if the old topic is tracked or if my response there would just be lost.
Thanks for you fast reply!
Just in case anybody else is missing this go to the issue and vote the hell out of it as this is fairly essential :)
https://youtrack.jetbrains.com/issue/DBE-2287
Thanks you! Corrected the link.
I down-vote this proposition as keeping specific DB in the list keep it clear, and working on servers delivering multiple DBs can be a nightmare if all names are listed like in PGAdmin or Navicat.
An alternative should be to set an option to show/not show all databases, but not as a default.
We are thinking about adding an option in Database window which would mean something like "show me more databases/schemas" if more schemas/db available. This would not pollute the view but it will be simple to discover.
For PostgreSQL unfortunately it is still not possible to have more than one database for a single connection (related issue is https://youtrack.jetbrains.com/issue/DBE-2287 ).
@Andrey Dernov: such option would be really nice
I am using postgres. I don't necessarily need multiple databases at once under a data source – just one at a time is workable as long as I can see a list of database to choose from. Currently, however, there doesn't seem to be a way to see a list of databases on a postgres instance/cluster.
Am I missing it? Do I literally have to know the database name in advance and type it into DataGrip?
Hi,
"Manage multiple databases in PostgreSQL" functionality will be available in next DataGrip EAP (https://youtrack.jetbrains.com/issue/DBE-2287)
Thank you.
I have asked the same question regarding how DataGrip perceives PostgreSQL's arrangement of 'Databases in a Cluster'.
The explanations as well as the DG functionality involved in 'Data Sources' and 'Data Bases' made no sense to me at all from the perspective of a PostgreSQL developer, or even an installer.
However, it all became clear when I read the Jetbrains Blog, 'Copy and Share Data Sources in IntelliJ-based IDE's.' What this refers/reveals is that the mechanism used for connecting to and sending commands to a PostgreSQL database in any IDE derived from IntelliJ is a two-step (two objects involved) implementation that requires an instance of a 'connection' which is a concept we are all familiar with, and an instance of a channel to send commands and receive database status and object representations for display in the IDE.
What's missing here is what we are all expecting DataGrip to have a reference to the installed PostgreSQL 'instance', which we refer to as 'the Cluster'. The cluster is the 'server' that owns the databases and broker's communication to each database's objects like tables, schemas, and tablespaces.
So, while Jetbrains has an issue created, I suspect this is a 'placebo' because the problem is not a DataGrip perspective or artifact. This is pretty clearly a result of all JetBrains IDE's deriving from the Eclipse framework. And, unbeknownst to us, Eclipse functions like an Enterprise Service Application in that all interactions are modeled after Service Connections and Service interactions. That is, Eclipse (and therefore all JetBrains IDE's) doesn't have a native concept of a Database Server that manages a group of databases. What it does have is the precept of a Service Interface, which is the mechanism that JetBrains has used to implement a 'Data Source', which is probably better described as a 'Data Contract', customized as a 'database connection manager', which contains references to 'channels' that are customized as a database command API.
DataGrip documentation refers to the Global Data Source, and the Project Data Source, which can be utilized instead of a per-database Data Source, which is the default that gets us confused by looking like a 'port' to the PostgreSQL Instance/Cluster object models. And we wonder why we can't just spin up a single 'data source' in a project and then reference any or all of the databases in what we think is the 'cluster', but really isn't that object at all. However, I've tried moving the XML references to the Project XML files as a 'shared data source', but it does not act in the way we would expect it to: its still a connection wrapper for a single database, meaning, if you want a project-based connection, you can only get to one database because... that's all there is folks!
So... by asking JetBrains repeatedly to 'fix this', we are uselessly allowing our confusion over this really strange implementation in DataGrip to distract us from the real problem: the Eclipse conceptual principle that 'everything is a service' so just get used to it! After all, it was created on the Antique IBM VisualAge IDE. In 2004. And here's a big clue: Eclipse 3.0 (released on 21 June 2004) selected the OSGi Service Platform specifications as the runtime architecture. (from Wikipedia).
So sorry! We just have to get back to work with multiple data sources in our projects and then we have to develop strategies about how to manage multi-database operations... maybe the best thing is multiple single-database projects connected with multiple single-direction foreign data wrappers.
The more I think about it, that sounds increasingly like the most realistic plan of attack, just a little wretched and creepy.
If I can't see a list of available databases after making a connection - then how can I at least see a list of databases while creating a connection. It's really annoying to have to remember each name. There is enough stuff to remember. It seems like the tool could have already looked this information up in the background and provide a list and connection creation time. But, even more is the tool should be able to easily change between databases. Free tools are doing this. I'd much rather support Jetbrains and use Jetbrains tools though. Any progress on this?
Kyle Manning, could you please elaborate a bit? In the newer versions of DataGrip, you can navigate to Schemas tab and select all necessary databases to work with, it also has a Refresh button.