Postgresql – How add user with same privileges

permissionspostgresql

There is a database owner, I need to add another user with the same privileges. With rights to update/delete/alter, etc.
How can I do it?

Best Answer

you can create an user and add all privileges trough grant command or you can just create a role and grant all privileges your role have to the new created role

`GRANT A TO B;`

It will grant all right of role A to B.

If A is a superuser, you also need: ALTER USER B WITH SUPERUSER;

reference link1 and link2