3 PostgreSQL documentation
6 <refentry id=
"SQL-DROPFOREIGNDATAWRAPPER">
8 <refentrytitle id=
"sql-dropforeigndatawrapper-title">DROP FOREIGN DATA WRAPPER
</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
14 <refname>DROP FOREIGN DATA WRAPPER
</refname>
15 <refpurpose>remove a foreign-data wrapper
</refpurpose>
18 <indexterm zone=
"sql-dropforeigndatawrapper">
19 <primary>DROP FOREIGN DATA WRAPPER
</primary>
24 DROP FOREIGN DATA WRAPPER [ IF EXISTS ]
<replaceable class=
"parameter">name
</replaceable> [ CASCADE | RESTRICT ]
29 <title>Description
</title>
32 <command>DROP FOREIGN DATA WRAPPER
</command> removes an existing
33 foreign-data wrapper. To execute this command, the current user
34 must be the owner of the foreign-data wrapper.
39 <title>Parameters
</title>
43 <term><literal>IF EXISTS
</literal></term>
46 Do not throw an error if the foreign-data wrapper does not
47 exist. A notice is issued in this case.
53 <term><replaceable class=
"parameter">name
</replaceable></term>
56 The name of an existing foreign-data wrapper.
62 <term><literal>CASCADE
</literal></term>
65 Automatically drop objects that depend on the foreign-data
66 wrapper (such as servers).
72 <term><literal>RESTRICT
</literal></term>
75 Refuse to drop the foreign-data wrappers if any objects depend
76 on it. This is the default.
84 <title>Examples
</title>
87 Drop the foreign-data wrapper
<literal>dbi<
/>:
89 DROP FOREIGN DATA WRAPPER dbi;
95 <title>Compatibility
</title>
98 <command>DROP FOREIGN DATA WRAPPER
</command> conforms to ISO/IEC
99 9075-
9 (SQL/MED). The
<literal>IF EXISTS<
/> clause is
100 a
<productname>PostgreSQL<
/> extension.
105 <title>See Also
</title>
107 <simplelist type=
"inline">
108 <member><xref linkend=
"sql-createforeigndatawrapper" endterm=
"sql-createforeigndatawrapper-title"></member>
109 <member><xref linkend=
"sql-alterforeigndatawrapper" endterm=
"sql-alterforeigndatawrapper-title"></member>