pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: John W Higgins <wishdev@gmail.com>
Cc: pgsql-hackers list <pgsql-hackers@lists.postgresql.org>
Subject: Re: Have I found an interval arithmetic bug?
Date: Fri, 30 Jul 2021 12:04:39 -0400
Message-ID: <20210730160439.GZ9600@momjian.us> (raw)
In-Reply-To: <20210728151916.GA15440@momjian.us>
References: <20210402234943.GB29126@momjian.us>
	<95D98B9E-CD54-4FAC-9574-D950E9741CAC@yugabyte.com>
	<20210403010229.GE29126@momjian.us>
	<20210727193614.GE19774@momjian.us>
	<456756.1627416114@sss.pgh.pa.us>
	<20210727211314.GA23040@momjian.us>
	<901454CE-2C0D-4C49-ADAB-A094C03B7CB1@yugabyte.com>
	<CAPhAwGyccJZT-mXzHU1216Q-Z_xY3q+4TixzZ2sZf3hiPFe5tg@mail.gmail.com>
	<CAEZATCWaK0qdTiqxS=fM03VaKcfbYmSOV_JzqYDrVn2nSaMnFQ@mail.gmail.com>
	<20210728151916.GA15440@momjian.us>

On Wed, Jul 28, 2021 at 11:19:16AM -0400, Bruce Momjian wrote:
> On Wed, Jul 28, 2021 at 08:42:31AM +0100, Dean Rasheed wrote:
> > So it's equal even without calling justify_interval() on the result.
> > 
> > FWIW, I remain of the opinion that the interval literal code should
> > just spill down to lower units in all cases, just like the
> > multiplication and division code, so that the results are consistent
> > (barring floating point rounding errors) and explainable.
> 
> Here is a more minimal patch that doesn't change the spill-down units at
> all, but merely documents it, and changes the spilldown to months to
> round instead of truncate.

Unless I hear more feedback, I plan to apply this doc patch to all
branches with the word "rounded" changed to "truncated" in the back
branches, and apply the rounded code changes to master.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.






view thread (95+ messages)  latest in thread

Message-ID: <20210730160439.GZ9600@momjian.us>
Permalink:  ../20210730160439.GZ9600@momjian.us/
Also on:    postgresql.org/message-id/20210730160439.GZ9600@momjian.us

 · 

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-general@postgresql.org
  Cc: bruce@momjian.us, dean.a.rasheed@gmail.com, wishdev@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Have I found an interval arithmetic bug?
  In-Reply-To: <20210730160439.GZ9600@momjian.us>
  References: <20210402234943.GB29126@momjian.us> <95D98B9E-CD54-4FAC-9574-D950E9741CAC@yugabyte.com> <20210403010229.GE29126@momjian.us> <20210727193614.GE19774@momjian.us> <456756.1627416114@sss.pgh.pa.us> <20210727211314.GA23040@momjian.us> <901454CE-2C0D-4C49-ADAB-A094C03B7CB1@yugabyte.com> <CAPhAwGyccJZT-mXzHU1216Q-Z_xY3q+4TixzZ2sZf3hiPFe5tg@mail.gmail.com> <CAEZATCWaK0qdTiqxS=fM03VaKcfbYmSOV_JzqYDrVn2nSaMnFQ@mail.gmail.com> <20210728151916.GA15440@momjian.us> <20210730160439.GZ9600@momjian.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