DBeaver (https://dbeaver.io/download/) is a great gui tool that allows us to connect and query multiple databases (Postgres,Mysql,Oracle…) from multiple operating systems. DBeaver is free but also has a paid version with extra functionalities

Configuring a connection to Postgres

You can create a new connection going to “File>New>DBeaver>Database connection” or clicking on the socket icon. After this we will see a screen like this:

Screen to select the connection driver

After this we can fill the connection information

My recommendation is to test the connection before finishing

Trick

If you want to use this connection to access different databases you can specify this on the PostgreSQL tab, and enable the “Show all databases” option

You can configure more databases like MySQL or Oracle

Configuring a connection with a SSH tunnel

A cool feature of DBeaver is that it can connect to a database that is on a remote machine without having to expose the service to the whole Internet.

To do this you can go to the tab of “SSH” and configure the

Once you fill the host,user and password you can test the connection and finish

Other functionalities

Viewing the database schema

With DBeaver you can see the database diagram using this button or you can see the relations of a single table.

The result is something like this:

Viewing gis data

A cool feature of DBeaver is the integration with Postgis, so if you double click over a geometry field you will be able to preview the feature in a map