DROP FOREIGN DATA WRAPPER

DROP FOREIGN DATA WRAPPER removes the definition of a data wrapper that was recorded by CREATE FOREIGN DATA WRAPPER.

Syntax

DROP FOREIGN DATA WRAPPER <wrappername> [ CASCADE | RESTRICT ]

Notes

The local or foreign data wrapper cannot be dropped if any servers are defined that depend upon it - unless the CASCADE option is specified, in which case all dependent servers (and any objects depending on those servers, directly or indirectly) are dropped at the same time as the data wrapper. The default option is RESTRICT.

Examples

-- drop a wrapper that has no dependencies
DROP FOREIGN DATA WRAPPER gmail;
-- error if there are dependencies
DROP FOREIGN DATA WRAPPER jms_bridge RESTRICT
-- force drop all dependent servers, streams, tables
DROP FOREIGN DATA WRAPPER esb_gateway CASCADE