Getting started
Add pgJDBC to a project, prepare the database server, and open the first connection. Start here if you are new to pgJDBC; the rest of the documentation builds on what you set up on these pages.
- Quick start
The minimum viable path to a working pgJDBC application: add the Maven, Gradle, or SBT dependency, then open a TLS-protected connection with
DriverManager.getConnection. The rest of the documentation fills in the edges. - Compatibility Which pgJDBC release line matches your Java runtime and PostgreSQL server, including the .jre6 / .jre7 classifier variants of 42.2.x.
- Server preparation Three things to check on the PostgreSQL server before the first JDBC connection: TCP listener, pg_hba.conf, and database encoding.