PostgreSQL JDBC Driver 42.7.6 Released

Notable changes

Features

  • fix: Enhanced DatabaseMetadata.getIndexInfo() method, added index comment as REMARKS property PR #3513

Performance Improvements

  • performance: Improve ResultSetMetadata.fetchFieldMetaData by using IN row values instead of UNION ALL for improved query performance (later reverted) PR #3510
  • feat:Use a single simple query for all startup parameters, so groupStartupParameters is no longer needed PR #3613

Bug Fixes

Protocol & Connection Handling

  • fix: Send extra_float_digits=3 for PostgreSQL 12+ as well PR #3491
  • fix: Fixed handling of protocol 3.2 and wider cancel keys PR #3592
  • fix: Made PgConnection#abort compatible with Java 24 PR #3582
  • fix: Fixed ArrayIndexOutOfBounds when writing big objects into GSS enabled connections PR #3500
  • fix: Added back application name setting PR #3509

Metadata & Catalog Handling

  • fix: Set column name explicitly when using current_database() in queries PR #3526
  • fix: Use query to find the current catalog instead of relying on the database in the connection URL pull #3565
  • fix: Refactored empty resultset to use empty result set if the catalog is not correct PR #3588

API Improvements

  • fix: Undeprecated Fastpath API and fixed deprecation warnings PR #3493
  • fix: Undeprecated sslfactoryarg PR #3496
  • fix: Added PgMessageType and used static variables for protocol literals PR #3609
  • fix: Add the ability to turn off automatic LSN flush PR #3403
  • fix: isValid incorrectly called execute, instead of executeWithFlags PR #3631. Fixes Issue #3630
  • fix: EOFException on PreparedStatement#toString with unset bytea parameter since 42.7.4 Commit 0a88ea4. Fixes Issue #3365

Infrastructure & Build Improvements

Java Support

  • update: Updated to use Java 21 for building pgjdbc by default PR #3612
  • update: Updated Java 21 as the build dependency for copr PR #3607
  • update: Updated latest JDK to version 24 PR #3580
  • update: Applied the latest byte-buddy version for tests to support the latest Java versions PR #3583

Testing & Quality

  • test: Added ErrorProne verification to detect bugs earlier PR #3493
  • test: Simplified TestUtil.openDB, added tests with various assumeMinServerVersion values PR #3624
  • test: Updated to use PostgreSQL 17 rather than 17rc1 for CI tests PR #3501
  • test: Removed stale logging message from SslTest PR #3584
  • test: Added CI executions with adaptive_fetch=true by default for performance testing PR #3615
  • test: Added tests with reWriteBatchedInserts=true PR #3616

Code Quality

Dependency Updates

  • Updated numerous dependencies including:
  • Gradle to 8.14
  • Checkerframework to v3.49.3
  • JUnit to v5.12.2
  • Spotbugs to v4.9.3
  • Checkstyle to v10.23.1
  • Hamcrest to v3
  • Error Prone Core to v2.38.0
  • Byte Buddy to v1.17.5
  • JaCoCo to v0.8.13

Documentation

Removed

  • chore: Removed unused Travis CI configuration PR #3498
  • chore: Excluded Oracle Java 17 from CI tests PR #3499
  • fix: Removed workaround which was needed for an old checkstyle commit #4500ea04

Commits by author

Dave Cramer (13 commits)

Vladimir Sitnikov (30 commits)

Sehrope Sarkuni (2 commits)

mkoncek (1 commit)

Ramin Orujov (1 commit)

Kenneth Geisshirt (1 commit)

Joe Jensen (1 commit)

Bernd (1 commit)

Mohit-Attry (1 commit)

  • Code formatting fixes

Anmol Sharma (1 commit)

  • Test framework improvements

Kim Johan Andersson (1 commit)