Skip to content

Commit 614d2d7

Browse files
committed
test
1 parent 28e8c00 commit 614d2d7

File tree

1 file changed

+10
-0
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+10
-0
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,17 @@ begin
504504
else rec.grantee::regrole
505505
end
506506
));
507+
end if;
508+
end loop;
509+
end loop;
507510
511+
foreach obj in array default_acls
512+
loop
513+
for rec in
514+
select grantor, grantee, privilege_type, is_grantable
515+
from aclexplode((obj->>'acl')::aclitem[])
516+
loop
517+
if obj->>'role' in ('postgres', 'supabase_admin') or rec.grantee::regrole in ('postgres', 'supabase_admin') then
508518
execute(format('alter default privileges for role %I %s grant %s on %s to %I %s'
509519
, obj->>'role'
510520
, case when obj->>'schema' is null then ''

0 commit comments

Comments
 (0)