ALTER_RULE
change the definition of a rule
- Provided by: postgresql-client-18 (Version: 18.4-0ubuntu0.26.04.1)
- Source: postgresql-18
- Report a bug
change the definition of a rule
ALTER RULE name ON table_name RENAME TO new_name
ALTER RULE changes properties of an existing rule. Currently, the only available action is to change the rule's name.
To use ALTER RULE, you must own the table or view that the rule applies to.
name
table_name
new_name
To rename an existing rule:
ALTER RULE notify_all ON emp RENAME TO notify_me;
ALTER RULE is a PostgreSQL language extension, as is the entire query rewrite system.
CREATE RULE (CREATE_RULE(7)), DROP RULE (DROP_RULE(7))