我想设置一个玩具数据库,我可以随意创建和销毁。我不想使用postgres
用户以防我破坏重要的东西。我做了以下内容:psql:致命:角色“斯蒂芬”不存在
$ psql -h localhost -U postgres
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+-----------------------------------+-----------
postgres | Superuser, Create role, Create DB | {}
postgres=# create user Stephen createdb;
CREATE ROLE
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+-----------------------------------+-----------
postgres | Superuser, Create role, Create DB | {}
stephen | Create DB | {}
postgres=# ^D\q
后来,当我尝试连接,我收到以下错误:
$ psql -h localhost
psql: FATAL: role "Stephen" does not exist
$ psql -h localhost -U Stephen
psql: FATAL: role "Stephen" does not exist
这是没有意义的我。我可以看到用户,斯蒂芬,但它不会让我使用它。我错过了什么?
我在OS X Lion上使用psql 9.0.10。
[您可能想查阅关于此事的优秀手册。](http://www.postgresql.org/docs/current/interactive/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS) –