After recently setting up Postgresql on my Raspberry Pi I created an account which is not a power user. Initially to set this up I entered
from the terminal and then executed
createuser pi -P --interactive
I responded N for superuser Y for create databases Y for create new roles and then.
Create database test;
When I try to go to psql now using simply
pi@raspberrypi:~ $ psql psql: FATAL: database "pi" does not exist
I can go to psql test and create databases there, but I was wondering what causes this behavior.
Does terminal automatically pass the Pi user credentials to postgresql or is it logging me in with my system's Pi Account?