LucaCappelletti94 opened a new pull request, #2732: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2732
`GRANT bypasser TO anon` failed with `Expected: a privilege keyword, found: bypasser` in every dialect, since `GRANT` only knew the privilege form. PostgreSQL grants membership in a role by naming the role without a keyword ([GRANT](https://www.postgresql.org/docs/current/sql-grant.html)). The statement now parses into a new `Statement::GrantRole`, as the membership form shares neither the objects nor `WITH GRANT OPTION` with `Grant`. The privilege form is still tried first, and the role form takes over only when it fails on a role list followed by `TO`, so existing statements and their errors are unchanged. The `WITH` options and the matching `REVOKE` follow in separate PRs. -- 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]
