Skip to main content
Version: 4.x

DROP ROLE MAPPING

DROP ROLE MAPPING drops a role mapping.

Note:

Supported since VeloDB Enterprise 4.1.4.

Syntax​

DROP ROLE MAPPING [IF EXISTS] <mapping_name>;

Required parameters​

ParameterDescription
<mapping_name>Name of the role mapping to drop.

Optional parameters​

ParameterDescription
IF EXISTSSuppresses the error if the mapping does not exist.

Access control requirements​

The user executing this statement must have the following privilege, either directly or through a role:

PrivilegeObjectDescription
ADMIN_PRIVUser or roleRequired to perform this operation.

Usage notes​

  • Without IF EXISTS, the statement returns an error if the mapping does not exist.
  • After the mapping is dropped, its authentication integration no longer evaluates those rules.
  • To change rules, drop the mapping and recreate it with CREATE ROLE MAPPING.

Examples​

Drop a mapping:

DROP ROLE MAPPING corp_oidc_roles;

Drop a mapping only if it exists:

DROP ROLE MAPPING IF EXISTS corp_oidc_roles;