我正在运行PostgreSQL 9.3.1 . 我有 test
数据库和 backup
用户,用于备份数据库 . 我对授予所有当前表的权限没有任何问题,但每次将新表添加到模式时都必须授予权限 .
createdb test
psql test
test=# create table foo();
CREATE TABLE
test=# grant all on all tables in schema public to backup;
GRANT
test=# create table bar();
CREATE TABLE
psql -U backup test
test=> select * from foo;
test=> select * from bar;
ERROR: permission denied for relation bar
是否可以授予对将来创建的表的访问权限,而无需创建表的用户所有者?
1 回答
看起来解决方案是更改
backup
用户的默认权限: