Re: returning row numbers in select - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: returning row numbers in select
Date
Msg-id 20040310231840.GA10056@wolff.to
Whole thread Raw
In response to Re: returning row numbers in select  (Randall Skelton <skelton@brutus.uwaterloo.ca>)
List pgsql-general
On Wed, Mar 10, 2004 at 17:25:49 -0500,
  Randall Skelton <skelton@brutus.uwaterloo.ca> wrote:
>
> That would be ideal as it is theoretically possible for there to be
> missing rows due to sampling errors; nevertheless, a WHERE test doesn't
> seem obvious to me.  Can you please post an example?  The time spacing
> between rows is 1 second but I want my select statement to return rows
> every 5 seconds (see marked lines below).  I've tried various interval
> operations but I don't really understand how to relate the timestamp
> and and the interval.

You could extract seconds from timestamp, cast to integer and apply
the mod function and test against whichever remainder you want.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: returning row numbers in select
Next
From: "Alexander Hachmann"
Date:
Subject: Mails not taken by List