DROP COLUMN ENCRYPTION KEY

Function

CREATE COLUMN ENCRYPTION KEY deletes a column encryption key (CEK).

Precautions

Only the CEK owner or a user who has been granted the DROP permission can run this command. By default, the system administrator has this permission.

NOTE: In the Lite scenario, openGauss provides this syntax, but encrypted database-related functions are unavailable.

Syntax

DROP COLUMN ENCRYPTION KEY [ IF EXISTS ] column_encryption_key_name [CASCADE];

Parameter Description

  • IF EXISTS

    If a specified CEK does not exist, a notice rather than an error is issued.

  • column_encryption_key_name

    Name of a CEK to be deleted.

    Value range: a string. It is the name of an existing CEK.

Examples

-- Delete a CEK.
openGauss=# DROP COLUMN ENCRYPTION KEY ImgCEK CASCADE;
ERROR:  cannot drop column setting: imgcek cascadely because encrypted column depend on it.
HINT:  we have to drop encrypted column: name, ... before drop column setting: imgcek cascadely.
Feedback
编组 3备份
    openGauss 2024-12-26 01:05:31
    cancel