DROP_ROUTINE(7pg13)

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

πŸ’… DROP ROUTINE πŸ’…

okay bestie, so this is the DROP ROUTINE page from the PostgreSQL 13.23 docs β€” yes, that's the manual this little beauty lives in, DROP_ROUTINE(7). buckle up πŸŽ€


✨ NAME ✨

DROP_ROUTINE β€” remove a routine πŸ—‘οΈβœ¨


🌸 SYNOPSIS 🌸

DROP ROUTINE [ IF EXISTS ] name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] [, ...]
    [ CASCADE | RESTRICT ]

like, look at all those optional brackets. she's flexible. she contains multitudes. 🫢


πŸ’– DESCRIPTION πŸ’–

so DROP ROUTINE removes the definition of an existing routine. and "routine" here is a whole umbrella term β€” it can be an aggregate function, a normal function, or a procedure. one command, three vibes, no cap πŸ‘‘

but here's the thing β€” the actual descriptions of the parameters, the juicier examples, and all the further details live under their own pages:

so if you want the full tea, go read those. iykyk πŸ’…


πŸ¦‹ EXAMPLES πŸ¦‹

wanna drop the routine foo for type integer? say less:

DROP ROUTINE foo(integer);

and the iconic part?? this command works independent of whether foo is an aggregate, a function, or a procedure. she does not care. she does not ask questions. she just drops πŸ”₯


⭐ COMPATIBILITY ⭐

this command conforms to the SQL standard β€” cute! β€” but with these PostgreSQL extensions, bestie:

  • the standard only allows one routine to be dropped per command. we said "what if... more though" πŸ’€
  • the IF EXISTS option
  • the ability to specify argument modes and names
  • aggregate functions are an extension

🌈 SEE ALSO 🌈

ok real talk β€” note that there is no CREATE ROUTINE command. 😭 she drops, she does not create. main character energy only.

and that's the whole page, bestie! 🌸 this little masterpiece is from PostgreSQL 13.23, dated 2025 β€” go forth and drop responsibly πŸ’œπŸ§šβœ¨

πŸ“¦ where this page comes from