PostgreSQL JDBC Driver 42.0.0 Released



  • Version bumped to 42.0.0 to avoid version clash with PostgreSQL version and follow a better semantic versioning. 46634923
  • Ensure executeBatch() can be used with pgbouncer. Previously pgjdbc could use server-prepared statements for batch execution even with prepareThreshold=0. Issue 742
  • Error position is displayed when SQL has unterminated literals, comments, etc. Issue 688
  • Strict handling of accepted values in getBoolean and setObject(BOOLEAN), now it follows PostgreSQL accepted values, only 1 and 0 for numeric types are acepted (previusly !=0 was true). PR 732
  • Return correct versions and name of the driver. PR 668


  • Support for PostgreSQL versions below 8.2 was dropped. PR 661


  • Deprecated PGPoolingDataSource, instead of this class you should use a fully featured connection pool like HikariCP, vibur-dbcp, commons-dbcp, c3p0, etc. PR 739


  • Data truncated in setCharacterStream. Fixed in 42.1.0
  • No suitable driver found for jdbc:postgresql when using a DataSource implementation. Fixed in 42.1.0

You may have noticed the change in the versioning of the driver, you can read the FAQ for more information.

Commits by author

AlexElin (6):

Eric McCormack (1):

Jordan Lewis (1):

Jorge Solorzano (22):

Pavel Raiskup (3):

  • fix: sync with latest Fedora PR 637 a29ad80b
  • packaging: rpm: update srpm generator 5c3c9239
  • packaging: rpm_ci: use curl -L to download rawhide logs c8125cff

Philippe Marschall (3):

Roman Ivanov (2):

  • config: move version of checkstyle to property PR 723 9ef7d6f1
  • chore: upgrade checkstyle to 7.4, make checkstyle version configurable via property PR 725 e1a25782

Steve Ungerer (1):

  • fix: ensure executeBatch() does not use server-side prepared statements when prepareThreshold=0 PR 690 aca26a07

Trygve Laugstøl (1):

  • feat: connect the socket only if the socket factory created an unconnected socket PR 587 f75572be

Vladimir Gordiychuk (4):

Vladimir Sitnikov (12):

  • fedora: add BuildRequires: classloader-leak-test-framework 64b6750c
  • tests: remove Class.forName(..driver..) from test code c99507b5
  • test: add CI tests against PostgreSQL 8.2 PR 659 63ee60e2
  • feat: display error position when SQL has unterminated literals, comments, etc PR 688 8a95d991
  • feat: add support for PreparedStatement.setCharacterStream(int, Reader) PR 671 ee4c4265
  • chore: update next version to 42.0.0-SNAPSHOT 46634923
  • refactor: add CallableQueryKey#equals override 401c51a1
  • doc: correct wording in readme regarding PostgreSQL versions used in pgjdbc regression testing 60391d75
  • fix: revert ExpressionProperties to Properties in BaseDataSource 989b4d23
  • fix: correct edge cases for setCharacterStream(int, Reader) f1190d8c
  • test: add SharedTimerClassLoaderLeakTest to the regular test suite b3553276
  • refactor: wrap more log statements with isLoggable check 07d225ec

bd-infor (1):

Contributors to this release

We thank the following people for their contributions to this release.



Eric McCormack

Jordan Lewis

Jorge Solorzano

Pavel Raiskup

Philippe Marschall

Roman Ivanov

Steve Ungerer

Trygve Laugstøl

Vladimir Gordiychuk

Vladimir Sitnikov