39 system(sprintf("PGSERVICE=%s psql -c 'delete from docperm where upacl=0 and unacl=0;update docperm set cacl=0 where cacl != 0;'", escapeshellarg($pgservice_freedom)));
41if ($big) system(sprintf("PGSERVICE=%s psql -c 'DROP INDEX groups_idx2;DROP INDEX groups_idx1;'", escapeshellarg($pgservice_freedom)));
42 system(sprintf("PGSERVICE=%s psql -c 'delete from groups;delete from docperm where upacl=0 and unacl=0;update docperm set cacl=0 where cacl != 0;'", escapeshellarg($pgservice_freedom)));
43 system(sprintf("PGSERVICE=%s pg_dump -a --disable-triggers -t groups | PGSERVICE=%s psql", escapeshellarg($pgservice_core) , escapeshellarg($pgservice_freedom)));
44
45if ($big) system(sprintf("PGSERVICE=%s psql -c 'CREATE unique INDEX groups_idx2 on groups(iduser,idgroup);CREATE INDEX groups_idx1 on groups(iduser);'", escapeshellarg($pgservice_freedom)));
46 }
47
48 system("PGSERVICE=\"$pgservice_core\" psql -c 'DELETE FROM permission WHERE computed = TRUE;'");