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
Support casting in LIMIT
clauses for compatibility with postgres_fdw (12+)
#13835
Labels
Comments
hlcianfagna
changed the title
Support casting in
Support casting in Mar 21, 2023
LIMIT
clauses for compatibility for postgres_fdw (12+)LIMIT
clauses for compatibility with postgres_fdw (12+)
matriv
added
feature: sql: grammar
SQL Grammar enhancements
complexity: no estimate
labels
Mar 21, 2023
matriv
added a commit
that referenced
this issue
Apr 11, 2023
Allow both `CAST(<value> AS <datatype>)` and <value>::<datatype>`` expressions. Invalid datatypes would throw errors during symbol normalization. Closes: #13835
matriv
added a commit
that referenced
this issue
Apr 11, 2023
Allow both `CAST(<value> AS <datatype>)` and <value>::<datatype>`` expressions. Invalid datatypes would throw errors during symbol normalization. Closes: #13835
matriv
added a commit
that referenced
this issue
Apr 11, 2023
Allow both `CAST(<value> AS <datatype>)` and `<value>::<datatype>` expressions. Invalid datatypes would throw errors during either from the `ExpressionAnalyzer` if the resulting type of the cast cannot be converted to an integer, or during symbol normalization, if the actual runtime value cannot be converted to an integer. Closes: #13835
mergify bot
pushed a commit
that referenced
this issue
Apr 11, 2023
Allow both `CAST(<value> AS <datatype>)` and `<value>::<datatype>` expressions. Invalid datatypes would throw errors during either from the `ExpressionAnalyzer` if the resulting type of the cast cannot be converted to an integer, or during symbol normalization, if the actual runtime value cannot be converted to an integer. Closes: #13835
@hlcianfagna Thx for reporting this improvement, It's been implemented and will be included in the next release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Statement
In certain circumstances (requested in the Community) it can be useful to use a
FOREIGN DATA WRAPPER
in a PostgreSQL instance to haveFOREIGN TABLE
s from a CrateDB instance.Starting on PostgreSQL 12,
postgres_fdw
will passLIMIT
clauses with a cast like:This is currently not supported by CrateDB and it fails with:
Possible Solutions
Use PostgreSQL 11.19 which is still supported.
Considered Alternatives
There are workarounds when the client/input query can be controlled, but in the case mentioned in the Community there was a 3rd party tool involved.
The text was updated successfully, but these errors were encountered: