DROP POLICY

Synopsis

DROP POLICY removes the specified row level security policy from the table. Note that if allpolicies for a table are removed and the table still has ENABLE ROW LEVEL SECURITY, then a defaultdeny all policy will be applied for the table.

Syntax

  1. drop_policy ::= DROP POLICY [ IF EXISTS ] name ON table_name
  2. [ CASCADE | RESTRICT ]

drop_policy

DROP POLICY - 图1

Where

  • name is the name of the policy to be removed.
  • table_name is the name of the table that the policy is on.
  • CASCADE / RESTRICT don’t have any effect since table policies don’t have any dependencies.

Example

  • Drop a policy.
  1. yugabyte=# DROP POLICY p1 ON table_foo;

See also