I have installed Postgre SQL on my local Ubuntu 20.04 as described here:
https://computingforgeeks.com/how-to-install-postgresql-13-on-ubuntu/
In order to log in to Postge SQL I have to switch to user postgres first
(base) irbis@irbis-System-Product-Name:~$ sudo su - postgres
[sudo] password for irbis:
postgres@irbis-System-Product-Name:~$ psql
psql (13.8 (Ubuntu 13.8-1.pgdg20.04+1))
Type "help" for help.
postgres=#
Without switching to postgres there is an error:
(base) irbis@irbis-System-Product-Name:~$ psql
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "irbis" does not exist
So the question is - what I have to do in order to
- Start Console by default (with user irbis)
- Type psql (not psql -U or any other)
- Postgres started
Maybe create role etc. Please provide me with code snippet. I am a newbie to Postgres and don't want to break anything.