1

I have loged in postresql as default postgres user:

psql -U postres

and following the official documentation: https://www.postgresql.org/docs/12/app-createuser.html I have type this:

create user -d -e --role=myrole -r -s myuser;

and nothing happens. Postresql ignores the command.

\du

does not return myuser in user list.
It ignores the command when added any option, only this works:

create user myuser;
wykopowiedz1
  • 103
  • 1
  • 8
  • Try removing the space between 'create' and 'user'. Like this instead: createuser -d -e --role=myrole -r -s myuser; – gsteiner May 07 '20 at 19:31

1 Answers1

0

CREATE USER is a SQL statement that has its own syntax https://www.postgresql.org/docs/12/sql-createuser.html whereas createuser is an executable that has a different syntax: https://www.postgresql.org/docs/12/app-createuser.html: you cannot mix them.

pifor
  • 7,419
  • 2
  • 8
  • 16