You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -547,6 +547,7 @@ begin
547
547
from aclexplode((obj->>'acl')::aclitem[])
548
548
where grantee = 'postgres'::regrole
549
549
loop
550
+
execute(format('revoke all on schema %s from supabase_admin', (obj->>'oid')::regnamespace));
550
551
execute(format('grant %s on schema %s to postgres %s', rec.privilege_type, (obj->>'oid')::regnamespace, case when rec.is_grantable then 'with grant option' else '' end));
551
552
end loop;
552
553
end loop;
@@ -562,6 +563,7 @@ begin
562
563
from aclexplode((obj->>'acl')::aclitem[])
563
564
where grantee = 'postgres'::regrole
564
565
loop
566
+
execute(format('revoke all on type %s from supabase_admin', (obj->>'oid')::regtype));
565
567
execute(format('grant %s on type %s to postgres %s', rec.privilege_type, (obj->>'oid')::regtype, case when rec.is_grantable then 'with grant option' else '' end));
566
568
end loop;
567
569
end loop;
@@ -577,6 +579,7 @@ begin
577
579
from aclexplode((obj->>'acl')::aclitem[])
578
580
where grantee = 'postgres'::regrole
579
581
loop
582
+
execute(format('revoke all on function %s(%s) from supabase_admin', (obj->>'oid')::regproc, pg_get_function_identity_arguments((obj->>'oid')::regproc)));
580
583
execute(format('grant %s on function %s(%s) to postgres %s', rec.privilege_type, (obj->>'oid')::regproc, pg_get_function_identity_arguments((obj->>'oid')::regproc), case when rec.is_grantable then 'with grant option' else '' end));
581
584
end loop;
582
585
end loop;
@@ -594,6 +597,7 @@ begin
594
597
from aclexplode((obj->>'acl')::aclitem[])
595
598
where grantee = 'postgres'::regrole
596
599
loop
600
+
execute(format('revoke all on table %s from supabase_admin', (obj->>'oid')::oid::regclass));
597
601
execute(format('grant %s on table %s to postgres %s', rec.privilege_type, (obj->>'oid')::oid::regclass, case when rec.is_grantable then 'with grant option' else '' end));
0 commit comments