Postgres (SQL) - Resolve "role does not exist"
by
Jeremy Canfield |
Updated: September 16 2022
| Postgres (SQL) articles
Let's say the following is being returned when attempting to issue a psql command.
[john.doe@localhost ~]$ psql --list
psql: error: FATAL: role "john.doe" does not exist
command terminated with exit code 2
One simple option is to include the -U options with a user that exists.
[john.doe@localhost ~]$ psql -U postgres_user --list
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+------------+------------+-----------------------
db001 | postgres | UTF8 | en_US.utf8 | en_US.utf8 |
db002 | john.doe | UTF8 | en_US.utf8 | en_US.utf8 |
Did you find this article helpful?
If so, consider buying me a coffee over at