Re: timestamp with time zone wire format - Mailing list pgsql-jdbc

From Vladimir Sitnikov
Subject Re: timestamp with time zone wire format
Date
Msg-id CAB=Je-FY5i3wECa9afZgJDczfggCT7p-o2t5mQyPrp0w81XK2Q@mail.gmail.com
Whole thread Raw
In response to timestamp with time zone wire format  (Philippe Marschall <pm@netcetera.ch>)
Responses Re: timestamp with time zone wire format  (Philippe Marschall <pm@netcetera.ch>)
List pgsql-jdbc
> I can write parse code

Parse code for timestampTZ is probably there. The missing part is
conversion from-to JSR-310.

> for backwards compatibility with older Java/JDBC versions a dedicated class would probably be better

Things will get much easier after
https://github.com/pgjdbc/pgjdbc/pull/435 is merged in.
It will enable pre-processor, so it would be possible to seamlessly
integrate java.time right into `statement.getObject` without failing
the build for older java versions.

Here's an example:

https://github.com/vlsi/pgjdbc/blob/2236505772e8d36640929b8a75fa3857f0bfbb94/core/src/main/java/org/postgresql/jdbc/PgResultSet.java#L3471-L3491

Vladimir


pgsql-jdbc by date:

Previous
From: Philippe Marschall
Date:
Subject: timestamp with time zone wire format
Next
From: "Corradini, Carlos"
Date:
Subject: Re: [GENERAL] plpgsql function with RETURNS SETOF refcursor in JAVA