REVOKE (User Defined Extension)

Revokes the EXECUTE privilege on a user-defined extension (UDx) from a database user or role. Optionally revokes privileges on all user-defined extensions within one or more schemas. You can revoke privileges on the following user-defined extension types:

Syntax

REVOKE EXECUTE 
...ON FUNCTION [ schema.]function-name [, ...]
... | ON AGGREGATE FUNCTION [ schema.]function-name [, ...]
... | ON ANALYTIC FUNCTION [ schema.]function-name [, ...]
... | ON TRANSFORM FUNCTION [ schema.]function-name [, ...]
... | ON FILTER [ schema.]filter-name [, ...]
... | ON PARSER [ schema.]parser-name [, ...]
... | ON SOURCE [ schema.]source-name [, ...]
... | ON ALL FUNCTIONS IN SCHEMA schema-name [, ...]
... ( [ argname ] argtype [, ...] )
... FROM { username | role | PUBLIC } [, ...]
... [ CASCADE ] 

Parameters

schema

Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example:

myschema.thisDbObject
function-name
filter-name
parser-name
source-name

The name of the UDx from which to revoke the EXECUTE privilege. If you use more than one schema, you must specify the schema that contains the UDx, as noted in the previous row.

ON ALL FUNCTIONS IN SCHEMA

Revokes EXECUTE privileges on all UDx's within one or more schemas from a user, role, or all users and roles.

argname

[Optional] The argument name or names for the UDx.

When you GRANT, REVOKE, or DROP privileges for a polymorphic function, you must include an argument with the command.

argtype

The argument data type or types of the UDx.

{ username | role | PUBLIC } [,...]

Revokes the privileges from the specified user, role, or all users and roles (PUBLIC) that have been granted the privilege.

CASCADE
Revokes the privilege from the specified user or role and then from others. After a user or role has been granted a privilege, the user can grant that privilege to other users and roles. The CASCADE keyword first revokes the privilege from the initial user or role, and then from other grantees extended the privilege.

Privileges

You must have DBADMIN privileges, or be the owner of the UDX, to run REVOKE (User Defined Extension).

Examples

The following command revokes EXECUTE privileges from user Bob on the myzeroifnull function:

> REVOKE EXECUTE ON FUNCTION myzeroifnull (x INT) FROM Bob;

The following command revokes ALL privileges from user Doug on the Pagerank polymorphic function:

> REVOKE ALL ON TRANSFORM FUNCTION Pagerank (t float) FROM Doug;

The following command revokes EXECUTE privileges on all functions in the zero-schema schema from user Bob:

> REVOKE EXECUTE ON ALL FUNCTIONS IN SCHEMA zero-schema FROM Bob;

The following command revokes EXECUTE privileges from user Bob on the tokenize function:

> REVOKE EXECUTE ON TRANSFORM FUNCTION tokenize(VARCHAR) FROM Bob;

The following command revokes ALL privileges on the ExampleSource() source from user Alice:

> REVOKE ALL ON SOURCE ExampleSource() FROM Alice;

See Also