You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update pg_user_mapping set umuser = 'postgres'::regrole where umuser = 'supabase_admin'::regrole;
490
+
foreach obj in array user_mappings
491
+
loop
492
+
execute(format('drop user mapping for %I server %I', case when obj->>'role' = 'postgres' then 'supabase_admin' else 'postgres' end, obj->>'server'));
493
+
end loop;
494
+
foreach obj in array user_mappings
495
+
loop
496
+
execute(format('create user mapping for %I server %I', obj->>'role', obj->>'server'));
497
+
update pg_user_mapping set umoptions = (obj->>'options')::text[] where umuser = (obj->>'role')::regrole and umserver = (select oid from pg_foreign_server where srvname = obj->>'server');
498
+
end loop;
480
499
481
500
-- init privs
482
501
foreach obj in array init_privs
483
502
loop
503
+
-- We need to modify system catalog directly here because there's no ALTER INIT PRIVILEGES.
484
504
update pg_init_privs set initprivs = (obj->>'initprivs')::aclitem[] where objoid = (obj->>'objoid')::oid and classoid = (obj->>'classoid')::oid;
0 commit comments