Password when executing postgresql command

0

Good morning,

I'm trying to create a database in postgresql via terminal on windows. But he asks me for a password every time I give him the command. I tried using the postgres user password but did not accept it. Can anyone help me?

    
asked by anonymous 03.07.2018 / 17:12

1 answer

1

To create a new usuario/role in PostgreSQL , you need the CREATE ROLE , for example:

CREATE ROLE adempiere LOGIN NOSUPERUSER INHERIT CREATEDB CREATEROLE;

To create a new usuário/role through the Windows terminal you can use the utility pgsql , see:

psql -U postgres -c "CREATE ROLE adempiere LOGIN NOSUPERUSER INHERIT CREATEDB CREATEROLE;"
    
03.07.2018 / 21:59