1

I have a number of spatial databases each containing multiple schemas on one server, I want to use QGIS to examine layers,

Is it possible to create one PostGIS connection in QGIS and add all databases at once?

All of them share the same host and it is a really long list of databases.

1
  • Would PG admin be sufficient for you to examine layers? You can check attribute tables, as well as display features on a map. In PG admin you add the whole server, and can work with all databases and schemas saved on that server.
    – Trnovstyle
    Jan 7 at 15:06
2

No, this is not possible.

Each connection in QGIS is configured for one specific database.

If possible you can restructure your database to use schemas instead of databases. Or you can try to reduce the amount of manual work by using the python api to create the connections or by editing the ini file in the profile.

0

It is not possible to do it with one connection.

Below steps can help you to quickly add more connections.

  1. Create first PostGIS connection. I recommend you to save username and password in Qgis password manager, in this case only authentication ID is visible. See this tutorial for more info.
  2. Save connection to xml: right click on PostGIS in Browser -> save Connections -> select connection that you want to export and save to xml:

Qgis save connections

  1. Open XML file with text editor, copy/paste connection details from connection created in step 1 and change name and database for each new connection that you need. Save and close XML.
  2. Import edited XML: Right click on PostGIS -> Load Connections -> Select XML file -> Select all connections that you want to import (exclude one that you already have from step 1).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.