1 <!-- doc/src/sggml/ref/drop_foreign_table.sgml -->
3 <refentry id="SQL-DROPFOREIGNTABLE">
5 <refentrytitle>DROP FOREIGN TABLE</refentrytitle>
6 <manvolnum>7</manvolnum>
7 <refmiscinfo>SQL - Language Statements</refmiscinfo>
11 <refname>DROP FOREIGN TABLE</refname>
12 <refpurpose>remove a foreign table</refpurpose>
15 <indexterm zone="sql-dropforeigntable">
16 <primary>DROP FOREIGN TABLE</primary>
21 DROP FOREIGN TABLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
26 <title>Description</title>
29 <command>DROP FOREIGN TABLE</command> removes a foreign table.
30 Only the owner of a foreign table can remove it.
35 <title>Parameters</title>
39 <term><literal>IF EXISTS</literal></term>
42 Do not throw an error if the foreign table does not exist.
43 A notice is issued in this case.
49 <term><replaceable class="PARAMETER">name</replaceable></term>
52 The name (optionally schema-qualified) of the foreign table to drop.
58 <term><literal>CASCADE</literal></term>
61 Automatically drop objects that depend on the foreign table (such as
68 <term><literal>RESTRICT</literal></term>
71 Refuse to drop the foreign table if any objects depend on it. This is
80 <title>Examples</title>
83 To destroy two foreign tables, <literal>films</literal> and
84 <literal>distributors</literal>:
87 DROP FOREIGN TABLE films, distributors;
88 </programlisting></para>
92 <title>Compatibility</title>
95 This command conforms to the ISO/IEC 9075-9 (SQL/MED), except that the
96 standard only allows one foreign table to be dropped per command, and apart
97 from the <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</>
103 <title>See Also</title>
105 <simplelist type="inline">
106 <member><xref linkend="sql-alterforeigntable"></member>
107 <member><xref linkend="sql-createforeigntable"></member>