git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a3804d)
Update createuser examples to match the current program behavior,
2005年5月13日 16:31:43 +0000 (16:31 +0000)
2005年5月13日 16:31:43 +0000 (16:31 +0000)
and add an example showing assignment of a password. Per suggestion
from Jari Aalto (via Martin Pitt).


diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml
index 5af2028b4e5370ac25ab0042400292a2160f577f..f277c53fde95aad19ff0a5049a4e80a8149e4fbd 100644 (file)
--- a/doc/src/sgml/ref/createuser.sgml
+++ b/doc/src/sgml/ref/createuser.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/createuser.sgml,v 1.39 2003年11月29日 19:51:38 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/createuser.sgml,v 1.40 2005年05月13日 16:31:43 tgl Exp $
PostgreSQL documentation
-->
@@ -68,8 +68,10 @@ PostgreSQL documentation
<term><replaceable class="parameter">username</replaceable></term>
<listitem>
<para>
- Specifies the name of the <productname>PostgreSQL</productname> user to be created.
- This name must be unique among all <productname>PostgreSQL</productname> users.
+ Specifies the name of the <productname>PostgreSQL</productname> user
+ to be created.
+ This name must be unique among all users of this
+ <productname>PostgreSQL</productname> installation.
</para>
</listitem>
</varlistentry>
@@ -290,7 +292,7 @@ PostgreSQL documentation
server:
<screen>
<prompt>$ </prompt><userinput>createuser joe</userinput>
-<computeroutput>Is the new user allowed to create databases? (y/n) </computeroutput><userinput>n</userinput>
+<computeroutput>Shall the new user be allowed to create databases? (y/n) </computeroutput><userinput>n</userinput>
<computeroutput>Shall the new user be allowed to create more new users? (y/n) </computeroutput><userinput>n</userinput>
<computeroutput>CREATE USER</computeroutput>
</screen>
@@ -301,11 +303,28 @@ PostgreSQL documentation
server on host <literal>eden</>, port 5000, avoiding the prompts and
taking a look at the underlying command:
<screen>
-<prompt>$ </prompt><userinput>createuser -p 5000 -h eden -D -A -e joe</userinput>
-<computeroutput>CREATE USER "joe" NOCREATEDB NOCREATEUSER</computeroutput>
+<prompt>$ </prompt><userinput>createuser -h eden -p 5000 -D -A -e joe</userinput>
+<computeroutput>CREATE USER joe NOCREATEDB NOCREATEUSER;</computeroutput>
<computeroutput>CREATE USER</computeroutput>
</screen>
</para>
+
+ <para>
+ To create the user <literal>joe</literal> as a superuser,
+ and assign a password immediately:
+<screen>
+<prompt>$ </prompt><userinput>createuser -P -d -a -e joe</userinput>
+<computeroutput>Enter password for new user: </computeroutput><userinput>xyzzy</userinput>
+<computeroutput>Enter it again: </computeroutput><userinput>xyzzy</userinput>
+<computeroutput>CREATE USER joe PASSWORD 'xyzzy' CREATEDB CREATEUSER;</computeroutput>
+<computeroutput>CREATE USER</computeroutput>
+</screen>
+ In the above example, the new password isn't actually echoed when typed,
+ but we show what was typed for clarity. However the password
+ <emphasis>will</> appear in the echoed command, as illustrated &mdash;
+ so you don't want to use <literal>-e</> when assigning a password, if
+ anyone else can see your screen.
+ </para>
</refsect1>
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /