Re: interval question

Поиск
Список
Период
Сортировка
От Stefan Waidele jun.
Тема Re: interval question
Дата
Msg-id 5.0.2.1.0.20010306083058.025d4640@imap.Krone-Neuenburg.de
обсуждение исходный текст
Ответ на interval question  ("Fernando P. Schapachnik" <fernando@schapachnik.com.ar>)
Ответы Re: Re: interval question
Список pgsql-general
At 21:59 05.03.2001 -0300, Fernando P. Schapachnik wrote:
>[...]
>         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?

Yes, maybe...

'0:00'+start <= '0:00'+now <= start+duration

It is not really beautiful, and I have not tested it, but if it works: The
are no awards for beauty, are there?

Stefan


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

Предыдущее
От: Renaud Tthonnart
Дата:
Сообщение: Re: libpq++ : Disconnect a DB
Следующее
От: dev@archonet.com
Дата:
Сообщение: Re: remote dumping of databases