SET synchronous_commit TO off;

do $$
begin
  for i in 1..100000 loop
    execute 'create table pol' || i || ' (f1 int primary key, f2 text)';
    execute 'create table tst' || i || ' (f1 int primary key, f2 text)';
  end loop;
end $$;

do $$
begin
  for i in 1..100000 loop
	for j in 1..100 loop
	  execute 'create policy example' || j || ' on pol' || i || ' for select to ' || current_user;
	end loop;
  end loop;
end $$;
