Re: BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Pietro Pugni <pietro(dot)pugni(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs\(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.
Date: 2017-04-27 10:00:26
Message-ID: 8760hqur29.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "Pietro" == Pietro Pugni <pietro(dot)pugni(at)gmail(dot)com> writes:

Pietro> The whole point (for leap years) is:

Pietro> - inconsistency (adding and subtracting the same quantity to a
Pietro> date should provide the date itself, but it doesn't);

It should be obvious that this is mathematically impossible; a function
from a larger set (the 366 days of a leap year) to a smaller one (the
365 days of a common year) cannot have an inverse.

--
Andrew (irc:RhodiumToad)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Roy Brokvam 2017-04-27 10:29:50 Meaning of pg_constraint.conindid for foreign keys
Previous Message Andres Freund 2017-04-27 07:10:09 Re: Concurrent ALTER SEQUENCE RESTART Regression