云数据库 GAUSSDB-DROP ROW LEVEL SECURITY POLICY:示例

时间:2024-11-02 18:53:05

示例

--创建数据表all_data
openGauss=# CREATE TABLE all_data(id int, role varchar(100), data varchar(100));

--创建行访问控制策略
openGauss=# CREATE ROW LEVEL SECURITY POLICY all_data_rls ON all_data USING(role = CURRENT_USER);

--删除行访问控制策略
openGauss=# DROP ROW LEVEL SECURITY POLICY all_data_rls ON all_data;
support.huaweicloud.com/centralized-devg-v2-gaussdb/devg_03_0618.html