From: Oliver Elphick <olly@lfix.co.uk>
To: pgsql-sql@postgresql.org
Subject: Re: Format interval as hours/minutes etc
Date: Mon, 17 Sep 2007 13:13:35 +0100
Message-ID: <1190031215.11172.374.camel@linda.lfix.co.uk> (raw)
In-Reply-To: <46ED5DBF.1030303@Sheeky.Biz>
References: <200709161300.53257.andreak@officenet.no>
<20070916111427.GA13886@KanotixBox>
<200709161327.16989.andreak@officenet.no>
<46ED5DBF.1030303@Sheeky.Biz>
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@lfix.co.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: olly@lfix.co.uk
Subject: Re: Format interval as hours/minutes etc
In-Reply-To: <1190031215.11172.374.camel@linda.lfix.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox