In documentation on https://www.postgresql.org/docs/9.1/sql-grant.html theres a syntax to GRANT command.
GRANT { EXECUTE | ALL [ PRIVILEGES ] }
ON { FUNCTION function_name ( [ [ argmode ] [ arg_name ] arg_type [, ...] ] ) [, ...]
| ALL FUNCTIONS IN SCHEMA schema_name [, ...] }
TO { [ GROUP ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ]
I trying to add execute permission to some function using this syntax but without success:
db=# GRANT EXECUTE ON FUNCTION some_function TO some_user;
ERROR: syntax error at or near "TO"
LINE 1: GRANT EXECUTE ON FUNCTION some_function TO some_user...
Why there's so cohesion between documentation and reality? What I'm doing wrong?