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

From Michael Paquier
Subject Re: [HACKERS] pow support for pgbench
Date
Msg-id CAB7nPqS4qLwC4fzqHAj0JOg33o=f7Z2fB5n31ZMOBNL+okbDUQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pow support for pgbench  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] pow support for pgbench
List pgsql-hackers
On Tue, Dec 5, 2017 at 5:38 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> 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.

It seems to me that 1 and 2 have value on their own for the workloads
tried to be emulated, so what you are suggesting in 3 looks good to
me. Now why are two different function names necessary? The parsing
takes care of argument types through PgBenchValue->type so having one
function exposed to the user looks like the most sensible approach to
me.
--
Michael


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error handling (or lack of it) in RemovePgTempFilesInDir
Next
From: Michael Paquier
Date:
Subject: Re: Error handling (or lack of it) in RemovePgTempFilesInDir