1ALTER RULE(7) PostgreSQL 12.2 Documentation ALTER RULE(7)
2
3
4
6 ALTER_RULE - change the definition of a rule
7
9 ALTER RULE name ON table_name RENAME TO new_name
10
12 ALTER RULE changes properties of an existing rule. Currently, the only
13 available action is to change the rule's name.
14
15 To use ALTER RULE, you must own the table or view that the rule applies
16 to.
17
19 name
20 The name of an existing rule to alter.
21
22 table_name
23 The name (optionally schema-qualified) of the table or view that
24 the rule applies to.
25
26 new_name
27 The new name for the rule.
28
30 To rename an existing rule:
31
32 ALTER RULE notify_all ON emp RENAME TO notify_me;
33
35 ALTER RULE is a PostgreSQL language extension, as is the entire query
36 rewrite system.
37
39 CREATE RULE (CREATE_RULE(7)), DROP RULE (DROP_RULE(7))
40
41
42
43PostgreSQL 12.2 2020 ALTER RULE(7)