redshift其实是基于Postgres8的
所以以下操作用psql命令行就可以完成,在AWS上反而会报cannot use commit while connection is in auto-commit mode
错
revoke create on schema public from public;
create user t_viewer with password 'xxxxx';
create group data_viewers;
alter group data_viewers add user t_viewer;
grant select on all tables in schema public to group data_viewers;
alter default privileges in schema public grant select on tables to group data_viewers;
:::tips alter default privileges 使往后创建的表默认有select权限 :::
关键是需要revoke create on schema public from public,因为