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.1409231516470.3297@sto
Whole thread Raw
In response to Re: add modulo (%) operator to pgbench  (Stephen Frost <sfrost@snowman.net>)
Responses Re: add modulo (%) operator to pgbench
List pgsql-hackers
Hello Stephen,

>> But this is not convincing. Adding a unary function with a clean
>> syntax indeed requires doing something with the parser.
>
> Based on the discussion so far, it sounds like you're coming around to
> agree with Robert (as I'm leaning towards also) that we'd be better off
> building a real syntax here instead.

Not exactly.

My actual opinion is that it is really an orthogonal issue. ISTM that a 
similar code would be required somehow for the executor part of an 
hypothetical real syntax if it was to support modulo.

> If so, do you anticipate having a patch to do so in the next few days, 
> or...?

Developping a full expression syntax is a significant project that I'm not 
planing to undertake in the short or medium term, especially as I'm not 
convinced that it is worth it: It would involve many changes, and I'm 
afraid that the likelyhood of the patch being rejected on some ground is 
high.

So my opinion is that this small modulo operator patch is both useful and 
harmless, so it should be committed. If someday there is a nice real 
syntax implemented, that will be great as well.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: RLS feature has been committed
Next
From: David Johnston
Date:
Subject: Re: RLS feature has been committed