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

前端 未结 9 572
粉色の甜心
粉色の甜心 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:50

    I fixed it by logging in with postgres user (and then apply my changes, which was changing ownership in my case):

    sudo -u postgres psql
    ALTER DATABASE my_database OWNER TO new_user;
    

提交回复
热议问题