CREATE DATABASE
postgres=# GRANT ALL PRIVILEGES ON DATABASE keatest TO keatest;
GRANT
+postgres=# \c keatest
+You are now connected to database "keatest" as user "postgres".
+keatest=# GRANT ALL PRIVILEGES ON SCHEMA public TO keatest;
+GRANT
postgres=# \q
@endverbatim
However, this only affects tables which exist when the privileges are granted.
To ensure that the user has specific privileges to tables dynamically created
by the unit tests, the default schema privileges must be altered.
+ In the Postgres 15.0+, you need to explicitly grant privileges to access to
+ the ``public`` schema.
The following example demonstrates how to create the user <i>keatest_readonly</i>,
which has SELECT privilege to the tables within the <i>keatest</i> database,
The first task is to create both the database and the user under
which the servers will access it. A number of steps are required:
-1. Log into PostgreSQL as "root":
+1. Log into PostgreSQL as "postgres":
.. code-block:: console
CREATE ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE database-name TO user-name;
GRANT
+ postgres=# \c database-name
+ You are now connected to database "database-name" as user "postgres".
+ postgres=# GRANT ALL PRIVILEGES ON SCHEMA public TO user-name;
+ GRANT
postgres=#
4. Exit PostgreSQL:
commands as described in :ref:`mysql-upgrade`, with the exception that the "pgsql"
database backend type must be used in the commands.
+If you upgraded your Postgres database from a version prior 15.0, you need to grant
+the additional privileges to the user:
+
+First, log into PostgreSQL as "postgres":
+
+ .. code-block:: console
+
+ $ sudo -u postgres psql -d database-name -U postgres
+ Enter password:
+ postgres=#
+
+Next, grant the access to the ``public`` schema.
+
+ .. code-block:: psql
+
+ postgres=# GRANT ALL PRIVILEGES ON SCHEMA public TO user-name;
+ GRANT
+ postgres=#
+
+Now, quit the PostgreSQL client:
+
+ .. code-block:: psql
+
+ postgres=# \q
+ Bye
+ $
+
Use the following command to check the current schema version:
.. code-block:: console