May 2018
Intermediate to advanced
576 pages
30h 25m
English
From the command line, you can run the createuser command:
pguser@hvost:~$ createuser bob
If you add the --interactive command-line option, you activate the interactive mode, which means you will be asked some questions, as follows:
pguser@hvost:~$ createuser --interactive aliceShall the new role be a superuser? (y/n) nShall the new role be allowed to create databases? (y/n) yShall the new role be allowed to create more new roles? (y/n) n
Without --interactive, the preceding questions get no as the default answer; you can change that with the -s, -d, and -r command-line options.
In interactive mode, questions are asked only if they make sense. One example is when the user is a superuser; no other questions are asked because ...