PostgreSQL – 在授予特权时,关系不存在错误

我用sudo进入了postgres控制台并做了这个:
create user uu with password 'uu';    
create database u_db owner uu;   
grant all privileges on u_db to uu;

错误:关系u_db不存在.

您必须在此处使用关键字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授予额外的权利.

相关文章

项目需要,有个数据需要导入,拿到手一开始以为是mysql,结果...
本文小编为大家详细介绍“怎么查看PostgreSQL数据库中所有表...
错误现象问题原因这是在远程连接时pg_hba.conf文件没有配置正...
因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本...
wamp 环境 这个提示就是说你的版本低于10了。 先打印ph...
psycopg2.OperationalError: SSL SYSCALL error: EOF detect...