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

From Tom Lane
Subject Re: add modulo (%) operator to pgbench
Date
Msg-id 12172.1411480468@sss.pgh.pa.us
Whole thread Raw
In response to Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: add modulo (%) operator to pgbench  (Stephen Frost <sfrost@snowman.net>)
Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes:
> So my opinion is that this small modulo operator patch is both useful and 
> harmless, so it should be committed.

You've really failed to make that case --- in particular, AFAICS there is
not even consensus on the exact semantics that the operator should have.
So I'm inclined to reject rather than put in something that may cause
surprises down the road.  The usefulness doesn't seem great enough to
take that risk.

The way forward, if we think there is enough value in it (I'm not
sure there is), would be to build enough expression infrastructure
so that we could inexpensively add both operators and functions.
Then we could add a modulo operator with whatever semantics seem
most popular, and some function(s) for the other semantics, and
there would not be so much riding on choosing the "right" semantics.
        regards, tom lane



pgsql-hackers by date:

Previous
From: David Johnston
Date:
Subject: Re: RLS feature has been committed
Next
From: Stephen Frost
Date:
Subject: Re: tick buildfarm failure