如何修改PostgreSQL数据库中所有表的所有者?
我试过,ALTER TABLE * OWNER TO new_owner但它不支持星号语法.
我想使用更改一个特定数据库中所有表的所有者
REASSIGN OWNED BY postgres TO myuser
Run Code Online (Sandbox Code Playgroud)
但它显示:
ERROR: cannot reassign ownership of objects owned by role postgres because they are required by the database system
Run Code Online (Sandbox Code Playgroud)
我认为这是因为这个系统中有更多的数据库,但我想只在一个指定的数据库(database1)中重新分配所有者.
有办法吗?
postgresql ×2