Hello!

The example for ALTER USER MAPPING is missing the action keyword
(ADD|SET|DROP).

Since ADD is the default option, the given command attempts to add a user
'bob' to the already-existing user mapping 'bob', which throws an 'ERROR:
 option "user" provided more than once'

Here's a working example that a) matches the description ("change
password") and b) continues the steps started with the CREATE USER MAPPING
example.

ALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public');

I've attached a patch as well.

Thanks!

gabrielle
From 96ea52b63a82dd4dea24754f233978821b1e74d4 Mon Sep 17 00:00:00 2001
From: gabrielle <gor...@gmail.com>
Date: Wed, 24 Aug 2016 18:01:03 -0700
Subject: [PATCH 1/1] correct ALTER USER MAPPING example

Existing example threw an error.
---
 doc/src/sgml/ref/alter_user_mapping.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/alter_user_mapping.sgml b/doc/src/sgml/ref/alter_user_mapping.sgml
index 3a90813..95f59e5 100644
--- a/doc/src/sgml/ref/alter_user_mapping.sgml
+++ b/doc/src/sgml/ref/alter_user_mapping.sgml
@@ -91,7 +91,7 @@ ALTER USER MAPPING FOR { <replaceable class="parameter">user_name</replaceable>
   <para>
    Change the password for user mapping <literal>bob</>, server<literal> foo</>:
 <programlisting>
-ALTER USER MAPPING FOR bob SERVER foo OPTIONS (user 'bob', password 'public');
+ALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public');
 </programlisting></para>
 
  </refsect1>
-- 
2.7.4

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Reply via email to