  Let $V$ be a valuation ring of a global field $K$. We show that for all
positive integers $k$ and $1 < n_1 \leq \ldots \leq n_k$ there exists an
integer-valued polynomial on $V$, that is, an element of $\text{Int}(V) = \{ f
\in K[X] \mid f(V) \subseteq V \}$, which has precisely $k$ essentially
different factorizations into irreducible elements of $\text{Int}(V)$ whose
lengths are exactly $n_1,\ldots,n_k$. In fact, we show more, namely that the
same result holds true for every discrete valuation domain $V$ with finite
residue field such that the quotient field of $V$ admits a valuation ring
independent of $V$ whose maximal ideal is principal or whose residue field is
finite. If the quotient field of $V$ is a purely transcendental extension of an
arbitrary field, this property is satisfied. This solves an open problem
proposed by Cahen, Fontana, Frisch and Glaz in these cases.
