Re: Remove dependence on integer wrapping

Поиск
Список
Период
Сортировка
От Joseph Koshakow
Тема Re: Remove dependence on integer wrapping
Дата
Msg-id CAAvxfHdYnTB7BjkRSPO8__wxB3880TiYD-TVU2uW8q1KbzymPg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Remove dependence on integer wrapping  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
Thanks for the review!

On Mon, Jul 15, 2024 at 11:31 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>
>    I took a closer look at 0002.
>
>    I'm curious why you aren't using float8_mul/float8_div here, i.e.,
>
>            fresult = rint(float8_mul((float8) c, f));
>            fresult = rint(float8_div((float8) c, f));

I wrongly assumed that it was only meant to be used to implement
multiplication and division for the built-in float types. I've updated
the patch to use these functions.

>    nitpick: I'd name the functions something like "cash_mul_float8" and
>    "cash_div_float8". Perhaps we could also add functions like
>    "cash_mul_int64"

Done in the updated patch.

>    and "cash_sub_int64"

Did you mean "cash_div_int64"? There's only a single function that
subtracts cash and an integer, but there's multiple functions that
divide cash by an integer. I've added a "cash_div_int64" in the updated
patch.

The other patches, 0001, 0003, and 0004 are unchanged but have their
version number incremented.

Thanks,
Joe Koshakow
Вложения

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: Proposal for implementing OCSP Stapling in PostgreSQL