Re: ResultSet.getObject(..., LocalTime.class) not working with Postgres timetz type

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Re: ResultSet.getObject(..., LocalTime.class) not working with Postgres timetz type
Date: 2019-04-06 17:40:13
Message-ID: 716bbd9d-7708-f73b-7b49-641cc9e2790b@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Mark Rotteveel schrieb am 06.04.2019 um 10:15:
>> Retrieving the value of a timetz column fails when using getObject(, LocalTime.class)
>>
>> I am not sure if this is the same as: https://github.com/pgjdbc/pgjdbc/issues/1048
>> If it's not the same root cause, should I create an issue?
>>
>> Using "select localtime" instead, works just fine

> For reference, the JDBC specification does not specify support java.time.LocalXXX types on WITH TIME ZONE types.
>
> Especially because it is rather ambiguous what local would mean: would it mean local in the default JVM time zone, local at the original zone or local at UTC?

Makes sense.

However, the column is reported as Types.TIME and not Types.TIME_WITH_TIMEZONE, that's why I stumbled over it.

I think the driver should then support getObject(1, OffsetTime.class), shouldn't it?

Thomas

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nikolai Ivanov 2019-04-08 10:52:04 [pgjdbc/pgjdbc] b6ab27: fix: improper relative cursor movement (#1462)
Previous Message Mark Rotteveel 2019-04-06 08:15:57 Re: ResultSet.getObject(..., LocalTime.class) not working with Postgres timetz type