From: | Mike Castle <dalgoda(at)ix(dot)netcom(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | tinterval or interval |
Date: | 2000-11-24 17:43:09 |
Message-ID: | 20001124114308.A24717@thune.mrc-home.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)ix(dot)netcom(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Castle | 2000-11-24 18:47:38 | Re: tinterval or interval |
Previous Message | Tom Lane | 2000-11-24 17:08:09 | Re: Skipping numbers in a sequence. |