]> begriffs open source - ai-pg/blob - full-docs/txt/sql-droppolicy.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-droppolicy.txt
1
2 DROP POLICY
3
4    DROP POLICY — remove a row-level security policy from a table
5
6 Synopsis
7
8 DROP POLICY [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]
9
10 Description
11
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
14    row-level security enabled via ALTER TABLE, then the default-deny
15    policy will be used. ALTER TABLE ... DISABLE ROW LEVEL SECURITY can be
16    used to disable row-level security for a table, whether policies for
17    the table exist or not.
18
19 Parameters
20
21    IF EXISTS
22           Do not throw an error if the policy does not exist. A notice is
23           issued in this case.
24
25    name
26           The name of the policy to drop.
27
28    table_name
29           The name (optionally schema-qualified) of the table that the
30           policy is on.
31
32    CASCADE
33           RESTRICT
34           These key words do not have any effect, since there are no
35           dependencies on policies.
36
37 Examples
38
39    To drop the policy called p1 on the table named my_table:
40 DROP POLICY p1 ON my_table;
41
42 Compatibility
43
44    DROP POLICY is a PostgreSQL extension.
45
46 See Also
47
48    CREATE POLICY, ALTER POLICY