We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a20649a commit ee4ad71Copy full SHA for ee4ad71
ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh
@@ -391,8 +391,15 @@ begin
391
execute(format(
392
'grant %I to postgres %s granted by %I;',
393
rec.roleid::regrole,
394
- case when rec.admin_option then 'with admin option' else '' end,
395
- rec.grantor::regrole
+ case
+ when rec.admin_option then 'with admin option'
396
+ else ''
397
+ end,
398
399
+ when rec.grantor = 'postgres'::regrole then 'supabase_admin'
400
+ when rec.grantor = 'supabase_admin'::regrole then 'postgres'
401
+ else rec.grantor::regrole
402
+ end
403
));
404
end loop;
405
0 commit comments