Re: add modulo (%) operator to pgbench

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: add modulo (%) operator to pgbench
Date: 2014-09-23 13:29:50
Message-ID: alpine.DEB.2.10.1409231516470.3297@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Johnston 2014-09-23 13:36:46 Re: RLS feature has been committed
Previous Message Robert Haas 2014-09-23 13:14:13 Re: RLS feature has been committed