DROP_ACCESS_METHOD(7pg14)
π DROP ACCESS METHOD π
okay so bestie, welcome to the DROP ACCESS METHOD page from the PostgreSQL 14.24 documentation β yes the actual manual, and yes i'm gonna make it make sense π«Ά
β¨ NAME β¨
DROP_ACCESS_METHOD β bestie. it literally removes an access method. that's the whole gig π
πΈ SYNOPSIS πΈ
DROP ACCESS METHOD [ IF EXISTS ] name [ CASCADE | RESTRICT ]
look at her. iconic. the square brackets are optional bits, iykyk π
π¦ DESCRIPTION π¦
okay so DROP ACCESS METHOD removes an existing access method. that's it, that's the plot π
but here's the thing β only superusers can drop access methods. like, this is not a group-chat-casual operation, this is main character with admin privileges energy. if you're not a superuser, no cap, you're not doing this π
π PARAMETERS π
IF EXISTSβ do not throw an error if the access method does not exist. instead a notice is issued in this case. so like, it won't yell at you, it'll just quietly be like "hey btw that one's not here" β¨nameβ the name of an existing access method. literally just the name. slay.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.14). this is the "take everything down with me" option π₯ like ok chain reaction, we love a domino momentRESTRICTβ refuse to drop the access method if any objects depend on it. This is the default. so if you don't say anything, she's cautious. respectful. boundaries π
bestie warning: CASCADE is not playing around β it takes the dependents too, and then the things that depend on those. know what you're doing fr fr π
π EXAMPLES π
drop the access method heptree:
DROP ACCESS METHOD heptree;
short. sweet. devastating. periodt πβ¨
π COMPATIBILITY π
DROP ACCESS METHOD is a PostgreSQL extension. so yeah, this one's our girl, not standard SQL π«Ά
β SEE ALSO β
CREATE ACCESS METHOD(CREATE_ACCESS_METHOD(7)) β the reverse situation, the origin story, the beginning π§
and that's the whole page bestie, you ate π
PostgreSQL 14.24 Β· 2026 Β· DROP ACCESS METHOD(7) β mwah, go drop (or don't drop) responsibly πΈπ
π¦ 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