1

自由に作成および破棄できるおもちゃのデータベースをセットアップしようとしています。postgres重要なものを破壊した場合に備えて、ユーザーを使用したくありません。私は次のことをしました:

$ 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 を使用しています。

4

2 に答える 2

1

ログインでは大文字と小文字が区別されます。「Stephen」は「stephen」とは異なります。

于 2013-06-27T21:11:58.930 に答える