ALTER_RULE(7pg17)
π NAME π
okay bestie, welcome to the ALTER_RULE(7pg17) page β up top itβs literally ALTER RULE(7) β from the PostgreSQL 17.11 Documentation π
β¨. This manual is called ALTER_RULE, and 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 β thatβs the whole menu, no cap π.
To use ALTER RULE, you must own the table or view that the rule applies to. Like, you gotta be the owner-owner, bestie π.
πΈ PARAMETERS πΈ
nameβ the name of an existing rule to alter. Yep, the rule has to already exist π.table_nameβ the name (optionally schema-qualified) of the table or view that the rule applies to. Schema-qualified is allowed, iconically β¨.new_nameβ the new name for the rule. Fresh name, same rule, slay π¦.
π¦ EXAMPLES π¦
To rename an existing rule, you literally do this:
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. So yeah, this is Postgres-specific territory, bestie β periodt π
.
π§ SEE ALSO π§
CREATE RULE (CREATE_RULE(7))DROP RULE (DROP_RULE(7))
mwah π thatβs the whole page β source/version: PostgreSQL 17.11, date: 2026, and the manual page is ALTER RULE(7). byeee π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-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