pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Dilger <pgsql@markdilger.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [SQL] Interval subtracting
Date: Wed, 01 Mar 2006 16:02:58 -0800
Message-ID: <44063632.20505@markdilger.com> (raw)
In-Reply-To: <17317.1141257505@sss.pgh.pa.us>
References: <200603012326.k21NQOv08610@candle.pha.pa.us>
	<4406331A.6080307@markdilger.com>
	<17317.1141257505@sss.pgh.pa.us>

Tom Lane wrote:
> Mark Dilger <pgsql@markdilger.com> writes:
> 
>>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.
> 
> 
> If so, one function or the other is cheating.  Per discussion,
> justify_hours must never touch months, and I don't believe that
> justify_days should touch seconds either.  The proposed justify_interval
> function should have a result different from successive application
> of the two existing functions, because it will ensure that all three
> fields have similar signs whereas separate use of the two functions
> can't promise that in corner cases.
> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 

That depends what you mean by cheating.  The justify_hours function looks to see 
what answer justify_days would give, but does not actually change the data.  I 
described this all earlier and I still don't see why there is anything wrong 
with it.

mark



view thread (62+ messages)  latest in thread

Message-ID: <44063632.20505@markdilger.com>
Permalink:  ../44063632.20505@markdilger.com/
Also on:    postgresql.org/message-id/44063632.20505@markdilger.com

 · 

reply

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, tgl@sss.pgh.pa.us
  Subject: Re: [SQL] Interval subtracting
  In-Reply-To: <44063632.20505@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