\set seed random(1, 1000000000000000000)
\set i0 pr_perm(0, 2, :default_seed + :seed)
\set i1 pr_perm(1, 2, :default_seed + :seed)
INSERT INTO perm_count AS pc (perm)
  VALUES (:i0 + :i1*10)
  ON CONFLICT (perm) DO UPDATE SET cnt = pc.cnt+1; 
