Why Is An Error Reported When I Attempt to Change a Table Owner of My RDS for PostgreSQL Instance?
Symptom
An error is reported when the owner of a table named mytable is being changed to user test. The table is in the my_db database created by user root.
ALTER TABLE mytable OWNER TO test;
Possible Causes
The error is displayed because user root has not escalated the privilege.
After the privilege is escalated, user root has the permission to assign the table owner to another user.
Solution
- Log in to the database as user test.
- Run the following command as user test:
GRANT test TO root;
- Log in to the database as user root.
- Run the following command as user root to change the owner of the mytable table:
ALTER TABLE mytable OWNER TO test;
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot