![]() ![]() Because the REASSIGN OWNED statement can only access objects in the current database, you need to execute this statement in each database that contains objects owned by the target role.Īfter transferring the ownerships of objects to another role, you need to drop any remaining objects owned by the target role by executing the DROP OWNED statement in each database that contains objects owned by the target role. The REASSIGN OWNED statement reassigns the ownership of all dependent objects of a target role to another role. Second, revoke any permissions granted to the role.First, either remove the database objects owned by the role using the DROP OWNED statement or reassign the ownership of the database objects to another role REASSIGN OWNED. ![]() In this case, you have to take two steps: When you remove a role referenced in any database, PostgreSQL will raise an error. To drop non-superuser roles, you need to have the CREATEROLE privilege. Login to PostgreSQL as postgres administrator user. If this method also does not work, assign superuser role to your user using the following commands. To remove a superuser role, you need to be a superuser. If the above approach does not work, try creating your owner user testuser as postgres with sudo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |