logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ALTER_RULE - change the definition of a rule

Compatibility

ALTERRULE is a PostgreSQL language extension, as is the entire query rewrite system.

Description

ALTERRULE changes properties of an existing rule. Currently, the only available action is to change the rule's name. To use ALTERRULE, you must own the table or view that the rule applies to.

Examples

To rename an existing rule: ALTER RULE notify_all ON emp RENAME TO notify_me;

Name

ALTER_RULE - change the definition of a rule

Parameters

name The name of an existing rule to alter. table_name The name (optionally schema-qualified) of the table or view that the rule applies to. new_name The new name for the rule.

See Also

CREATE RULE (CREATE_RULE(7)), DROP RULE (DROP_RULE(7)) PostgreSQL 17.5 2025 ALTERRULE(7)

Synopsis

ALTER RULE name ON table_name RENAME TO new_name

See Also