Re: [HACKERS] pow support for pgbench

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] pow support for pgbench
Дата
Msg-id 20171227010322.GD1727@paquier.xyz
обсуждение исходный текст
Ответ на Re: [HACKERS] pow support for pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [HACKERS] pow support for pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Tue, Dec 26, 2017 at 11:26:58PM +0100, Fabien COELHO wrote:
> > This version looks good to me, except that I wonder if we should try to
> > switch to the floating-point version if the integer version would/does
> > overflow.
>
> My 0.02€ is that it is under the user control who provides either ints or
> doubles as arguments. So I do not think that we should bother, for what my
> opinion is worth.
>
> If this is a new requirement, detecting the integer overflow is probably
> possible with some testing, eg unexpected changes of sign, but that would
> probably add two tests per round, and probably double the computation cost.

And my 2c on the matter is that switching silently from one version to
the other would be unwelcome. The user should be aware if a test is
overflowing a number when specifying an integer.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [table partitioning] How many partitions are possibel?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] replace GrantObjectType with ObjectType