When attempting to connect to a database as a user who does not have connect privileges on that database, the error incorrectly reports that the problem is with a role instead of with the user. This example illustrates the error message:
beehive=> create user kris with password 'beehive';
CREATE USER
beehive=> create database foo;
CREATE DATABASE
beehive=> \c foo kris;
Password for "kris":
act: ERROR: role "kris" does not have connect privileges on this database.
Previous connection kept