diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml
index 5af2028b4e5..f277c53fde9 100644
--- a/doc/src/sgml/ref/createuser.sgml
+++ b/doc/src/sgml/ref/createuser.sgml
@@ -1,5 +1,5 @@
@@ -68,8 +68,10 @@ PostgreSQL documentation
username
- Specifies the name of the PostgreSQL user to be created.
- This name must be unique among all PostgreSQL users.
+ Specifies the name of the PostgreSQL user
+ to be created.
+ This name must be unique among all users of this
+ PostgreSQL installation.
@@ -290,7 +292,7 @@ PostgreSQL documentation
server:
$ createuser joe
-Is the new user allowed to create databases? (y/n) n
+Shall the new user be allowed to create databases? (y/n) n
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
@@ -301,11 +303,28 @@ PostgreSQL documentation
server on host eden>, port 5000, avoiding the prompts and
taking a look at the underlying command:
-$ createuser -p 5000 -h eden -D -A -e joe
-CREATE USER "joe" NOCREATEDB NOCREATEUSER
+$ createuser -h eden -p 5000 -D -A -e joe
+CREATE USER joe NOCREATEDB NOCREATEUSER;
CREATE USER
+
+
+ To create the user joe as a superuser,
+ and assign a password immediately:
+
+$ createuser -P -d -a -e joe
+Enter password for new user: xyzzy
+Enter it again: xyzzy
+CREATE USER joe PASSWORD 'xyzzy' CREATEDB CREATEUSER;
+CREATE USER
+
+ In the above example, the new password isn't actually echoed when typed,
+ but we show what was typed for clarity. However the password
+ will> appear in the echoed command, as illustrated —
+ so you don't want to use -e> when assigning a password, if
+ anyone else can see your screen.
+