1.用户及密码的创建.
me=# create user you with password 'password123';
CREATE ROLE
me=# \du
角色列表
角色名称 | 属性 | 成员属于
----------+-------------------------------------------+----------
me | Systemuser +| {}
| 密码有效直至2018-03-05 11:25:42.801458+08 |
syssao | Systemuser +| {}
| 密码有效直至2018-03-05 11:25:42.801543+08 |
syssso | Systemuser +| {}
| 密码有效直至2018-03-05 11:25:42.801568+08 |
you | 密码有效直至2018-03-06 11:49:03.321253+08 | {}
me=# select *from pg_shadow;
usename | usesysid | usecreatedb | usesuper | usecatupd | userepl | passwd | valuntil | useconfig
---------+----------+-------------+----------+-----------+---------+----------------------------------------------+------------------------+-----------
syssao | 12 | f | t | t | f | sha11cebd1cb26194927bfb38474ce6c9c161bda62c9 | 2018-03-05 11:25:42+08 |
me | 10 | t | t | f | t | sha1612356b5c7c51b2cb0adb9c83519add1f923d4ed | 2018-03-05 11:25:42+08 |
you | 16392 | f | f | f | f | sha1d6641d7d9b98c050a48945da8b5070e291020c0c | 2018-03-06 11:49:03+08 |
syssso | 13 | f | t | t | f | sha1729219c98f147f71db80532f4ad6f84b04d95127 | 2018-03-05 11:25:42+08 |
(4 行记录)
说明:passwd: sha1 hash加密格式,md5 加密格式.
pg_shadow显示pg_authid中所有被标记为rolcanlogin的角色的属性</