The ALTER_GROUPED_POLICY procedure is used to modify the namespace and attribute associations of a group policy.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support it.
Syntax
DBMS_RLS.ALTER_GROUPED_POLICY(
object_schema IN VARCHAR2 := NULL,
object_name IN VARCHAR2,
policy_group IN VARCHAR2 := 'SYS_DEFAULT',
policy_name IN VARCHAR2,
alter_option IN BINARY_INTEGER := NULL,
namespace IN VARCHAR2,
attribute IN VARCHAR2);
Parameters
Parameter |
Description |
|---|---|
| object_schema | The name of the schema to which the table or view belongs. Default isNULL, indicating the current schema. |
| object_name | The name of the table or view. |
| policy_group | Policy group name. Default isSYS_DEFAULT. |
| policy_name | The name of the policy. |
| alter_option | Modify the options. The following constants are supported:ADD_ATTRIBUTE_ASSOCIATION=1、REMOVE_ATTRIBUTE_ASSOCIATION=2. |
| namespace | Namespace. |
| attribute | Attribute. |
Examples
BEGIN
DBMS_RLS.ALTER_GROUPED_POLICY(
object_schema => 'hr',
object_name => 'employees',
policy_group => 'admin_group',
policy_name => 'emp_dept_policy',
alter_option => DBMS_RLS.ADD_ATTRIBUTE_ASSOCIATION,
namespace => 'emp_ns',
attribute => 'dept');
END;
/
