Re: Have I found an interval arithmetic bug?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Have I found an interval arithmetic bug?
Дата
Msg-id 20210403030012.GH29126@momjian.us
обсуждение исходный текст
Ответ на Re: Have I found an interval arithmetic bug?  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
On Fri, Apr  2, 2021 at 07:53:35PM -0700, Zhihong Yu wrote:
> Bruce:
> In src/interfaces/ecpg/pgtypeslib/interval.c, how about the following places ?
> 
> Around line 158:
>                 case 'Y':
>                     tm->tm_year += val;
>                     tm->tm_mon += (fval * MONTHS_PER_YEAR);
> 
> Around line 194:
>                     tm->tm_year += val;
>                     tm->tm_mon += (fval * MONTHS_PER_YEAR);
> 
> Is rint() needed for these two cases ?

Ah, yes, good point.  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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Making wait events a bit more efficient
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: SQL-standard function body