~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/drop_user_mapping.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

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