“ERROR: must be member of role” When creating schema in PostgreSQL

前端 未结 9 661
粉色の甜心
粉色の甜心 2021-01-31 13:01

I\'m logged in with a superuser account and this is the process I\'m doing:

1-> CREATE ROLE test WITH IN ROLE testroles PASSWORD \'testpasswd\'
2-> CREATE S         


        
9条回答
  •  轮回少年
    2021-01-31 13:32

    I have encountered this issue on RDS as well. I logged in as the root user, created a role named myappuser and then tried creating a schema called superduper whose owner is myappuser.

    I found a solution which works. Create the myappuser role, and make sure that this role at least has the permission to create databases (the privilege is called CREATEDB). After creating the myappuser role, I logged into the database as myappuser and created the superduper schema whose user is myappuser. This worked without any problems.

提交回复
热议问题