6
我進入Postgres的控制檯使用sudo,這樣做,當關系犯規存在錯誤。PostgreSQL的授予特權時
我進入Postgres的控制檯使用sudo,這樣做,當關系犯規存在錯誤。PostgreSQL的授予特權時
您必須在此處使用關鍵字DATABASE
進行授予。所以我發佈你psql的輸出:
postgres=# create user uu with password 'uu';
CREATE ROLE
postgres=# create database u_db owner uu;
CREATE DATABASE
postgres=# grant all privileges on u_db to uu;
FEHLER: Relation »u_db« existiert nicht
postgres=# grant all privileges on database u_db to uu;
GRANT
不過。恕我直言,通過數據庫的所有者設置,你不需要授予用戶uu
的額外權利。
'授予DATABASE u_db所有權限給uu;'([更多信息](http://www.postgresql.org/docs/current/static/sql-grant.html)) –