\set x random(1, 100000) select * from base where k between 1 and 20000 and v = :x