Message-ID: From: "findepi (@findepi)" To: "pgjdbc/pgjdbc" Date: Tue, 30 Jul 2019 12:43:36 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #1225: Java 8 Time Support for Postgres Arrays In-Reply-To: References: List-Id: X-GitHub-Author-Login: findepi X-GitHub-Comment-Id: 516402407 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 1225 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/1225#issuecomment-516402407 Content-Type: text/plain; charset=utf-8 > you'd probably be surprised to know that timestamp with timezone doesn't store the timezone either then. In PostgreSQL -- yes, I know. Right, I missed the fact the issue is broader than just `timestamp[]`. I was not as much concerned about `timestamptz[]` being mapped to `java.sql.Timestamp[]` because in `timestamptz` case all I need is point in time. So this mapping at least does not lose information. https://github.com/prestosql/presto/blob/c39358eee752eac13959fd05dc5427502cf03b33/presto-postgresql/src/main/java/io/prestosql/plugin/postgresql/PostgreSqlClient.java#L355-L357 (Or course `java.time.Instant` would be more appropriate) For `date[]`, mapping to `java.sql.Date[]` loses information in one edge case only (`DATE '2011-12-30'` and `Pacific/Apia` zone). Of course, it's still desirable to get the `date[]` data as `java.time.LocalDate[]`. (Let me explain my point of view. I am concerned mostly about losing information and not about convenience, because in Presto use-cases, not losing information is all we need. Even accessing String would be enough. Others, are probably more interested in getting java.time. classes because in application code there is usually more code that interacts with JDBC in some way.)