Manage Execute privilege

To grant or revoke Execute privilege on an object:
  • GRANT EXECUTE ON object TO entity;
  • REVOKE EXECUTE ON object FROM entity;
Always use a complete signature for the object. For example, to grant Execute privileges for the sample function CustomerName to the user myuser, you can use the following command:
GRANT EXECUTE ON CustomerName(varchar(64000)) TO myuser;
To grant Execute privilege on all functions to the user newuser:
GRANT EXECUTE ON FUNCTION TO newuser;
To grant Execute privilege on the library mylib to the user newuser:
GRANT EXECUTE ON mylib TO newuser;
To revoke Execute privileges for the sample aggregate PenMax from the group sales:
REVOKE EXECUTE ON PenMax(int4) FROM GROUP sales;