Search code examples
sqlpermissionsamazon-redshiftdatabase-administration

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. I'm looking at the AWS docs

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

And they say I can grant alter table to a role. 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.. So, I'm confused on what exactly a role in redshift is and how it works. Using rows, could I grant a group of people alter table permissions on a single schema?


Solution

  • You can grant "ALTER TABLE" in this way.

    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.