微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

我需要更改表的所有者.
我创建了表格:
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.)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐