gpt4 book ai didi

postgresql - 为 1 个指定的数据库重新分配拥有者

转载 作者:行者123 更新时间:2023-11-29 11:14:55 24 4
gpt4 key购买 nike

我想使用

更改一个特定数据库中所有表的所有者
REASSIGN OWNED BY postgres TO myuser

但它显示:

ERROR:  cannot reassign ownership of objects owned by role postgres because they are required by the database system

我想是因为这个系统中的数据库比较多,但是我只想在一个指定的数据库(database1)中重新分配所有者。

有办法吗?

最佳答案

因为 postgres 用户拥有系统目录,所以您不能重新分配 postgres 拥有的所有对象。在这种情况下,您将不得不手动解决这种情况。将来,避免将 postgres 用于非管理任务。

关于postgresql - 为 1 个指定的数据库重新分配拥有者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16959764/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com