BenSatori opened a new pull request, #2494:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2494
Fixes parsing of two legal Postgres `SUBSTRING` forms:
- `SUBSTRING('hello world' FOR 5 FROM 1)` (`FOR` before `FROM`)
- `SUBSTRING('hello world' SIMILAR '%#"o w#"%' ESCAPE '#')`
See https://www.postgresql.org/docs/current/functions-string.html
Both previously failed with a parser error. Adds a `similar` flag to
`Expr::Substring` to track the `SIMILAR ... ESCAPE` display form, and allows
`FOR` to be parsed before `FROM` (normalized to `FROM ... FOR` on output).
Generated with AI assistance (GitHub Copilot).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]