Re: returning row numbers in select

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: returning row numbers in select
Дата
Msg-id 20040310231840.GA10056@wolff.to
обсуждение исходный текст
Ответ на Re: returning row numbers in select  (Randall Skelton <skelton@brutus.uwaterloo.ca>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: returning row numbers in select
Следующее
От: "Alexander Hachmann"
Дата:
Сообщение: Mails not taken by List