DROP_ACCESS_METHOD(7pg17)

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

πŸ’… DROP_ACCESS_METHOD(7pg17) πŸ’…

Okay bestie, this is the manual page for DROP_ACCESS_METHOD(7pg17) from the PostgreSQL 17.11 Documentation β€” and we're gonna make removing access methods make sense. No cap. 🫢

🌸 NAME 🌸

DROP_ACCESS_METHOD β€” remove an access method. That's the whole vibe: access method, but make it gone. ✨

πŸŽ€ SYNOPSIS πŸŽ€

DROP ACCESS METHOD [ IF EXISTS ] name [ CASCADE | RESTRICT ]

πŸ¦‹ DESCRIPTION πŸ¦‹

So DROP ACCESS METHOD literally removes an existing access method. Only superusers can drop access methods β€” superuser privilege check, periodt. πŸ‘‘

✨ PARAMETERS ✨

  • IF EXISTS β€” do not throw an error if the access method does not exist. In that case a notice is issued. Lowkey merciful. πŸ™ˆ
  • name β€” the name of an existing access method. Your target. πŸ’…
  • CASCADE β€” automatically drop objects that depend on the access method (such as operator classes, operator families, and indexes), and in turn all objects that depend on those objects (see Section 5.15). It's giving chain reaction. πŸ”₯
  • RESTRICT β€” refuse to drop the access method if any objects depend on it. This is the default. Safety first, bestie. πŸ›‘οΈ

πŸ“ EXAMPLES πŸ“

Drop the access method heptree:

DROP ACCESS METHOD heptree;

🌈 COMPATIBILITY 🌈

DROP ACCESS METHOD is a PostgreSQL extension. It's PostgreSQL's own little moment, iykyk. πŸ’œ

πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’– Sign-off tea: this page comes from PostgreSQL 17.11 Documentation, dated 2026, and it's the DROP ACCESS METHOD(7) manual page. Byeee, go drop your access methods responsibly! πŸ’‹βœ¨
πŸ“¦ where this page comes from