DROP_FOREIGN_DATA_WRAPPER(7pg14)

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

πŸ¦‹ DROP_FOREIGN_DATA_WRAPPER(7pg14) πŸ¦‹

okay so bestie, welcome to the DROP_FOREIGN_DATA_WRAPPER(7pg14) page from the PostgreSQL 14.24 docs. This is the β€œremove a foreign-data wrapper” one β€” yes, the whole page is literally about saying bye to a foreign-data wrapper. It’s giving admin-girlie main character energy, and this page ate and left no crumbs. πŸ’…

🌸 NAME 🌸

DROP_FOREIGN_DATA_WRAPPER β€” remove a foreign-data wrapper. That’s the name, no cap. πŸŽ€

✨ SYNOPSIS ✨

DROP FOREIGN DATA WRAPPER [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]

πŸ¦‹ DESCRIPTION πŸ¦‹

So DROP FOREIGN DATA WRAPPER removes an existing foreign-data wrapper. To run this command, the current user must be the owner of the foreign-data wrapper. That ownership thing is not a vibe check you can skip, bestie β€” it’s literally required. πŸ”₯

πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” don’t throw an error if the foreign-data wrapper does not exist. A notice is issued in this case. Not me being dramatic, it’s just a notice. πŸ™ˆ
  • name β€” the name of an existing foreign-data wrapper. You know, the one you’re trying to drop. πŸ’–
  • CASCADE β€” automatically drop objects that depend on the foreign-data wrapper (such as foreign tables and servers), and in turn all objects that depend on those objects (see Section 5.14). This is the β€œit’s giving chain reaction” option. πŸŒ€
  • RESTRICT β€” refuse to drop the foreign-data wrapper if any objects depend on it. This is the default. So if you don’t pick anything, the command is lowkey saying β€œbestie, no, something still depends on this.” πŸ’€

πŸ“ EXAMPLES πŸ“

Drop the foreign-data wrapper dbi:

DROP FOREIGN DATA WRAPPER dbi;

πŸ’« COMPATIBILITY πŸ’«

DROP FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED). The IF EXISTS clause is a PostgreSQL extension. So it’s standards-compliant with a lil PostgreSQL-only garnish β€” slay. ✨

πŸ‘‘ SEE ALSO πŸ‘‘


xoxo, bestie 🫢 this was the DROP_FOREIGN_DATA_WRAPPER(7pg14) rewrite, based on the PostgreSQL 14.24 docs and dated 2026 β€” original footer energy: DROP FOR...A WRAPPER(7). Go drop that foreign-data wrapper, but only if you own it. periodt. πŸ’–πŸŽ€

πŸ“¦ where this page comes from