| From: | "Jan Bodey" <jan_bodey(at)hotmail(dot)com> |
|---|---|
| To: | tgl(at)sss(dot)pgh(dot)pa(dot)us |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Date comparison question |
| Date: | 2003-05-20 17:39:50 |
| Message-ID: | Law11-F115BSoqY6FC300037315@hotmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
The problem I have with having the values as type interval, is that I am
restricted by using Torque. I can't work out what Torque type (if any!)
maps to Interval! Your 'float-times-interval' operator may well get me
around that though, although I will not test until tomorrow, high time I
left the office!!
Cheers
Jan.
>
>"Jan Bodey" <jan_bodey(at)hotmail(dot)com> writes:
> > SELECT * FROM utable
> > WHERE now() - utimestamp > interval '10 hours';
>
> > The problem I am having is that the interval is not fixed, and I would
>like
> > to be able to store it as a value in a database table. The unit of the
> > interval can, however, be fixed, and will almost certainly be fixed to
> > hours.
>
>Do you not want to store the values as type interval? That would seem
>like the most straightforward answer. If you really want to store them
>as plain numbers, there's a float-times-interval operator, so you could
>do something like
> ... > table.float8col * interval '1 hour';
>
> regards, tom lane
_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today!
http://www.msn.co.uk/messenger
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2003-05-20 17:47:06 | Re: plpgsql recursion |
| Previous Message | Tom Lane | 2003-05-20 17:36:42 | Re: Date comparison question |