0

I have a role that will execute a stored procedure (function) to update a table. I give the user acccess to the role, and the role execute on the stored procedure. Do I also have to give the role update on the table? Thanks

2

You have three options. You can grant update on the table to the role. You can grant update on the table to the user. Or you can do neither of those and create the function with the "SECURITY DEFINER" option.

In the last case, then the user will be able to update the table via the function, but will not be able to update the table outside of the function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.