A new JDBC driver for PostgreSQL aimed at supporting the advanced features of JDBC and Postgres
A great place to start is the Website.
For comprehensive documentation see the User Guide
For quick reference, here are some useful details
com.impossibl.pgjdbc-ng pgjdbc-ng LATEST
The driver accepts basic URLs in the following format
See the User Guide for complete details on the accepted URL syntax.
The javax.sql.DataSource class is
, the javax.sql.ConnectionPoolDataSource class is
and the XADataSource class is
pgjdbc-ng is released under the 3 clause BSD license.
The driver is built with Gradle. To build & test, execute:
./gradlew clean build.
This will produce, in the
driver/build/libsdirectory, two JAR files. One with dependencies packaged inside (
pgjdbg-nc-all-) and another without (
NOTE: Building requires a working install of Docker and Docker Compose as the unit tests are executed against a PostgreSQL instance in a private test container that is automatically started. If you wish to execute the tests against a specific instance of PostgreSQL outside of Docker see Testing.
Alternatively, to build the driver without testing you can execute:
./gradlew clean assemble
The unit tests need a PostgreSQL database to execute against. The build will start a Docker container and setup the test environment to execute against that container automatically.
If you don't have Docker installed or, wish to execute the tests against a specific instance of PostgreSQL, you can execute the
testtasks with the
noDockerproperty set to true. For example:
./gradle -PnoDocker=true test
For this to work the unit tests need to locate your selected PostgreSQL instance. The unit tests attempt a connection assuming theses defaults:
SERVER: localhost PORT: 5432 DATABASE: test USERNAME: test PASSWORD: test
The following system properties are supported in order to customize the setup
pgjdbc.test.server pgjdbc.test.port pgjdbc.test.db pgjdbc.test.user pgjdbc.test.password