From f81a77d5ef3d9b5ecbfc5745e676fb356570e330 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 13 May 2005 16:31:43 +0000 Subject: [PATCH] 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). --- doc/src/sgml/ref/createuser.sgml | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml index 5af2028b4e..f277c53fde 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. + -- 2.40.0