ON PROCEDURE
Syntax
GRANT { EXECUTE | ALL [ PRIVILEGES ] }
ON { PROCEDURE procedure_name ( [ [ argmode ] [ arg_name ] arg_type [, ...] ] ) [, ...]
| ALL PROCEDURES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
Parameters
- ON PROCEDURE
- Grant privileges on a stored procedure. Note: A role cannot execute a procedure unless
EXECUTE
is granted to the role on the procedure andUSAGE
orALL PRIVILEGES
is granted to the role on the owning schema. - EXECUTE
- Privilege to execute (run) a procedure.
- ALL PROCEDURES IN SCHEMA
- Grant the privilege to all the procedures in the named schema.
Examples
Grant
EXECUTE
privilege on a stored procedure to the
ybd
user.premdb=# grant execute on procedure proc1() to ybd;
GRANT
Grant
EXECUTE
privilege on all stored procedures in the
public
schema to the ybd
user:premdb=# grant execute on all procedures in schema public to ybd;
GRANT