Use (controlled!) recursivity:
with recursive v as ( select id, min val, max from a union select id, val + 1, max from v where val < max ) select id, val from v;
See it running live.