pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Bryn Llewellyn <bryn@yugabyte.com>
Cc: Isaac Morland <isaac.morland@gmail.com>
Cc: John W Higgins <wishdev@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Have I found an interval arithmetic bug?
Date: Mon, 12 Apr 2021 12:18:42 -0400
Message-ID: <20210412161842.GA22319@momjian.us> (raw)
In-Reply-To: <CALNJ-vQkNfeM--i_L9XSpXsP_sj=UYFnAtF+u2ZhGUSe0PW6Cw@mail.gmail.com>
References: <E34DA978-0C0E-4F43-97CD-278FA0C228E5@yugabyte.com>
	<20210403022126.GG29126@momjian.us>
	<20210405163310.GP6592@telsasoft.com>
	<20210405180158.GB12179@momjian.us>
	<20210408172444.GC6909@momjian.us>
	<CALNJ-vR9s8zjGkUrxqLbK5GMS8Rn-o=dxb56gNSaWCHUKQZAvQ@mail.gmail.com>
	<CALNJ-vQE-W9K8b_XicbeR6CEkzUsA=CqarkwTLjudYTBpH90uw@mail.gmail.com>
	<CALNJ-vQkNfeM--i_L9XSpXsP_sj=UYFnAtF+u2ZhGUSe0PW6Cw@mail.gmail.com>

On Sun, Apr 11, 2021 at 07:33:34PM -0700, Zhihong Yu wrote:
> Among previous examples given by Bryn, the following produces correct result
> based on Bruce's patch.
> 
> # select interval '-1.7 years 29.4 months';
>     interval
> ----------------
>  9 mons 12 days

Yes, that changed is caused by the rounding fixes, and not by the unit
pushdown adjustments.

-- 
  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: <20210412161842.GA22319@momjian.us>
Permalink:  ../20210412161842.GA22319@momjian.us/
Also on:    postgresql.org/message-id/20210412161842.GA22319@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, zyu@yugabyte.com, pryzby@telsasoft.com, bryn@yugabyte.com, isaac.morland@gmail.com, wishdev@gmail.com, pgsql-hackers@postgresql.org, tgl@sss.pgh.pa.us
  Subject: Re: Have I found an interval arithmetic bug?
  In-Reply-To: <20210412161842.GA22319@momjian.us>
  References: <E34DA978-0C0E-4F43-97CD-278FA0C228E5@yugabyte.com> <20210403022126.GG29126@momjian.us> <20210405163310.GP6592@telsasoft.com> <20210405180158.GB12179@momjian.us> <20210408172444.GC6909@momjian.us> <CALNJ-vR9s8zjGkUrxqLbK5GMS8Rn-o=dxb56gNSaWCHUKQZAvQ@mail.gmail.com> <CALNJ-vQE-W9K8b_XicbeR6CEkzUsA=CqarkwTLjudYTBpH90uw@mail.gmail.com> <CALNJ-vQkNfeM--i_L9XSpXsP_sj=UYFnAtF+u2ZhGUSe0PW6Cw@mail.gmail.com> <20210412161842.GA22319@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