DROP_SERVER(7pg16)
π NAME π
okay so this is DROP_SERVER(7pg16) β the PostgreSQL 16.15 docs page for removing a foreign server descriptor, manual vibes included, and yes bestie you are exactly where you need to be. DROP_SERVER literally means remove a foreign server descriptor. slay.
β¨ SYNOPSIS β¨
DROP SERVER [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
π DESCRIPTION π
DROP SERVER removes an existing foreign server descriptor. no cap, that's the whole main-character move.
To execute this command, the current user must be the owner of the server. fr fr β ownership check is not optional.
πΈ PARAMETERS πΈ
IF EXISTSβ Do not throw an error if the server does not exist. A notice is issued in this case. so like, no dramatic error moment, just a little notice πnameβ The name of an existing server.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 giving chain reaction πRESTRICTβ Refuse to drop the server if any objects depend on it. This is the default. the safe little guardrail is on by default, periodt.
π¦ EXAMPLES π¦
Drop a server foo if it exists:
DROP SERVER IF EXISTS foo;
β COMPATIBILITY β
DROP SERVER conforms to ISO/IEC 9075-9 (SQL/MED). The IF EXISTS clause is a PostgreSQL extension. cute little PostgreSQL bonus, iykyk β¨
π SEE ALSO π
CREATE SERVER (CREATE_SERVER(7))ALTER SERVER (ALTER_SERVER(7))
go read those too bestie, they're the supporting cast π«Ά
bye bestie π this page is from PostgreSQL 16.15, dated 2026 β documentation royalty, periodt πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-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