Imitate "generate_series"

Hello there,

I want to imitate the behaviour of “generate_series” from psql.
My table contains an integer value “count”.
I want to output each line as often as “count”. In psql this can be done via the “generate_series” function.
How to reproduce this behaviour in plain sql?

regards
Muffex

Hey everyone.

Over at stackoverflow someone came up with one possible solution.

If somebody has an (even) better approach. Please let me know.

regards
Muffex