Removes a row-level security policy from a table.
DROP POLICY [ IF EXISTS ] <name> ON <table_name> [ CASCADE | RESTRICT ]
DROP POLICY
removes the specified policy from the table. Note that if the last policy is removed for a table and the table still has row-level security enabled via ALTER TABLE
, then the default-deny policy will be used. ALTER TABLE ... DISABLE ROW LEVEL SECURITY
can be used to disable row-level security for a table, whether policies for the table exist or not.
To drop the policy called p1
on the table named my_table
:
DROP POLICY p1 ON my_table;
DROP POLICY
is a Greenplum Database extension to the SQL standard.
Parent topic: SQL Commands