Re: pgbench more operators & functions

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench more operators & functions
Date: 2017-09-10 05:59:26
Message-ID: CAFj8pRDivVf3TGUGE23DTMgUkDdDAzrHuEydPQyTMPBYaKzByA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

2017-09-09 11:02 GMT+02:00 Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>:

>
> Hello Pavel,
>
> Here is a v13. No code changes, but TAP tests added to maintain pgbench
> coverage to green.
>
>
> Summary of patch contents:
>
> This patch extends pgbench expressions syntax while keeping compatibility
> with SQL expressions.
>
> It adds support for NULL and BOOLEAN, as well as assorted logical,
> comparison and test operators (AND, <>, <=, IS NULL...).
>
> A CASE construct is provided which takes advantage of the added BOOLEAN.
>
> Integer and double functions and operators are also extended: bitwise
> operators (<< & ...), exp/ln, mod() as synonymous to % (matching pg).
>
> Added TAP tests maintain pgbench source coverage to green (if you ignore
> lexer & parser generated files...).
>
>
> Future plans include extending and synchronizing psql & pgbench variable
> and expression syntaxes:
> - move expression parsing and evaluation in fe_utils,
> which would allow to
> - extend psql with some \let i <expression> cliend-side syntax
> (ISTM that extending the \set syntax cannot be upward compatible)
> and probably handle \let as a synonymous to \set in pgbench.
> - allow \if <expression> in psql instead of just \if <boolean>
> - add \if ... support to pgbench
> - maybe add TEXT type support to the expression engine, if useful
> - maybe add :'var" and :"var" support to pgbench, if useful
>
> There are already patches in the queue for:
> - testing whether a variable is defined in psql
> feature could eventually be added to pgbench as well
> - adding \gset (& \cset) to pgbench to get output of possibly
> combined queries into variables, which can be used for making
> decisions later in the script.
>
> --
> Fabien.

1. there are no any problem with compilation, patching
2. all tests passed
3. doc is ok

I'll mark this patch as ready for commiter

Regards

Pavel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-09-10 06:11:22 Re: Setting pd_lower in GIN metapage
Previous Message Jaime Casanova 2017-09-10 05:08:58 Re: generated columns