DROP_LANGUAGE(7pg13)

๐Ÿ“ฆ version 13.23, in opensuse-leap 16.0

๐Ÿฆ‹ NAME ๐Ÿฆ‹

hey bestie, welcome to the DROP LANGUAGE(7) page from the PostgreSQL 13.23 Documentation ๐Ÿ’– DROP_LANGUAGE is literally just: remove a procedural language. Thatโ€™s the vibe, thatโ€™s the assignment, periodt.


๐Ÿ’… SYNOPSIS ๐Ÿ’…

DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] name [ CASCADE | RESTRICT ]

โœจ DESCRIPTION โœจ

okay so DROP LANGUAGE removes the definition of a previously registered procedural language. To use it, you must be a superuser or the owner of the language. no cap, permissions are doing their main character thing here.

Note, bestie: As of PostgreSQL 9.1, most procedural languages have been made into โ€œextensionsโ€, and should therefore be removed with DROP EXTENSION (DROP_EXTENSION(7)) โ€” not DROP LANGUAGE. iykyk ๐Ÿ™ˆ

๐ŸŽ€ PARAMETERS ๐ŸŽ€

  • IF EXISTS โ€” do not throw an error if the language does not exist. A notice is issued in this case. like, โ€œhey, it wasnโ€™t there, but weโ€™re fineโ€ ๐Ÿ’…
  • name โ€” the name of an existing procedural language. For backward compatibility, the name can be enclosed by single quotes.
  • 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.14). itโ€™s giving โ€œclean it all up, bestieโ€ ๐Ÿงน
  • RESTRICT โ€” refuse to drop the language if any objects depend on it. This is the default. lowkey protective, highkey iconic ๐Ÿ›ก๏ธ

๐ŸŒธ EXAMPLES ๐ŸŒธ

This command removes the procedural language plsample:

DROP LANGUAGE plsample;

slay. thatโ€™s it. thatโ€™s the example. ๐Ÿ’–


โญ COMPATIBILITY โญ

There is no DROP LANGUAGE statement in the SQL standard. fr fr, itโ€™s a PostgreSQL thing.


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ


PostgreSQL 13.23 ยท 2025 ยท DROP LANGUAGE(7) โ€” byeee, bestie ๐Ÿซถ๐Ÿ’–

๐Ÿ“ฆ where this page comes from