-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Empty PostgreSQL ARRAY should be printed with a cast #853
Comments
Or use |
I provide a fix in #854, but found another issue that if we render a |
This would failed on type mismatch like String may be TEXT or VARCHAR. Then I'd like to keep #854 while other types can be cast with For example: // ids: Vec<Uuid>
let expr: SimpleExpr = request.ids.clone().into();
expr.cast_as(IdenStr("UUID[]")) |
Otherwise, it will fail with "cannot determine type of empty array".
For example, an empty string vec will be converted to
ARRAY []
but PG needsARRAY[]::TEXT[]
or things like that for understanding the type.The text was updated successfully, but these errors were encountered: