pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Dilger <pgsql@markdilger.com>
To: Hannu Krosing <hannu@skype.net>
Subject: Re: [SQL] Interval subtracting
Date: Wed, 01 Mar 2006 12:46:12 -0800
Message-ID: <44060814.8030604@markdilger.com> (raw)
In-Reply-To: <1141244920.3737.10.camel@localhost.localdomain>
References: <200603012018.k21KIhi22006@candle.pha.pa.us>
	<1141244920.3737.10.camel@localhost.localdomain>

Hannu Krosing wrote:
> But unfortunately '2 mons -1 days' <> '1 mons 29 days'
> 
> If I want something to happen 1 day less than two months from dome date,
> then the only way to say that consistently *is* '2 mons -1 days'.

Correct me if I am wrong, but I thought that justify_days would only be called 
if the user wanted it.  I get the following behavior in psql even after the 
patch is applied:

select '2 mons -1 days'::interval;
     interval
----------------
  2 mons -1 days


So there does not seem to be any justification going on without the user's 
permission.  Consequently, if you need '2 mons -1 days', don't call justify_days.

Am I missing something?

mark



view thread (62+ messages)  latest in thread

Message-ID: <44060814.8030604@markdilger.com>
Permalink:  ../44060814.8030604@markdilger.com/
Also on:    postgresql.org/message-id/44060814.8030604@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, hannu@skype.net
  Subject: Re: [SQL] Interval subtracting
  In-Reply-To: <44060814.8030604@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