head	1.5;
access;
symbols
	REL9_0_0:1.5
	REL9_1_ALPHA1:1.5
	REL9_0_RC1:1.5
	REL9_0_BETA4:1.5
	REL9_0_STABLE:1.5.0.2
	REL9_0_BETA3:1.5
	REL9_0_BETA2:1.5
	REL8_4_4:1.3
	REL9_0_BETA1:1.5
	REL9_0_ALPHA5_BRANCH:1.4.0.8
	REL9_0_ALPHA5:1.4
	REL8_4_3:1.3
	REL9_0_ALPHA4:1.4
	REL9_0_ALPHA4_BRANCH:1.4.0.6
	REL8_5_ALPHA3:1.4
	REL8_5_ALPHA3_BRANCH:1.4.0.4
	REL8_4_2:1.3
	REL8_5_ALPHA2:1.4
	REL8_5_ALPHA2_BRANCH:1.4.0.2
	REL8_4_1:1.3
	REL8_5_ALPHA1:1.3
	REL8_5_ALPHA1_BRANCH:1.3.0.4
	REL8_4_STABLE:1.3.0.2
	REL8_4_0:1.3
	REL8_4_RC2:1.3
	REL8_4_RC1:1.2
	REL8_4_BETA2:1.2
	REL8_4_BETA1:1.2;
locks; strict;
comment	@# @;


1.5
date	2010.04.03.07.23.01;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2009.09.19.10.23.27;	author petere;	state Exp;
branches;
next	1.3;

1.3
date	2009.06.19.15.28.25;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2009.01.20.09.10.20;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2008.12.19.16.25.16;	author petere;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_user_mapping.sgml,v 1.4 2009/09/19 10:23:27 petere Exp $
PostgreSQL documentation
-->

<refentry id="SQL-DROPUSERMAPPING">
 <refmeta>
  <refentrytitle>DROP USER MAPPING</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>DROP USER MAPPING</refname>
  <refpurpose>remove a user mapping for a foreign server</refpurpose>
 </refnamediv>

 <indexterm zone="sql-dropusermapping">
  <primary>DROP USER MAPPING</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
DROP USER MAPPING [ IF EXISTS ] FOR { <replaceable class="parameter">user_name</replaceable> | USER | CURRENT_USER | PUBLIC } SERVER <replaceable class="parameter">server_name</replaceable>
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   <command>DROP USER MAPPING</command> removes an existing user
   mapping from foreign server.
  </para>

  <para>
   The owner of a foreign server can drop user mappings for that server
   for any user.  Also, a user can drop a user mapping for his own
   user name if <literal>USAGE</> privilege on the server has been
   granted to the user.
  </para>
 </refsect1>

 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
    <term><literal>IF EXISTS</literal></term>
    <listitem>
     <para>
      Do not throw an error if the user mapping does not exist.  A
      notice is issued in this case.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">user_name</replaceable></term>
    <listitem>
     <para>
      User name of the mapping.  <literal>CURRENT_USER</>
      and <literal>USER</> match the name of the current
      user.  <literal>PUBLIC</> is used to match all present and
      future user names in the system.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">server_name</replaceable></term>
    <listitem>
     <para>
      Server name of the user mapping.
     </para>
    </listitem>
   </varlistentry>
    </variablelist>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   Drop a user mapping <literal>bob</>, server <literal>foo</> if it exists:
<programlisting>
DROP USER MAPPING IF EXISTS FOR bob SERVER foo;
</programlisting>
  </para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   <command>DROP USER MAPPING</command> conforms to ISO/IEC 9075-9
   (SQL/MED).  The <literal>IF EXISTS</> clause is
   a <productname>PostgreSQL</> extension.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-createusermapping"></member>
   <member><xref linkend="sql-alterusermapping"></member>
  </simplelist>
 </refsect1>

</refentry>
@


1.4
log
@Make the placeholder naming in the synopses of the SQL help more consistent
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_user_mapping.sgml,v 1.3 2009/06/19 15:28:25 petere Exp $
d8 1
a8 1
  <refentrytitle id="sql-dropusermapping-title">DROP USER MAPPING</refentrytitle>
d106 2
a107 2
   <member><xref linkend="sql-createusermapping" endterm="sql-createusermapping-title"></member>
   <member><xref linkend="sql-alterusermapping" endterm="sql-alterusermapping-title"></member>
@


1.3
log
@Add manvolnum, so that man pages are generated.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_user_mapping.sgml,v 1.2 2009/01/20 09:10:20 petere Exp $
d24 1
a24 1
DROP USER MAPPING [ IF EXISTS ] FOR { <replaceable class="parameter">username</replaceable> | USER | CURRENT_USER | PUBLIC } SERVER <replaceable class="parameter">servername</replaceable>
d59 1
a59 1
    <term><replaceable class="parameter">username</replaceable></term>
d71 1
a71 1
    <term><replaceable class="parameter">servername</replaceable></term>
@


1.2
log
@Revise the permission checking on user mapping DDL commands.
CREATE/ALTER/DROP USER MAPPING are now allowed either by the server owner or
by a user with USAGE privileges for his own user name.  This is more or less
what the SQL standard wants anyway (plus "implementation-defined")

Hide information_schema.user_mapping_options.option_value, unless the current
user is the one associated with the user mapping, or is the server owner and
the mapping is for PUBLIC, or is a superuser.  This is to protect passwords.

Also, fix a bug in information_schema._pg_foreign_servers, which hid servers
using wrappers where the current user did not have privileges on the wrapper.
The correct behavior is to hide servers where the current user has no
privileges on the server.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_user_mapping.sgml,v 1.1 2008/12/19 16:25:16 petere Exp $
d9 1
@


1.1
log
@SQL/MED catalog manipulation facilities

This doesn't do any remote or external things yet, but it gives modules
like plproxy and dblink a standardized and future-proof system for
managing their connection information.

Martin Pihlak and Peter Eisentraut
@
text
@d2 1
a2 1
$PostgreSQL$
d32 8
a39 2
   mapping from foreign server.  To execute this command, the current
   user must be the owner of the server containing the mapping.
@

