\set v random(1,1000000)

SELECT * FROM hashp WHERE a = :v;
