DROP_SERVER(7pg15)

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

✨ NAME ✨

okay so DROP SERVER β€” remove a foreign server descriptor. This is the DROP_SERVER(7pg15) page from the PostgreSQL 15.19 Documentation, bestie, and it's literally here to help you drop that descriptor. πŸ’…

🫢 SYNOPSIS 🫢

DROP SERVER [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]

πŸ’… DESCRIPTION πŸ’…

DROP SERVER removes an existing foreign server descriptor. To execute this command, the current user must be the owner of the server. no cap, ownership is the vibe check here. πŸ‘‘

πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” do not throw an error if the server does not exist. A notice is issued in this case, so it's giving "gentle heads-up" instead of chaos. πŸ™ˆ
  • 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 a whole chain reaction, bestie. πŸ”₯
  • RESTRICT β€” refuse to drop the server if any objects depend on it. This is the default. so if you don't say anything, it's lowkey protective. πŸ›‘οΈ

🌸 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. periodt. ✨

πŸ¦‹ SEE ALSO πŸ¦‹


okay bye bestie β€” this slay little page is from PostgreSQL 15.19, dated 2026. πŸ’…πŸŽ€βœ¨

πŸ“¦ where this page comes from