postgresql中用户与角色是相同的,你可以使用一个角色来连接数据库。但新建的角色没有login权限,所以以下两个命令等效:
create role 角色名 identified by '密码' login; create user 用户名 identified by '密码';