How to create a user in Postgresql?

I try my best to make it as simple as it should. Everywhere I look, it's that simple:

$ createuser -P

But this will always fail:

$ creation of new role failed: ERROR:  role "postgres" already exists

I am expecting a clue so that I can give a name, but it will not appear.

Now what?

+4
source share
1 answer

Try reading the best guides . You specify username

createuser -P newusername

Personally, I always do this through SQL with CREATE USER

+10
source

Source: https://habr.com/ru/post/1544349/


All Articles