Skip to content

Commit eea5ee0

Browse files
committed
fix: account for public grantee
1 parent b3d2228 commit eea5ee0

File tree

1 file changed

+2
-1
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+2
-1
lines changed

Diff for: ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ begin
356356
end
357357
, case when rec.grantee = 'postgres'::regrole then 'supabase_admin'
358358
when rec.grantee = 'supabase_admin'::regrole then 'postgres'
359+
when rec.grantee = 0 then 'public'
359360
else rec.grantee::regrole
360361
end
361362
));
@@ -382,7 +383,7 @@ begin
382383
when obj->>'objtype' = 'T' then 'types'
383384
when obj->>'objtype' = 'n' then 'schemas'
384385
end
385-
, rec.grantee::regrole
386+
, case when rec.grantee = 0 then 'public' else rec.grantee::regrole end
386387
, case when rec.is_grantable then 'with grant option' else '' end
387388
));
388389
end if;

0 commit comments

Comments
 (0)