※This sample exam is different from those that appear in the actual OSS-DB Exam.
When creating a new database with CREATE DATABASE in PostgreSQL, a copy of either the default or specified template database is made.
Immediately after the database cluster is initialized by initdb, there are two template databases, one called template0 and one called template1.
Template0 is includes only standard objects that the base PostgreSQL provides, you will not be able to add or update either data or objects. template1, together with normal (non template) databases, allow you to add or update data and objects.
CREATE DATABASE uses template1 as the template database by default. If you want to use another database as a template database, specify that database using the TEMPLATE option. The database specified with the TEMPLATE option does not necessarily need to be a template database, but if you specify a database that is not a template database, you must be either a superuser or the owner of that database. To make the database a template database, set the datistemplate of the system catalog pg_database to true.
In order to prevent template0 from being accidentally updated, datallowconn of pg_database is false, so that no one can connect, including superuser.
Therefore, the correct answer is B and E.