Re: extend pgbench expressions with functions

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tomáš Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: extend pgbench expressions with functions
Date: 2015-11-07 07:45:59
Message-ID: alpine.DEB.2.10.1511070838210.12530@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> Thanks. Part 1 looks, on the whole, fine to me, although I think the
>> changes to use less whitespace and removing decimal places in the
>> documentation are going in the wrong direction. That is:
>>
>> - About 67% of values are drawn from the middle <literal>1.0 /
>> threshold</>
>> + About 67% of values are drawn from the middle <literal>1/param</>,
>>
>> I would say 1.0 / param, just as we used to say 1.0 / threshold. Any
>> reason why not?
>
> For the 1.0 -> 1, this because in the example afterwards I set param to 2.0
> and I wanted it clear where the one half was coming from, and ISTM that the
> 2.0 stands out more with "1 / 2.0" than with "1.0 / 2.0".
>
> For the spaces, this is because with just "1/" the space seemed less
> necessary for clarity, but it seemed necessary with "1.0 /"
>
> Now it is easy to backtrack.

After looking at the generated html version, I find that the "1/param" and
"2/param" formula are very simple and pretty easy to read, and they would
not be really enhanced with additional spacing.

ISTM that adaptative spacing (no spacing for level 1 operations, some for
higher level) is a good approach for readability, ie:

f(i) - f(i+1)
^ no spacing here
^ some spacing here

So I would suggest to keep the submitted version, unless this is a
blocker.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2015-11-07 11:38:18 Re: CustomScan support on readfuncs.c
Previous Message Michael Paquier 2015-11-07 07:36:26 Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled