简体   繁体   English

将整个模式的 alter table 授予 redshift 中的一个组

[英]Grant alter table on an entire schema to a group in redshift

I think I'm missing something when it comes to grant alter table.我认为在授予 alter table 时我遗漏了一些东西。 I'm looking at the AWS docs我正在查看 AWS 文档

https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html

And they say I can grant alter table to a role.他们说我可以将 alter table 授予角色。 I've tried running grant alter table to user but that gives me SQL Error [0LP01]: ERROR: Grant/Revoke system privilege on User is not supported.我试过grant alter table to user但这给了我SQL Error [0LP01]: ERROR: Grant/Revoke system privilege on User is not supported. . . So, I'm confused on what exactly a role in redshift is and how it works.因此,我对 redshift 中的确切角色及其工作原理感到困惑。 Using rows, could I grant a group of people alter table permissions on a single schema?使用行,我可以授予一组人对单个模式的更改表权限吗?

I think you are being crossed up by the fact the GRANT ALTER is for external datalake objects only.我认为您被 GRANT ALTER 仅适用于外部数据湖对象这一事实所困扰。 It has to do with modifying the external datastore and isn't meant for normal Redshift tables.它与修改外部数据存储有关,不适用于普通的 Redshift 表。

If memory serves the ability to ALTER a normal table is linked with DROP permission.如果 memory 提供 ALTER 正常表的功能,则与 DROP 权限相关联。 Otherwise it is linked to table ownership.否则,它与表所有权相关联。

You can grant "ALTER TABLE" in this way.您可以通过这种方式授予“ALTER TABLE”。

create role testingaltertablerole;
create user testingaltertableuser with password disable;

grant alter table to role testingaltertablerole;

grant role testingaltertablerole to testingaltertableuser;

At the moment, there's no way to grant this permission for a single table, AFAIK.目前,无法为单个表授予此权限,AFAIK。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM