From: Mark Dilger <pgsql@markdilger.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [SQL] Interval subtracting
Date: Wed, 01 Mar 2006 15:49:46 -0800
Message-ID: <4406331A.6080307@markdilger.com> (raw)
In-Reply-To: <200603012326.k21NQOv08610@candle.pha.pa.us>
References: <200603012326.k21NQOv08610@candle.pha.pa.us>
Bruce Momjian wrote:
> Even if we had people do:
>
> justify_hours(justify_days(justify_hours()))
>
> I don't think that would do what we want in all cases. Consider '1 mon
> -1 hour'. That should be '29 days 23 hours' but neither existing
> function, even if modified, will allow us to return that. Only
> something like justify_interval() could do it.
>
justify_days(justify_hours(...)) fixes *everything* in the most recently
submitted patch, regardless of the convoluted case you invent. There is no data
for which it won't work. There is no need for justify_interval(...), except as
syntactic sugar.
Since the backward compatibility argument didn't convince you, then we should go
with the existing patch as-is. Whether we introduce the new function
justify_interval(...) could be treated as a separate question, though I don't
mind putting that in the patch and resubmitting.
mark
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: pgsql@markdilger.com, pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: [SQL] Interval subtracting
In-Reply-To: <4406331A.6080307@markdilger.com>
* 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