LucaCappelletti94 opened a new pull request, #2727: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2727
`GRANT` and `REVOKE ... ON FUNCTION` and `ON PROCEDURE` kept the argument list as `arg_types: Vec<DataType>`, so an empty list and an absent one gave the same AST and `GRANT EXECUTE ON FUNCTION f() TO bob` printed back as `GRANT EXECUTE ON FUNCTION f TO bob`, which mean quite different things, as [`f()` names the zero-argument overload, and a bare `f` is accepted only when no other function shares the name](https://www.postgresql.org/docs/current/sql-grant.html). Argument names and modes failed to parse, which breaks `pg_dump` output such as `REVOKE ALL ON FUNCTION public.f(p_id uuid) FROM PUBLIC`, and only one function was accepted per statement. `GrantObjects::Functions` and `GrantObjects::Procedures` now hold `Vec<FunctionDesc>`, the type `DROP FUNCTION` and `DROP PROCEDURE` already use, and the parser reads them with the same `parse_function_desc`. They replace the `Function` and `Procedure` variants added for Snowflake in #1930, so this changes the public AST. Snowflake statements such as `GRANT USAGE ON FUNCTION db1.sc1.foo(INT) TO ROLE role1` parse and print unchanged. -- 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]
