using postgresql 9.4 on ubuntu 15.04.
logged in as postrges
created following roles: fooadmin, fooread, fooupdate with appropriate privileges for the role.
created following user: fooadminuser
granted role to user: grant fooadmin to fooadminuser;
log out of psql
attempt to login to psql using the following:
psql -U fooadminuser -h localhost -W
get prompted for password/enter password
receive following error message:
psql: FATAL: database "fooadminuser" does not exist
I thought I was doing this correctly by creating the roles, then creating the login users, then login with the user that has the createdb role and create the database.
Is there a way to override during login the attempt to access a non-existent database?