On Mon, Jan 18, 2016 at 10:07 AM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Sun, Jan 17, 2016 at 3:10 AM, Fabien COELHO <coe...@cri.ensmp.fr> wrote: >> I put the function evaluation in a function in the attached version. > > Thanks, this makes the code a bit clearer.
OK, so I had an extra look at this patch and I am marking it as ready for committer. A couple of things to be aware of, and the result of this thread with the patch in its current state: - The patch is keeping \setrandom. Fabien and I are agreeing to purely remove it, though it is kept in the patch because it is easier to remove existing code rather than add it again per Fabien's concerns. - INT64_MIN / -1 throws a core dump, and errors on HEAD. I think this should be fixed, Fabien does not. - There are not many overflow checks for the exiting int64 operators and functions. HEAD doesn't do much, this patch makes it the situation a bit worse even if there are a couple of checks for int() for example. We do not do any checks for sqrt(-N) (N > 0) for example. - It may be more interesting to have the function execution code into a separate file for clarity. Not mandatory though. Except those comments, all the other issues have been addressed. I think this is a great patch, and greatly improves the extensibility of pgbench. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers