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: tgl@sss.pgh.pa.us, rafia.sabih@enterprisedb.com, michael.paquier@gmail.com, Langote_Amit_f8@lab.ntt.co.jp, robertmhaas@gmail.com, pavel.stehule@gmail.com, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-04-17T06:34:53Z
Lists: pgsql-hackers

Attachments

Hello Tatsuo-san,

> Thank you for the patch. I tested a little bit and found that it does
> not allow value replacement against non ascii variables in given SQL
> statements . Is it intentional?

No, this is a bug.

> If not, I think you need to fix parseVariable() as well.

Indeed. Here is v2.

-- 
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.