REVOKE (User Defined Extension)
Revokes privileges on one or more user-defined extensions from users and roles.
Syntax
REVOKE [ GRANT OPTION FOR ] { EXECUTE | ALL PRIVILEGES } ON { UDx‑type [[database.]schema.]function‑name( [argument‑list] )[,...] | ALL FUNCTIONS IN SCHEMA schema[,...] } FROM grantee[,...]
Parameters
|
Revokes the grant option for the specified privileges. Current privileges for grantees remain unaffected. If you omit this clause, Vertica revokes both the grant option and current privileges. |
EXECUTE
|
Revokes grantees ability to run the specified functions. |
ALL [PRIVILEGES]
|
Revokes all function privileges that also belong to the revoker. Users cannot revoke privileges that they themselves lack. The optional keyword |
|
Specifies the function's user-defined extension (UDx) type, where UDx‑type is one of the following:
|
[database.]schema
|
Database and schema. The default schema is |
function‑name | The name of the user-defined function on which to revoke privileges. |
ON ALL FUNCTIONS IN SCHEMA schema
|
Revokes privileges on all functions in the specified schema. |
argument-list |
Required for all polymorphic functions, a comma-delimited list of function arguments, where each argument is specified as follows: [argname] argtype If the procedure is defined with no arguments, supply an empty argument list. |
grantee | Specifies whose privileges are revoked, one of the following: |
CASCADE
|
|
Privileges
Non-superuser, one of the following:
- Owner of the target function
- Privileges grantee who was given the option (
WITH GRANT OPTION
) of extending these privileges to other users
Examples
Revoke EXECUTE
privileges from user Bob
on function myzeroifnull
:
=> REVOKE EXECUTE ON FUNCTION myzeroifnull (x INT) FROM Bob;
Revoke all privileges from user Doug
on function Pagerank
:
=> REVOKE ALL ON TRANSFORM FUNCTION Pagerank (t float) FROM Doug;
Revoke EXECUTE
privileges on all functions in the zero-schema
schema from user Bob:
=> REVOKE EXECUTE ON ALL FUNCTIONS IN SCHEMA zero-schema FROM Bob;
Revoke EXECUTE
privileges from user Bob on the tokenize
function:
=> REVOKE EXECUTE ON TRANSFORM FUNCTION tokenize(VARCHAR) FROM Bob;
Revoke all privileges on the ExampleSource()
source from user Alice:
=> REVOKE ALL ON SOURCE ExampleSource() FROM Alice;
See Also
- GRANT (User Defined Extension)
- Granting and Revoking Privileges in the Administrator's Guide
- Developing User-Defined Extensions (UDxs) in Extending Vertica