2

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 1

0

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

2
  • 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. 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.
    – Jasen
    Jun 3, 2018 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.