1DROP POLICY(7) PostgreSQL 11.3 Documentation DROP POLICY(7)
2
3
4
6 DROP_POLICY - remove a row level security policy from a table
7
9 DROP POLICY [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]
10
12 DROP POLICY removes the specified policy from the table. Note that if
13 the last policy is removed for a table and the table still has row
14 level security enabled via ALTER TABLE, then the default-deny policy
15 will be used. ALTER TABLE ... DISABLE ROW LEVEL SECURITY can be used
16 to disable row level security for a table, whether policies for the
17 table exist or not.
18
20 IF EXISTS
21 Do not throw an error if the policy does not exist. A notice is
22 issued in this case.
23
24 name
25 The name of the policy to drop.
26
27 table_name
28 The name (optionally schema-qualified) of the table that the policy
29 is on.
30
31 CASCADE
32 RESTRICT
33 These key words do not have any effect, since there are no
34 dependencies on policies.
35
37 To drop the policy called p1 on the table named my_table:
38
39 DROP POLICY p1 ON my_table;
40
42 DROP POLICY is a PostgreSQL extension.
43
45 CREATE POLICY (CREATE_POLICY(7)), ALTER POLICY (ALTER_POLICY(7))
46
47
48
49PostgreSQL 11.3 2019 DROP POLICY(7)