我想使用特定数据库中的所有表的所有者。
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)中重新分配所有者。
有什么办法吗?
我想使用特定数据库中的所有表的所有者。
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
。