From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Format interval as hours/minutes etc |
Date: | 2007-09-17 12:13:35 |
Message-ID: | 1190031215.11172.374.camel@linda.lfix.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, 2007-09-17 at 02:15 +0930, Shane Ambler wrote:
> I get the idea you want the interval to be expressed as 2,765 days and
> 23 hours or 66,383 hours, which I think would be useful (more so for
> shorter intervals).
>
> I am thinking the exact function you are after isn't there - from what I
> can find a larger interval is always given as x years y months z days...
> which is why extracting the epoch is the easiest point to start your calcs.
>
> Maybe this can be a feature request - functions to give an interval in
> total number of days/hours/minutes instead of years months days
Doesn't the SQL standard allow one to define intervals as YEAR TO MONTH,
DAY TO HOUR, HOUR TO SECOND and so on? This sets both the greatest unit
to report and the resolution. (YEAR/MONTH cannot be mixed with other
types because of the uncertainty of month lengths.)
Is there any plan to support that?
--
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
Do you want to know God? http://www.lfix.co.uk/knowing_god.html
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2007-09-17 14:43:24 | Re: Extracting hostname from URI column |
Previous Message | hubert depesz lubaczewski | 2007-09-17 07:25:41 | Re: Optimize querry sql |