ALTER_RULE(7pg15)
π ALTER_RULE π
okay so this is ALTER_RULE(7pg15) from the PostgreSQL 15.19 docs β the manual page for changing a ruleβs definition, and itβs literally giving βsmall but mightyβ β¨
π NAME π
ALTER_RULE β change the definition of a rule π
β¨ SYNOPSIS β¨
ALTER RULE name ON table_name RENAME TO new_name
π¦ DESCRIPTION π¦
ALTER RULE changes properties of an existing rule. Currently, the only available action is to change the ruleβs name. Thatβs it β one action, zero extra drama π
To use ALTER RULE, you must own the table or view that the rule applies to. Ownership check says slay or stay home, bestie π
πΈ PARAMETERS πΈ
nameβ the name of an existing rule to alter.table_nameβ the name of the table or view that the rule applies to; it can be optionally schema-qualified.new_nameβ the new name for the rule.
π EXAMPLES π
To rename an existing rule:
ALTER RULE notify_all ON emp RENAME TO notify_me;
π COMPATIBILITY π
ALTER RULE is a PostgreSQL language extension β and so is the entire query rewrite system. PostgreSQL extension vibes, periodt π
π«Ά SEE ALSO π«Ά
CREATE RULE(CREATE_RULE(7))DROP RULE(DROP_RULE(7))
xoxo, your PostgreSQL 15.19 doc bestie π β dated 2026, no cap.
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms