Check that postgres got installed correctly by checking the version: $ postgres -V
(on windows just use the postgresSQL shell that comes with the installer)
If you get an error saying the postgres user doesn’t exist then create that user:
$ /usr/local/opt/postgres/bin/createuser -s postgres
postgres=# CREATE DATABASE security_demo;
postgres=# create user user1 with encrypted password 'password';
postgres=# grant all privileges on database security_demo to user1;