Re: Re: interval question - Mailing list pgsql-general

From Fernando P. Schapachnik
Subject Re: Re: interval question
Date
Msg-id 200103061228.f26CS1Z00578@funes.schapachnik.com.ar
Whole thread Raw
In response to Re: interval question  ("Stefan Waidele jun." <St.Waidele.jun@Krone-Neuenburg.de>)
List 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 by date:

Previous
From: dev@archonet.com
Date:
Subject: Re: interval question
Next
From: "Paulo Parola"
Date:
Subject: Reliable and up-to-date PostgreSQL virtual hosting suggestions