amazon-redshift-utils
amazon-redshift-utils copied to clipboard
v_generate_user_grant_revoke_ddl creates invalid statement.
The output of the v_generate_user_grant_revoke_ddl creates invalid statement because it quotes the object.
ALTER DEFAULT PRIVILEGES for user testuser in schema testschema REVOKE ALL on "tables" FROM testone; ALTER DEFAULT PRIVILEGES for user testuser in schema testschema1 REVOKE ALL on "procedures" FROM testone; ALTER DEFAULT PRIVILEGES for user testuser in schema testschema1 REVOKE ALL on "functions" FROM testone;
The expected output should be objects (tables,procedures,functions) without quotes as below.
ALTER DEFAULT PRIVILEGES for user testuser in schema testschema REVOKE ALL on tables FROM testone; ALTER DEFAULT PRIVILEGES for user testuser in schema testschema1 REVOKE ALL on procedures FROM testone; ALTER DEFAULT PRIVILEGES for user testuser in schema testschema1 REVOKE ALL on functions FROM testone;