On this page
Connect to PostgreSQL
The PostgreSQL JDBC driver is included in BroadSQL: you only need the URL of your server.
| Driver | Bundled with BroadSQL (PostgreSQL JDBC driver 42.7.13); nothing to download. |
|---|---|
Type to choose in ADD CONNECTION or CONFIG | PostgreSQL |
| URL format | jdbc:postgresql://<host>:<port>/<database> |
| Example | jdbc:postgresql://dbhost:5432/mydb |
| Where the URL format comes from | PostgreSQL JDBC driver: Connecting to the database, checked October 17, 2026 |
| Verified with BroadSQL | The driver is bundled and is part of the BroadSQL release. The example URL above was not run by the BroadSQL team for this page. |
Steps
ADD CONNECTION MYPG;(orCONFIG;on Windows), typePostgreSQL, URLjdbc:postgresql://dbhost:5432/mydb, then your PostgreSQL user and password.PING MYPG;, thenCONNECT MYPG;.
The port can be left out when it is the standard one, 5432: jdbc:postgresql://dbhost/mydb.
Options people often need
- Encryption: add
?sslmode=requireto the URL. The documented values aredisable,allow,prefer(the default),require,verify-caandverify-full; the last two also check the server certificate. - Another driver option: add it as
?name=value, several separated by&. See the driver's list of connection parameters.
On PostgreSQL
- After an error, PostgreSQL cannot continue the transaction: with
Autocommitoff, BroadSQL rolls it back and says so (see Output and error handling). - Ctrl+C during a query: the driver sends the cancellation to the server on a separate connection (see Interactive console).
SET PASSWORDdoes not change a PostgreSQL password: change it in PostgreSQL, then update BroadSQL withEDIT CONNECTION.
Related
- Connect to your database: the common steps and what to do when it fails.
- Technical requirements
Found something wrong or unclear on this page? Tell us, with the page address.