DROP ROW LEVEL SECURITY POLICY
Function
DROP ROW LEVEL SECURITY POLICY deletes a row-level access control policy from a table.
Precautions
Only the owner of a table or a system administrator has the DROP ROW LEVEL SECURITY POLICY permission.
Syntax
1
|
DROP [ ROW LEVEL SECURITY ] POLICY [ IF EXISTS ] policy_name ON table_name [ CASCADE | RESTRICT ] |
Parameter Description
- IF EXISTS
Reports a notice instead of an error if the specified row-level access control policy does not exist.
- policy_name
Specifies the name of a row-level access control policy to be deleted.
Examples
1 2 3 4 5 6 7 8 |
-- Create the data table all_data. openGauss=# CREATE TABLE all_data(id int, role varchar(100), data varchar(100)); -- Create a row-level access control policy. openGauss=# CREATE ROW LEVEL SECURITY POLICY all_data_rls ON all_data USING(role = CURRENT_USER); -- Delete a row-level access control policy. openGauss=# DROP ROW LEVEL SECURITY POLICY all_data_rls ON all_data; |
Helpful Links
ALTER ROW LEVEL SECURITY POLICY and CREATE ROW LEVEL SECURITY POLICY
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot