DROP FOREIGN DATA WRAPPER

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 ]

drop_foreign_data_wrapper

DROPFOREIGNDATAWRAPPERIFEXISTSfdw_nameCASCADERESTRICT

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;

See also