pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pietro Pugni <pietro.pugni@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.
Date: Thu, 27 Apr 2017 01:16:13 +0200
Message-ID: <62AA1945-7282-4166-8991-E6EA4C9C37A5@gmail.com> (raw)
In-Reply-To: <CAKFQuwZCG0H_uXBQ1wK+_srF_cgm9jALE6PvkmAPWs1TtZgeOA@mail.gmail.com>
References: <20170426182322.24371.95224@wrigleys.postgresql.org>
	<CAKFQuwZ+PXKFrQ+LqOOorfva9nMesie0WQpe_hJTdkMn7vCZAw@mail.gmail.com>
	<5752C491-B0EC-4D1E-AF97-5E1C8C793A8A@gmail.com>
	<9066.1493241918@sss.pgh.pa.us>
	<F0C67D01-0A6C-4822-89D5-2286DD64C75F@gmail.com>
	<CAKFQuwZCG0H_uXBQ1wK+_srF_cgm9jALE6PvkmAPWs1TtZgeOA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

> On Wed, Apr 26, 2017 at 3:44 PM, Pietro Pugni <pietro.pugni@gmail.com <mailto: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 = 12 months = 1 year.  9 years + 1 year = 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 “simply” threating leap years in a different way. Intervals are used to approach a human meaning of time measure, what we call “age”. Leap years should represent a specific exception IMHO.

Kind regards,
 Pietro Pugni

view thread (25+ messages)  latest in thread

Message-ID: <62AA1945-7282-4166-8991-E6EA4C9C37A5@gmail.com>
Permalink:  ../62AA1945-7282-4166-8991-E6EA4C9C37A5@gmail.com/
Also on:    postgresql.org/message-id/62AA1945-7282-4166-8991-E6EA4C9C37A5@gmail.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pietro.pugni@gmail.com, david.g.johnston@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.
  In-Reply-To: <62AA1945-7282-4166-8991-E6EA4C9C37A5@gmail.com>
  References: <20170426182322.24371.95224@wrigleys.postgresql.org> <CAKFQuwZ+PXKFrQ+LqOOorfva9nMesie0WQpe_hJTdkMn7vCZAw@mail.gmail.com> <5752C491-B0EC-4D1E-AF97-5E1C8C793A8A@gmail.com> <9066.1493241918@sss.pgh.pa.us> <F0C67D01-0A6C-4822-89D5-2286DD64C75F@gmail.com> <CAKFQuwZCG0H_uXBQ1wK+_srF_cgm9jALE6PvkmAPWs1TtZgeOA@mail.gmail.com> <62AA1945-7282-4166-8991-E6EA4C9C37A5@gmail.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