DROP POLICY

On this page Carat arrow pointing down

The DROP POLICY statement removes an existing row-level security (RLS) policy from a table.

Syntax

icon/buttons/copy
DROP POLICY [ IF EXISTS ] policy_name ON table_name [ CASCADE | RESTRICT ];

Parameters

Parameter Description
policy_name Unique identifier for the policy on the table.
table_name The table to which the policy applies.
IF EXISTS Suppresses an error if the policy doesn't exist.
CASCADE, RESTRICT Standard dependency handling (not relevant for policies themselves).

Examples

Drop a policy

To drop an existing policy, issue the following statement:

icon/buttons/copy
DROP POLICY IF EXISTS your_policy ON orders;

See also


Yes No
On this page

Yes No