DROP_SERVER(7pg16)

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

πŸŽ€ 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 🌈

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