Answers for "add user in postgresql"

38

create db user postgres

sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;
Posted by: Guest on September-01-2020
0

how to add user to role postgresql

CREATE ROLE joe LOGIN INHERIT;
CREATE ROLE admin NOINHERIT;
CREATE ROLE wheel NOINHERIT;
GRANT admin TO joe;
GRANT wheel TO admin;
Posted by: Guest on January-27-2021

Code answers related to "add user in postgresql"

Browse Popular Code Answers by Language