Skip to content

Commit fed2cff

Browse files
committed
fix: prevent public from being casted into regrole
1 parent aff70a8 commit fed2cff

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ begin
357357
, case when rec.grantee = 'postgres'::regrole then 'supabase_admin'
358358
when rec.grantee = 'supabase_admin'::regrole then 'postgres'
359359
when rec.grantee = 0 then 'public'
360-
else rec.grantee::regrole
360+
else rec.grantee::regrole::text
361361
end
362362
));
363363
end if;
@@ -383,7 +383,7 @@ begin
383383
when obj->>'objtype' = 'T' then 'types'
384384
when obj->>'objtype' = 'n' then 'schemas'
385385
end
386-
, case when rec.grantee = 0 then 'public' else rec.grantee::regrole end
386+
, case when rec.grantee = 0 then 'public' else rec.grantee::regrole::text end
387387
, case when rec.is_grantable then 'with grant option' else '' end
388388
));
389389
end if;

0 commit comments

Comments
 (0)