From a347f96b99741e44276cdd481a72d04f1b2ac5fc Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 7 Feb 2012 14:55:34 +0200 Subject: createuser: Disable prompting by default Do not prompt when options were not specified. Assume --no-createdb, --no-createrole, --no-superuser by default. Also disable prompting for user name in dropdb, unless --interactive was specified. reviewed by Josh Kupershmidt --- doc/src/sgml/ref/createuser.sgml | 37 ++++++++++++++++++++++++++++--------- doc/src/sgml/ref/dropuser.sgml | 7 +++++-- 2 files changed, 33 insertions(+), 11 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml index 4cbfd69148c..9942cd66f61 100644 --- a/doc/src/sgml/ref/createuser.sgml +++ b/doc/src/sgml/ref/createuser.sgml @@ -102,7 +102,8 @@ PostgreSQL documentation - The new user will not be allowed to create databases. + The new user will not be allowed to create databases. This is the + default. @@ -152,6 +153,20 @@ PostgreSQL documentation + + + + + Prompt for the user name if none is specified on the command line, and + also prompt for whichever of the options + /, + /, + / is not specified on the command + line. (This was the default behavior up to PostgreSQL 9.1.) + + + + @@ -215,7 +230,8 @@ PostgreSQL documentation - The new user will not be allowed to create new roles. + The new user will not be allowed to create new roles. This is the + default. @@ -235,7 +251,7 @@ PostgreSQL documentation - The new user will not be a superuser. + The new user will not be a superuser. This is the default. @@ -286,11 +302,6 @@ PostgreSQL documentation - - You will be prompted for a name and other missing information if it - is not specified on the command line. - - createuser also accepts the following command-line arguments for connection parameters: @@ -422,6 +433,14 @@ PostgreSQL documentation server: $ createuser joe + + + + + To create a user joe on the default database + server with prompting for some additional attributes: + +$ createuser --interactive joe Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) n Shall the new role be allowed to create more new roles? (y/n) n @@ -430,7 +449,7 @@ PostgreSQL documentation To create the same user joe using the - server on host eden, port 5000, avoiding the prompts and + server on host eden, port 5000, with attributes explicitly specified, taking a look at the underlying command: $ createuser -h eden -p 5000 -S -D -R -e joe diff --git a/doc/src/sgml/ref/dropuser.sgml b/doc/src/sgml/ref/dropuser.sgml index 724fe40df26..bc6feafe9f2 100644 --- a/doc/src/sgml/ref/dropuser.sgml +++ b/doc/src/sgml/ref/dropuser.sgml @@ -62,7 +62,9 @@ PostgreSQL documentation Specifies the name of the PostgreSQL user to be removed. - You will be prompted for a name if none is specified on the command line. + You will be prompted for a name if none is specified on the command + line and the / option + is used. @@ -83,7 +85,8 @@ PostgreSQL documentation - Prompt for confirmation before actually removing the user. + Prompt for confirmation before actually removing the user, and prompt + for the user name if none is specified on the command line. -- cgit v1.2.3