-
Notifications
You must be signed in to change notification settings - Fork 90
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
String with date treated as date and transforms the string #172
Comments
For example, "2018-02-13" gets changed to "2018-02-13 -07:00:00" and "2018-11-15T16:45:32Z" gets changed to "2018-11-15 09:45:32.000000 -07:00:00" |
Yes this is super limiting, and creates all sort of hard to solve problems for my team. It really comes down to the optimistic cast for temporal types, where any string that fits a time, date or timestamp pattern is automatically converted, with no option to turn off the conversion (code is in JDBCStatementHelper.java). It really should be like the optimistic cast for uuid, where it's optional (castUUID=true/false), where you can allow of disallow it in the JDBC options. And this would require so lite code to fix. |
Version
General info
What is your jdbc driver
org.postgresql.Driver
What is your RDBMS server
PostgreSQL
What is your connection string (no user/passwords please!)
jdbc:postgresql://localhost:5432/postgres
Context
I encountered an exception which looks suspicious while ...
Under certain circumstances a string containing a date (that should be handled as a string) is passed in as a param, and seems to get interpreted as a date, resulting in the string getting changed. I've written code to reproduce the issue. Link below.
Do you have a reproducer?
https://github.com/fuelyourdev/date-string-bug-reproducer
Steps to reproduce
Extra
The text was updated successfully, but these errors were encountered: