Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Mon, 28 Jul 2025 03:55:18 +0000 Subject: [pgjdbc/pgjdbc] PR #3734: feat: support java.time.Instant and java.time.ZonedDateTime for ResultSet.getObject(..., Class) and PreparedStatement.set(..., Object) List-Id: X-GitHub-Author-Id: 213894 X-GitHub-Author-Login: vlsi X-GitHub-Issue: 3734 X-GitHub-Labels: enhancement X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: open X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3734 Content-Type: text/plain; charset=utf-8 Previously, the users had to round-trip to OffsetDateTime.class which had several drawbacks: 1) It was not convenient when the application already had Instant at hand 2) Instant has a closer mapping to the underlying PostgreSQL timestamptz type (== seconds from epoch), so it is a bit faster if the user does not need date/time components. Only timestamptz and timetz are supported for Instant. timestamp in the database does not properly represent a moment in time, so we fail fast so the application developer could either alter the type of the column or use a different type in Java (e.g. LocalDateTime) Fixes https://github.com/pgjdbc/pgjdbc/issues/1325