awslabs / amazon-redshift-utils

Amazon Redshift Utils contains utilities, scripts and view which are useful in a Redshift environment
Apache License 2.0
2.76k stars 1.25k forks source link

Drop user with altered default privileges. #492

Open gorros opened 4 years ago

gorros commented 4 years ago

I am trying to user v_generate_user_grant_revoke_ddl to change user ownership and drop user. But I am having issues with default acl. Suggested step does not handle that case select regexp_replace(ddl,grantor,'<superuser>') from v_generate_user_grant_revoke_ddl where grantor='<username>' and ddltype='grant' and objtype <>'default acl' order by objseq,grantseq;

And get this error owner of default privileges on new relations belonging to user

adedotua commented 4 years ago

Are you still having this issue with the latest version of the view? Any chance you can provide a repro?

mfrye-blue-owl commented 4 years ago

I'm getting this too. I'm having trouble tracking down the edits to make to reverse default privileges that were set.

f0o commented 4 years ago

👍 same