※This sample exam is different from those that appear in the actual OSS-DB Exam.
2019/03/04
createuser is the command to create a new database user to the PostgreSQL server. Since PostgreSQL dedicated command, you will not be able to create a user of the OS.
Internally connect to the database and issue the CREATE ROLE command. Therefore, what you can do with createuser can also be realized by connecting to the database with psql and executing the CREATE USER or CREATE ROLE command.
Because the database to be connected is specified with options such as -h and -p, you can also create a user by connecting to a remote database.
Specify the superuser privilege, user creation authority, or database creation authority for new users by specifying them at runtime options. If not specified, asking it interactively until PostgreSQL 9.1 was the default, but since 9.2 the behavior has changed and these rights are not granted by default.
To execute the createuser command, you need to have user creation authority, but it does not necessarily need to be a database administrator user.
Whether to grant superuser privileges, user creation privileges, and database creation privileges to new users is determined by options at runtime.
If not specified, asking it interactively until PostgreSQL 9.1 was the default, but since 9.2 the behavior has changed and these rights are not granted by default.
To execute the createuser command, you need to have user creation authority, but it does not necessarily need to be a database administrator user.
Therefore, the correct answer is B and D.