supabase-postgres.git / summary / log / commit / refs
commit eea5ee0ff3d00fa3008a82fce2911b529c272265
Author: Bobbie Soedirgo <bobbie@soedirgo.dev>
Commit: Bobbie Soedirgo <31685197+soedirgo@users.noreply.github.com>
Date: Thu Sep 26 12:53:44 2024 +0000
fix: account for `public` grantee
ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh b/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh
index e978b2a5..4c776844 100755
--- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh
+++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh
@@ -356,6 +356,7 @@ begin
end
, case when rec.grantee = 'postgres'::regrole then 'supabase_admin'
when rec.grantee = 'supabase_admin'::regrole then 'postgres'
+ when rec.grantee = 0 then 'public'
else rec.grantee::regrole
end
));
@@ -382,7 +383,7 @@ begin
when obj->>'objtype' = 'T' then 'types'
when obj->>'objtype' = 'n' then 'schemas'
end
- , rec.grantee::regrole
+ , case when rec.grantee = 0 then 'public' else rec.grantee::regrole end
, case when rec.is_grantable then 'with grant option' else '' end
));
end if;
[parent: b3d22287aeb4]