New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix JDBC type of TIMESTAMP WITH TIME ZONE #439
Conversation
we have required Java7 for a couple versions now, so no need to hard-code the constant |
54b944a
to
4211e93
Compare
I made a typo JDBC 4.2 is Java 1.8 and it's only available there. See |
@@ -315,7 +315,8 @@ | |||
// 24 for ValueTimestamp, 32 for java.sql.Timestamp | |||
56 | |||
); | |||
add(Value.TIMESTAMP_TZ, Types.OTHER, "TimestampTimeZone", | |||
// TIMESTAMP_WITH_TIMEZONE = 2014 | |||
add(Value.TIMESTAMP_TZ, 2014, "TimestampTimeZone", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please a comment here why we are doing this (I don't like to look in git history to figure out things like that)
also please update the changelog.html file and add a big fat [API CHANGE] to your entry |
4211e93
to
0ed7392
Compare
Currently the JDBC type of TIMESTAMP WITH TIME ZONE is Types.OTHER. JDBC 4.2 has a dedicated type for this Types.TIMESTAMP_WITH_TIMEZONE. Unfortunately this type is only available in JDBC 4.2/Java 1.8 so I hard code the constant value instead of the constant reference.
0ed7392
to
72be2bd
Compare
I added the comments, updated the changelog and created #441 to track clean ups that can be done once Java 8 is required. |
Great. thanks! |
I find it strange that "TIMESTAMP WITH TIME ZONE" was mapped to JDBC See there (Java 8 / JDBC 4.2 / master) : https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java#L88 |
Currently the JDBC type of TIMESTAMP WITH TIME ZONE is Types.OTHER.
JDBC 4.2 has a dedicated type for this Types.TIMESTAMP_WITH_TIMEZONE.
Unfortunately this type is only available in JDBC 4.2/Java 1.8 so I
hard code the constant value instead of the constant reference.