DROP_EXTENSION(7pg13)
okay so bestie, welcome to the DROP EXTENSION(7) page β aka DROP_EXTENSION β from the PostgreSQL 13.23 Documentation. it's literally the manual for removing an extension, and we're gonna get into it π
β¨
β¨ NAME β¨
DROP_EXTENSION β remove an extension π
πΈ SYNOPSIS πΈ
DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
π DESCRIPTION π
DROP EXTENSION removes extensions from the database. dropping an extension causes its member objects, and other explicitly dependent routines (see ALTER ROUTINE (ALTER_ROUTINE(7)), the depends on extension action), to be dropped as well. yes, it's giving "cleanup era" π
You must own the extension to use DROP EXTENSION. no ownership, no dropping, periodt.
π PARAMETERS π
IF EXISTSβ do not throw an error if the extension does not exist. a notice is issued in this case. lowkey polite of it, ngl.nameβ the name of an installed extension. that's the target, bestie π―CASCADEβ automatically drop objects that depend on the extension, and in turn all objects that depend on those objects (see Section 5.14). it's giving chain reaction, but make it SQL πRESTRICTβ this option prevents the specified extensions from being dropped if other objects, besides these extensions, their members, and their explicitly dependent routines, depend on them. this is the default. so yeah, it's cautious by default π«Ά
π EXAMPLES π
to remove the extension hstore from the current database:
DROP EXTENSION hstore;
this command will fail if any of hstore's objects are in use in the database, for example if any tables have columns of the hstore type. add the CASCADE option to forcibly remove those dependent objects as well. so if you're getting errors, that's the vibe check telling you something still depends on it ππ₯
π¦ COMPATIBILITY π¦
DROP EXTENSION is a PostgreSQL extension. no cap, that's the whole compatibility note π
π SEE ALSO π
CREATE EXTENSION (CREATE_EXTENSION(7))ALTER EXTENSION (ALTER_EXTENSION(7))
π final cute sign-off: source/version is PostgreSQL 13.23, the date is 2025, and the manual name is DROP EXTENSION(7). bye bestie, go drop your extensions responsibly π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-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