REVOKE (User Defined Extension)

Revokes privileges on one or more user-defined extensions from users and roles.

Syntax

REVOKE [ GRANT OPTION FOR ] privilege
   ON { 
       UDx‑type [[database.]schema.]function‑name( [argument‑list] )[,…] 
       | ALL FUNCTIONS IN SCHEMA schema[,…] }
... FROM grantee[,…]

Parameters

GRANT OPTION FOR

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.

privilege

One of the following:

  • EXECUTE: Permission to call a user-defined extension.
  • ALL [PRIVILEGES]:  Revokes all privileges that pertain to functions that also belong to the grantor. Grantors cannot revoke privileges that they themselves lack. The optional keyword PRIVILEGES conforms with the SQL standard.
ON UDx‑type

Specifies the function's user-defined extension (UDx) type, where UDx‑type is one of the following:

  • FUNCTION
  • AGGREGATE FUNCTION
  • ANALYTIC FUNCTION
  • TRANSFORM FUNCTION
  • FILTER
  • PARSER
  • SOURCE
[database.]schema

Specifies a schema, by default public. If schema is any schema other than public, you must supply the schema name. For example:

myschema.thisDbObject

If you specify a database, it must be the current database.

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

If the target grantees have a grant option to extend the specified privileges to other users, CASCADE specifies to search for these users and revoke the privileges from them also.

Privileges

One of the following:

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