]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_server.sgml
Create a "sort support" interface API for faster sorting.
[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  <refmeta>
8   <refentrytitle>DROP SERVER</refentrytitle>
9   <manvolnum>7</manvolnum>
10   <refmiscinfo>SQL - Language Statements</refmiscinfo>
11  </refmeta>
12
13  <refnamediv>
14   <refname>DROP SERVER</refname>
15   <refpurpose>remove a foreign server descriptor</refpurpose>
16  </refnamediv>
17
18  <indexterm zone="sql-dropserver">
19   <primary>DROP SERVER</primary>
20  </indexterm>
21
22  <refsynopsisdiv>
23 <synopsis>
24 DROP SERVER [ IF EXISTS ] <replaceable class="parameter">server_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">server_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      </para>
68     </listitem>
69    </varlistentry>
70
71    <varlistentry>
72     <term><literal>RESTRICT</literal></term>
73     <listitem>
74      <para>
75       Refuse to drop the server if any objects depend on it.  This is
76       the default.
77      </para>
78     </listitem>
79    </varlistentry>
80   </variablelist>
81  </refsect1>
82
83  <refsect1>
84   <title>Examples</title>
85
86   <para>
87    Drop a server <literal>foo</> if it exists:
88 <programlisting>
89 DROP SERVER IF EXISTS foo;
90 </programlisting></para>
91  </refsect1>
92
93  <refsect1>
94   <title>Compatibility</title>
95
96   <para>
97    <command>DROP SERVER</command> conforms to ISO/IEC 9075-9
98    (SQL/MED).  The <literal>IF EXISTS</> clause is
99    a <productname>PostgreSQL</> extension.
100   </para>
101  </refsect1>
102
103  <refsect1>
104   <title>See Also</title>
105
106   <simplelist type="inline">
107    <member><xref linkend="sql-createserver"></member>
108    <member><xref linkend="sql-alterserver"></member>
109   </simplelist>
110  </refsect1>
111
112 </refentry>