Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3WBJ-00055k-A3 for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Apr 2017 23:17:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d3WBI-0004Cu-GV for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Apr 2017 23:17:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d3WAb-0002zs-SD for pgsql-bugs@postgresql.org; Wed, 26 Apr 2017 23:16:26 +0000 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d3WAX-0007bT-8T for pgsql-bugs@postgresql.org; Wed, 26 Apr 2017 23:16:24 +0000 Received: by mail-wr0-x230.google.com with SMTP id l9so7918790wre.1 for ; Wed, 26 Apr 2017 16:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=1AG6/xiGc9UTD06F0bmcP8FBF95mV2oyCqMusA50a8k=; b=aX2QUgTEsBGFwZ43gz4vb6fLZOP3NlqESY6QfhGO6LESN10wGLjv7XZN9uha3shqz4 03WeqHlMsDHo0irVyRfFkudvHXQ9FmUo0j+UULpmNMroDBQgUNVMmUZ0u638GCmok98I HKnVEhBWgGiHmujYl2SBl/I1u4BOybiutNrnZetH0q1K803hbvV5MFG170dNoOufaYsu KpfiBuVqaDKqvWP0uLEajnMu6ynJRGtjwPID4kcaYeUbXEMyXGbjPxXYflWZFKA00EmW TsXEzsB19vgByIvfdMMGghmSS0c3fgLBMR06cWYNV6Y9snubxfsKembhuB4eslmT/smV sqqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=1AG6/xiGc9UTD06F0bmcP8FBF95mV2oyCqMusA50a8k=; b=bafo50W0cbsNtq2rHrdINdDgaxPp9tAMLLEKmPn4qVrW1tkoVhaWW0z8Q1JcnwMagG vEPxI79lWHypeNDf4974ARagZxDUjZiV17lDO762KW+xB7qf+fIEN0POkrCbE71y8sCf CnoN/zhKwbcek04YeoBtpHAMLNEBlM5Qh2rNEWOBLNi7fZ3PDJZjqBOkEH11RnysCAVN Ww70duGDpalpxaEza+5vMNlzDJ+f0MEDZ9xPLrLbxbzCF2L1g27bmKJ0L3awAKSpTqLk oVzOCxzvqKwG0zl6ukj6JXocjgMv5vglc1aQSMLzKc//CClTH3NB2fh1kuDnLEEJf8jP kC+w== X-Gm-Message-State: AN3rC/4FSMCS04KlIv7P4bWOucggqwCoKF4V7sHznDI3IQdFeJNLEJeC xnPwMntvtv9new8FH+Q= X-Received: by 10.223.132.39 with SMTP id 36mr1290435wrf.182.1493248579040; Wed, 26 Apr 2017 16:16:19 -0700 (PDT) Received: from [192.168.2.5] (2-230-140-245.ip202.fastwebnet.it. [2.230.140.245]) by smtp.gmail.com with ESMTPSA id f25sm738880wrf.13.2017.04.26.16.16.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Apr 2017 16:16:18 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_40C50CB3-E0E9-4A61-AF6A-B88070AA1763" Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: BUG #14632: Plus and minus operators inconsistency with leap years and year intervals. From: Pietro Pugni In-Reply-To: Date: Thu, 27 Apr 2017 01:16:13 +0200 Cc: Tom Lane , "pgsql-bugs@postgresql.org" Message-Id: <62AA1945-7282-4166-8991-E6EA4C9C37A5@gmail.com> References: <20170426182322.24371.95224@wrigleys.postgresql.org> <5752C491-B0EC-4D1E-AF97-5E1C8C793A8A@gmail.com> <9066.1493241918@sss.pgh.pa.us> To: "David G. Johnston" X-Mailer: Apple Mail (2.3124) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --Apple-Mail=_40C50CB3-E0E9-4A61-AF6A-B88070AA1763 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Wed, Apr 26, 2017 at 3:44 PM, Pietro Pugni > wrote: > I don't know if you intended to supersize your response but it ended = up that way in my mail client. It was my client (Mail on OS X) that messed up font size and just saw it = from the web browser.. > I'll agree that the age function has enough data available to it to = return 10 years in this case. >=20 > 28 days, target month is February in a non-leap-year (1922), convert = to 1 month. 11 months + 1 month =3D 12 months =3D 1 year. 9 years + 1 = year =3D 10 years. >=20 > But the provided answer is correct as well... This is the sort of ambiguity/inconsistency I was referring to. = Intervals need a context in order to have a meaning but they never gave = me issues except from leap years. So, I think it should be solved by = =E2=80=9Csimply=E2=80=9D threating leap years in a different way. = Intervals are used to approach a human meaning of time measure, what we = call =E2=80=9Cage=E2=80=9D. Leap years should represent a specific = exception IMHO. Kind regards, Pietro Pugni --Apple-Mail=_40C50CB3-E0E9-4A61-AF6A-B88070AA1763 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On Wed, Apr 26, 2017 = at 3:44 PM, Pietro Pugni <pietro.pugni@gmail.com> = wrote:
I don't know if you = intended to supersize your response but it ended up that way in my mail = client.
It was my client (Mail = on OS X) that messed up font size and just saw it from the web = browser..

I'll agree that the age = function has enough data available to it to return 10 years in this = case.

28 days, target month = is February in a non-leap-year (1922), convert to 1 month.  11 = months + 1 month =3D 12 months =3D 1 year.  9 years + 1 year =3D 10 = years.

But the provided answer = is correct as well...

This is the sort of = ambiguity/inconsistency I was referring to. Intervals need a context in = order to have a meaning but they never gave me issues except from leap = years. So, I think it should be solved by =E2=80=9Csimply=E2=80=9D = threating leap years in a different way. Intervals are used to approach = a human meaning of time measure, what we call =E2=80=9Cage=E2=80=9D. = Leap years should represent a specific exception = IMHO.

Kind = regards,
 Pietro Pugni

= --Apple-Mail=_40C50CB3-E0E9-4A61-AF6A-B88070AA1763--