pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: bokken (@bokken) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #1325: Additional jsr 310 support
Date: Mon, 28 Jul 2025 12:55:29 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

I think that linked issue was adding `OffsetTime` - and `OffsetDateTime` even predates it - but the overall point that it has been around for a long time remains.

This is shaking loose some memories. The jdbc 4.2 spec explicitly called out `OffsetDateTime` - and the work done to support jdbc 4.2 only covered the datatypes explicitly listed.

`timestamptz` maps very nicely to `Instant` and `java.sql.Timestamp`/`java.util.Date` - in that all are an point in time. `OffsetDateTime` and `ZonedDateTime` add the context of specific offset and full time zone respectively. Because of jdbc 4.2, we pretty much have to support `OffsetDateTime` - we can extend that to `ZonedDateTime`, but since the database does not support either timezone or offset data, there could be value in not supporting additional types not required by the spec which imply more functionality than the database can provide. There is already repeated confusion about what `timestamptz` actually stores.

If we are going to do `ZonedDateTime`, there might be value in making the ZoneId exactly `UTC` rather than just inheriting from `OffsetDateTime` and offset of 0.

view thread (25+ messages)

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] issue #1325: Additional jsr 310 support
  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