tinterval or interval - Mailing list pgsql-novice

From Mike Castle
Subject tinterval or interval
Date
Msg-id 20001124114308.A24717@thune.mrc-home.org
Whole thread Raw
Responses Re: tinterval or interval
List pgsql-novice
I'm working on a scheduler, and my first inclination was to use tinterval
(since I happen to have data available in YYYY-MM-DD HH:MM-HH:MM anyway).

After some trial and error, I've finally discovered the && overlap operator
(it's mentioned in the regression tests but not in the manual), which I
need.

However, I also need to know how long a tinterval is.  The | is nice for
getting the start time in a tinterval, but I can't figure out how to get
the stop time, or an interval out of tinterval.  Is there a way?

Barring that, how could I efficiently use a timestamp/interval pair to
prevent overlaps (better, overlaps are ok if a certain resource is shared).

It seems that tinterval is deprecated, but it comes very close to fitting my
needs.

mrc
--
       Mike Castle       Life is like a clock:  You can work constantly
  dalgoda@ix.netcom.com  and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day.  -- mrc
    We are all of us living in the shadow of Manhattan.  -- Watchmen

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Skipping numbers in a sequence.
Next
From: Mike Castle
Date:
Subject: Re: tinterval or interval