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.1409250940140.15111@sto
Whole thread Raw
In response to Re: add modulo (%) operator to pgbench  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hello Robert,

> I think you're making a mountain out of a molehill.

Probably. I tend to try the minimum effort first.

> I implemented this today in about three hours.  The patch is attached.

Great!

Your patch is 544 lines, my size evaluation was quite good:-)

Note that I probably spent 10 minutes on the 10 lines patch, but I 
probably spent hours writing mails about it.

> It needs more testing, documentation, and possibly some makefile 
> adjustments, but it seems to basically work.

I'll try to do that, but not in the short term.

Note that the modulo is not the one I need, but probably I can make do 
with an abs() function and/or a conditional.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: David Johnston
Date:
Subject: Re: proposal: rounding up time value less than its unit.
Next
From: Fabien COELHO
Date:
Subject: Re: add modulo (%) operator to pgbench