Bootstrap FreeKB - Postgres (SQL) - Resolve "role does not exist"
Postgres (SQL) - Resolve "role does not exist"

Updated:   |  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 Buy Me A Coffee



Comments


Add a Comment


Please enter 62a4eb in the box below so that we can be sure you are a human.