Updated on 2024-06-03 GMT+08:00

DROP FOREIGN DATA WRAPPER

Description

Deletes a specified foreign data wrapper.

Precautions

The DROP statement can be successfully executed only when support_extended_features is set to on.

Syntax

DROP FOREIGN DATA WRAPPER [ IF EXISTS ] name [ CASCADE | RESTRICT ];

Parameters

  • IF EXISTS

    Sends a notification instead of throwing an error if the foreign data wrapper does not exist.

  • name

    Specifies the name of an existing foreign data wrapper.

  • CASCADE

    Automatically drops objects (such as servers) that depend on the foreign data wrapper.

  • RESTRICT

    If there are objects that depend on the foreign data wrapper, the foreign data wrapper cannot be deleted. This is the default behavior.

Example

-- Delete the foreign data wrapper dbi.
gaussdb=# DROP FOREIGN DATA WRAPPER dbi;