DROP_LANGUAGE(7)
๐ DROP_LANGUAGE โ bestie, let's delete a whole procedural language
okay so this is the page for DROP LANGUAGE in PostgreSQL 18.6 docs, and no cap it's lowkey iconic. Here's the tea on yeeting a procedural language out of existence. ๐๏ธโจ
โจ NAME โจ
DROP_LANGUAGE โ remove a procedural language ๐ซถ
๐ SYNOPSIS ๐
DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] name [ CASCADE | RESTRICT ]
๐ฆ DESCRIPTION ๐ฆ
So DROP LANGUAGE removes the definition of a procedural language that was previously registered. That's it, that's the whole vibe. ๐ซ
But listen โ permission check first, bestie: you must be a superuser or the owner of the language to use DROP LANGUAGE. No sneaking in. ๐ช๐
Note ๐ โ As of PostgreSQL 9.1, most procedural languages have been made into "extensions", and should therefore be removed withDROP EXTENSION, notDROP LANGUAGE. So likeโฆ double-check before you swing. ๐ญ
๐ธ PARAMETERS ๐ธ
IF EXISTSโ do not throw an error if the language doesn't exist. A notice is issued in this case. So it's giving "no drama, just a lil heads up." ๐nameโ the name of an existing procedural language. Like, the actual name, bestie. ๐CASCADEโ automatically drop objects that depend on the language (such as functions in the language), and in turn all objects that depend on those objects (see Section 5.15). This is the chain-reaction, domino-effect, full-send option. ๐ฅRESTRICTโ refuse to drop the language if any objects depend on it. This is the default. She's cautious, she's responsible, she's the main character of safety. ๐ง
โญ EXAMPLES โญ
This command removes the procedural language plsample:
DROP LANGUAGE plsample;
And that's it. Slay. ๐
๐ COMPATIBILITY ๐
There is no DROP LANGUAGE statement in the SQL standard. We're off-book on this one, iykyk. ๐โ
๐ SEE ALSO ๐
ALTER LANGUAGE(ALTER_LANGUAGE(7))CREATE LANGUAGE(CREATE_LANGUAGE(7))
That's the whole page, bestie! This was PostgreSQL 18.6, dated 2026, and it's the DROP LANGUAGE(7) page. Go forth and drop responsibly. ๐ซถโจ๐
๐ฆ where this page comes from
- alpine 3.23: postgresql18-doc 18.6-r0 ยท PostgreSQL
- alpine 3.24: postgresql18-doc 18.6-r0 ยท PostgreSQL
- arch rolling: postgresql 18.6-4 ยท PostgreSQL
- fedora 43: postgresql 18.6-1.fc43 ยท PostgreSQL
- fedora 43: postgresql 18.6-1.fc43 ยท PostgreSQL
- fedora 44: postgresql 18.6-1.fc44 ยท PostgreSQL
- fedora 44: postgresql 18.6-1.fc44 ยท PostgreSQL
- nixos 26.05: postgresql 18.6
- ubuntu resolute: postgresql-client-18 18.6-0ubuntu0.26.04.1 ยท PostgreSQL
- ubuntu stonking: postgresql-client-18 18.6-3build2 ยท PostgreSQL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms