On Jul 13, 2005, at 6:13 PM, Aaron Bingham wrote:

This would be easy (in my case at least) if there were a way to
generate a table containing all integers between 1 and n, where n is
the result of a subquery.  In my case, n will be at most a few
hundred.  I would like to be able to generate this table as a
subquery.  Any ideas?

Take a look at generate_series(), available in v8.0 and above.

http://www.postgresql.org/docs/8.0/interactive/functions-srf.html


Michael Glaesemann
grzm myrealbox com



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to