postgresql创建用户

(1)内部命令create user 用户名 with superuser password '密码';   

          先进入数据库后用命令h create user 查看帮助
 
 
with后面是一些参数。superuser 是指定创建超级用户。createdb 指新用户有创建数据库的权限 password 是指定密码。
 
 (2)外部shell命令: createuser 用户名  -s  -P '密码'
在linux命令行使用命令创建。在shell中用命令createuser --help查看帮助 
 
-s 是指成为超级用户,-P(大定)是指定密码
 
天街小雨润如酥,草色遥看近却无 最是一年春好处,绝胜烟柳满皇都
原文地址:https://www.cnblogs.com/jmlovepython/p/4753216.html