2 doc/src/sgml/ref/drop_user_mapping.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-DROPUSERMAPPING">
8 <refentrytitle>DROP USER MAPPING</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
14 <refname>DROP USER MAPPING</refname>
15 <refpurpose>remove a user mapping for a foreign server</refpurpose>
18 <indexterm zone="sql-dropusermapping">
19 <primary>DROP USER MAPPING</primary>
24 DROP USER MAPPING [ IF EXISTS ] FOR { <replaceable class="parameter">user_name</replaceable> | USER | CURRENT_USER | PUBLIC } SERVER <replaceable class="parameter">server_name</replaceable>
29 <title>Description</title>
32 <command>DROP USER MAPPING</command> removes an existing user
33 mapping from foreign server.
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
45 <title>Parameters</title>
49 <term><literal>IF EXISTS</literal></term>
52 Do not throw an error if the user mapping does not exist. A
53 notice is issued in this case.
59 <term><replaceable class="parameter">user_name</replaceable></term>
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.
71 <term><replaceable class="parameter">server_name</replaceable></term>
74 Server name of the user mapping.
82 <title>Examples</title>
85 Drop a user mapping <literal>bob</>, server <literal>foo</> if it exists:
87 DROP USER MAPPING IF EXISTS FOR bob SERVER foo;
88 </programlisting></para>
92 <title>Compatibility</title>
95 <command>DROP USER MAPPING</command> conforms to ISO/IEC 9075-9
96 (SQL/MED). The <literal>IF EXISTS</> clause is
97 a <productname>PostgreSQL</> extension.
102 <title>See Also</title>
104 <simplelist type="inline">
105 <member><xref linkend="sql-createusermapping"></member>
106 <member><xref linkend="sql-alterusermapping"></member>