Add manvolnum, so that man pages are generated.
[PostgreSQL.git] / doc / src / sgml / ref / drop_user_mapping.sgml
blob4b032ad66a90527b4e9d5fc5e024e54450b52c0d
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-DROPUSERMAPPING">
7 <refmeta>
8 <refentrytitle id="sql-dropusermapping-title">DROP USER MAPPING</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
11 </refmeta>
13 <refnamediv>
14 <refname>DROP USER MAPPING</refname>
15 <refpurpose>remove a user mapping for a foreign server</refpurpose>
16 </refnamediv>
18 <indexterm zone="sql-dropusermapping">
19 <primary>DROP USER MAPPING</primary>
20 </indexterm>
22 <refsynopsisdiv>
23 <synopsis>
24 DROP USER MAPPING [ IF EXISTS ] FOR { <replaceable class="parameter">username</replaceable> | USER | CURRENT_USER | PUBLIC } SERVER <replaceable class="parameter">servername</replaceable>
25 </synopsis>
26 </refsynopsisdiv>
28 <refsect1>
29 <title>Description</title>
31 <para>
32 <command>DROP USER MAPPING</command> removes an existing user
33 mapping from foreign server.
34 </para>
36 <para>
37 The owner of a foreign server can drop user mappings for that server
38 for any user. Also, a user can drop a user mapping for his own
39 user name if <literal>USAGE</> privilege on the server has been
40 granted to the user.
41 </para>
42 </refsect1>
44 <refsect1>
45 <title>Parameters</title>
47 <variablelist>
48 <varlistentry>
49 <term><literal>IF EXISTS</literal></term>
50 <listitem>
51 <para>
52 Do not throw an error if the user mapping does not exist. A
53 notice is issued in this case.
54 </para>
55 </listitem>
56 </varlistentry>
58 <varlistentry>
59 <term><replaceable class="parameter">username</replaceable></term>
60 <listitem>
61 <para>
62 User name of the mapping. <literal>CURRENT_USER</>
63 and <literal>USER</> match the name of the current
64 user. <literal>PUBLIC</> is used to match all present and
65 future user names in the system.
66 </para>
67 </listitem>
68 </varlistentry>
70 <varlistentry>
71 <term><replaceable class="parameter">servername</replaceable></term>
72 <listitem>
73 <para>
74 Server name of the user mapping.
75 </para>
76 </listitem>
77 </varlistentry>
78 </variablelist>
79 </refsect1>
81 <refsect1>
82 <title>Examples</title>
84 <para>
85 Drop a user mapping <literal>bob</>, server <literal>foo</> if it exists:
86 <programlisting>
87 DROP USER MAPPING IF EXISTS FOR bob SERVER foo;
88 </programlisting>
89 </para>
90 </refsect1>
92 <refsect1>
93 <title>Compatibility</title>
95 <para>
96 <command>DROP USER MAPPING</command> conforms to ISO/IEC 9075-9
97 (SQL/MED). The <literal>IF EXISTS</> clause is
98 a <productname>PostgreSQL</> extension.
99 </para>
100 </refsect1>
102 <refsect1>
103 <title>See Also</title>
105 <simplelist type="inline">
106 <member><xref linkend="sql-createusermapping" endterm="sql-createusermapping-title"></member>
107 <member><xref linkend="sql-alterusermapping" endterm="sql-alterusermapping-title"></member>
108 </simplelist>
109 </refsect1>
111 </refentry>