Re: add modulo (%) operator to pgbench - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: add modulo (%) operator to pgbench
Date
Msg-id alpine.DEB.2.10.1412311305510.8764@sto
Whole thread Raw
In response to Re: add modulo (%) operator to pgbench  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
Here is a review & updated version of the patch.

Patch applies and compiles without problem on current head,
and worked for the various tests I made with custom scripts.

This patch is a good thing, and I recommand warmly its inclusion. It 
extends greatly pgbench custom capabilities by allowing arbitrary integer 
expressions, and will allow to add other functions (I'll send abs() & a 
hash(), and possibly others).

I'm not sure about what Makefile changes could be necessary for
various environments, it looks ok to me as it is.

I have included the following additional changes in v2:

(1) small update to pgbench documentation. English proof reading is welcome.

(2) improve error reporting to display the file and line from where an error    is raised, and also the column on
syntaxerrors (yyline is always 1...).    The prior status was that there were no way to get this information, which
wasquite annoying.  It could probably be improved further.
 

(3) spacing fixed in a few places.

If Robert is ok with these changes, I think it could be applied.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Redesigning checkpoint_segments
Next
From: Tomas Vondra
Date:
Subject: Re: Initdb-cs_CZ.WIN-1250 buildfarm failures