Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
soedirgo committed Aug 8, 2024
1 parent 8706723 commit 2f1ef5c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -546,16 +546,16 @@ begin
execute(format('revoke %s on schema %s from %I', rec.privilege_type, (obj->>'oid')::regnamespace, case when rec.grantee = 'postgres'::regrole then 'supabase_admin' else 'postgres' end));
end loop;
end loop;
foreach obj in array schemas
loop
for rec in
select grantor, grantee, privilege_type, is_grantable
from aclexplode((obj->>'acl')::aclitem[])
where grantee::regrole in ('postgres', 'supabase_admin')
loop
execute(format('grant %s on schema %s to %I', rec.privilege_type, (obj->>'oid')::regnamespace, rec.grantee::regrole));
end loop;
end loop;
-- foreach obj in array schemas
-- loop
-- for rec in
-- select grantor, grantee, privilege_type, is_grantable
-- from aclexplode((obj->>'acl')::aclitem[])
-- where grantee::regrole in ('postgres', 'supabase_admin')
-- loop
-- execute(format('grant %s on schema %s to %I', rec.privilege_type, (obj->>'oid')::regnamespace, rec.grantee::regrole));
-- end loop;
-- end loop;
-- types
foreach obj in array types
Expand Down

0 comments on commit 2f1ef5c

Please sign in to comment.