Jim Nasby <decibel(at)decibel(dot)org> writes:
> Are you sure the case statements are needed? It seems it would be
> better to just punt to the behavior of generate_series (esp. if
> generate_series eventually learns how to count backwards).
What's this "eventually"?
regression=# select * from generate_series(10,1,-1);
generate_series
-----------------
10
9
8
7
6
5
4
3
2
1
(10 rows)
regards, tom lane