我是 PostgreSQL 的新手。
我正在尝试创建一个新角色pgdba
,如下所示...
localhost.localdomain:[/home/postgres]createuser -d -i -l -P -r -s pgdba
new role's password : pgdba
retype password : pgdba
password : postgres
localhost.localdomain:[/home/postgres]psql
Password: postgres
psql (9.0.1)
Type "help" for help.
postgres=# select * from pg_shadow;
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig
----------+----------+-------------+----------+-----------+-------------------------------------+----------+-----------
postgres | 10 | t | t | t | md53175bce1d3201d16594cebf9d7eb3f9d | |
pgdba | 16385 | t | t | t | md53cd688326933adcdedd77097c95d131d | |
(2 rows)
postgres=# \q
localhost.localdomain:[/home/postgres]psql -U pgdba
Password for user pgdba: pgdba
FATAL: database "pgdba" does not exist
psql: FATAL: database "pgdba" does not exist
我究竟做错了什么?