Встроенные функции

generate_series()

generate_series()
select
    *
from
    generate_series(1, 10) as f(x);
x
---
  1
...
 10