From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hannu Krosing <hannu@skype.net>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: Milen A. Radev <milen@radev.net>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [SQL] Interval subtracting
Date: Wed, 01 Mar 2006 15:35:28 -0500
Message-ID: <14928.1141245328@sss.pgh.pa.us> (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 <hannu@skype.net> writes:
> 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'.
Sure, but if you want to represent that then you don't pass the value
through justify_days(). The entire premise of justify_days() is that
1 month is interchangeable with 30 days and we should try to make the
value "look nice" given that assumption.
I think everyone's independently arrived at the same thought that
justify_days should not produce a result with different signs for month
and day (except for the case with month = 0, per my last message).
regards, tom lane
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, hannu@skype.net, pgman@candle.pha.pa.us, sszabo@megazone.bigpanda.com, milen@radev.net, pgsql-hackers@postgresql.org
Subject: Re: [SQL] Interval subtracting
In-Reply-To: <14928.1141245328@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