\set i random(1, 8)
\set j random(1, 8)
BEGIN;
  UPDATE deadlocks
    SET val = val + 1
    WHERE id = :i;
  UPDATE deadlocks
    SET val = val - 1
    WHERE id = :j;
END;
