interval question

Поиск
Список
Период
Сортировка
От Fernando P. Schapachnik
Тема interval question
Дата
Msg-id 200103060059.f260xeT01461@funes.schapachnik.com.ar
обсуждение исходный текст
Ответы Re: interval question
Re: interval question
Re: interval question
Список pgsql-general
Hello:
    Maybe somebody on the list can give me a hand with this. I
have:

id serial,
start time,
duration time

    (That is, ids have an start time and a duration).

    I want to know which ids are current, ie, which satisfy
start<=now<=start+duration.

    The problem is that start+duration is an interval, and I
can't find the way to cast now to interval or interval to time or
tinterval in order to make the comparison.

    Any ideas?

    Thanks in advance.

Fernando P. Schapachnik
fernando@schapachnik.com.ar

В списке pgsql-general по дате отправления:

Предыдущее
От: Boulat Khakimov
Дата:
Сообщение: Re: Getting lengths of variable fields
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: List of all system tables.