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

时间:2024-01-23 20:09:25

示例

1
2
3
4
5
6
7
8
--创建数据表all_data
postgres=# CREATE TABLE all_data(id int, role varchar(100), data varchar(100));

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

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