3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "DROP POLICY" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 DROP_POLICY \- remove a row\-level security policy from a table
35 DROP POLICY [ IF EXISTS ] \fIname\fR ON \fItable_name\fR [ CASCADE | RESTRICT ]
40 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
41 \fBALTER TABLE\fR, then the default\-deny policy will be used\&.
42 ALTER TABLE \&.\&.\&. DISABLE ROW LEVEL SECURITY
43 can be used to disable row\-level security for a table, whether policies for the table exist or not\&.
48 Do not throw an error if the policy does not exist\&. A notice is issued in this case\&.
53 The name of the policy to drop\&.
58 The name (optionally schema\-qualified) of the table that the policy is on\&.
65 These key words do not have any effect, since there are no dependencies on policies\&.
69 To drop the policy called
78 DROP POLICY p1 ON my_table;
90 CREATE POLICY (\fBCREATE_POLICY\fR(7)), ALTER POLICY (\fBALTER_POLICY\fR(7))