我想設置一個玩具數據庫,我可以隨意創建和銷燬。我不想使用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) –