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: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: extend pgbench expressions with functions
Date: 2015-11-05 10:34:50
Message-ID: alpine.DEB.2.10.1511051120110.29177@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Robert,

Here is a v13 and a small test script.

- change names to random(), random_exponential() and random_gaussian()
I find them too long, but if the committer want that I cannot help
it:-)

- more comments, especially about the expression evaluation &
type system.

- improved documentation, in particular to include suggestions by Tomas
Vondra about clarifying explanations about the gaussian &
exponential random generators, and clear references from \setrandom
to the \set expressions.

- still just one patch, because removing double would mean removing the 2
exponential & gaussian random functions which require a double
argument.

Note that I started with one small patch for adding the infrastructure,
but then Heikki requested more functions including double type stuff to
illustrate the point, then Robert asks to break it back, going forward
and backward is tiring...

- still "lousy" *debug functions, because I found them useful for
debugging and testing, really. It is easy to remove them, but I would
advise against doing that as it would make debugging an expression
much less straightforward.

--
Fabien.

Attachment Content-Type Size
pgbench-expr-abs-13.patch text/x-diff 38.7 KB
functions.sql application/x-sql 756 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2015-11-05 11:00:20 Re: Foreign join pushdown vs EvalPlanQual
Previous Message Evgeniy Shishkin 2015-11-05 09:45:31 Re: Yet another abort-early plan disaster on 9.3