Updated on 2025-03-13 GMT+08:00

DROP MASKING POLICY

Description

Deletes a masking policy.

Precautions

Only users with the POLADMIN or SYSADMIN permission, or the initial user can perform this operation.

Syntax

1
DROP MASKING POLICY [ IF EXISTS ] policy_name;

Parameters

  • policy_name

    Specifies the audit policy name, which must be unique.

    Value range: a string. It must comply with the naming convention. The value is an existing policy name.

Examples

1
2
3
4
5
-- Delete a masking policy.
gaussdb=# DROP MASKING POLICY IF EXISTS maskpol1;

-- Delete a group of anonymization policies.
gaussdb=# DROP MASKING POLICY IF EXISTS maskpol1, maskpol2, maskpol3;