DROP_RULE(7pg17)

πŸ“¦ version 17.11, in opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so bestie, welcome to DROP_RULE(7pg17) β€” aka the DROP RULE(7) manual page β€” and it’s literally all about how to remove a rewrite rule. That’s the main character energy here. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

DROP RULE [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]

🌸 DESCRIPTION 🌸

DROP RULE drops a rewrite rule. Simple, iconic, done. πŸ’…

πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” do not throw an error if the rule does not exist. A notice is issued in this case. 🫢
  • name β€” the name of the rule to drop.
  • table_name β€” the name (optionally schema-qualified) of the table or view that the rule applies to.
  • CASCADE β€” automatically drop objects that depend on the rule, and in turn all objects that depend on those objects (see Section 5.15). πŸ”₯
  • RESTRICT β€” refuse to drop the rule if any objects depend on it. This is the default. πŸ›‘

🌈 EXAMPLES 🌈

To drop the rewrite rule newrule:

DROP RULE newrule ON mytable;

⭐ COMPATIBILITY ⭐

DROP RULE is a PostgreSQL language extension, as is the entire query rewrite system. periodt. πŸ’œ

πŸ‘‘ SEE ALSO πŸ‘‘


okay bye bestie β€” this was DROP_RULE(7pg17) / DROP RULE(7), pulled from PostgreSQL 17.11 Documentation, dated 2026. mwah πŸ’‹

πŸ“¦ where this page comes from