Re: [HACKERS] pow support for pgbench

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Raúl Marín Rodríguez <rmrodriguez(at)carto(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] pow support for pgbench
Date: 2017-12-04 15:47:34
Message-ID: alpine.DEB.2.20.1712041643180.13084@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> Please add the new function into the documentation table in
>> alphabetical order.
>
> Fixed in the attached patch.

Yep. Patch applies cleanly. Make check & pgbench check ok. make html ok.
POW is in the right place in the table, sorry I did not check before.

> 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.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-12-04 15:50:53 Re: [HACKERS] [POC] Faster processing at Gather node
Previous Message Konstantin Knizhnik 2017-12-04 15:46:07 Re: [HACKERS] Cached plans and statement generalization