title: Generate series like from 0001 to something in postgres
body: <p>I want to generate numbers from the a min to a max number. I have an inbuilt function in postgres generate_series(int,int) that can easily do that. My problem is that am working with a text field because i would like to capture values like 0001. If there is no other inbuilt function that can keep this format, i would then want to extract the preceeding zeroes then append them to the function generate_series(int, int). Any solution regarding this will be appreciated.</p>