change user permission postgres code example
Example 1: postgresql change user role grant
=# ALTER USER librarian WITH SUPERUSER;
ALTER ROLE
Example 2: postgresql user permissions to database
sudo -u postgres psqlpostgres=# create database mydb;postgres=# create user myuser with encrypted password 'mypass';postgres=# grant all privileges on database mydb to myuser;
Example 3: postgresql change user role grant
=# ALTER USER role_specification WITH OPTION1 OPTION2 OPTION3;