Re: role "my_account" does not exist - Mailing list pgsql-general

From Adrian Klaver
Subject Re: role "my_account" does not exist
Date
Msg-id 1ec81ed0-b562-d71f-fc66-298babd9f3d8@aklaver.com
Whole thread Raw
In response to role "my_account" does not exist  (Amn Ojee Uw <amnojeeuw@gmail.com>)
List pgsql-general
On 8/3/23 17:17, Amn Ojee Uw wrote:
> Hello!
> 
> Following this web page 
> <https://ubiq.co/database-blog/create-user-postgresql/>, I have tried to 
> create a new role/user, but to no avail.

Why use random Web tutorials, most of which are full of errors, instead 
of the Postgres documentation:

https://www.postgresql.org/docs/current/app-createuser.html

> 
> After typing the following command : /*createuser --interactive 
> --pwprompt*/ I get the following questions:
> 
> Enter name of role to add: company_name
> Enter password for new role: xxxxxxx
> Enter it again: xxxxxxx
> Shall the new role be a superuser? (y/n) y
> 
> Than this error is displayed :
> */createuser: error: connection to server on socket 
> "/var/run/postgresql/.s.PGSQL.5432" /**/
> /**/failed: FATAL:  role "my_debian_login_account_name" does not exist/*

Well in your example above the role name is 'company_name' not 
'my_debian_login_account_name', so the error message is correct.

> 
> How/ever, this issue is not really relevant/, per se, since I am able to 
> create roles once I log in PostgreSQL-15. Nonetheless, if the service 
> exist, why not usu it. If the services exist and is not working, could 

createuser works.

> it be that there is a problem that will come apparent later on, when 
> unlike now, it would be during a critical moment. Thus the question, 
> what can I do to resolve this issue?
> Is there something I am missing?


Yes reading the documentation and paying attention to what you are doing.

> 
> 
> Thanks
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: role "my_account" does not exist
Next
From: Amn Ojee Uw
Date:
Subject: Re: role "my_account" does not exist