DROP FOREIGN DATA WRAPPER
This page documents the preview version (v2.21). Preview includes features under active development and is for development and testing only. For production, use the stable version (v2024.1). To learn more, see Versioning.
Synopsis
Use the DROP FOREIGN DATA WRAPPER
command to remove a foreign-data wrapper. The user who executes the command must be the owner of the foreign-data wrapper.
Syntax
drop_foreign_data_wrapper ::= DROP FOREIGN DATA WRAPPER [ IF EXISTS ]
fdw_name [ CASCADE | RESTRICT ]
Semantics
Drop a foreign-data wrapper named fdw_name. If it doesn’t exist in the database, an error will be thrown unless the IF EXISTS
clause is used.
RESTRICT/CASCADE:
RESTRICT
is the default and it will not drop the foreign-data wrapper if any objects depend on it.
CASCADE
will drop the foreign-data wrapper and any objects that transitively depend on it.
Examples
Drop the foreign-data wrapper my_wrapper
, along with any objects that depend on it.
yugabyte=# DROP FOREIGN DATA WRAPPER my_wrapper CASCADE;