2

I am trying to find references to what the difference between EXECUTE and ALL is in:

GRANT { EXECUTE | ALL [ PRIVILEGES ] } ON { FUNCTION | ALL FUNCTIONS IN SCHEMA }...

but all I can find is what the docs say:

EXECUTE Allows the use of the specified function and the use of any operators that are implemented on top of the function. This is the only type of privilege that is applicable to functions. (This syntax works for aggregate functions, as well.)

For example, I know that for schemas ALL = CREATE + USAGE but I wanted to double check that in reference to functions:

This is the only type of privilege that is applicable to functions.

in the above snippet from the docs implies that for functions ALL = EXECUTE and that:

GRANT ALL ON ALL FUNCTIONS...

is equivalent to:

GRANT EXECUTE ON ALL FUNCTIONS...
2

The only permission applicable to functions is EXECUTE, so when you use ALL postgresql will try to apply all the permissions available for functions, and for now this is just "EXECUTE".

So it means exactly the same.

EXECUTE

Allows the use of the specified function and the use of any operators that are implemented on top of the function. This is the only type of privilege that is applicable to functions.

https://www.postgresql.org/docs/10/static/sql-grant.html

But be carefully if more kind of permissions for functions be implemented in new postgresql versions this can do wrong (but i can't see other than execute).

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.