SELECT generate_series(1, EXTRACT(day FROM ('2021-02-1 15:36:13.340'::timestamp + interval '1 month - 1 day'))::integer) AS number;