1

I'm trying to connect to 2 db's from the same connection simultaneously but I can't seem to find a way to do so. The idea is to get something like this.

{
"sqltools.connections": [

    {
        "previewLimit": 50,
        "server": "localhost",
        "port": 5432,
        "driver": "PostgreSQL",
        "name": "DataBase",
        "username": "sampleuser",
        "password": "samplepasswd",
        "database": "root, database1, database2..."
    }
]
}

How do I go about this? (here's an image for better visibility, I would like the simple_bank db to show under root;)

Can't upload screenshots yet

JGH
  • 15,928
  • 4
  • 31
  • 48
  • No, not possible. A connection is always to a single database in Postgres. Maybe you want to use schemas instead? –  Dec 03 '21 at 06:32

1 Answers1

0

you can link postgres databases with extension postgres_fdw if you have rights to do so i.e create extension,create server,create user mapping,create schema,import foreign schema. In queries use prefix of the new schema to access the second database.