After the all Permission Is Granted to the Schema of a User, the Error Message "ERROR: current user does not have privilege to role tom" Persists During Table Creation
Symptom
Assume that there are two users, tom and jerry. jerry wants to create a table in the schema with the same name as that of tom. tom grants the all permission of the schema to jerry. However, an error is still reported when the table is created.
1 2 3 4 5 6 7 8 9 |
dbtest=# GRANT all on schema tom to jerry; GRANT dbtest=# \c - jerry Password for user jerry: Non-SSL connection (SSL connection is recommended when requiring high-security) You are now connected to database "dbtest" as user "jerry". dbtest=> dbtest=> CREATE TABLE tom.t(a int); ERROR: current user does not have privilege to role tom |
Possible Causes
According to the error message, jerry requires the permission of the role tom.
Handling Procedure
After the permission of the role tom is granted to jerry, the table is created successfully.
1 2 3 4 5 6 7 8 9 10 11 |
dbtest=# GRANT tom to jerry; GRANT ROLE dbtest=# \c - jerry Password for user jerry: Non-SSL connection (SSL connection is recommended when requiring high-security) You are now connected to database "dbtest" as user "jerry". dbtest=> dbtest=> CREATE TABLE tom.t(a int); NOTICE: The 'DISTRIBUTE BY' clause is not specified. Using 'a' as the distribution column by default. HINT: Please use 'DISTRIBUTE BY' clause to specify suitable data distribution column. CREATE TABLE |
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