DROP_SERVER(7pg13)
π DROP SERVER π
okay so this is the DROP SERVER page from the PostgreSQL 13.23 docs (manual section 7, bestie, we're in the SQL command pages) β and it's literally all about yeeting a foreign server descriptor out of existence. that's it. that's the whole vibe. let's get into it π«Ά
β¨ NAME β¨
DROP_SERVER β remove a foreign server descriptor ποΈβ¨
πΈ SYNOPSIS πΈ
DROP SERVER [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
π DESCRIPTION π
so DROP SERVER removes an existing foreign server descriptor. gone. deleted. no cap.
but bestie, listen β to run this command, the current user must be the owner of the server. if that's not you, this is not your moment, and postgres will let you know ππ
π¦ PARAMETERS π¦
IF EXISTSβ don't throw an error if the server doesn't exist. instead a notice gets issued in this case. it's giving "no drama, just a lil note" πnameβ the name of an existing server. you know, the one you're about to drop πCASCADEβ automatically drop objects that depend on the server (such as user mappings), and in turn all objects that depend on those objects (see Section 5.14). it's a whole chain reaction, main character energy, everything downstream goes too ππ₯RESTRICTβ refuse to drop the server if any objects depend on it. this is the default, so if you don't say anything, postgres is gonna be protective and say nope π
fr fr though β CASCADE is the dramatic one. it takes the dependents with it. know what you're dropping before you drop it π
β EXAMPLES β
drop a server foo if it exists:
DROP SERVER IF EXISTS foo;
iconic. clean. no errors if foo ghosted us already β¨
π COMPATIBILITY π
DROP SERVER conforms to ISO/IEC 9075-9 (SQL/MED). the IF EXISTS clause is a PostgreSQL extension β so that part's our homegrown slay π
π SEE ALSO π
CREATE SERVER(CREATE_SERVER(7))ALTER SERVER(ALTER_SERVER(7))
and that's the page!! π§π this lil masterpiece comes to you from PostgreSQL 13.23, dated 2025, and it lives at DROP SERVER(7) in the manual. go forth and drop responsibly, bestie ππ«Ά
π¦ 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