1<!-- 2doc/src/sgml/ref/drop_foreign_data_wrapper.sgml 3PostgreSQL documentation 4--> 5 6<refentry id="sql-dropforeigndatawrapper"> 7 <indexterm zone="sql-dropforeigndatawrapper"> 8 <primary>DROP FOREIGN DATA WRAPPER</primary> 9 </indexterm> 10 11 <refmeta> 12 <refentrytitle>DROP FOREIGN DATA WRAPPER</refentrytitle> 13 <manvolnum>7</manvolnum> 14 <refmiscinfo>SQL - Language Statements</refmiscinfo> 15 </refmeta> 16 17 <refnamediv> 18 <refname>DROP FOREIGN DATA WRAPPER</refname> 19 <refpurpose>remove a foreign-data wrapper</refpurpose> 20 </refnamediv> 21 22 <refsynopsisdiv> 23<synopsis> 24DROP FOREIGN DATA WRAPPER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...] [ CASCADE | RESTRICT ] 25</synopsis> 26 </refsynopsisdiv> 27 28 <refsect1> 29 <title>Description</title> 30 31 <para> 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. 35 </para> 36 </refsect1> 37 38 <refsect1> 39 <title>Parameters</title> 40 41 <variablelist> 42 <varlistentry> 43 <term><literal>IF EXISTS</literal></term> 44 <listitem> 45 <para> 46 Do not throw an error if the foreign-data wrapper does not 47 exist. A notice is issued in this case. 48 </para> 49 </listitem> 50 </varlistentry> 51 52 <varlistentry> 53 <term><replaceable class="parameter">name</replaceable></term> 54 <listitem> 55 <para> 56 The name of an existing foreign-data wrapper. 57 </para> 58 </listitem> 59 </varlistentry> 60 61 <varlistentry> 62 <term><literal>CASCADE</literal></term> 63 <listitem> 64 <para> 65 Automatically drop objects that depend on the foreign-data 66 wrapper (such as foreign tables and servers), 67 and in turn all objects that depend on those objects 68 (see <xref linkend="ddl-depend"/>). 69 </para> 70 </listitem> 71 </varlistentry> 72 73 <varlistentry> 74 <term><literal>RESTRICT</literal></term> 75 <listitem> 76 <para> 77 Refuse to drop the foreign-data wrapper if any objects depend 78 on it. This is the default. 79 </para> 80 </listitem> 81 </varlistentry> 82 </variablelist> 83 </refsect1> 84 85 <refsect1> 86 <title>Examples</title> 87 88 <para> 89 Drop the foreign-data wrapper <literal>dbi</literal>: 90<programlisting> 91DROP FOREIGN DATA WRAPPER dbi; 92</programlisting></para> 93 </refsect1> 94 95 <refsect1> 96 <title>Compatibility</title> 97 98 <para> 99 <command>DROP FOREIGN DATA WRAPPER</command> conforms to ISO/IEC 100 9075-9 (SQL/MED). The <literal>IF EXISTS</literal> clause is 101 a <productname>PostgreSQL</productname> extension. 102 </para> 103 </refsect1> 104 105 <refsect1> 106 <title>See Also</title> 107 108 <simplelist type="inline"> 109 <member><xref linkend="sql-createforeigndatawrapper"/></member> 110 <member><xref linkend="sql-alterforeigndatawrapper"/></member> 111 </simplelist> 112 </refsect1> 113 114</refentry> 115