Controlling, regulating pressure or flow by means of a valve by-passing a pump