sudo -u postgres psql
postgres=# CREATE DATABASE test_database;
CREATE DATABASE
postgres=# CREATE USER test_user WITH password 'qwerty';
CREATE ROLE
postgres=# GRANT ALL privileges ON DATABASE test_database TO test_user;
GRANT
# drop database
postgres=# DROP DATABASE test_database;
DROP DATABASE
comments are disabled for this article