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?
1 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;
-
The only cons are that this way you cannot drop A without B losing the privileges, there are other attributes besides superuser, and B can now impersonate A. Commented Jun 1, 2018 at 15:23
-
You also can't drop A without reassigning his ownerships some other user, so that may nt be such a big problem.– JasenCommented Jun 3, 2018 at 23:01