加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

错误:必须是角色“”PostgreSQL的成员

发布时间:2020-12-13 18:06:46 所属栏目:百科 来源:网络整理
导读:我需要更改表的所有者. 我创建了表格: CREATE TABLE example (some columns); 然后我试图改变主人: ALTER TABLE database.expample OWNER TO "secondary"; 他们我得到了这个错误: ERROR: must be member of role "secondary" 有谁能够帮我? 提前致谢. 从
我需要更改表的所有者.
我创建了表格:
CREATE TABLE example (some columns);

然后我试图改变主人:

ALTER TABLE database.expample OWNER TO "secondary";

他们我得到了这个错误:

ERROR: must be member of role "secondary"

有谁能够帮我?
提前致谢.

从Postgresql文档中看到这个:

http://www.postgresql.org/docs/current/static/sql-altertable.html

You must own the table to use ALTER TABLE. To change the schema of a table,you must also have CREATE privilege on the new schema. To alter the owner,you must also be a direct or indirect member of the new owning role,and that role must have CREATE privilege on the table’s schema. (These restrictions enforce that altering the owner doesn’t do anything you couldn’t do by dropping and recreating the table. However,a superuser can alter ownership of any table anyway.)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读