Re: [HACKERS] pow support for pgbench - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] pow support for pgbench
Date
Msg-id alpine.DEB.2.20.1712041643180.13084@lancre
Whole thread Raw
In response to Re: [HACKERS] pow support for pgbench  (Raúl Marín Rodríguez <rmrodriguez@carto.com>)
Responses Re: [HACKERS] pow support for pgbench  (Robert Haas <robertmhaas@gmail.com>)
List 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.

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: [HACKERS] Cached plans and statement generalization
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] [POC] Faster processing at Gather node