Re: [HACKERS] pow support for pgbench

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] pow support for pgbench
Дата
Msg-id CA+TgmoaNyQ-TDCvonMSLRV3_J3znc88TWZey4fWVgYTL-5wV+A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] pow support for pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [HACKERS] pow support for pgbench  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Mon, Dec 4, 2017 at 10:47 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
>> What's the name of the backend function whose behavior this matches?
>>
>> As Fabien has mentioned, it tries to behave as "numeric_power". Maybe we
>> it'd better if we switch to "dpow" (which is pow with some error handling)
>> and always return a double. What do you think?
>
> My 0.02€: I think that having a integer pow implementation when possible is
> a good think for pgbench, because the main use case is to deal with table
> keys in a benchmarking scripts, which are expected to be integers.

I'm willing to commit any of the following things:

1. A patch that adds an integer version of pow() but not a double version
2. A patch that adds a double version of pow() but not an integer version
3. A patch that adds both an integer version of pow() and a double
version of pow(), with the two versions having different names

If Raúl is happy with only having an integer version, then I suggest
that he adopt #1 and call it good.  Otherwise, given that Fabien wants
the double version, I suggest we call the integer version pow() and
the double version dpow() and go with #3.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: [HACKERS] Additional logging for VACUUM and ANALYZE
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Do we actually need an ItemId array on nbtree pages containingfixed-width tuples?