From: Tom Lane Date: Fri, 13 May 2005 16:31:43 +0000 (+0000) Subject: Update createuser examples to match the current program behavior, X-Git-Tag: REL8_1_0BETA1~804 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f81a77d5ef3d9b5ecbfc5745e676fb356570e330;p=thirdparty%2Fpostgresql.git Update createuser examples to match the current program behavior, 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 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. +