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
Use "numeric" (without parameters) data type in PostgreSQL #1906
Use "numeric" (without parameters) data type in PostgreSQL #1906
Conversation
…t data type has char parameters in data type (like NUMBER(*,0) in Oracle)
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.
This change would allow values such as NUMBER(*) and NUMBER(1..0) etc. and still try to use numeric as the value. Yes, it will fix your use case specifically but needs to account for other invalid non number formats.
Unit Test Results 4 560 files + 391 4 560 suites +391 30m 37s ⏱️ + 3m 27s Results for commit cd01227. ± Comparison against base commit e8c6019. ♻️ This comment has been updated with latest results. |
…Lonwo/liquibase into LonwoLonwo-fixNumberFormatExceptionPG
…preserve the given arguments
The piece that was keeping me from reviewing it sooner was thinking on what sort of tests we'd like for this. The fix itself is very isolated but also sort of expansive since it treats any number parse error as that we should ignore the arguments. While Really, the only reason we're trying to parse that first argument is because there times we get a larger than 1000 value from metadata and so we want to remove it in that case. But in general we try to respect the arguments users pass along, under the assumption they understand what is possible in their database better than we do. I ended up adding a new unit test around the toDatabaseType() and also updating your change to preserve the arguments if it gets arguments it doesn't understand. That still works well with your oracle vs. postgresql comparison logic, correct @LonwoLonwo ? |
Thanks @nvoxland Now it all looks fantastic, and it's working for me. |
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.
- Fix improves handling of precision for Postgres numeric datatypes.
- Change limited to Postgres (and by extension, EDB)
- A nice new set of tests added to validate behavior with different number types.
APPROVED
when input data type has char parameters in the data type (like NUMBER(*,0) in Oracle)
catch NumberFormatException
Steps:
Actual result: catch NumberFormatException
Hello from DBeaver.