从
the PostgreSQL docs:
原文链接:https://www.f2er.com/postgresql/193046.htmlThe concept of roles subsumes the concepts of “users” and “groups”. In
Postgresql versions before 8.1,users and groups were distinct kinds
of entities,but now there are only roles. Any role can act as a user,
a group,or both.
为什么他们在8.1中做出这个改变?
也许从C编程者的角度来看,使用单个Role类(struct)更容易?
CREATE USER等同于CREATE ROLE,除了CREATE USER给用户/角色的LOGIN权限。
(我即将为我的webapp设计权限系统,因此我对此感兴趣。)