Re: Re: interval question

Поиск
Список
Период
Сортировка
От Fernando P. Schapachnik
Тема Re: Re: interval question
Дата
Msg-id 200103061228.f26CS1Z00578@funes.schapachnik.com.ar
обсуждение исходный текст
Ответ на Re: interval question  ("Stefan Waidele jun." <St.Waidele.jun@Krone-Neuenburg.de>)
Список pgsql-general
En un mensaje anterior Stefan Waidele jun. escribió:
> 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

When I do:

select * from table where '0:00'::time+'now'<=start+duration

I lost conection to the backend. Why?


Fernando P. Schapachnik
fernando@schapachnik.com.ar

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

Предыдущее
От: dev@archonet.com
Дата:
Сообщение: Re: interval question
Следующее
От: "Paulo Parola"
Дата:
Сообщение: Reliable and up-to-date PostgreSQL virtual hosting suggestions