DROP_ROUTINE(7pg13)
π 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:
DROP AGGREGATE(DROP_AGGREGATE(7))DROP FUNCTION(DROP_FUNCTION(7))DROP PROCEDURE(DROP_PROCEDURE(7))
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 EXISTSoption - the ability to specify argument modes and names
- aggregate functions are an extension
π SEE ALSO π
DROP AGGREGATE(DROP_AGGREGATE(7))DROP FUNCTION(DROP_FUNCTION(7))DROP PROCEDURE(DROP_PROCEDURE(7))ALTER ROUTINE(ALTER_ROUTINE(7))
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
- 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