Re: [HACKERS] pow support for pgbench

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Raúl Marín Rodríguez <rmrodriguez(at)carto(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-05 02:32:33
Message-ID: 25025.1512441153@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> On Tue, Dec 5, 2017 at 5:38 AM, Robert Haas <robertmhaas(at)gmail(dot)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

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

ISTM one key issue here is whether pgbench's expression language is
meant to model SQL (where we have function overloading) or C (where
there is no overloading). I don't think we've really settled on a
fixed policy on that, but maybe now is the time.

If we do think that function overloading is OK, there remains the
question of when the typing is resolved. I think Robert is objecting
to resolving at runtime, and I tend to agree that that's something
we'd regret in the long run. It doesn't match either SQL or C.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-12-05 02:38:33 Re: Error handling (or lack of it) in RemovePgTempFilesInDir
Previous Message Michael Paquier 2017-12-05 02:30:38 Re: Error handling (or lack of it) in RemovePgTempFilesInDir