Re: add modulo (%) operator to pgbench

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: 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-11 19:08:46
Message-ID: alpine.DEB.2.10.1409112101580.23473@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> However, that would not diminish nor change much the amount and kind of
>> code necessary to add an operator or a function
>
> That's not really true. You can't really add abs(x) or hash(x) right
> now because the current code only supports this syntax:
>
> \set varname operand1 [ operator operand2 ]
>
> There's no way to add support for a unary operator with that syntax.

Hmmm. If you accept a postfix syntax, there is:-)

But this is not convincing. Adding a unary function with a clean syntax
indeed requires doing something with the parser.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-09-11 19:08:53 Re: RLS Design
Previous Message Peter Geoghegan 2014-09-11 19:05:07 Re: about half processes are blocked by btree, btree is bottleneck?