Re: extend pgbench expressions with functions

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: extend pgbench expressions with functions
Date: 2015-12-18 21:56:24
Message-ID: alpine.DEB.2.10.1512182247380.13095@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Michael,

> It was definitely useful to debug the double/int type stuff within
> expressions when writing a non trivial pgbench script. It is probably less
> interesting if there are only integers.

After looking again at the code, I remembered why double are useful: there
are needed for random exponential & gaussian because the last parameter is
a double.

I do not care about the sqrt, but double must be allowed to keep that, and
the randoms are definitely useful for a pgbench script. Now the patch may
just keep double constants, but it would look awkward, and the doc must
explain why 1.3 and 1+2 are okay, but not 1.3 + 2.4.

So I'm less keen at removing double expressions, because it removes a key
feature. If it is a blocker I'll go for just the constant, but this looks
to me like a stupid compromise.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gaetano Mendola 2015-12-18 22:18:44 Re: pg_tables bug?
Previous Message Peter Geoghegan 2015-12-18 21:28:59 Re: Refactoring speculative insertion with unique indexes a little