DROP_FOREIGN_DATA_WRAPPER(7pg13)
π DROP_FOREIGN_DATA_WRAPPER β postgresql 13.23 documentation, bestie β¨
okay so real talk, this is the page for DROP_FOREIGN_DATA_WRAPPER from the PostgreSQL 13.23 Documentation, and it's literally the glow-up-and-goodbye command for foreign-data wrappers. let's get into it π«Ά
β¨ NAME β¨
DROP_FOREIGN_DATA_WRAPPER β remove a foreign-data wrapper. that's it, that's the vibe. deleting the thing, no cap π
π SYNOPSIS π
DROP FOREIGN DATA WRAPPER [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
look at her. iconic. one line, so much power β¨
π¦ DESCRIPTION π¦
so DROP FOREIGN DATA WRAPPER removes an existing foreign-data wrapper. that's the whole assignment, and she ate. π₯
but bestie, listen β to actually execute this command, the current user must be the owner of the foreign-data wrapper. no ownership, no deleting. it's giving main character energy only π
πΈ PARAMETERS πΈ
IF EXISTSβ do not throw an error if the foreign-data wrapper does not exist. instead, a notice is issued in this case. so like, she just quietly lets you know instead of screaming at you π thoughtful queennameβ the name of an existing foreign-data wrapper. yk, the thing you're yeeting π―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). it's a whole chain reaction, dominoes style π heads up tho, it's a lotRESTRICTβ refuse to drop the foreign-data wrapper if any objects depend on it. this is the default. she's cautious, she's responsible, we love her π
lowkey important:RESTRICTbeing the default means postgres is not gonna go deleting your whole dependency tree unless you explicitly sayCASCADE. protect your data, bestie π
π EXAMPLES π
drop the foreign-data wrapper dbi:
DROP FOREIGN DATA WRAPPER dbi;
so clean. so simple. we stan a one-liner π
π COMPATIBILITY π
DROP FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED). π―
the IF EXISTS clause is a PostgreSQL extension β that part's a little extra, but like, in a good way β¨
π SEE ALSO π
CREATE FOREIGN DATA WRAPPER(CREATE_FOREIGN_DATA_WRAPPER(7))ALTER FOREIGN DATA WRAPPER(ALTER_FOREIGN_DATA_WRAPPER(7))
go read those too, iykyk π§
and that's the page!! π this was PostgreSQL 13.23, dated 2025, and the header's officially DROP FOR...A WRAPPER(7) (yes the title got truncated, she's mysterious like that π). now go forth and drop responsibly, bestie β mwah ππΈ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-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