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

From Robert Haas
Subject Re: add modulo (%) operator to pgbench
Date
Msg-id CA+Tgmoa2vv_r9tLYQEpBw3xepxfZL04mz7F=kHYof8DYe5sYzg@mail.gmail.com
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
List pgsql-hackers
On Thu, Sep 11, 2014 at 2:47 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
> Ok. I do agree that an expression syntax would be great!
>
> 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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [REVIEW] Re: Compression of full-page-writes
Next
From: Arthur Silva
Date:
Subject: Re: Memory Alignment in Postgres