Support for TIMESTAMP_WITH_TIMEZONE in ResultSet#getString()

Lukas Eder lukas.eder at gmail.com
Fri Nov 16 15:50:36 UTC 2018


Hello,

I've noticed that the table B 6 of the JDBC 4.3 spec doesn't specify that
ResultSet.getString() should be able to produce string versions of the
TIMESTAMP_WITH_TIMEZONE and TIME_WITH_TIMEZONE data types despite table B 5
allowing to call setObject() with Offset[Date]Time types on CHAR and
VARCHAR columns.

Usually, drivers always support calling getString() on any data type. The
not so unreasonable default implementation being String.valueOf(Object).

Is this lack of specification intended? What were the thoughts behind not
supporting this conversion?

Thanks,
Lukas


More information about the jdbc-spec-discuss mailing list