]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_server.sgml
Trim trailing whitespace
[postgresql] / doc / src / sgml / ref / drop_server.sgml
1 <!--
2 doc/src/sgml/ref/drop_server.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPSERVER">
7  <indexterm zone="sql-dropserver">
8   <primary>DROP SERVER</primary>
9  </indexterm>
10
11  <refmeta>
12   <refentrytitle>DROP SERVER</refentrytitle>
13   <manvolnum>7</manvolnum>
14   <refmiscinfo>SQL - Language Statements</refmiscinfo>
15  </refmeta>
16
17  <refnamediv>
18   <refname>DROP SERVER</refname>
19   <refpurpose>remove a foreign server descriptor</refpurpose>
20  </refnamediv>
21
22  <refsynopsisdiv>
23 <synopsis>
24 DROP SERVER [ 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 SERVER</command> removes an existing foreign server
33    descriptor.  To execute this command, the current user must be the
34    owner of the server.
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 server does not exist.  A notice is
47       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 server.
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 server (such as
66       user mappings),
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 server if any objects depend on it.  This is
78       the default.
79      </para>
80     </listitem>
81    </varlistentry>
82   </variablelist>
83  </refsect1>
84
85  <refsect1>
86   <title>Examples</title>
87
88   <para>
89    Drop a server <literal>foo</> if it exists:
90 <programlisting>
91 DROP SERVER IF EXISTS foo;
92 </programlisting></para>
93  </refsect1>
94
95  <refsect1>
96   <title>Compatibility</title>
97
98   <para>
99    <command>DROP SERVER</command> conforms to ISO/IEC 9075-9
100    (SQL/MED).  The <literal>IF EXISTS</> clause is
101    a <productname>PostgreSQL</> extension.
102   </para>
103  </refsect1>
104
105  <refsect1>
106   <title>See Also</title>
107
108   <simplelist type="inline">
109    <member><xref linkend="sql-createserver"></member>
110    <member><xref linkend="sql-alterserver"></member>
111   </simplelist>
112  </refsect1>
113
114 </refentry>