我创建了一个具有超级用户角色的新用户rentdb,当我尝试删除时,我会得到它与某些pg函数有关的依赖关系。 有没有办法可以完全删除rentdb。
postgres-# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
rentdb | Superuser | {}
答案 0 :(得分:0)
As documented in the manual您可以{}为用户拥有的drop everything:
drop owned by rentdb cascade;
或assign将这些对象发送给其他用户:
reassign owned by rentdb to postgres;