4 ALTER POLICY — change the definition of a row-level security policy
8 ALTER POLICY name ON table_name RENAME TO new_name
10 ALTER POLICY name ON table_name
11 [ TO { role_name | PUBLIC | CURRENT_ROLE | CURRENT_USER | SESSION_USER } [,
13 [ USING ( using_expression ) ]
14 [ WITH CHECK ( check_expression ) ]
18 ALTER POLICY changes the definition of an existing row-level security
19 policy. Note that ALTER POLICY only allows the set of roles to which
20 the policy applies and the USING and WITH CHECK expressions to be
21 modified. To change other properties of a policy, such as the command
22 to which it applies or whether it is permissive or restrictive, the
23 policy must be dropped and recreated.
25 To use ALTER POLICY, you must own the table that the policy applies to.
27 In the second form of ALTER POLICY, the role list, using_expression,
28 and check_expression are replaced independently if specified. When one
29 of those clauses is omitted, the corresponding part of the policy is
35 The name of an existing policy to alter.
38 The name (optionally schema-qualified) of the table that the
42 The new name for the policy.
45 The role(s) to which the policy applies. Multiple roles can be
46 specified at one time. To apply the policy to all roles, use
50 The USING expression for the policy. See CREATE POLICY for
54 The WITH CHECK expression for the policy. See CREATE POLICY for
59 ALTER POLICY is a PostgreSQL extension.
63 CREATE POLICY, DROP POLICY