> I to return a sequential row number beginning at 1?
> 
> i.e.
> 
> row|         timestamp
> ---+----------------------------
> 1   2004-02-01 23:15:00.824-05
> 2   2004-02-01 23:15:01.824-05
> 3   2004-02-01 23:15:02.824-05
> ...
> 
> My reason for wanting row numbers is so I can use a 'MOD(row_number, 
> n)' to get the nth row from the table.


Doesn't LIMIT and OFFSET do the job?
http://www.postgresql.org/docs/7.3/interactive/queries-limit.html


Bye, Chris.



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to