pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #3734: feat: support java.time.Instant  and java.time.ZonedDateTime for ResultSet.getObject(..., Class) and PreparedStatement.set(..., Object)
Date: Mon, 28 Jul 2025 03:55:18 +0000
Message-ID: <[email protected]> (raw)

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


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #3734: feat: support java.time.Instant  and java.time.ZonedDateTime for ResultSet.getObject(..., Class) and PreparedStatement.set(..., Object)
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox