Re: pgbench - allow to store select results into variables

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tatsuo Ishii <ishii@sraoss.co.jp>
Cc: rafia.sabih@enterprisedb.com, michael.paquier@gmail.com, tgl@sss.pgh.pa.us, Langote_Amit_f8@lab.ntt.co.jp, robertmhaas@gmail.com, pavel.stehule@gmail.com, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-08-13T18:33:32Z
Lists: pgsql-hackers

Attachments

Here is a v11.

It is basically a simple rebase after Tom committed the "pgbench -M order" 
patch. It interfered because the compound command management also needs
to delay part of the SQL command initialization. Some patch are luckier 
than others:-)

> Here is a v10:
>
> - does not talk about ASCII variable name constraint, as a patch has been
>   submitted independently to lift this constraint.
>
> - rename gcset to cset (compound set, \; + \set), where gset is ; + \set,
>   because "\gcset" looked really strange.
>
> - simplify the code a little bit.
>
> Also attached is an updated test script.
>
>

-- 
Fabien.

Commits

  1. pgbench: Remove \cset

  2. pgbench: add \cset and \gset commands

  3. Adjust pgbench to allow non-ASCII characters in variable names.

  4. Refactor script execution state machine in pgbench.

  5. Allow empty queries in pgbench.