JSqlParser
JSqlParser copied to clipboard
implicit cast to "double precision" is not supported
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
-
SELECT double precision '1'
- Parsing this SQL using JSqlParser with this statements
-
org.junit.ComparisonFailure: Expected query to parse but it failed to parse (error: Encountered unexpected token: "\'1\'" <S_CHAR_LITERAL>
Expected behavior query to parse
System
- postgres
- 15
- 4.1
This kind of implicit cast is not supported (yet). Please consider to use a Standard Compliant explicit cast:
SELECT CAST('1' AS DOUBLE)
;
This also seems to work:
SELECT '1'::Double
;
thanks for the workaround, it'd be great if this can be supported in the future though :)
double precision is definitly supported
select 1::double precision
however, this syntax double precision '1'
is not.
thanks for the note, updated the title :)
I am closing this since it is not support and won't be supported (unless any genius provided a PR).