ALTER_RULE(7pg14)
β¨ NAME β¨
okay so welcome to the ALTER RULE(7) page from the PostgreSQL 14.24 documentation π
the main character here is ALTER_RULE β it changes 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. β¨
To use ALTER RULE, you must own the table or view that the rule applies to. No cap β that ownership requirement is literally part of the vibe check. π«Ά
bestie, if you donβt own the table or view the rule applies to, this is not your moment π
π PARAMETERS π
nameβ the name of an existing rule to alter. like, which rule are we giving a glow-up? π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. fresh name, who dis? π
π₯ EXAMPLES π₯
To rename an existing rule:
ALTER RULE notify_all ON emp RENAME TO notify_me;
π COMPATIBILITY π
ALTER RULE is a PostgreSQL language extension, as is the entire query rewrite system. π
π SEE ALSO π
CREATE RULE(CREATE_RULE(7))DROP RULE(DROP_RULE(7))
mwah π thatβs the whole page β PostgreSQL 14.24, dated 2026, ALTER RULE(7) out. π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-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