Re: [BUGS] BUG #14632: Plus and minus operators inconsistency withleap years and year intervals. - Mailing list pgsql-bugs

From Marko Tiikkaja
Subject Re: [BUGS] BUG #14632: Plus and minus operators inconsistency withleap years and year intervals.
Date
Msg-id CAL9smLD5ARjoWon=YgJCXKD-Dc9cCPXOhNRQYxu_J-4ivPeuPw@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.  (Pietro Pugni <pietro.pugni@gmail.com>)
Responses Re: [BUGS] BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.
List pgsql-bugs
On Thu, Apr 27, 2017 at 1:01 AM, Pietro Pugni <pietro.pugni@gmail.com> wrote:
Expect 1912-02-28 is a correct response.  The only reason you think the 29th comes into play here is because you remember that the starting point was the 29th.  The system has no such memory.
And this is logically wrong because it leads to wrong results. I’m aware that time intervals are difficult to manage but more exactness is needed here: '10 years' must have the same meaning when added to a date and subtracted from it, otherwise it leads to wrong results. 

Your suggestion just moves the wrong results to another use case; see my response upthread.  There is no objectively correct answer here, like you seem to think.


.m

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [BUGS] BUG #14632: Plus and minus operators inconsistency withleap years and year intervals.
Next
From: Michael Paquier
Date:
Subject: Re: [BUGS] Concurrent ALTER SEQUENCE RESTART Regression