DROP_FOREIGN_DATA_WRAPPER(7pg14)
π¦ 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 (seeSection 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 π
CREATE FOREIGN DATA WRAPPER(CREATE_FOREIGN_DATA_WRAPPER(7))ALTER FOREIGN DATA WRAPPER(ALTER_FOREIGN_DATA_WRAPPER(7))
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
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-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