pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: marschall (@marschall) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #1325: Additional jsr 310 support
Date: Wed, 14 Nov 2018 22:44:45 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

These are my personal views:
* Supporting Instant for TIMESTAMPTZ is fine. It is not covered by the JDBC 4.2 specification but it is semantically equivalent. I find it not particularly useful as I find Instant a not particularly useful datatype, it's just an int and a long.
* I am against supporting Instant for TIMESTAMP. These are semantically different data types. When converting between Instant and TIMESTAMP you have two options and both seem wrong
  * use the system default time zone which means you'll get different values/instants depending on the system default time zone. Additionally in case of DST transitions you can get reorderings and the duration between instants can change .
  * use UTC which adds semantics to TIMESTAMP which it doesn't have and will possibly users as the value stored on the database is different from the local time
* Supporting ZonedDateTime for TIMESTAMPTZ is fine. It is not covered by the JDBC 4.2 specification but it is semantically equivalent. I would also use UTC as that's what Postgres is storing. There is potential here as well for user confusion as they will likely get a different offset back. However they will get the same instant and that's consistent with the current behavior of OffsetDateTime.
* I am against supporting ZonedDateTime for TIMESTAMP. These are semantically different data types. If you're using the default zone id you will get different instants depending on the default zone id. Also in the case of DST transitions you can get reorderings and some of the conversions are ambiguous as there are two possible offsets to chose from.

view thread (25+ messages)  latest in thread

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