0

I found the problem here among many other solutions for *nix systems, but I couldn't seem to access psql

Simply throws a fatal error telling that role Username doesn't exist while I have just created the role and can explicitly see that role there in the list

enter image description here

Things were going super smooth with sqlite and now I need to migrate all data from sqlite3 to PostgreSQL and I'm stuck here for hours...! What do I do?

icedwater
  • 4,701
  • 3
  • 35
  • 50
Saravanabalagi Ramachandran
  • 8,551
  • 11
  • 53
  • 102

1 Answers1

4

Solution 1: Use doublequotes to preserve case: psql -U postgres -c "CREATE ROLE \"Zeke\""

In Windows usernames are usually given as Username but psql command refuses to preserve case! and this is causing the error...

Solution 2: psql -U zeke

I still wonder if there exists any solution for taking usernames in windows as lowercase characters! Adding an ENV variable PGUSER helps get rid of -U zeke after every psql cmd

Saravanabalagi Ramachandran
  • 8,551
  • 11
  • 53
  • 102