pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <pgsql@markdilger.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [SQL] Interval subtracting
Date: Wed, 01 Mar 2006 16:11:09 -0500
Message-ID: <15320.1141247469@sss.pgh.pa.us> (raw)
In-Reply-To: <44060C42.50905@markdilger.com>
References: <200603012013.k21KDFM21139@candle.pha.pa.us>
	<14834.1141244891@sss.pgh.pa.us>
	<44060682.9020505@markdilger.com>
	<15150.1141246521@sss.pgh.pa.us>
	<44060C42.50905@markdilger.com>

Mark Dilger <pgsql@markdilger.com> writes:
> The current code (without the patch) behaves as follows:

>    select justify_days(justify_hours('1 month 95 days -36:00:00'::interval));
>          justify_days
>    -------------------------
>     4 mons 4 days -12:00:00

So?  If we liked the current behavior we wouldn't be discussing a patch...

My thought is that justify_hours should reduce that input to
'1 month 93 days 12:00:00' and then justify_days would produce
'4 months 3 days 12:00:00'.

			regards, tom lane



view thread (62+ messages)  latest in thread

Message-ID: <15320.1141247469@sss.pgh.pa.us>
Permalink:  ../15320.1141247469@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15320.1141247469@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, pgsql@markdilger.com, pgman@candle.pha.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] Interval subtracting
  In-Reply-To: <15320.1141247469@sss.pgh.pa.us>

* 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