Re: extend pgbench expressions with functions
От | Fabien COELHO |
---|---|
Тема | Re: extend pgbench expressions with functions |
Дата | |
Msg-id | alpine.DEB.2.10.1601291514010.6449@sto обсуждение исходный текст |
Ответ на | Re: extend pgbench expressions with functions (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: extend pgbench expressions with functions
|
Список | pgsql-hackers |
>> Also, a comment is needed to explain why such a bizarre >> condition is used/needed for just the INT64_MIN case. > > The last patch I sent has this bit: > + /* > + * Some machines throw a floating-point exception > + * for INT64_MIN % -1, the correct answer being > + * zero in any case. > + */ > How would you reformulate that à-la-Fabien? This one about modulo is fine. I was refering to this other one in the division case: + /* overflow check (needed for INT64_MIN) */ + if (lval != 0 && (*retval < 0 == lval < 0)) Why not use "if (lval == INT64_MIN)" instead of this complicated condition? If it is really needed for some reason, I think that a comment could help. -- Fabien.
В списке pgsql-hackers по дате отправления: