Re: Have I found an interval arithmetic bug?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Have I found an interval arithmetic bug?
Дата
Msg-id 20210720225350.GB27025@momjian.us
обсуждение исходный текст
Ответ на Re: Have I found an interval arithmetic bug?  (Zhihong Yu <zyu@yugabyte.com>)
Ответы Re: Have I found an interval arithmetic bug?
Список pgsql-hackers
On Tue, Jul 20, 2021 at 02:33:07PM -0700, Zhihong Yu wrote:
> On Mon, Jul 19, 2021 at 9:14 PM Bruce Momjian <bruce@momjian.us> wrote:
> >     Obviously this should return '1 mon 26 days', but with my most recent
> >     patch, it returned '1 mon 25 days'.  Turns out I had not properly used
> >     rint() in AdjustFractDays, and in fact the function is now longer needed
> >     because it is just a multiplication and an rint().
>
> Patch looks good.
> Maybe add the statement above as a test case :
> 
> SELECT INTERVAL '1.8594 months' 

Good idea --- updated patch attached.

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

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


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: POC: GROUP BY optimization